feat(gateway): resume interrupted sessions after restart - #5226
Conversation
|
Big surface change but isolated to gateway shutdown/startup paths with a dedicated test file (+294). Opt-in ledger is the right call for a new persistence path. Proceed. Note the rebased baseline still has 19 failing tests unrelated to this PR — worth confirming those are tracked separately before merge. |
|
I checked the rebased baseline on the exact upstream branch/worktree for this PR. The original What I could reproduce on the current branch:
So the short version is: not all of the old baseline reds are tracked already, but most of what remains is either test drift or one shared regression cluster unrelated to this PR’s gateway restart-resume changes. |
|
Follow-up cleanup PR for the trivial drift / baseline test issues discussed here: #5321. It covers the stale test expectations and the |
|
Follow-up baseline cleanup is now split out in #5329. It isolates process-global terminal/code-execution test state so cached sandboxes and interrupt flags do not leak across the full suite. The internal-only Matrix fake- |
|
Thanks for this PR, @malaiwah — the design here is solid and the opt-in ledger approach was exactly the right call. This is an automated hermes-sweeper review. The feature this PR proposes has since been implemented on
The follow-up PRs you split out (#5284, #5287, #5321, #5329) addressed the baseline test drift separately — those are tracked independently. Closing this PR as implemented. |
Summary
Validation
source venv/bin/activate && python -m pytest tests/gateway/test_restart_resume.py tests/gateway/test_gateway_shutdown.py tests/gateway/test_session_race_guard.py tests/gateway/test_reasoning_command.py tests/gateway/test_config.py tests/gateway/test_update_command.py tests/gateway/test_resume_command.py tests/gateway/test_queue_consumption.py tests/gateway/test_platform_reconnect.py tests/test_anthropic_error_handling.py -q19 failed, 8228 passed, 27 skipped, 1 xfailedCloses #5225