Repository navigation
fix(chat): let a model pick right after a Thinking change go through - #1796
Conversation
A session.updated receipt carries the new execution_generation in its payload; the conversation read it only from the envelope, so the next model pick sent a stale fence and the host refused it. Fixes #1795 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
[Medium impact] This PR appears safe to merge.
|
Linked issue
Fixes #1795
What changed
A tester on 2.2 (1) changed Thinking on a new Hermes chat, then picked a model, and got "This chat changed on the server. Reopen it and try again." Picking the model first worked.
The host saves a Thinking change as a fenced policy edit that moves the session's revision and execution generation. It announces both in the payload of a
session.updatedevent (hermes-agent3b42157,gateway/session_mutations.py_project_result,hermes_state_runtime.pyreceipt). Hermex took the revision from that payload, but took the generation only from the event envelope, which is empty on an idle chat. So the next model change sent a staleexpected_generation, and the host refused it withstale_generation. Hermex now also takespayload.execution_generationfromsession.updated, through the existing forward-onlyadoptGeneration.How it was tested
Proof: the new
HermesChatSettingsTestscase failed before the fix (the first model pick after a Thinking change sent generation 1 instead of 2) and passes after it.scripts/test-sim <iPhone 17e> --only HermesMobileTests/HermesChatSettingsTests: 52 passed--only HermesConversationTests HermesChatTurnTests HermesHistoryRewindTests HermesSessionActionsTests: 161 passedbuild_run_sim. No live repro: the only route to a fresh chat on the test host went through real bot sessions.Checklist
scripts/test-sim <assigned-simulator-udid>with the tests required byAGENTS.md§ Verifying; the selection and results are recorded aboveCodablemodels decode tolerantly (optionals for fields the server might add or rename)AGENTS.mdis locked)Reviewed with sol-loop: 1 round with gpt-6.2-sol on high. Sol verdict: approved
Created with Claude Opus 5.5 in Claude Code (T3 Code); investigation partner GPT-6.2 Astra, reviewer GPT-6.2 Sol.
🤖 Generated with Claude Code
Summary by CodeRabbit