Repository navigation
fix(profile-session): make stop idempotent - #343
Merged
Merged
Conversation
gmemmy
force-pushed
the
codex/fix-profile-stop-idempotency
branch
from
September 8, 2026 06:37
f2b434b to
43a1350
Compare
gmemmy
changed the base branch from
codex/fix-portable-promoted-evidence
to
main
September 8, 2026 06:38
gmemmy
marked this pull request as ready for review
September 8, 2026 06:38
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.
Problem
A repeated or delayed profile-session stop could append another terminal event and rewrite authoritative storage after a run had already stopped. A stale stop could also race with a newer active run unless the caller and storage transition were bound to the same scenario and run identity.
What changed
stopped,already-stopped, or rejected outcomes.scenarioandrunIdon stop deep links while preserving argument-free in-processstopProfileSession()calls.1.2.0and update package fixtures, declarations, and public contract text.Why this approach
The durable authority manifest remains the source of truth. Stop decisions are serialized with the existing storage operation chain, so concurrent calls cannot each publish a terminal transition. The public helper keeps its existing no-argument path while allowing identity-bound callers to fail closed.
Proof
pnpm typecheck- passed.pnpm package:smoke- passed, including packed installation and public declaration checks.pnpm release:check- passed, including package smoke and installed-consumer rehearsal.git diff --check- passed.Risks and limits
Stack/review order
Follow-ups