Repository navigation
Tracker: P1-RECOVERY, Gateway recovery while an independent Runner survives #101
Copy link
Copy link
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Description
What this issue is
The CodeSpace tracker for P1-RECOVERY, started on the owner's direction of 2026-10-14. It is a living tracker: when the state changes, add a comment (date, what changed, evidence link) and tick the boxes below.
- Ledger: DevGuard
milestones.jsonowns the status. Plan: DevGuarddocs/planning/milestones/P1-RECOVERY.md, re-baselined on 2026-10-14 because it was written against CS-RG's C-series units, which were never built. - Entry: CS-RG is implemented and qualified on macOS for one exact combination, CodeSpace
ca306ee(DevGuard ledger970acf5, report docs: CS-RG qualification report, supported modes, adoption and rollback (CSRG-U6) #99). - Earlier trackers: Handoff: CS-RG managed-execution suspension (#75) and the DevGuard boundary revalidation (2026-09-27) #76 and Handoff: CS-RG hold, boundary revalidation and pending owner approvals (2026-09-27) DevGuard#14 cover CS-RG; whether to close them is decided separately.
- Nothing here authorizes a merge. Each merge needs the owner's approval naming the exact head.
Scope
In an operator-selected mode, an independent Runner keeps its processes, I/O and original deadlines when the Gateway exits, and a new Gateway takes over the same executions. Existing modes keep their termination behavior. InProcess, restoring I/O after the Runner itself restarts, and replaying argv are out of scope (ADR-002).
Units
One CodeSpace PR per unit, merged in order. Each unit starts on the owner's approval after the previous one is merged and its post-merge CI is green.
| Unit | What it adds | After |
|---|---|---|
| P1R-C01 | Opt-in independent Runner lifecycle: serial connections, exit intents (detach or stop), Runner identity in Hello; a re-attached Gateway may only observe, write stdin, resize and terminate |
DevGuard ledger start |
| P1R-C02 | Process records in the operations database, with a schema version and a single-writer lock | P1R-C01 |
| P1R-C03 | Claim on the existing connection, with an epoch fence on every mutating request |
P1R-C02 |
| P1R-C04 | Reconciliation of records, Runner inventory and DevGuard attempts; a per-workspace barrier | P1R-C03 |
| P1R-C05 | Output gaps, uncertainty and Runner loss; the operator runbook | P1R-C04 |
| P1R-C06 | Qualification harness and the macOS runs, then the report | P1R-C05 |
Rules
- The default mode does not change. The new mode is opt-in and is not a supported mode until P1R-C06 qualifies it.
- No Codex pin, DevGuard pin, DevGuard release, installed service or policy change without the owner's approval. A Codex fix is a recorded patch file only (upstream patches).
- MCP contract changes (new error codes, gap and uncertainty reasons, mode-specific tool text) are listed in each PR's "Contract changes" and need the owner's approval at merge.
- The known defects OX-01 and OX-02 (Handoff: CS-RG managed-execution suspension (#75) and the DevGuard boundary revalidation (2026-09-27) #76) are not fixed here; P1-RECOVERY does not change when a PTY handle is dropped.
Checklist
- DevGuard ledger: P1-RECOVERY
in-progressand the plan re-baselined (docs: start P1-RECOVERY and re-baseline its plan DevGuard#36) - P1R-C01 merged and verified
- P1R-C02 merged and verified
- P1R-C03 merged and verified
- P1R-C04 merged and verified
- P1R-C05 merged and verified
- P1R-C06 merged; qualification run on macOS; report merged
- DevGuard ledger: P1-RECOVERY
implementedand its qualification recorded
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Activity
novelKR commentedon Oct 14, 2026
2026-10-14, DevGuard ledger started. novelKR/DevGuard#36 was merged on the owner's approval at head
9b19078, as DevGuardmain165cb84(documentation only; the merge tree equals the head). Post-merge CI run 38573601167 is green.The ledger now records P1-RECOVERY as
in-progresswith P1R-C01active, the plan carries the dated re-baseline, the integration specification's recovery mode section is excepted from the suspension for P1-RECOVERY, and ADR-001 has the amendment for the independent Runner's credential file. CodeSpace's DevGuard pin stays6e7e065.P1R-C01 may ask for its merge once its pull request is green at its exact head.
Generated by Claude Code
novelKR commentedon Oct 14, 2026
2026-10-14, P1R-C01 merged and verified; P1R-C02 started. #102 was merged on the owner's approval at head
c22e823, asmainfeb5f52. Post-merge CI run 38592385183 passed all 17 jobs, hosted macOS included. The approval also covered the contract changes listed in #102. With it the owner started P1R-C02. The DevGuard pin stays6e7e065.The DevGuard ledger update, P1R-C01
merged-verifiedand P1R-C02active, is novelKR/DevGuard#37 (heada623275, CI green), waiting for the owner's merge approval.Generated by Claude Code
novelKR commentedon Oct 14, 2026
2026-10-14, P1R-C02 merged and verified; P1R-C03 started. #103 was merged on the owner's approval at head
a4f362c, asmain5976df0. Post-merge CI run 38612003338 passed all 17 jobs, hosted macOS included. The approval also covered the contract changes listed in #103. With it the owner started P1R-C03. The DevGuard pin stays6e7e065.DevGuard ledger: novelKR/DevGuard#37 (P1R-C01
merged-verified, P1R-C02active) was merged on the owner's approval as DevGuardmain0f4bf73, post-merge CI green. The next update, novelKR/DevGuard#38 (P1R-C02merged-verified, P1R-C03active), was merged on the owner's approval at headbd078f5as DevGuardmain77293a2; post-merge CI run 38616346872 is green.Generated by Claude Code
novelKR commentedon Oct 15, 2026
2026-10-15, P1R-C03 merged and verified; P1R-C04 started. #104 was merged on the owner's approval at head
4e54309, asmain1fda789. Post-merge CI run 38686514388 passed all 17 jobs, hosted macOS included. In its first attempt the macOS contracts job failed in its "macOS contracts and dependencies" step, on a tree whose PR run 38631018229 had passed; the one re-run of that job passed. The approval also covered the contract changes listed in #104. With it the owner started P1R-C04. The DevGuard pin stays6e7e065.DevGuard ledger: novelKR/DevGuard#39 (P1R-C03
merged-verified, P1R-C04active) was merged on the owner's approval at head760041aas DevGuardmain7cd86e4; post-merge CI run 38708338123 is green.Generated by Claude Code
novelKR commentedon Oct 15, 2026
2026-10-15, P1R-C04 merged and verified; P1R-C05 started. #105 was merged on the owner's approval at head
7cabcba, asmain385e177. Post-merge CI run 38708302887 passed, with Linux isolation skipped by the plan as on the PR. In its first attempt the macOS contracts job failed in the runner's DevGuard tests (cargo test -p codespace-runner --features devguard --lib -- registration wire admission launch independent lifecycleexited 101), on a tree whose PR run 38704449082 had passed; the one re-run of that job passed. Which test failed is in that attempt's artifact only. The approval also covered the contract changes listed in #105. With it the owner started P1R-C05. The DevGuard pin stays6e7e065.Follow-up, tests only: #106 (head
41db94c), opened while looking for that failure. A P1R-C03 test in the same command,an_independent_runner_answers_registration_before_the_next_claim, failed 1 run in 25 locally; #106 fixes it and makes five tests from #105 wait for a process's end rather than its exit. It is not a unit; it was merged on the owner's approval asmain950e2b2. Its post-merge CI run 38718331468 passed after one re-run: in the first attempt only the Linux integration job failed (cargo test --locked --workspaceexited 101; the failing test is in that attempt's artifact only).DevGuard ledger: novelKR/DevGuard#40 (P1R-C04
merged-verified, P1R-C05active) was merged on the owner's approval at head7b6ad73as DevGuardmain494793a; post-merge CI run 38718406648 is green.Generated by Claude Code
novelKR commentedon Oct 15, 2026
2026-10-15: what P1R-C05 found outside its unit
While driving #108, the P1R-C05 work found:
mcp::independent_tests::an_independent_gateway_blocks_a_workspace_whose_records_and_runner_disagreefailed runner, server, store: answer for a lost Runner's processes and let an operator release them (P1R-C05) #108's Linux Integration job on5a41aaf(run 38728457392), whose log named it thanks to scripts: name a failed stage's tests in the job log #107. It fails on main3fac934too (5 of 64 runs at 8 in parallel) and is probably main950e2b2's Integration failure (run 38718331468). The test terminates its sandboxed command while the sandbox is still being set up. A test-only fix, terminating once the command has printed a line, passed 80 of 80 runs on main. Details: comment on #108.a_gateway_that_started_work_claims_its_runner_again_and_reconciles_itfails about 1 in 100 runs at 16 in parallel, on main and on runner, server, store: answer for a lost Runner's processes and let an operator release them (P1R-C05) #108's branch. An exit that the Runner sends right after the new Claim's answer reaches the records' exit-following loop (crates/server/src/records.rs) beforereclaim_loop(crates/runner/src/uds.rs) makes the link current. The status query is then refused as reconnecting, and the record ends as "exited, how not known", which reconciliation cannot correct. In use, this loses the exit code of a process that exits around a reconnection; nothing runs twice.--openreopens admission.Plan: 1 and 2 go into one follow-up PR after #108 merges, as #106 did for P1R-C04, so P1R-C06's Mac qualification runs on a main that has them. #109 stays outside the units unless the owner adds it.
Generated by Claude Code
novelKR commentedon Oct 15, 2026
2026-10-15, P1R-C05 merged and verified; P1R-C06 started. #108 was merged on the owner's approval at head
5deb102, asmaindadb58c. Post-merge CI run 38739506757 passed all 17 jobs on the first attempt, macOS contracts and Linux isolation included, and the documentation site run 38739507537 passed. The approval also covered the contract changes listed in #108. With it the owner started P1R-C06. The DevGuard pin stays6e7e065.CI tooling, not a unit: #107 and #110 make a failed CI stage list its failed tests and cargo's rerun targets in the job log, never their output. Both were merged on the owner's approval, #107 at head
dea6c47asmain3fac934and #110 at headdfe9144asmaine947e80; their post-merge CI runs 38728182277 and 38739632977 passed on the first attempt.Follow-up for findings 1 and 2 above: #111 (head
57908bc), from the P1R-C05 work, was merged on the owner's approval asmain345864d; its post-merge CI run 38743295778 passed on the first attempt. P1R-C06's macOS qualification runs on amainthat includes it.DevGuard ledger: novelKR/DevGuard#41 (P1R-C05
merged-verified, P1R-C06active) was merged on the owner's approval at headcf3e206as DevGuardmainec66b12; post-merge CI run 38743349871 is green.Generated by Claude Code
novelKR commentedon Oct 15, 2026
2026-10-15, P1R-C06's harness and protocol merged. #112 was merged on the owner's approval at head
8de5fdb, asmainb2cb042. Post-merge CI run 38767662399 passed all 17 jobs on the first attempt, and the documentation site run 38767664121 passed. It adds therecovery-*functional suites and therecoveryrestart measurement toscripts/qualify-devguard.py, the Gateway recovery qualification protocol in English and Korean, and the independent Runner's adoption and rollback to the operations guide. It changes no MCP tool, error code or status value, and no pin. The independent mode stays unsupported until the macOS run qualifies a combination.Next, in P1R-C06's thread: the macOS check and candidate freeze on
b2cb042or a latermain, the measurement, then a docs-only report PR. The P1R-C06 box is ticked when that report merges, and the DevGuard ledger then records P1-RECOVERY's result.Generated by Claude Code