Repository navigation
fix(runtime): mint a new approval event after restore - #737
Merged
Merged
Conversation
Boundary event ids include projection epoch so the same request_id can re-prepare the same effect after restore. Add daemon runtime-activation to flip new-session creation without editing sqlite by hand.
Review: harness.TurnStarted/TurnSettled ids now include :e{epoch}.
Codex P2 follow-up: require projection_epoch at every _boundary_event_id call site, load it once per persist, and include the session id when the fact epoch is invalid. Do not cache across persists; store-level restore can bump the epoch without SessionManager.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
After Phase G restore bumps
projection_epoch, re-persistingApprovalRequestedwith the old deterministic event id hitStateVersionConflictError.:e{projection_epoch}. Samerequest_id/effect_idcan prepare again; the EventRecord is new.coding_agent daemon runtime-activation [--enable|--disable]flips local SQLitenew_sessions_enabled. Default stays off. SQLite needs a daemon restart.test_successful_turn_event_ids_are_deterministicfor the new id shape. Done.'0'on bad epoch, pass epoch on uuid chat ids) not taken: fail-fast and one load per persist are enough.Tests
uv run pytest tests/coding_agent/test_harness_p2_wrap.py tests/coding_agent/test_harness_p2_wire_turn.py tests/cli/test_entrypoint_contract.py -q