Repository navigation
Conversation
|
@coderabbitai review |
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe change adds shared host-scope parsing and exact process-incarnation liveness classification for local, WSL, and SSH providers. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 749b3073-b879-43ab-bf5a-3043fc20e3a0
📒 Files selected for processing (7)
config/reliability-gates.jsoncsrc/main/runtime/orca-runtime-process-incarnation-liveness.test.tssrc/main/runtime/orca-runtime.tssrc/main/runtime/orchestration/db.tssrc/main/runtime/orchestration/worker-terminal-process-liveness.tssrc/main/runtime/rpc/methods/orchestration-worker-release.test.tssrc/main/runtime/rpc/methods/orchestration-worker-release.ts
|
Superseded by the combined, rebased PR #13927, which includes this cleanup fix plus the authoritative worker-completion fix and validates both together through one real compiled-CLI Electron journey. Closing this duplicate PR without merging. |
Fixes #13860
Linear: STA-3932
Problem
Settled supervised workers with external, user-owned, or transferred terminal ownership stayed permanently
retainedafter their runtime terminal handle went stale. Release returned before consulting the provider that authoritatively owns process liveness, so there was no safe path from retained ownership to released accounting.Root cause and invariant
SQLite is authoritative for orchestration ownership/release state, while the owning local/WSL/SSH provider inventory is authoritative for the immutable PTY process incarnation. Handle staleness is not death: a daemon, SSH, or restored PTY may survive a runtime handle generation.
Invariant: a settled resource may reconcile to
releasedonly when one fresh inventory from its exact owning provider positively excludes its exact immutable process incarnation. Live, missing/malformed identity, invalid host scope, unavailable inventory, active transferred owner, or corrupted ownership history all remain retained.The two-signal oracle requires:
ownership_stateandrelease_stateboth becomereleased;closeTerminalremains uncalled and the receipt reportsprocessAction: none.Design
live, positive absence asdead, and every unavailable or ambiguous shape asunknown.BEGIN IMMEDIATEtransaction before committing release.Alternatives rejected:
terminal_handle_staleas death could discard a surviving daemon/SSH/paired PTY.Deterministic red / red / green evidence
Byte-identical command:
origin/main444638d96b: 3/3 red; all three resources remainedretained.d44d46178b: 3/3 green.444638d96b: 3/3 red.The same test bytes asserted durable state and zero terminal-close calls in every run.
Validation
Two internal-review-until-clean rounds completed. Round 1 fixed malformed provider-incarnation metadata being usable as evidence; round 2 was clean across adversarial, architecture, performance/resource, platform, security, UX, mobile/backcompat, and readiness lenses.
Risks and gaps
archive: null.