Skip to content

fix: restore update checks after early Node refusal - #180939

Merged
shakkernerd merged 1 commit into
mainfrom
update-node-preflight-tests
Oct 22, 2026
Merged

shakkernerd merged 1 commit into
mainfrom
update-node-preflight-tests

Conversation

@shakkernerd

@shakkernerd shakkernerd commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

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-incompatible before 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:

  • changed-file formatting and lint: 0 errors;
  • affected test type graph: core-test-cli-update passed;
  • 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;
  • 35/35 relevant selected tests passed across the remaining two changed files and engine-preflight sibling. Per-file single-worker runs also passed: target-schema 24/24 in 165.37s and node-runtime 8/8 in 50.50s.

Hosted CI passed on the rebased exact head, and required review found no actionable defects.

@clawsweeper

clawsweeper Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes size: S labels Oct 22, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 22, 2026
@roboclaw-bot

Copy link
Copy Markdown
Collaborator

Overlap note from the main-CI repair campaign: #180931 merged at 2872d16ddef8b712742efcebdda705d56b91da12 while this PR was in flight. It fixes the same two fresh-Doctor launcher expectations and removes the obsolete replacement-runtime setup; its exact-head CI and native landing are complete.

The update-cli.node-runtime.test.ts and update-cli.target-schema.test.ts changes here cover the remaining failures I was qualifying. I have not started a duplicate patch or changed this branch or its CI. GitHub currently reports this head (a56814d619381505d3528e5610ad720fca9d18b2) as conflicting with main.

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.

@clawsweeper

clawsweeper Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This 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.

  • Before: The test incorrectly expects automatic service-runtime replacement and a successful update.
  • After: The test expects preflight-node-runtime-incompatible and verifies that the package and service command remain unchanged.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, correct test repair with passing exact-head checks; its evidence is command-boundary harness coverage rather than shipped-entry-point proof.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored test repair exercises the production update command with fixture I/O; focused results and current-head CI support the assertion changes, with no new runtime behavior requiring a live demonstration.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Updater checks fail because their expectations describe runtime recovery that early engine admission now intentionally prevents.
Reason: The maintainer-authored repair restores useful checks for the accepted behavior while retaining metadata authority and installation-preservation coverage.

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
Reviewed head: e488c9fe56dbffcf081ecb9349750fb791cbcad3

Before merge

None.

Findings

None.

Agent review details

How this fits together

The 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]
Loading

Technical review

Best 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

  • Managed service and nvm runtime expectations changes intended behavior with a stated reason (c93810d: The split retained existing service-runtime recovery coverage; later consolidation and runtime-floor changes preserved its old expectations. The split commit does not establish the scenarios' original introduction.)
  • Target-metadata refusal reason keeps the original intent (b863809: Test consolidation retained the contract that the first inspected metadata remains authoritative; this PR preserves that contract and updates only the now-earlier refusal reason.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 3755040 adds src/cli/update-cli/update-command-target.ts:600 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 37550409085c; files: src/cli/update-cli/update-command-target.ts)

PR surface

Tests +34. Total +34 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 48 14 +34
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 48 14 +34

Labels

Label changes:

  • add P3: This is a test-only expectation repair with no runtime, configuration, or persisted-state change.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: This is a test-only expectation repair with no runtime, configuration, or persisted-state change.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-22T19:51:34.402Z sha a56814d619381505d3528e5610ad720fca9d18b2 :: needs changes before merge. :: none

Reviewed October 22, 2026, 4:15 PM ET / 20:15 UTC (Revision 2).

@shakkernerd

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 22, 2026
@shakkernerd
shakkernerd merged commit eb8a2ab into main Oct 22, 2026
135 of 136 checks passed
@shakkernerd
shakkernerd deleted the update-node-preflight-tests branch October 22, 2026 20:18
@shakkernerd

Copy link
Copy Markdown
Contributor Author

Fixed: Update CLI tests now enforce early incompatible Gateway Node refusal while preserving compatible update and later-recovery paths.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 23, 2026
Aligned update CLI coverage with the early incompatible Gateway Node refusal while preserving compatible update and later-recovery cases.
RomneyDa added a commit that referenced this pull request Oct 26, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants