Repository navigation
fix(update): keep model authentication from blocking updates - #154453
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review blockedAutomated review did not run, so no review verdict was produced. Reason: The input-safety check could not safely complete for this revision. ClawSweeper will not retry this unchanged revision. Next step: No contributor action is requested. Maintainers should inspect the linked workflow run. |
|
Codex review: needs real behavior proof before merge. Reviewed September 21, 2026, 3:32 AM ET / 07:32 UTC (Revision 3). ClawSweeper reviewWhat this changesRemoves inference repair from update validation and recovery, preserves a deferral response for older updaters, and routes post-failure triage through durable shared credentials. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness⛔ Blocked before merge - 11 items remain Keep open: current main still needs this fix, but both earlier review findings remain unresolved. The published-updater evidence supports the update path without establishing automatic recovery’s execution-policy safety. Priority: P0 Review scores
Verification
How this fits togetherThe updater validates a candidate installation, activates it, and verifies or restores the Gateway. After a failed update settles, triage can use configured model credentials to diagnose and repair the installation. flowchart TD
A[Installed updater] --> B[Candidate validation]
B --> C[Activation and Gateway verification]
C --> D[Settled update outcome]
B --> D
D --> E[Post-failure triage]
F[Configured credentials and execution policy] --> E
E --> G[Repair commands and filesystem changes]
Before merge
Findings
Agent review detailsSecurityNeeds attention: The new automatic-recovery caller broadens execution policy; no dependency or supply-chain change was found. PR surfaceSource -838, Tests -2167, Docs +7, Other -3. Total -3001 across 61 files. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep updates independent of model authentication while preserving automatic recovery’s configured runtime, execution restrictions, and live authority through final effects. Do we have a high-confidence way to reproduce the issue? Yes, from source: automatic recovery with configured ask/allowlist/auto execution enters repairRunConfig and receives full execution instead. No target code was executed during this read-only review. Is this the best way to solve the issue? Partly: removing update-time inference and reusing credential ownership are appropriate, but automatic recovery must preserve its existing runtime and execution-policy contract. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 69afbbaf3742. LabelsLabel justifications:
EvidenceSecurity concerns:
What I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (2 earlier review cycles)
|
93b8ed6 to
a010bbe
Compare
…w#154453) * fix(update): keep model authentication from blocking updates * test(update): preserve recovery verification after inference cutover * test(update): align module outcome fixture with retired inference repair
Related: #154114. Thanks @agebreak0083 for the detailed report.
What Problem This Solves
Updates could start inference repair during candidate checks or service recovery, before the update had finished. That made model authentication part of update admission and obscured the original failed check.
User Impact
Updates, verification, and rollback no longer launch an inference repair. Auth diagnostics remain advisory. Optional inference repair starts through triage after a failed update has settled, and uses shared OAuth profiles and agent-local overrides through the normal runtime credential owner.
Why This Change Was Made
Remove both in-update repair callers and their unused orchestration/transport producer. Keep the published worker IPC entrypoint as a no-inference deferral for older updaters. Both manual and automatic post-failure repair use the canonical auth resolver and a detached embedded turn with the selected durable credential owner. Automatic triage retains its original failure prompt, service intent, one-turn behavior, shared ten-minute budget, tool policy, cancellation, authority checks, and supervised cleanup.
The candidate snapshot already includes the shared SQLite store. The confirmed divergences were a separate read-only auth eligibility check that rejected refreshable OAuth, and temporary agent-exec credential inheritance that intentionally excluded shared OAuth. The reporter's catch-all message alone cannot identify its underlying exception. The Doctor shutdown fix from #153679 is already in the base and is not reimplemented here.
Evidence
CI fixture follow-up (tests only):
3c89cdb0d12cdc8716cabdca07e7a8dc4b34c3f1removes the obsoleterepairUpdateServicefixture stub andrepair-unverifiedexpectation fromscripts/tests/update-restart-module-outcome.mjs. All four module-failure cases remain; they still require the failed outcome, retained backup, rollback attempt, recovery observation, and no unexpected dependency calls. Production is unchanged; incremental test/support LOC is +0/−5 (aggregate tests/support +1106/−3278, net −2172).tbx_01m31j68yb8bc656qwx8cjx0hn: reproduced exactly four stalerepair-unverifiedassertion failures, then passed all 20 inner cases with the fix.test/scripts/update-restart-module-outcome.test.ts(retains package backups after unverified post-swap module failures) passed in 0.592s test time (original failing hosted case: 0.683s). The wrapper plus post-update, post-update repair/recovery, service, and rollback siblings passed 206/206 tests across six files. Longest file: 62.689s; longest single case: 3.931s.node scripts/check-changed.mjs --timed -- scripts/tests/update-restart-module-outcome.mjspassed every selected guard/lint/format check. The earlier full changed gate and published-driver hop below remain valid for unchanged production. The initial local replay used Node 26.8.2 and hit its removed TypeScript transform mode before any assertions; the matching Node 24 Testbox supplied the before/after proof.f689af6af62cf5e05e1b7584f34daf710d2ef942. Testbox command exited 0; lease stopped. Auto-merge remains armed for this tests-only follow-up.r1 conflict resolution: Rebased onto
bb9564112c4069605536f90864c76e17a7ef885e. All five conflicts are resolved, including preservation of main's independent #153178 recovery behavior. Head:a010bbe4cd6e096bee177f0a202db2ae35dbcf8a.tbx_01m319k4d5mgf8fgt73kn37zq9: fullnode scripts/check-changed.mjs --timedpassed, including typechecks, dead-export scans, lint, and state/schema guards.--no-restart --yes --json.Ordinary posture/security findings remained warnings in candidate lint and updater advisories. No auth-profile finding was emitted; the regression suite independently proves auth-profile errors are written as update warnings.
readyz-unhealthyreason, and restore the real readiness verifier shadowed by the shared helper's default mock. Original outcome, rollback, ownership, Windows recovery, and no-inference assertions remain.Candidate tree:
c74325fa807978fd0a28be9859499234cc632452; tarball SHA-256:4b8edba33d1f1ddc6bd8c0b62f42211d9a4b193bb78aafe32beb3fabad0ba4b9. The complete Testbox command exited 0.Live Mac OAuth acceptance and real provider authentication remain unproven; credentials are synthetic. The earlier authored-head no-auth hop also passed, but the fresh rebased live cell was OAuth-only as requested.
Five conflict resolutions
src/cli/update-cli/update-command-repair.tssrc/cli/update-cli/update-command-repair-service.tssrc/infra/update-repair-worker.tssrc/infra/update-repair-agent-worker.test.tssrc/cli/update-cli/update-command-post-update-repair.test.tsPreserved main #153178's independent failure-recovery observation, installed/restored service identity, unsafe-restart constraints, readiness-based triage suppression, cleanup-error propagation, terminal recording, and explicit Doctor/update-repair maintenance custody. The auto-merged post-update owner retains those behaviors.
Fresh Testbox per-file timings
Native file timings with one worker; shared build/compilation excluded. The longest individual case was 24.83s and the longest file was 66.36s. The repository-plan file independently checks real test routing and inventories.
src/cli/update-cli/update-command-candidate-exit.test.tssrc/cli/update-cli/update-command-execution-validation.test.tssrc/cli/update-cli/update-command-execution.rehearsal.test.tssrc/cli/update-cli/update-command-post-update-recovery.test.tssrc/cli/update-cli/update-command-post-update-repair.test.tssrc/cli/update-cli/update-command-triage.test.tssrc/commands/doctor-lint.update-warnings.test.tssrc/commands/triage-prompt.test.tssrc/commands/triage-repair-isolation.test.tssrc/commands/triage-run.test.tssrc/commands/triage-target.test.tssrc/commands/triage.test.tssrc/infra/update-candidate-canary.cleanup.test.tssrc/infra/update-candidate-canary.exit.process.test.tssrc/infra/update-candidate-canary.integration.test.tssrc/infra/update-candidate-canary.lint.test.tssrc/infra/update-candidate-canary.test.tssrc/infra/update-repair-agent.runtime.test.tssrc/infra/update-repair-agent.test.tssrc/infra/update-repair-inference.oauth.test.tssrc/infra/update-repair-inference.route.test.tssrc/infra/update-repair-inference.test.tstest/scripts/ci-node-test-plan.test.tsRemoved code and compatibility boundary
update-command-repair.tsandupdate-command-repair-service.ts: private orchestration called only inside update admission/recovery. Their callers were removed together; neither is a CLI command, SDK export, persisted format, or candidate IPC entrypoint.update-repair-worker.tsandprepareUnattendedUpdateRepair: the now-unused internal producer. Published 2026.9.4 retains its own producer and launches the candidate'sdist/infra/update-repair.worker.jsdirectly.The published repair-worker entrypoint, incoming/outgoing wire schema, and historical ledger/report fields remain. The receiver now returns a bounded deferral without loading inference or opening state. Keep that compatibility receiver while supported published-updater cells include callers of this IPC contract.
No new CLI/config options, dependencies, or database schemas.
Reply draft for the reporter
Thanks for separating the symptoms. The earlier Doctor cleanup fix prevents completed checks from being killed during slow disposal. This change removes the model-auth requirement from update repair admission entirely: updates do not need an agent turn. It also gives post-failure triage the same shared/OAuth credential resolution as ordinary runtime execution. We verified the published 2026.9.4 updater against the rebased candidate using isolated synthetic OAuth state; the earlier authored head also passed with an empty credential store; this does not claim a live test of your Anthropic subscription. The separate unattended-restart and backup-cleanup symptoms need their own verification.