Repository navigation
fix: restore update checks after early Node refusal - #180939
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Overlap note from the main-CI repair campaign: #180931 merged at The Are you actively driving this PR through conflict repair, independent review, and landing? I will defer branch ownership to you; the overlap can be composed with the landed launcher fix while retaining your useful full-command and no-side-effect assertions. |
|
Codex review: needs maintainer review before merge. What this changesThis PR updates runtime and target-metadata tests to expect incompatible Node versions to be refused before package staging. Example: The Gateway selects Node 24.14.0, the shell provides 24.15.0, and the target requires >=24.15.0 <25.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR repairs stale updater expectations without changing production behavior; no actionable defects remain, and current-head CI passes. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe update CLI resolves registry metadata and checks the selected Gateway runtime before staging a package; these tests exercise refusal diagnostics, recovery guidance, and preservation of the existing installation. flowchart TD
A[Update CLI] --> B[Registry target metadata]
B --> C[Engine preflight]
C --> D[Refusal and recovery guidance]
C --> E[Compatible target staging]
D --> F[Preserved package and service]
Technical reviewBest possible solution: Merge the focused expectation repair while preserving the existing early-admission policy and compatible-runtime controls. Do we have a high-confidence way to reproduce the issue? Current-main preflight returns the early refusal that contradicts the original assertions; the PR and a separate merged repair document matching hosted failures, but this review ran no tests. Is this the best way to solve the issue? The patch fixes the existing consumer expectations at their current owners and adds preservation checks without bypassing admission or introducing production machinery. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a918e883b0e6. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests +34. Total +34 across 2 files. Added test files: 0. View PR surface stats
LabelsLabel 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 (1 earlier review cycle)
Reviewed October 22, 2026, 4:15 PM ET / 20:15 UTC (Revision 2). |
a56814d to
e488c9f
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Fixed: Update CLI tests now enforce early incompatible Gateway Node refusal while preserving compatible update and later-recovery paths. |
Aligned update CLI coverage with the early incompatible Gateway Node refusal while preserving compatible update and later-recovery cases.
…taging (#180769) 2026.10.6 raised engines.node to >=24.22.1 <25 || >=26.12.1 (#179992). Package-mode updates (npm/pnpm global, Control UI update.run) staged and installed the target before checking its Node requirement, so users on older Node got an opaque global-install-failed. Target resolution now runs the existing runtime-compat owner first against the Gateway's selected Node and refuses with preflight-node-runtime-incompatible, leaving the Gateway untouched and naming the current version, the required range and the next step. Unknown engines metadata never blocks. Fixes #180636 (@sglion777), Fixes #180701 (@Almost-Certified-ops), Fixes #180707 (@billpang1-sketch); Refs #180688 (@rayluo88). (cherry picked from commit 3755040) Adapted for 2026.9.x: used the 10.7 backport abc2431 as the template. The 9.x runtime-compat owner is resolvePackageRuntimePreflight in update-command-service-plan.ts (main later split it into update-command-runtime-preflight.ts); engineOnly is added there, and the service hint is appended to the 9.x error lines. No new config or protocol: preflight-node-runtime-incompatible already exists in the 9.x update outcome vocabulary (git preflight and update triage); it is now also an environment failure reason. Also folds in the main test alignments from eb8a2ab (#180939) and 2872d16 (#180931): incompatible registry targets now refuse before staging instead of provisioning or rebinding a service Node, so the 9.x node-runtime, npm-runtime, target-schema, runtime-channel, and runtime-preview expectations move to the early refusal. The candidate admission "fallback node-runtime" row and the obsolete "retains a check the candidate did not report" test are dropped as on main (the 9.x explicit .tgz fallback route main used for that row does not reach the installed Node check). The node-engine regression test inlines runtimeFixture and does not stub the process runtime (9.x lacks those helpers), and the update.run handoff case uses the 9.x update.test-harness mocks.
What Problem This Solves
Fixes: update CLI checks fail after registry package updates began rejecting an incompatible selected Gateway Node before package staging. The remaining target-metadata and runtime scenarios still expected the later runtime-admission reason, automatic recovery, or a successful service-definition refresh even though the earlier admission boundary now owns those outcomes.
User Impact
User impact: there is no production behavior change. The remaining update test owners now verify that an engine-incompatible registry target reports
preflight-node-runtime-incompatiblebefore package installation, regardless of the availability of a compatible replacement runtime.The coverage continues to require that target metadata stays authoritative and that the installed package, selected service command, runtime recovery, and service lifecycle remain untouched on refusal. Separate scenarios for compatible Node-prefix updates and already-current plugin-maintenance recovery are unchanged. #180931 independently landed the sealed/writable launcher coverage while this PR was in flight.
Why This Change Was Made
The early engine-only admission introduced by #180769 intentionally runs before staging and before later service capability or runtime recovery decisions. The stale expectations crossed that boundary: writable services and nvm-backed runtimes could no longer proceed to the recovery behavior those tests described when the selected service Node already failed the target package's engine range.
This change adapts only the two remaining affected consumer owners. It keeps the first-metadata control, compatible shell and nvm inputs as negative controls, exact diagnostics, and explicit no-side-effect checks. No production code, engine policy, configuration, dependency, or package script changes.
Evidence
The prior expectations failed in Actions run 39823514819. #180931 resolved the two fresh-doctor failures; this PR retains the remaining target-schema failure and two node-runtime failures. Their affected test, production, fixture, and configuration inputs are unchanged across the rebase.
Focused validation from the pre-rebase candidate remains applicable because the two changed-file blobs and every causal production, fixture, configuration, and sibling-test input are identical in this committed result:
core-test-cli-updatepassed;src/cli/update-cli.target-schema.test.ts;src/cli/update-cli.node-runtime.test.ts;src/cli/update-cli/update-command-node-engine-preflight.test.ts;Hosted CI passed on the rebased exact head, and required review found no actionable defects.