Repository navigation
fix(gateway): support pinned daemon runtime paths - #82290
Conversation
|
Codex review: blocked before merge. Reviewed September 16, 2026, 11:07 PM ET / September 17, 2026, 03:07 UTC (Revision 9). ClawSweeper reviewWhat this changesAdds persistent Node/Bun executable selection for Gateway and node services, preserves it through maintenance, and updates documentation, supporting fixtures, and deferred UI chunk loading. Merge readiness⛔ Blocked before merge - 1 item remains This PR remains useful: current main lacks persistent executable selection. The recorded upgrade evidence resolves the previous review’s compatibility follow-up, and this review found no actionable introduced defect. Priority: P2 Review scores
Verification
How this fits togetherManaged service installation translates CLI choices into operating-system service definitions. Runtime pins preserve the operator’s executable choice through setup and repair, using OpenClaw’s existing machine-state database. flowchart TD
A[CLI installation choices] --> B[Runtime selection]
C[Stored service pin] --> B
B --> D[Executable capability checks]
D --> E[Locked native service writer]
E --> F[Service definition readback]
F --> C
E --> G[Gateway or node service]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +523, Tests +985, Docs +34. Total +1542 across 51 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Retain explicit per-service runtime intent in the existing state owner while preserving automatic selection for unpinned installations and explicit reset recovery. Do we have a high-confidence way to reproduce the issue? Not applicable as a regression: this adds explicit runtime selection. Current-source inspection confirms the missing option, and recorded native execution demonstrates the new behavior. Is this the best way to solve the issue? Yes. Explicit intent uses the existing machine-state and service-write owners, avoiding automatic pin inference or a competing environment-variable persistence contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 9ca2d1dfcd16. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (8 earlier review cycles)
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7b5e3e7fb8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
d148679 to
002772e
Compare
Adopt the published Slack lifecycle type and approval receiver repair. Include the tracked plugin-source helper in cold preparation fixtures. Co-authored-by: Peter Steinberger <[email protected]>
|
Maintainer adjudication of the remaining compatibility checklist for The current review explicitly states: “The recorded upgrade evidence resolves the previous review’s compatibility follow-up,” and reports no actionable defect. Its generated Before merge checklist still repeats the same request. Confirmed by the Migration and upgrade compatibility proof — maintainer confirmation section in the PR body: published2026.9.4 driver run The compatibility confirmation is satisfied by this completed proof; no duplicate upgrade run is needed. Required exact-head CI and native prepare/merge gates remain in force. |
|
Merged via squash.
|
Use the current-main Qwen fixture from openclaw#150523 and openclaw#82290 unchanged. Remove the final temporary prerequisite delta while preserving the eleven-file alias repair and original contributor history.
* fix(plugin-runtime): restore channel turn alias * test(plugin-sdk): type channel turn alias override * fix(plugin-sdk): preserve legacy turn mock overrides * test(plugin-sdk): refresh channel turn alias gates * Align legacy channel compatibility paths for current-main repair Preserve the original contributor ancestry while resolving stale paths before the current-source alias repair. Intermediate branch preparation; not acceptance evidence. * fix: preserve complete legacy channel runtime alias Restore the complete five-member alias, including exact runtime-bound dispatch and scoped context construction. Preserve lazy loading, generic signatures and canonical override precedence. Keep deprecated compatibility metadata and current documentation aligned. Closes #91122 Co-authored-by: Yzx <[email protected]> * fix(ci): integrate canonical channel alias prerequisites Consume the reviewed file-preview lazy-English extraction from #150424, the cold worktree input closure, and the Qwen initial-deadline fixture from #150026. Native manifest closure is now also present on main via #150453. Keep the original channel alias implementation and accepted built-runtime proof unchanged. Co-authored-by: Peter Steinberger <[email protected]> * fix(ci): consume landed canonical UI startup repair Replace the temporary file-preview extraction with the current-main implementation from #150491 before merging main. Preserve the channel alias repair and existing contributor ancestry. Co-authored-by: Peter Steinberger <[email protected]> * fix(ci): consume landed canonical Qwen fixture Use the current-main Qwen fixture from #150523 and #82290 unchanged. Remove the final temporary prerequisite delta while preserving the eleven-file alias repair and original contributor history. --------- Co-authored-by: Jason (Json) <[email protected]> Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: Yzx <[email protected]>
* fix(gateway): support pinned daemon runtime paths * fix(node): preserve pinned runtime on reinstall * test(cli): update daemon coverage runtime mock * refactor(daemon): keep runtime pin value type private Remove the unused export; the type remains owned by pin state. * refactor(daemon): isolate runtime pin type contracts Break the service contract cycle with a dependency-free type leaf. Preserve runtime behavior and all original contributor ancestry. * fix(daemon): preserve runtime pin intent across setup callers Carry inspected pin revisions through configure, onboarding and Doctor installs. Keep automatic runtime choices unpinned and explicit runtime resets intentional. * perf(ui): keep attachment caching out of startup vendor code Let the lazy text-attachment consumer own the Lit cache directive chunk. Preserve existing compression and startup budgets. * fix(ci): restore native fixture qualification * test: adopt canonical fixture repairs * fix(ci): align Slack contracts and cold fixture inputs Adopt the published Slack lifecycle type and approval receiver repair. Include the tracked plugin-source helper in cold preparation fixtures. Co-authored-by: Peter Steinberger <[email protected]> * refactor(slack): adopt canonical ingress lifecycle type * test(qwen): control elapsed time in request fixture * test(ui): keep archive failure roster reads unavailable --------- Co-authored-by: Jason (Json) <[email protected]> Co-authored-by: Tuyen <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
* fix(plugin-runtime): restore channel turn alias * test(plugin-sdk): type channel turn alias override * fix(plugin-sdk): preserve legacy turn mock overrides * test(plugin-sdk): refresh channel turn alias gates * Align legacy channel compatibility paths for current-main repair Preserve the original contributor ancestry while resolving stale paths before the current-source alias repair. Intermediate branch preparation; not acceptance evidence. * fix: preserve complete legacy channel runtime alias Restore the complete five-member alias, including exact runtime-bound dispatch and scoped context construction. Preserve lazy loading, generic signatures and canonical override precedence. Keep deprecated compatibility metadata and current documentation aligned. Closes openclaw#91122 Co-authored-by: Yzx <[email protected]> * fix(ci): integrate canonical channel alias prerequisites Consume the reviewed file-preview lazy-English extraction from openclaw#150424, the cold worktree input closure, and the Qwen initial-deadline fixture from openclaw#150026. Native manifest closure is now also present on main via openclaw#150453. Keep the original channel alias implementation and accepted built-runtime proof unchanged. Co-authored-by: Peter Steinberger <[email protected]> * fix(ci): consume landed canonical UI startup repair Replace the temporary file-preview extraction with the current-main implementation from openclaw#150491 before merging main. Preserve the channel alias repair and existing contributor ancestry. Co-authored-by: Peter Steinberger <[email protected]> * fix(ci): consume landed canonical Qwen fixture Use the current-main Qwen fixture from openclaw#150523 and openclaw#82290 unchanged. Remove the final temporary prerequisite delta while preserving the eleven-file alias repair and original contributor history. --------- Co-authored-by: Jason (Json) <[email protected]> Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: Yzx <[email protected]>
Landed:
9843b937e3547feb30544d384b14ad201000ae74on 2026-09-17, from reviewed head0701e29346b49987020d29d0fb2e5ade4137ae71. Exact-head CI35176109266 passed; native prepare and merge passed. Native completion. Issue #60612 is closed.What Problem This Solves
Managed Gateway and node services can now opt into an exact Node/Bun executable with
--runtime-path <path>. This fixes service-manager PATH selection drifting away from the runtime an operator intentionally selected.Fixes #60612 through explicit persistent runtime selection and intentional version-manager handling.
openclaw gateway install --runtime node --force(or the node equivalent); replace it with another--runtime-path. Deleted or unsupported pins fail explicitly.Contributor Tuyen (@darkamenosa, account created 2014-02-13) and all three original commits remain in the branch ancestry. The maintainer integration preserves current-main SecretRef values, systemd scope/read bindings, Linux inspection hints, environment/TLS policy, service identity, and native locks. Small helper extractions keep existing line-cap ratchets intact.
Root cause and best-fix assessment
Runtime-family selection could not express a durable operator-selected executable. The original PR also conflated automatic Doctor choices with explicit intent and used an unbounded validation subprocess. The canonical machine-state owner plus existing bounded probe fixes those boundaries without adding an environment-variable persistence contract or weakening runtime policy.
Alternatives rejected: inferring intent from every installed executable would accidentally pin automatic choices; retaining a service environment key would duplicate durable state; silently falling back from a deleted pin would violate operator intent. Historical introduction of the original selection limitation is unknown; this is a new explicit capability, not a claimed regression attribution.
User-visible behavior
Existing unpinned installs keep automatic selection and read-only pin-state behavior. There are no shell startup edits, default runtime changes, network additions, or release-owned changelog changes.
Evidence
Current-source qualification is recorded below. Final exact-head CI will be linked after publication. The earlier synthetic-main UI startup failure is reproduced and corrected as described below. Retained earlier proof is not represented as a fresh current-head run.
pnpm buildpassed on the runtime-identical tree before a private type-export cleanup; final-head hosted CI is checked separately. Built CLI help exposes both runtime-path options. A real bounded probe accepted installed Node 24.20.0 with SQLite 3.53.4.Proof limits and compatibility
Real macOS launchd proof now passes on a task-created named profile using Node 24.20.0: explicit pin install; forced reinstall and restart preserve it; invalid replacement refuses before mutation with the previous PID still healthy; explicit runtime reset clears metadata; re-pin succeeds; uninstall removes both metadata and native registration. The fixture used the OS account HOME and a canonical separate profile/state directory. No operator service or configuration was changed. Linux/systemd and Windows/schtasks operations remain unit-level proof, not claimed as live platform qualification.
Unpinned services require no migration. Pin metadata uses the existing machine-state API; service replacement or concurrent metadata changes fail rather than silently adopting stale intent. No credentials, operator configuration, or live service state was modified during proof.
Review conversations
The original automatic-pin and unbounded-probe findings are addressed by the owner-boundary rewrite. Independent full-source and correction review evidence is preserved; the six-pass current-integration review returned one arbitrary-filename Bun flag. Direct validator execution disproved its premise: arbitrary Bun filenames are rejected before access/probe, and all supported names classify identically in Doctor. The finding and adjudication remain recorded; the subsequent fresh ClawSweeper setup-caller finding is addressed below.
The CI-reported type-import cycle is corrected by a dependency-free pin contract leaf. The seven-file correction is independently scoped-clean at P0-P2; full architecture, production/test types, lint and formatting pass. Runtime emission is byte-identical for all six changed existing files.
The fresh setup-caller finding is corrected in all four supported installation paths. Shared selection preserves existing pins and wrapper precedence, passes the inspected revision into installation, and clears intent only for explicit runtime options. The 13-file setup correction is independently scoped-clean at P0-P2. All 11 caller-regression cases fail on the preserved pre-correction source; reviewed source was restored byte-for-byte, and the extracted Doctor/wizard fixtures pass after restoration. No operator daemon or configuration was modified.
Current-main integration and CI repair
Integrated main
4e44dbfb428ad11cb20dbaf9ba82b87be7853651with both runtime-pin and versioned Node discovery contracts intact. The sole merge conflict was additive Doctor documentation; 13 focused runtime/discovery cases, current production types and docs formatting pass. The installed pnpm graph matches the current lock dependency document exactly.The inherited Control UI startup budget failed at 362,706 gzip bytes (limit 362,588). The shared Lit vendor group eagerly included the cache directive used only by the lazy text-attachment renderer. Letting that directive follow its consumer reduces startup to 362,535 bytes with the same seven requests and unchanged CSS, compression and budget. No rendering, styles, copy or UI workflow changes. Seven chunk-classification tests and two compiled Chromium text/Markdown attachment cases pass, including scrolling and download. Independent two-file review is scoped-clean at P0-P2; UI types and formatting pass. The canonical source-only core/UI lint configuration is used.
Maintainer persistence and recovery decision
For this explicitly authorized runtime-pin implementation, accept opt-in durable executable intent in the existing
config_machine_stateowner, scoped separately to Gateway/node and the actual managed-service identity. No pin is inferred from automatic selection; no schema version, table, database, environment variable, or default runtime change is introduced. The record is canonical operator intent, not evidence that a native definition is current. Reinstall/Doctor preserves it only with matching inspected revision and native definition. Explicit runtime selection clears it; successful uninstall deletes it. Invalid/deleted executables refuse before replacement rather than silently selecting another runtime. Native installation and SQLite metadata are not claimed to form one atomic transaction; stale plans and readback mismatches fail explicitly. Wrapper precedence remains unchanged.Alternatives considered: automatic inference would pin accidental choices; service environment persistence would duplicate state; silent fallback would erase explicit intent. Published unpinned installs require no pin migration. Older runtimes do not implement the opt-in pin contract; clear the pin through the current CLI before intentionally returning to an older runtime. Metadata is a bounded per-service record with existing database lifetime/permissions; no new retention/export permission is introduced. This implements the permanent explicit-runtime option requested in #60612.
Final inherited CI corrections
The exact
db371e91a6eb5a3332d72803cbde4ab5b3602ab0run (https://github.com/openclaw/openclaw/actions/runs/35168675151) exposed three inherited test/tooling defects. The native materialization inventory now includes three eager dependencies;31 affected tooling cases pass. The macOS multi-generation case exceeded the ordinary120-second harness budget; a diagnostic run with a300-second case budget completed all unchanged assertions in163seconds (not represented as a pass at120seconds). The fs-safe0.13.1 bounded-read fixture now uses the documented Root.read final-fence hook, preserving all byte-budget assertions;3cases pass.The subsequent main integration adopts canonical #150431 (batched sparse-worktree Git observations, unchanged state assertions/timeouts) and #150419 (the same bounded-read hook correction) byte-for-byte. These supersede the temporary test corrections on this branch; only the three missing wrapper inventory dependencies remain additional to main. Independent review and changed-input checks are recorded with the final head; historical failures remain visible rather than being counted as passing proof.
Real published-driver upgrade and recovery proof
Published
[email protected]drove an actual private-prefix upgrade into the packed candidate, using a dedicated named profile, real launchd and Node24.20.0. Driver build3a9d69db306cand candidate builddb371e91a6ebboth report package version2026.9.4, so success was verified with exact installeddist/build-info.jsonbytes against the candidate tarball—not version text alone. The later test/inventory correction paths are not in that tarball.The initial completed attempt passed staging, migration rehearsal, Doctor lint, config validation, plugin resolution, migration continuation, and Gateway canary, then exceeded the shipped driver's30-second package fingerprint budget before activation. The previous Gateway remained healthy. After the filesystem-heavy tests finished, a read-only retained-tree fingerprint completed in24seconds. The serialized retry completed staging, activation, restart, candidate health, and durable finalization successfully. No installed-driver patch, changed integrity rule, or operator service modification was used.
Actual command sequence (task-specific paths/profile omitted):
The detached helper—not merely the initiating CLI—exited0. Durable run
ded7c0c3-2315-4d4f-a4be-33aeaef1a791reportsstatus=succeeded,serviceRunning=true,versionMatch=true,readyz=true,settled=true, and running build2026.9.4-db371e91a6eb-2026-09-17T01-07-30.630Z. The unpinned upgrade stayed unpinned; explicit pin installation and Doctor preservation passed. Removing the fixture executable caused the expected pre-mutation refusal with the existing PID still healthy. Explicit runtime reset cleared pin metadata and recovered; uninstall completed and launchd reported the fixture registration absent. All helpers and fixture services settled before source integration.Linux/systemd and Windows/schtasks remain unit-level proof; no live cross-platform qualification is claimed. No operator service, configuration, credentials, or runtime deployment was changed.
Current publication
Earlier signed head
40302b932775053f7de88d44de95aa716d9fab98integrated main1fbb41545ec513156ec8da020bb61852f519c8cfwithout replacing contributor ancestry. Canonical sparse cases pass in5.163s/5.728s; type-aware lint, formatting, independent two-file review (scoped-clean P0-P2), and the new-main full build pass. The frozen dependency graph is unchanged. Exact-head CI is being dispatched through the native owner; native prepare/merge will run only after its required checks and review gates pass.Final CI integration correction
At
582f12b927fb08a65f8074ba304fcb50d0d51b82, adopted Peter Steinberger’s published Slack lifecycle-type and approval-receiver repair from #150483 and added the missingbundled-plugin-source-utils.mtscold-fixture input. All 37 cold-preparation tests, 27 thread-resolution tests, and the approval request/resolution dispatch case pass. Slack package types, fixture type-aware lint, all architecture guards (zero runtime/Madge cycles), formatting, and independent P0–P2 delta review pass. Native pin/setup/update code is unchanged, so the native proof above remains applicable.Local extension lint stopped before analysis because declaration preparation observed a parent checkout’s
qrcodemanifest; the shared parent install was left intact. Exact-head hosted lint is required before LAND. Earlier CI failures remain linked in the workflow history.Canonical conflict resolution at
c0c61c60aad5f3489ef7c63676e73366d97f4083: main independently landed the same Slack lifecycle type iningress.types.ts. Adopted all six files byte-for-byte from main9ce12dfa6125, removed the duplicate type location, and merged that pinned main with contributor ancestry intact. Slack types, Madge zero-cycle check, formatting/diff checks and fresh independent P0–P2 resolution review pass. No runtime behavior or assertion change; lockfile unchanged. The earlier manual CI preflight rejected a stale GitHub merge ref; no test ran in that failed preflight.Current exact-head test-fixture corrections
Current signed head
0701e29346b49987020d29d0fb2e5ade4137ae71preserves all contributor ancestry. CI 35174656874 completed with two inherited fixture failures; hosted lint, architecture, cold-preparation and the other shards passed. The Qwen request-shape case now holds Date.now fixed within that case (restored by onTestFinished), preserving the exact120000ms assertion. The archive/Undo failure scenarios keep only matching roster reads unavailable, so a later successful mock list cannot inject its canonical pin timestamp. All acknowledgement, rollback, timestamp and visible-row assertions remain unchanged.The exact Qwen case, Qwen package types, all four archive/Undo browser cases in original order, UI E2E test types, canonical UI type-aware lint, formatting and fresh independent P0–P2 reviews of both deltas pass. The original archive cases also passed locally; the hosted timing failure was not locally reproduced and remains recorded. An initial UI lint invocation used the wrong test config and stopped before analysis at the known ancestor-install boundary; the maintained changed-file UI lint command passed. No production source or lockfile changed. Final exact-head CI and native prepare/LAND passed, as linked above.
Migration and upgrade compatibility proof — maintainer confirmation
The remaining checklist item in review4462884081 is covered by the completed real published-driver proof above, not by a proposed future run. The PR adds an optional service-scoped JSON record through the existing
config_machine_stateowner; it changes no SQLite schema, table, schema version, or existing-row backfill.ded7c0c3-2315-4d4f-a4be-33aeaef1a791succeeded; exact installed candidate build matched; pin record remained absent (stored:false).stored:false) and Gateway ran with automatic selection; uninstall removed the native registration.Read-only Git object checks reconfirmed that
runtime-pin-state.ts,runtime-paths.ts,service.ts, andgateway-setup-runtime.tsare byte-identical between proven candidatedb371e91a6eband current head0701e29346b4. The later CI corrections do not change this compatibility surface. No old suite or native upgrade was replayed. This confirms the requested migration/upgrade compatibility evidence. Downgrades to a runtime without pin support are not claimed to preserve this new opt-in intent; clear the pin with the current CLI before deliberately downgrading, as documented above.