11 Commits

Author SHA1 Message Date
teknium1 ebe11403c6 fix(gateway): a profile named 'main' gets its own session namespace
`main` is a valid profile name (only hermes/default/test/tmp/root/sudo are
reserved), but _session_key_namespace mapped it to `agent:main` — the default
profile's namespace. Both profiles then built byte-identical keys: one routing
entry, one cached agent, and, since 75ae2859b9 pinned default-namespace
keys to the launch store, profiles/main's scoped sessions were written into
the ROOT state.db instead of profiles/main/state.db.

Key the `main` profile as `agent:main~` (`~` is outside the profile-id
alphabet, so the marked form cannot be any other profile's id) and give the
namespace slot one inverse, profile_from_session_key_namespace, used by the
store's key parser, _parse_session_key, the update-marker profile reader and
the profile-delete eviction prefix. Default keys stay byte-identical.
2026-09-13 15:41:01 -07:00
Teknium 1ec22acca0 fix(gateway): stop departed session heartbeats at reset boundaries
Clear the departed schedule using the route-owned database when ending a conversation, so stale watches cannot fire after reset and resuming the archived session cannot resurrect the schedule. Compression migration already archives its parent and remains unchanged.

Adjacent lifecycle reports: #80273 by pierrenode and #80208 by 0xGr1mm. This follow-up covers durable reset cleanup, not their poller changes.
2026-09-07 14:16:57 -07:00
Teknium 34e512ae58 fix(sessions): remove remaining timer migration and guidance 2026-09-07 06:10:54 -07:00
Teknium 1d5d059410 fix(gateway): stop time-triggered conversation rotation 2026-09-07 06:10:54 -07:00
Teknium e83816a4d1 review-fix(comments): restore lost #NNNN rationale comments across non-test source (mechanical sweep, condensed, code unchanged)
For each issue anchor present in BASE 63279301bc non-test .py and absent on HEAD, the BASE comment/docstring block was re-attached at the HEAD location of the code it explained (matched by the distinctive code line / enclosing def). Sentences already covered by an existing HEAD comment were deduped; the issue number always survives. Insert-only: no code lines changed.
2026-09-03 09:44:26 -07:00
Teknium f6c2c1a80a refactor(gateway): session mixins — compact docstrings/comments, fold short call sites (AST-identical) 2026-09-02 20:52:08 -07:00
Teknium 46258d89c5 refactor(gateway): session — rewrap comment/docstring paragraphs to 100 cols 2026-09-02 19:38:43 -07:00
Teknium 75fdd85316 refactor(gateway): session — pack exploded argument lists 2026-09-02 19:36:48 -07:00
Teknium 4f943a1cdd refactor(gateway): session — hug short parameter/argument lists 2026-09-02 19:33:00 -07:00
Teknium ef4f0f4f61 refactor(gateway): session — checkpoint: phase helpers for get_or_create_session, shared clock/id helpers in lifecycle, context/state/stall folding 2026-09-02 19:21:38 -07:00
Teknium d7bdf2788d refactor(gateway/session): split SessionStore into persistence/recovery/lifecycle/transcript mixins by call-graph cohesion; compact wire helpers 2026-09-02 16:15:42 -07:00