Repository navigation
fix(update): guard config-read children without import.meta.url queries and transport results without fd 3 - #158451
Conversation
Replace the URL-query child guard with a child-scoped environment marker and reject nested reader launches with candidate-config-read-recursion. Use one byte-length-framed stdout result transport for synchronous and asynchronous reads. Route ordinary stdout diagnostics to stderr and remove fd 3, which Bun 1.4.2 omits from spawnSync output. Preserve fresh candidate dependencies, rollback reads, and existing fail-soft service-definition behavior. Fixes #158339; thanks @hannesrudolph for the report.
|
🦞👀 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. |
|
Codex review: blocked before merge. Reviewed September 25, 2026, 8:03 PM ET / September 26, 2026, 00:03 UTC. ClawSweeper reviewWhat this changesThe branch changes the updater’s generated config reader to prevent recursive Bun child launches and return synchronous and asynchronous results through framed stdout, with tests and update documentation. Regression provenancePossible regression — probable (reviewed change; failure trace). No predecessor PR is attributed. Merge readiness⛔ Blocked before merge - 3 items remain Keep this PR open. Current main and the latest release retain the reported Bun-sensitive guard, and no merged fix supersedes this active repair. Priority: P0 Review scores
Verification
How this fits togetherDuring an update, the installed updater reads configuration from the candidate package through a stable alias. That read informs later service verification and reconciliation. flowchart LR
A[Update request] --> B[Installed updater]
B --> C[Candidate config alias]
C --> D{Reader child?}
D -->|No| E[Fresh Node or Bun child]
D -->|Yes| F[Candidate config read]
E --> F
F --> G[Result or warning]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +160, Docs +4, Other +11. Total +175 across 4 files. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep one generated alias responsible for bounded candidate config reads and diagnostic-safe results, while verifying its behavior when a shipped updater drives the upgrade. Do we have a high-confidence way to reproduce the issue? Yes. The linked report provides a bounded Node/Bun query-marker probe and an observed managed-update failure, while current main retains the matching guard; this read-only review did not run the full update. Is this the best way to solve the issue? Yes, repairing the generated alias addresses the shared handoff boundary without a runtime-specific mode. Its published-updater upgrade behavior still needs proof. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b74bd07a2fb0. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
…aw#158451) Replace the URL-query child guard with a child-scoped environment marker and reject nested reader launches with candidate-config-read-recursion. Use one byte-length-framed stdout result transport for synchronous and asynchronous reads. Route ordinary stdout diagnostics to stderr and remove fd 3, which Bun 1.4.2 omits from spawnSync output. Preserve fresh candidate dependencies, rollback reads, and existing fail-soft service-definition behavior. Fixes openclaw#158339; thanks @hannesrudolph for the report.
Backport #158451 from 5836021. Backport #158422 from 6ee9eb3. Backport #158338 from 8c29090. Use child-only config-reader admission and byte-framed stdout without changing the frozen TypeScript generator contract. Preserve fresh dependencies, operation-selected environments, diagnostics and rollback reads. Compare Windows tasks using omitted-default semantics without inventing missing triggers/principals or weakening explicit disable/deletion controls. Preserve all existing CI list entries and add the new Windows regression once. Exclude only incidental UUID-v4 Git transaction directories from plugin inventory. Keep explicit dependencies, transaction bytes and existing promotion rollback ordering intact; do not import newer streaming/lookup architecture. All 13 integrated postimages match the independently reviewed worker tree. Original failures reproduced; 42 focused tests and owning lint/ratchets pass. Real Bun and Windows qualification remain open. The Bun E2E preflight did not enter because the host's runtime-publication guard refused; no bypass occurred. Publication remains held by the prepared PR size-policy decision. Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: Josh Lehman <[email protected]> Co-authored-by: RomneyDa <[email protected]> Co-authored-by: vyctorbrzezowski <[email protected]> Co-authored-by: steipete <[email protected]> Co-authored-by: jalehman <[email protected]>
What Problem This Solves
Fixes recursive config-reader spawning during managed updates launched from a Bun Gateway, and synchronous config reads losing their result under Bun.
Closes #158339
User Impact
Node and Bun updates can read the candidate configuration in one fresh child per handoff, including after rollback. No configuration change or new CLI option is needed. Optional read failures retain the existing warning and service-definition preservation behavior.
Why This Change Was Made
Bun drops the import URL query used to identify reader children, and Bun 1.4.2 omits extra pipe descriptors from
spawnSync().output. The generated stable config alias now sets a child-only environment marker and rejects nested launches withcandidate-config-read-recursion. Both synchronous and asynchronous readers use one byte-length-prefixed JSON frame on stdout, with ordinary console/stdout diagnostics redirected to stderr. The URL-query and fd-3 paths are deleted; there is no runtime branch.Thanks @hannesrudolph for the report and bounded reproduction.
Evidence
node scripts/check-changed.mjs -- <four changed paths>passes all selected checks, including script/test-root typechecks and lint (307.12 seconds wall time).tbx_01m3dedg53d5rkgsm79sb3r1pa, prepared runner, Node 24.19.0 and official Bun 1.4.2. Exact-head CI is attached and running; CI duration is pending completion.Production/tooling: +24/−13 LOC (net +11). Tests: +160 LOC. Docs: +4 LOC.
Known gaps
Fresh Codex autoreview was attempted once and exited with
codex engine failed (1)before producing a verdict. The helper truncated the diagnostic before its underlying error detail. Maintainer re-review is pending; no successful fresh review is claimed for the result-transport change.Proof exercises the generated config handoff in isolated synthetic state; it does not claim a full managed-service update or live Gateway restart.