openclaw/scripts/run-node.mjs
Peter Steinberger 7a8dc4be23
fix(cli): let the dev runner own child shutdown (#138239)
* fix(cli): let the dev runner own child shutdown

The JavaScript shim and dev runner both escalated after five seconds. The
shim could kill the runner first, leaving its separately detached child
alive. Delegate termination to the runner and handle SIGHUP through its
existing signal and build-lock lifecycle. Preserve Node execution under Bun
and other shim callers' termination behavior.

Real process regressions fail before the fix and pass for SIGTERM/SIGHUP.
Runner and entrypoint tests, changed-file checks, and independent review
pass. A fresh Linux Node 24.19.0 build passes the original Gateway worker
restart scenario (Actions 33868737194).

Release-note context: source-checkout Gateway shutdown no longer abandons a
slow child when the development launcher's shutdown timers race.

* test(agents): align attempt fixtures with session contracts

Adopt the two relevant test-only corrections already landed in #138238
(e7fffcf7a0). Supply the session methods consumed by nested tool
observation and classify structured tool failures as AgentSession does.
Keep policy-denial and never-entered action/preparer assertions intact.

The original file reproduces three failures. All 112 files and 1,666 tests
pass after this correction, with complete changed-file gates and independent
review. Launcher implementation and release candidate are unchanged.
2026-09-04 06:08:03 -07:00

7 lines
194 B
JavaScript

#!/usr/bin/env node
import { runTsxCliShim } from "./lib/tsx-cli-shim.mjs";
await runTsxCliShim(import.meta.url, {
implementation: "./run-node.mts",
terminationOwner: "implementation",
});