test: guard session-owned runtime invariants#1753
Closed
Michaelyklam wants to merge 1 commit intonesquena:masterfrom
Closed
test: guard session-owned runtime invariants#1753Michaelyklam wants to merge 1 commit intonesquena:masterfrom
Michaelyklam wants to merge 1 commit intonesquena:masterfrom
Conversation
Collaborator
|
Thanks @Michaelyklam — this shipped in v0.51.12 (commit GitHub didn't auto-close because the merge commit only references the squash-merged stage branch, not your fork's commit directly — closing manually for hygiene. Live now on https://get-hermes.ai/ and on existing installs after Release notes: https://github.com/nesquena/hermes-webui/releases/tag/v0.51.12 |
pull Bot
pushed a commit
to soitun/hermes-webui
that referenced
this pull request
May 6, 2026
… custom provider routing + session runtime invariants) Constituent PRs: - nesquena#1746 (@Michaelyklam) — shorten cron profile lock for manual runs (closes nesquena#1574, RETURNS from v0.51.11 deferral with queue-drain blocker fixed) - nesquena#1752 (@Michaelyklam) — route custom provider models dict selections (slice of nesquena#1240 umbrella) - nesquena#1753 (@Michaelyklam) — guard session-owned runtime invariants (refs nesquena#1694) nesquena#1746 v2 fix: result_queue.get(timeout=...) BEFORE process.join() (drain-then-join), with queue.Empty recovery + 200,000-char regression test. Opus stage-306 verified the fix correct + complete; the prior fork→spawn SHOULD-FIX filed as follow-up issue nesquena#1754 (separate architectural change). Tests: 4622 → 4632 passing (+10). 0 regressions. Stably green on first try. Pre-release verification: - All 3 PRs CI-green individually + rebased onto master with NO conflicts (disjoint files: api/config.py + static/messages.js + api/routes.py) - pytest 4632 passed, 0 failed - node -c clean on static/messages.js - 11/11 browser API endpoints PASS - Opus advisor: SHIP all 3, 0 MUST-FIX, 1 SHOULD-FIX filed as nesquena#1754 Closes nesquena#1574.
iosub
pushed a commit
to iosub/HERMES-hermes-webui2
that referenced
this pull request
May 6, 2026
…unct from PR nesquena#1753 PR nesquena#1753 (shipped v0.51.12) introduced the 3-way OR guard in done/error/cancel handlers: 'isActiveSession || !S.session || !INFLIGHT[S.session.session_id]'. The third disjunct ('no other inflight on the active pane') is the permissive fallback Opus stage-306 verified — it allows the active pane to idle when no other session is running, even when the completing stream is from a different session. PR nesquena#1761's centralizing helper _setActivePaneIdleIfOwner inadvertently dropped this disjunct, so a user viewing pane A (idle) while pane B completes in the background would not get pane A's composer state cleared. Restored: _setActivePaneIdleIfOwner now checks the same 3-way OR. Verified via: - node -c static/messages.js — clean - pytest tests/test_session_runtime_ownership_invariants.py tests/test_1694_terminal_cleanup_ownership.py — 9 passed Co-authored-by: dso2ng <dso2ng@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thinking Path
done/ settled-session terminal paths exposed a small leak: background completion could still callsetBusy(false)and stop the active pane's approval/clarify pollers.What Changed
tests/test_session_runtime_ownership_invariants.pycovering:session.active_stream_id;doneand settled-session fallback completion do not idle an unrelated active pane;LIVE_STREAMSandINFLIGHTremain session-keyed.static/messages.jsso background terminal events:Refs #1694.
Why It Matters
This protects the core Milestone 2 streaming invariant: a long-running turn can finish, cancel, or error in the background without tearing down the runtime state for the session the user is currently viewing.
Verification
python -m pytest tests/test_session_runtime_ownership_invariants.py -qfailed on the unguardeddone/poller cleanup paths before the implementation./home/michael/.hermes/hermes-agent/venv/bin/python -m pytest tests/test_session_runtime_ownership_invariants.py -q->5 passed./home/michael/.hermes/hermes-agent/venv/bin/python -m pytest tests/test_session_runtime_ownership_invariants.py tests/test_sprint36.py tests/test_sidebar_first_turn_visibility.py tests/test_streaming_session_sidebar.py -q->29 passed.env -u HERMES_CONFIG_PATH -u HERMES_WEBUI_HOST /home/michael/.hermes/hermes-agent/venv/bin/python -m pytest tests/ -q->4601 passed, 2 skipped, 3 xpassed, 1 warning, 8 subtests passed.git diff --checkpassed.Risks / Follow-ups
SESSION_RUNTIMEregistry; design(streaming): clarify session-scoped runtime ownership for running WebUI sessions #1694's broader durable runtime/WAL decisions remain design follow-up work.Model Used
OpenAI Codex
gpt-5.5via Hermes Agent CLI, with terminal/file/GitHub tooling.