Repository navigation
fix(update): preserve failures before mutation admission - #186977
Conversation
Skip post-activation schema inspection after failed execution before mutation admission, preserving the original error and predecessor recovery. Keep inspection for post-admission and explicit state-risk failures. Prove the command boundary for Git and package updates; adjust the test-line ceiling to the exact required total with no reserve.
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper review Please review head 44211dd. Paired original-order Git/package controls fail on the old owner; the repaired five cases plus recovery siblings pass (105 total). Exact staged test-line count and targeted type-aware lint passed. The final boolean syntax change is equivalent under the required internal boolean contract and independently reviewed. Live incident cancellation attribution remains unknown; no live update replay is claimed. |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. What this changesSkip post-activation state inspection after failed updates that never admitted mutation, unless explicit state risk requires inspection. Example: Managed Gateway context capture fails with AbortError: CLI stopping before mutation admission.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR fixes a source-verifiable updater failure still present on main, with no actionable introduced defect found. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe update CLI coordinates installation mutation, Gateway recovery, state inspection, and final reporting using execution facts returned by the mutable-update owner. flowchart TD
A[Update CLI] --> B[Mutable update execution]
B --> C[Mutation admission and recovery facts]
C --> D[Finalization decision]
D --> E[State inspection when required]
D --> F[Preserve original failure]
E --> G[Finalize update result]
F --> G
Technical reviewBest possible solution: Use the existing execution owner's mutation-admission fact to preserve pre-mutation failures while retaining post-mutation and explicit-state-risk inspection. Do we have a high-confidence way to reproduce the issue? Source shows schema capture followed by a pre-admission context failure and predecessor restart, after which main still runs strict inspection; supplied paired controls report the expected failure, but no reproduction was executed during this review. Is this the best way to solve the issue? This is the smallest complete fix: the command already receives authoritative mutation admission, and the condition preserves existing inspection and recovery owners without adding another path or state store. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8d46327b2656. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +7, Tests +168, Other +2. Total +177 across 4 files. Added test files: 1. View PR surface stats
Review metrics
LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (5 earlier review cycles)
Reviewed October 28, 2026, 10:57 PM ET / October 29, 2026, 02:57 UTC (Revision 6). |
|
@clawsweeper re-review Please review current head 5e0aecb. The only change since 44211dd is the CI TS2454 correction: the closure-populated test capture now includes |
|
🦞👀 Re-review progress:
|
Baseline-Refresh: 05a4760ddd958834ae118e956fb2ebdb24c96bf8
Baseline-Refresh: b01db85e27e028b595b0aad523099838a9bfd407
|
@clawsweeper re-review Please review exact head The completed 89c8 published-upgrade cell passed once in 1,177 seconds with cleanup joined. The PR body now records its source/package/artifact identity, manual-restart and first-hop limitations, inherited component proof, and the still-failing installed-entry budget. The optional packaged initiating-driver failure reproduction remains explicitly deferred because the maintained fixtures lack this pre-mutation capture boundary. |
|
🦞👀 Re-review progress:
|
Baseline-Refresh: 04761b24ccc9cd65684611895419920ab059932d
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
…6977) * fix(update): preserve failures before mutation admission Skip post-activation schema inspection after failed execution before mutation admission, preserving the original error and predecessor recovery. Keep inspection for post-admission and explicit state-risk failures. Prove the command boundary for Git and package updates; adjust the test-line ceiling to the exact required total with no reserve. * test(update): type the pending execution capture * fix(ci): bind test budget to the inspected merge count * fix(update): allocate preactivation regression coverage independently
What Problem This Solves
A failed update could start strict state-schema inspection after update mutation was never admitted and the previous Gateway had already been restored. The live writer could then make inspection fail and replace the original error with a misleading rollback-state failure.
User Impact
Failed pre-mutation updates retain their original error and predecessor recovery. Post-mutation failures and explicit state-risk refusals still require strict inspection. No configuration or schema change is required.
The fix belongs to the initiating updater. It applies when an updater containing this change starts the operation; installing a candidate cannot retroactively change an older driver already running an update.
Why This Change Was Made
The outer command lifecycle owns the authoritative
mutationStartedfact. It now uses that fact for failed executions without explicit state risk. The inspection helper, executor fences, recovery-root checks, cleanup, and existing recovery mode remain unchanged.Production delta: +7 lines. Five boundary cases add 167 test lines and one routing entry. Under the landed independent budget policy, this PR allocates exactly those 167 lines in its own record. The shared scalar is unchanged. The current CI merge passes the ratchet at 6,246,370 lines against an effective 6,320,337 ceiling.
Evidence
6b639cb19c75d6a22ca25e0a02623b105841d5c0, based on policy mergef996c1c487a0fcb456a73c9af49e360b99d14de5. Independent source review verified the four-path delta, signature, preserved guard and unchanged 167-line regression. Exact-head CI completed SUCCESS: 48 successful jobs, 27 skipped, no failures. Its tested merge iscf53302bea11ed155fd4b65c514110a28dfd9e69on baseb0e65d76509dd60d097ba47049cf749dd8c6c6c0.Packaged Upgrade Proof
The published-driver × candidate base cell passed once in 1,177 seconds, with cleanup joined: published
[email protected]upgraded through its updater to candidate2026.10.8; migration, package identity, state survival, Doctor and Gateway readiness/status checks passed after a manual restart.Harness/package source:
89c8f06eb3287d7de85ec5eee720f33faaaa6400. Package SHA-256:14873aa1f1fc7673545dd8a86887c7b036a0eacae9b62834c16f8dc7d0530d7d. Proof artifact12851213352, SHA-256e218c1bec93a1a811f246e50224045f3d0e47fac46ee5939ae4a74c703d2fc67. First-hop post-core attribution is unavailable/original outcome unknown, and nested update output is truncated at 16 KiB. This is historical installed upgrade compatibility proof at 89c8, not complete first-hop attribution, automatic-restart proof or packaged execution of the successor.The overall Package Acceptance workflow failed the unchanged installed-tree entry budget: 47,621 > 47,500, while size passed at 584.1 MiB < 900 MiB and package integrity passed. An earlier ancestor package already failed at 47,608 entries. The exact contribution of this PR to the count difference has not been isolated. No package cap was raised and no CI exception is claimed for this manual workflow.
Limits and Follow-ups