Repository navigation
Add terminal snapshot freshness contract gate - #7005
Closed
brennanb2025 wants to merge 1 commit into
Closed
brennanb2025 wants to merge 1 commit into
brennanb2025 wants to merge 1 commit into
Conversation
Co-authored-by: Orca <[email protected]>
|
Ready to review this PR? Stage has broken it down into 3 individual chapters for you:
Chapters generated by Stage for commit 3542334 on Jul 1, 2026 8:22am UTC. |
This was referenced Jul 1, 2026
OrcaWin
marked this pull request as draft
October 27, 2026 09:50
Collaborator
|
Moving this PR to draft because it has been untouched for more than 80 days (latest recorded PR activity or commit timestamp: 2026-07-01T23:22:55Z; checked on 2026-10-27). This keeps the review queue focused on active work while preserving the proposal. Please mark it ready for review when work resumes. |
Contributor
Author
|
Fixed on main by #6801; this PR only adds tests. |
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
ELI5
The app sometimes asks, "which terminal sessions are alive?" That answer can arrive late. If a terminal reconnects while we are waiting, the old answer must not close the new terminal by mistake. This PR adds a test that freezes that timing problem and proves old answers cannot kill newer terminal bindings.
Why We Need This
This covers the stale terminal-liveness snapshot class. Orca can ask the provider which PTY sessions are alive, but that answer may arrive after a pane has already rebound to a newer PTY. Without a freshness invariant, an old answer can close a valid newer terminal.
Product Code vs Gate Coverage
This PR is gate coverage, not a runtime rewrite. It adds a deterministic provider-contract harness around the existing dead-session reconciliation behavior and updates the manifest metadata. The gate proves that stale pre-bind snapshots cannot tear down newer bindings, while fresh post-bind snapshots still close genuinely dead local bindings.
Red/Green
Performance
Merge Order
Requires #7001 first because this PR updates the reliability gate manifest introduced there.
After #7001 lands, this PR can merge independently of #7004, #7006, #7007, and #7008. No other child PR must merge before this one. Later child PRs may need a normal manifest rebase if this one lands first.
Why These Tests Stay Useful
listSessionsharness proves the failure more directly than a broad Electron flow. A full UI test would add timing noise without improving the core oracle.requestedAtafterlistSessionsresolves and the stale snapshot closes the newly bound PTYs. With the guard intact, stale pre-bind snapshots are ignored while fresh post-bind misses still close genuinely dead local bindings.soak; promotion requires recorded runtime, flake history, and saved red/green evidence before it can become blocking.Validation
Notes
Made with Orca 🐋
Post-PR Stabilization