Repository navigation
fix(session): fence late lifecycle settlements - #955
Merged
benvinegar merged 2 commits intoSep 1, 2026
Merged
benvinegar merged 2 commits into
benvinegar merged 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
This was referenced Aug 31, 2026
benvinegar
force-pushed
the
fix/session-lifecycle-generation-fences
branch
from
August 31, 2026 19:56
4f9fd28 to
45120db
Compare
benvinegar
marked this pull request as ready for review
August 31, 2026 23:54
Contributor
Greptile SummaryThe PR adds opaque generation and startup-attempt identities to prevent late asynchronous work from mutating stopped or replaced session lifecycle state.
Confidence Score: 5/5The PR appears safe to merge; no concrete changed-code defect remains after accounting for its documented cancellation and adapter boundaries. Exact generation and startup-attempt checks consistently guard lifecycle commits, while regression tests cover the relevant synchronous, asynchronous, reentrant, and failure paths. Important Files Changed
Sequence DiagramsequenceDiagram
participant Client as SessionBrokerClient
participant Launcher as Broker launcher
participant Connection as Broker connection
participant Socket as Socket generation
participant Bridge as App bridge
Client->>Launcher: Ensure daemon (startup attempt)
Launcher-->>Client: Health/launch settlement
Client->>Client: Verify attempt is current
Client->>Connection: Start connection
Connection->>Socket: Create fresh socket + generation token
Socket-->>Connection: Open/authentication callbacks
Connection->>Connection: Verify generation is current
Connection->>Socket: Register session
Socket->>Connection: Command
Connection->>Bridge: Dispatch retained foreign work
Bridge-->>Connection: Result settlement
Connection->>Connection: Verify originating generation is active
alt Generation remains active
Connection->>Socket: Send command result
else Stopped or replaced
Connection-->>Connection: Suppress stale delivery
end
Reviews (1): Last reviewed commit: "refactor(session): consolidate generatio..." | Re-trigger Greptile |
benvinegar
force-pushed
the
fix/session-lifecycle-generation-fences
branch
from
September 1, 2026 03:33
45120db to
fdca603
Compare
benvinegar
force-pushed
the
fix/session-lifecycle-generation-fences
branch
from
September 1, 2026 03:36
fdca603 to
4a1f892
Compare
1 task
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
Stack
Base branch:
refactor/session-lifecycle-clock. Review only the fifth commit for this PR.Validation
bun run typecheckbun run lintbun run deps:checkbun run test:session-broker-node— 3 passbun run check:packCancellation boundary
This PR fences commits; it does not claim cancellation. Foreign credential/crypto/probe/bridge promises continue until they settle. A detached process already synchronously started by an injected launcher cannot be recalled; stale metadata and cleanup commits are suppressed and launch locks are still released.
Compatibility
This PR description was generated by Pi using gpt-5.6-sol