Repository navigation
fix(turn-handoff): discard saved handoff at conversation boundaries (C4 backfill) - #1347
Conversation
A turn handoff is keyed by the stable gateway chat key and recorded the session_id but never checked it on consume. /new, /reset, idle/daily auto-reset and /resume rotate the session id under the same key, so the first turn of the next conversation injected the discarded conversation's request, results and tool re-issue instruction. SessionStore now deletes the key's handoff wherever it mints or switches the session id (reset_session, switch_session, get_or_create new candidate). Compression advances via advance_compression_session and is untouched, so the same conversation still resumes. FleetReview retro-backfill C4: hermes-agent#813 agent/turn_handoff.py:425, agent/turn_context.py:1694. Verified: tests/gateway/test_turn_handoff_session_boundary.py 3/4 FAIL on base (keep-case passes), 4/4 pass with fix; turn_handoff wiring + resume-handoff command tests pass (23 passed).
|
🤖 merged-by: apollo · lane: kanban-merge-pass · gate: ADVISORY (FleetReview not green for 524a708): fleetreview-advisory-20260927-standing.md · why: t_a2bf7813: Backfill C4 [P1] authz / ownership / guard bypass — 92 instances (hermes-agent 4; Argus off card review (Ace 13:08), CI green |
FleetReviewReview: post-merge · head Post-merge review ( profile: light (rule: default light: lines 166<800, files 3<1000000, hunks 6<1000000, no hot path) · round 0 · members: B-assert-ctx, L6, C-assert-xhigh, G · families: anthropic,openai,xai Confidence: 3/5 Findings
FleetReview provenance · models: B=gpt-6-sol, C=claude-code-opus-5-5, D=grok-4.6 · cost: $1.24 · duration: 10m 16s · rounds: 1 · files examined: 3 |
FleetReview retro-backfill 2026-09-27, class C4 (authz/ownership/guard bypass), slice 1 of hermes-agent.
Instances fixed (re-verified at HEAD 5a9d284):
Fix: SessionStore deletes the key's handoff wherever it mints or switches the session id (reset_session, switch_session, get_or_create new candidate incl. idle/daily auto-reset). Compression advances through advance_compression_session and is untouched, so the same conversation still resumes after a cut turn.
Tests: tests/gateway/test_turn_handoff_session_boundary.py — 3 of 4 FAIL on base (manual reset, /resume switch, auto-reset); keep-case passes on both. With fix 4/4, plus existing turn_handoff wiring + resume-handoff command tests (23 passed, narrow run).
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.