Conversation
|
Follow-up pushed in Why: local dogfood has a real hphone presence directory exported, and that exposed test contamination in the original branch. Validation after the follow-up: uv run --extra dev python -m pytest tests/hermes_cli/test_session_presence.py tests/test_tui_gateway_server.py -k 'session_presence or session_active_list'Result: 6 passed, with the ambient hphone presence env still present. |
|
Local MeshBoard settlement update:
So this is ready for maintainer-side CI/status/merge handling from the upstream repo namespace. |
9c5a0e7 to
b1d7e9d
Compare
|
Resolved branch drift against current upstream Updated head: Conflict notes:
Verification run locally:
GitHub now reports the PR as open/blocked rather than dirty; no checks are currently reported on the branch. |
|
Repaired branch drift against current upstream/main again. Updated head: 35537585c Conflict notes:
Verification:
Note: this fresh repair worktree needed npm ci --workspace apps/desktop first; npm reported the existing @icons-pack/react-simple-icons Node >=24 warning on Node 22.22.3. |
|
Pushed a small CI follow-up to repair the attribution check on this refreshed branch. What changed:
Verification:
|
|
The Docker build failure on the refreshed head was a GitHub Actions cache blob miss during the build context copy (HTTP 404 BlobNotFound), not a source failure. The rerun endpoint rejected the completed workflow, so I pushed an empty CI retrigger commit to the PR branch. Product diff is unchanged from the attribution-map repair; waiting on the fresh check run now. |
|
Correction to my previous note: the empty CI retrigger commit is |
ed7112b to
3d9e268
Compare
|
Ready for maintainer merge. I refreshed/rebased this branch onto the current upstream line and re-ran local verification: py_compile for the session presence/gateway files, focused session_presence tests, targeted TUI gateway presence tests, desktop typecheck, ui-tui typecheck, and git diff --check. GitHub required checks are green. MeshBoard dry-run accepted it as ready; the actual merge attempt is blocked only by my token lacking upstream MergePullRequest permission. |
3d9e268 to
e73ac9a
Compare
e73ac9a to
a36d542
Compare
8ded2d4 to
1be4b88
Compare
|
Re-authored onto current Desktop UI: rebuilt, not restoredThe original diff added a bespoke
Backend/substrate ported as-authored: Verified headless
Needs manual QA (not verifiable headless)
|
1be4b88 to
c7004b0
Compare
|
Refreshed onto current upstream/main (rebase, real merge-base — this branch's fork point is directly in upstream/main's history). One conflict, in |
teknium1
left a comment
There was a problem hiding this comment.
Thanks for the substantive presence substrate and the focused registry tests. I found several blockers before this can provide the documented cross-device Desktop flow.
Problems
apps/desktop/src/app/chat/sidebar/index.tsx:209declaresonOpenPresenceSession, butChatSidebarnever consumes it. Lines 346-362 only add presence IDs to existing rows' working-dot set; remote-only records cannot be rendered or opened. This conflicts withdocs/session-presence.md:77-80.- Presence expires after 90 seconds (
hermes_cli/session_presence.py:21,95). The PR publishes only from_init_session, live-payload attachment, andsession.active_list(tui_gateway/server.py:4745,6132,6173), while Desktop polls onlysession.presence_list. session.presence_listreads launch_hermes_home(tui_gateway/server.py:6185-6188) although writes may useprofile_home(6033-6072); resumed sessions publish beforeprofile_homeis restored (5885-5908).
Suggested changes
- Use a profile-aware
config.yamlpresence configuration rather than the documented non-secretHERMES_SESSION_PRESENCE_*controls. - Add lifecycle-owned refresh and multi-profile write/list/clear coverage.
- Render actionable presence rows, or narrow the Desktop/documentation claim.
This is an automated hermes-sweeper review.
| @@ -204,6 +206,7 @@ interface ChatSidebarProps extends React.ComponentProps<typeof Sidebar> { | |||
| onLoadMoreSessions: () => Promise<void> | void | |||
| onLoadMoreProfileSessions?: (profile: string) => Promise<void> | void | |||
| onLoadMoreMessaging?: (platform: string) => Promise<void> | void | |||
| onOpenPresenceSession?: (record: SessionPresenceRecord) => void | |||
There was a problem hiding this comment.
onOpenPresenceSession is never destructured or invoked by ChatSidebar; the presence data only contributes IDs to workingSessionIdSet. A remote-only presence record therefore has no row to click and cannot follow this route. Please render and wire an actionable presence row, or remove the dormant path and narrow the documentation.
| @@ -4727,6 +4742,7 @@ def _init_session( | |||
| # session startup resilient). | |||
| pass | |||
| _wire_callbacks(sid) | |||
| _publish_session_presence(sid, _sessions.get(sid) or {}) | |||
There was a problem hiding this comment.
This is one of the only publication paths. Desktop adds a session.presence_list poll, not an active_list poll, and session.create does not reach this _init_session path. With the 90-second TTL, a Desktop-created live session can be absent or expire without an independent lifecycle refresh.
| rid, | ||
| { | ||
| "sessions": list_session_presence( | ||
| hermes_home=_hermes_home, |
There was a problem hiding this comment.
Records may be written under session.profile_home by _session_presence_home, but this reader is pinned to launch _hermes_home. In addition, resume publishes before profile_home is restored. Define and test a single profile-aware read/write/clear scope so records do not become invisible or stale across profiles.
| $HERMES_HOME/session-presence/active/ | ||
| ``` | ||
|
|
||
| Set `HERMES_SESSION_PRESENCE_DIR` to place records in any other private shared |
There was a problem hiding this comment.
This introduces a documented non-secret HERMES_* behavioral configuration surface. Repository policy requires behavioral settings to be configured through config.yaml; please move the storage/endpoint/profile settings there (an internal compatibility bridge is fine if required).
Reapply Hermes session presence discovery (hermes_cli/session_presence.py, the tui_gateway/server.py wiring, desktop sidebar/session-actions presence UI, and docs/evidence) onto the post-history-replacement mainline. Conflict resolution (tui_gateway/server.py, one spot): upstream changed _notify_session_boundary's signature to take a third `_session_source(session)` argument (used consistently everywhere else in the file) since this branch was opened. Kept the PR's new clear_session_presence(...) cleanup block on session finalize, and called _notify_session_boundary with upstream's current 3-arg form instead of the PR's original 2-arg call. The other 13 files (5 more auto-merge candidates plus 8 pure additions) applied with zero conflict. Ran the touched-module suites locally: tests/hermes_cli/test_session_presence.py, tests/test_tui_gateway_server.py — 323 passed. `tsc --noEmit` clean in both apps/desktop and ui-tui. Refresh of PR NousResearch#40814; original head 1be4b8870875a492959163ff1891e2b43d635040.
c7004b0 to
b7337d0
Compare
GottZ
left a comment
There was a problem hiding this comment.
This was generated by AI during triage.
Summary
Two PRs address the live-session continuity complex: #40814 adds presence discovery, publication, polling, and activation scaffolding, while #40822 contains that stacked presence work plus multi-client event fanout. The diffs target distinct layers, but both retain correctness gaps that prevent the documented end-to-end flow.
Related pull requests
- #40814
related— (+775/-4) — keep open with a salvage path: the registry, presence RPC, lifecycle hooks, and focused tests are reusable, but the diff only marks existing sidebar rows as working and never consumesonOpenPresenceSession, so remote-only records cannot be rendered or opened as documented; publication also lacks a periodic refresh for the 90-second TTL, and reads are not consistently profile-aware. This follows the contributor keep_open review on #40814 and requires its UI, refresh, profile-home, andconfig.yamlblockers to be addressed. - #40822
related— (+1114/-36) — author action: rebase onto main, or split out the part that can merge: preserve the fanout-specificFanoutTransport, attach/detach lifecycle, stale-client handling, and regression tests, but separate them from the full #40814 presence stack. This follows the contributor keep_open review on #40822: the diff still assignsqueued["transport"]in the queued-prompt drain path rather than preserving fanout, and the inherited presence settings must be moved from user-facing environment variables toconfig.yaml.
Duplicates
#40822 is stacked on #40814 and therefore duplicates #40814's presence, Desktop, documentation, and registry changes; only #40822's fanout-specific gateway transport changes and tests are distinct. It should not be treated as a wholesale duplicate while that delta remains unsplit.
Suggested consolidation
Keep #40814 open with a salvage path limited to the presence registry/RPC and tests, with author action required to implement a usable remote-only Desktop row, periodic TTL refresh, profile-consistent storage, and config.yaml configuration. For #40822, author action: rebase onto main, or split out the fanout-only delta and add a two-client queued-prompt regression fix using the shared attach path; once split, the duplicated #40814 portion can be dropped rather than maintained in both PRs. These actions explicitly preserve both contributor keep_open reviews and do not recommend merging either current diff.
Cross-PR triage: Reviewed 2 pull requests and 0 issues in this complex. Each diff was read against this issue; Assessment working set: 101 kB of PR diffs, 9 kB of issue/PR text, 14 kB of discussion (20 comments), 0 verify verdicts. verdicts reflect diff content, not PR titles. Part of an automated triage batch.
Why
Hermes needs a generic way for separate client surfaces to discover live sessions without hard-coding one private setup, sync tool, or device topology. This PR adds discovery metadata only; it does not make endpoint hints executable and it does not introduce a new transport, so other installations can adopt the mechanism with their own gateway/profile wiring.
The concrete dogfood target is the same Hermes session showing up from hphone and Hermes Desktop on macOS, with the Desktop able to attach through an already configured gateway profile.
What changed
hermes_cli.session_presencewrites, lists, clears, expires, and deduplicates secret-free JSON presence records so sync-conflict files and same-endpoint successor records collapse to the newest live record.presence_client,presence_endpoint,presence_profile), includes asession_idcompatibility alias onsession.active_list, and exposessession.presence_listover JSON-RPC.HERMES_CLIENT_NAME,HERMES_SESSION_PRESENCE_ENDPOINT, andHERMES_SESSION_PRESENCE_PROFILEwhen creating a session.session.activate, falling back tosession.resumewhen only stored history is available.HERMES_SESSION_PRESENCE_DIR, record shape, expiration, and optional private endpoint hints.How to review
Start with
hermes_cli/session_presence.pyfor the portable record contract, then reviewtui_gateway/server.pyfor how live sessions publish those records without secrets. After that, check the Desktop hook/sidebar changes to confirm a presence row only uses configured profiles and existing JSON-RPC attach/resume paths.For UI review, focus on the Desktop Live row behavior: it should be compact, readable, and two-line rather than clipped into one crowded row.
Evidence
session.presence_listreturned one livehphonerecord forqwen3.6-27bon profiletaro; the Desktop sidebar rendered that as a single two-line LIVE row.20260606_174039_e478af, and the remote taro gateway accepted the attach WebSocket for the hphone runtime.qwen3.6-27bprovider path returnedokthrough a one-shot Hermes CLI prompt after the hphone reset/restart.session.activatecompatibility.Verification
uv run --extra dev python -m pytest tests/hermes_cli/test_session_presence.py tests/test_tui_gateway_server.py -k 'session_active_list_publishes_presence or session_presence_list_reads_registry or session_activate_switches_live_session_without_closing_siblings or session_presence'returned 8 passed on head690df0d835be6467ac3f18aad2fc5fceacd985e2.npm --workspace ui-tui run buildcompleted successfully.npm --prefix apps/desktop run type-checkcompleted successfully.npm exec eslint src/app/desktop-controller.tsx src/app/chat/sidebar/index.tsx src/app/session/hooks/use-session-actions.ts src/types/hermes.tsfromapps/desktopcompleted successfully.python3 -m compileall -q tui_gateway/server.py hermes_cli/session_presence.py && git diff --checkcompleted successfully.Risks / gaps
session.activatecan attach.hermes-mesh-session-continuity-substrate: [hermes-mesh-session-continuity-substrate][2/n] Add live session transport fanout #40822 handles same-gateway multi-client event fanout, and feat(tui): multiline status bar layout for narrow terminals + context pressure colors #40850 handles narrow mobile TUI statusbar layout.Collaborators
Participants:
ko-macand hphone/taro dogfood target.ko-mac, implementation and verification lane.Process:
Task context:
hermes-mesh-session-continuity-substrate.Related work:
hermes-mesh-session-continuity-substrate.