Commit Graph

1212 Commits

Author SHA1 Message Date
Hermes Agent fcc9329ae5 Stage 367: PR #2365 — Fix: support YAML list format for custom_providers.models in model dropdown by @mccxj 2026-05-16 05:43:27 +00:00
BonyFish b48e44a24a Add tests for list-format custom_providers.models
Covers 9 scenarios: plain string list, dict list, unnamed provider,
mixed formats, dedup, empty list, fallback keys, @-prefix routing,
and mixed list/dict items from multiple providers.
2026-05-16 05:43:09 +00:00
Frank Song 80be1d08dc Fix Markdown table cell paragraph spacing 2026-05-16 05:43:04 +00:00
Frank Song 433ad29939 Fix compression reference card anchoring 2026-05-16 04:25:22 +00:00
Hermes Agent 4dac7940e7 Stage 365: PR #2348 — Suppress interim text echoes in Thinking cards by @franksong2702 2026-05-16 04:08:42 +00:00
Frank Song d94320b4bf Avoid duplicate Thinking echo helper names 2026-05-16 04:07:03 +00:00
Frank Song dd5f3ff9b5 Suppress interim text echoes in Thinking cards 2026-05-16 04:07:03 +00:00
Frank Song 40f69a2b75 Keep recovered pending turns in context 2026-05-16 04:07:02 +00:00
Hermes Agent b293bf8bc5 stage-364: Opus-caught live SSE event_id fix (side-channel approach)
Replace the earlier frontend-reset approach with a backend side-channel
approach that preserves the queue (event, data) tuple shape.

Problem (Opus catch):
- Live SSE frames emitted by _sse() in api/streaming.py:2296 carried no
  'id:' field. Only journal-replay frames (via _sse_with_id) emitted IDs.
- Frontend's _lastRunJournalSeq cursor stayed at 0 during live streaming.
- Mid-stream error → reconnect-to-replay arrived with after_seq=0.
- Server replayed every journaled event from seq 1.
- assistantText (closure-scoped) had accumulated all live tokens already
  → double-rendered output.

Fix:
- api/config.py: STREAM_LAST_EVENT_ID: dict = {} module-level dict.
- api/streaming.py put(): capture journal event_id, write to
  STREAM_LAST_EVENT_ID[stream_id]. Keep queue tuple as (event, data).
- api/routes.py _handle_sse_stream: read STREAM_LAST_EVENT_ID[stream_id]
  at emit time, use _sse_with_id when set.
- api/streaming.py finally block: pop STREAM_LAST_EVENT_ID for cleanup.

Why side-channel instead of 3-tuple:
- Earlier attempt (queue tuple → (event, data, event_id)) broke 4 existing
  tests: test_cancel_interrupt, test_sprint42, test_sprint51,
  test_issue1857_usage_overwrite. These all unpack 'event, data = q.get()'.
- Frontend-reset approach (reset assistantText before replay) broke 3
  other tests: test_smooth_text_fade, test_streaming_markdown,
  test_streaming_race_fix. _wireSSE must NOT reset accumulators because
  legacy reconnect doesn't replay events; only journal-replay does.

Side-channel preserves both invariants:
- Queue contract stays (event, data) — legacy consumers unbroken.
- Frontend accumulators stay alive on _wireSSE — legacy reconnect unbroken.
- Live SSE emits 'id:' so the journal cursor advances correctly.

6 regression tests added in test_stage364_opus_live_sse_event_id.py.
1 existing test (test_run_journal_streaming_static.test_streaming_journals_sse_events_before_queue_delivery) updated to be tuple-shape-agnostic.

Test results:
- Full pytest: 5713 passed, 10 skipped, 1 xfailed, 2 xpassed, 0 failed
- Previously-failing 5 tests: ALL PASS
- 6 new regression tests: ALL PASS
2026-05-16 03:58:54 +00:00
Hermes Agent f3b0c2cb5f stage-364: Opus-caught replay double-render fix + regression test
Opus advisor caught that the new run-journal replay path could double-render
when the live stream errors mid-stream:

- Live SSE frames emitted by _sse() in api/streaming.py:2296 carry no 'id:'
  field. Only _sse_with_id() (used in _replay_run_journal at routes.py:5853)
  emits IDs.
- During live streaming, EventSource.lastEventId stays empty, so the frontend's
  _lastRunJournalSeq stays at 0.
- If the server dies mid-stream, the error reconnect handler opens replay with
  after_seq=0 — server replays every journaled event from seq 1.
- assistantText accumulator (closure scope in messages.js) carries over from
  the live phase. The token handler unconditionally appends d.text. Double-
  rendered text.

Fix: reset assistantText, reasoningText, liveReasoningText, segmentStart, and
set _smdReconnect=true before opening the replay EventSource. Next live token
clears assistantBody.innerHTML to match the reset accumulator.

4 regression tests added in test_stage364_opus_replay_doublerender_fix.py.
Revert-fix verification confirms 3/4 tests fail against reverted code.

This is the TWO-LAYER catch in action: agent self-verified the producer→
consumer chain works end-to-end (Step 3 in agent-side-empirical-verification.md
PASSED for #2283), and Opus independently caught a separate frontend coupling
issue. Both checks required and both fire.
2026-05-16 03:28:07 +00:00
Hermes Agent c0662a4624 Stage 364: PR #2283 — Add WebUI run event journal replay by @franksong2702 2026-05-16 03:08:35 +00:00
Hermes Agent e38a4260eb Stage 364: PR #2343 — feat: clarify profiles and workspaces by @Michaelyklam 2026-05-16 03:08:34 +00:00
Frank Song a3eace4380 Preserve SSE handler test shape 2026-05-16 02:58:34 +00:00
Frank Song 80d8d4b42c Address run journal replay review 2026-05-16 02:58:34 +00:00
Frank Song 3b96035af0 Add WebUI run event journal replay 2026-05-16 02:58:34 +00:00
Michael Lam b373f090bd feat: clarify profiles and workspaces 2026-05-16 02:58:33 +00:00
Frank Song 685b075dd0 Avoid touching updated_at during stale stream cleanup 2026-05-16 02:58:33 +00:00
Hermes Agent 8399a1ade4 Stage 363: PR #2339 — feat: add workspace panel edge reopen toggle by @Michaelyklam 2026-05-16 02:39:23 +00:00
Hermes Agent 2f633ae32e Stage 363: PR #2342 — Fix pending user row on active reattach by @franksong2702 2026-05-16 02:39:23 +00:00
Hermes Agent 0d70ed9e26 Stage 363: PR #2334 — fix: lock turn journal appends by @Michaelyklam 2026-05-16 02:38:53 +00:00
Frank Song 2162dab4a5 Fix pending user row on active reattach 2026-05-16 10:34:55 +08:00
Michael Lam 4d613e723f feat: add workspace panel edge reopen toggle 2026-05-15 18:33:27 -07:00
Michael Lam 0e91f89ce3 fix: clear runtime fields on loaded compression snapshots 2026-05-15 17:55:35 -07:00
Michael Lam 4dbf6712dc fix: lock turn journal appends 2026-05-15 16:39:45 -07:00
Hermes Agent 2161b81da2 Revert "Merge pull request #2323 into stage-362"
This reverts commit 0651fe13b0, reversing
changes made to 1e6ce3d2e7.
2026-05-15 23:22:44 +00:00
Hermes Agent 0651fe13b0 Merge pull request #2323 into stage-362
fix: isolate background worker profile env (Michaelyklam, closes #2321)

# Conflicts:
#	CHANGELOG.md
2026-05-15 22:55:39 +00:00
Hermes Agent 1e6ce3d2e7 Merge pull request #2328 into stage-362
fix: clean session attachment and stream recovery leftovers (Michaelyklam, closes #2325)
2026-05-15 22:55:37 +00:00
Hermes Agent 59f73ba45a Merge pull request #2332 into stage-362
feat: show cron output usage metadata (Michaelyklam)
2026-05-15 22:55:36 +00:00
Hermes Agent 62e4d9b2f5 Merge pull request #2327 into stage-362
fix: use assistant name in cancel copy (dotBeeps)
2026-05-15 22:55:35 +00:00
Hermes Agent 300571936c Merge pull request #2331 into stage-362
fix: show readable live activity progress (Michaelyklam)

# Conflicts:
#	CHANGELOG.md
2026-05-15 22:55:33 +00:00
Hermes Agent 94be64b62c Merge pull request #2330 into stage-362
fix: skip provider mismatch for named custom providers (Michaelyklam)
2026-05-15 22:55:32 +00:00
Hermes Agent 5ab2ebed2e Merge pull request #2322 into stage-362
fix: route endpoint-discovered Ollama models correctly (Michaelyklam)
2026-05-15 22:55:30 +00:00
Hermes Agent 8b6673a3d1 Merge pull request #2326 into stage-362
fix: expand legacy Hermes CLI toolset alias (Michaelyklam, closes #2232)
2026-05-15 22:55:29 +00:00
Michael Lam 6799ec56cf test: retarget compression snapshot runtime regression 2026-05-15 15:29:28 -07:00
Michael Lam 8186577c7b feat: show cron output usage metadata 2026-05-15 14:54:20 -07:00
Michael Lam 2e039ab7f7 fix: show readable live activity progress 2026-05-15 14:11:58 -07:00
Michael Lam 5a2137bedb fix: skip provider mismatch for named custom providers 2026-05-15 13:50:18 -07:00
Michael Lam c991f36021 fix: clean session attachment and stream recovery leftovers 2026-05-15 13:30:46 -07:00
Michael Lam 2fdc1d99e2 fix: expand legacy Hermes CLI toolset alias 2026-05-15 13:08:22 -07:00
dot 🐶 3add6f450f fix: use assistant name in cancel copy
Replace the hardcoded Skyly cancellation wording with the configured bot_name from settings, falling back to Hermes when unset.

Keep the client-side fallback in sync by using window._botName if the session refresh after cancellation fails.

Co-authored-by: Obryn 🐉 <obryn-ai@dotbeeps.dev>
2026-05-15 16:00:30 -04:00
Hermes Agent 29d13953d6 stage-361: apply Opus SHOULD-FIX — allow _attachment_root() in _build_native_multimodal_message 2026-05-15 19:55:34 +00:00
Michael Lam ff9e20f132 fix: isolate background worker profile env 2026-05-15 12:47:24 -07:00
Hermes Agent 0a4d9679fc Merge pull request #2319 into stage-361
feat: store chat uploads outside workspace root (Michaelyklam)
2026-05-15 19:17:08 +00:00
Hermes Agent ab749575df Merge pull request #2318 into stage-361
fix: defer mobile stream errors while tab is hidden (Michaelyklam, closes #2307)

# Conflicts:
#	CHANGELOG.md
2026-05-15 19:17:06 +00:00
Hermes Agent 74ee110b2f Merge pull request #2315 into stage-361
Seed bundled skills for WebUI profile creation (Michaelyklam, closes #2305)

# Conflicts:
#	CHANGELOG.md
2026-05-15 19:17:04 +00:00
Hermes Agent 62413067e6 Merge pull request #2317 into stage-361
fix: preserve explicit light/dark theme fallback (Michaelyklam, refs #2312)
2026-05-15 19:17:03 +00:00
Michael Lam 512c401e8a fix: route endpoint-discovered Ollama models correctly 2026-05-15 12:16:23 -07:00
Michael Lam 3ead446f14 feat: store chat uploads outside workspace root 2026-05-15 11:52:23 -07:00
Michael Lam aeda75271c fix: defer stream errors while mobile tabs are hidden 2026-05-15 11:25:53 -07:00
Hermes Agent 803ab170d8 stage-360: align test_sprint29::TestENVLock with non-reentrant invariant from QA
#2299 added test_env_lock_importable_from_streaming asserting reentrance,
which contradicts the architectural invariant enforced by QA
test_env_lock_is_non_reentrant. The QA test wins because the non-reentrant
property is what makes _ENV_LOCK catch deadlock bugs early.

Updated the new test to assert NON-reentrance to match the actual lock
type (threading.Lock) and the QA invariant.
2026-05-15 17:12:29 +00:00