Repository navigation
feat(gateway): honor host lifetime and install ownership - #161583
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. |
|
Codex review: needs maintainer review before merge. Reviewed September 30, 2026, 9:01 AM ET / 13:01 UTC (Revision 19). ClawSweeper reviewWhat this changesThe branch lets an app-held stdin pipe stop its Gateway gracefully and makes app-owned packages direct updates and Doctor repairs to the app updater. Merge readiness✅ Ready for maintainer review This remains useful, distinct groundwork for app-hosted Gateways. Current main lacks both contracts. The recorded macOS behavior and upgrade proof are strong, and this review found no concrete patch defect. The earlier intermittent pressure-test failure remains documented without established causality. Priority: P2 Review scores
Verification
How this fits togetherThe Gateway run loop controls server shutdown, while update and Doctor classify who owns an installed package before changing it. A host pipe and a package marker enter those owners and produce either graceful shutdown or app-directed update guidance. flowchart LR
A[App launcher] --> B[Stdin lifeline]
B --> C[Gateway lifecycle]
C --> D[Graceful stop]
E[Package marker] --> F[Install ownership]
F --> G[Update and Doctor]
G --> H[App updater guidance]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +373, Tests +1022, Docs +24, Other -1. Total +1418 across 70 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Use the packaging-written marker and launcher-held pipe as the shared app-hosting contract, then let the separate macOS integration consume them while preserving standalone installs. Do we have a high-confidence way to reproduce the issue? Not applicable: this adds opt-in host behavior. The PR records direct after-change runs for shutdown, update, and native-service refusal. Is this the best way to solve the issue? Yes. The marker is read by the existing install-discovery owner, and host loss enters the existing Gateway stop path; app packaging and hosting remain in their separate integration PRs. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against cd59fe831ed9. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (18 earlier review cycles; latest 8 shown)
|
9f758a1 to
496495d
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
fd83e8f to
3eef870
Compare
|
@clawsweeper re-review Refreshed to The separate unmarked CLI → marked native LaunchAgent smoke also passed: readable ownership refusal, unchanged full package/service snapshots and native process generation, health before/after, and complete isolated-fixture cleanup. The coordinator has directed continuation through fresh normal CI and review gates with the remaining pressure uncertainty documented. |
|
🦞👀 Re-review progress:
|
|
Fresh CI attempt 1 failed checks-node-changed-2 in Two bounded local reproductions on unchanged head
The cohort used node scripts/run-vitest.mjs src/agents/subagents/registry/subagent-registry.requester-wake.e2e.test.ts --maxWorkers=1Original cohort target orderThese were macOS/Node 26.10 runs; CI used Linux/Node 24.19. The target case took 1.618 s and 1.753 s locally. Source inspection supports independence from B1: this case uses an in-process registry and mocked Gateway/spawn calls, without a QA Gateway or Codex stdio child. Agent, state, shared, plugin and config owners are byte-identical to the main baseline; the reached Gateway-admission change is type-only. No identical assertion was found in the recent failed-main logs checked. A fixture/native-worker scheduling race is plausible, not proven; passing replays do not establish a fix. No source, timeout, or assertion changes were made. Under the coordinator's explicit policy, I am requesting the single permitted failed-jobs-only rerun: |
|
Merged via squash.
|
…1583) * feat(gateway): honor host lifetime and install ownership * fix(codex): preserve hosted child process grouping * fix(update): keep install kinds outside update check cycles * fix(update): check retained recovery before install discovery * fix(update): admit retained recovery before repair discovery * fix(gateway): tolerate unavailable cwd during update admission
What Problem This Solves
An app-hosted Gateway needs to stop when its launching app disappears and must leave replacement of its bundled package/runtime to the app updater. This is B1, the core-contract PR in the Bun-powered macOS app series; packaging and native app hosting are owned by separate PRs.
Why This Change Was Made
OPENCLAW_GATEWAY_HOST_LIFELINE=stdinopts into an inherited pipe. EOF/error requests the existing graceful stop path, joining drain/child cleanup, releasing the Gateway lock, and flushing logs. It never converts host loss into a restart. QA now keeps that pipe open and uses the same owner; the PID watchdog and its environment contract are removed. Codex child grouping follows the parent Gateway's host state, so childenv/clearEnvoverrides cannot change containment. Broken host output pipes also retain the same shutdown owner, so console EPIPE cannot bypass drain or log flush.A packaging-owned
openclaw-install-owner.jsonmarker is validated by one reader before any Git probe, avoiding the macOS Command Line Tools installer stub. Host packages refuse update/repair/finalize/wizard and Gatewayupdate.run, skip package-registry/background/node updates, and report their owner and update hint. Doctor leaves payload/runtime/service repair to the host. A separately installed CLI also respects a marked service package before redirecting an update or rebinding the service.User Impact
App-owned payloads stay in lockstep with OpenClaw.app. Missing markers preserve package/Git/unknown behavior without read-retry delays; malformed markers warn and are ignored. Terminal Gateways and supervised services retain their current lifetime unless the lifeline variable is explicitly set. No app or packaging files, configuration options, database changes, or Gateway protocol schema changes are included.
The existing Gateway update-status protocol keeps its configured-policy display and historical records. Host installs do not publish an unsupported install kind or package target; execution is skipped and browser update requests receive the app's hint.
Update behavior
Older published updaters do not know this marker and never encounter it: it exists only in app payloads created by the subsequent packaging work. New code ignores missing markers. No migration is needed, and a host refusal happens before package changes or stopping its Gateway.
Evidence
Current landing status: refreshed onto main
e2113276497f3as3eef870c0a772and continuing through normal review/CI gates under the coordinator decision. The constrained result is main 8/8 and head 7/8; causality remains inconclusive. The independently valid locator contention fix is landed separately in #161822 and is now included through main. It is not claimed to resolve the pressure failure. If fresh CI repeats the pressure failure, the coordinator authorizes one evidence comment and one failed-jobs-only rerun; a second red attempt stops landing.Constrained native-hook pressure: all 16 standalone runs
Across the original three interleaved main/head pairs and five additional pairs, main passed 8/8 and PR head passed 7/8. The retained head failure reported 0/20 matched callbacks at the assertion. This establishes an intermittent failure on the PR head; it does not establish whether the cause is PR-specific or inherited under load.
Each campaign ran main then head on the same Linux Testbox lease, with a fresh lease for the additional five pairs. Every cell verified CPU affinity/cpuset 0–1, a 200% CPU quota, 8 GiB memory, zero swap, and Node 24.19.0. Original main runs 1–3 used
ed7039629fa130e3499a7479fa6707cb5649382f; additional main runs 4–8 used7db6ea365a62ef888a2eb2e1ac34f6aaa53d5505. All eight head runs usedfd83e8fdaceeef9fccef348040a52b7aeecb7a55. The combined main count therefore spans two pinned main revisions, not eight identical-baseline repetitions.The common entry point was
node --import tsx scripts/ci-run-node-test-shard.mts, selectingextensions/qa-lab/src/codex-native-hook-pressure.e2e.test.tsthroughOPENCLAW_NODE_TEST_TARGETS_JSON, with prebuilt private-QA runtime,OPENCLAW_VITEST_MAX_WORKERS=2, and one plan. Assertions and timeouts were unchanged. The additional pairs added identical read-only fixture diagnostics on both revisions to capture callback counts and the existing hook-event stream.All durations below are seconds. Command wall covers the complete standalone file invocation, including the transient-unit wrapper. Matched turn is the twenty-call scenario's
turnElapsedMs; it includes work outside hook execution. Slowest hook in batch is the maximum individual hook-completiondurationMsamong that scenario's twenty hooks, not a sum or a batch wall time. The last column is the nominal difference between that maximum and the configured 10.000 s external per-hook deadline; it is not a scheduling guarantee. Individual hook timing was not captured in the original six runs and is explicitly unrecorded.All ten instrumented runs recorded twenty completed hook events for the twenty-call scenario and no failed hook-completion event. Their slowest hooks ranged from 3.936–7.876 s, all below the 10 s deadline. These passing observations do not explain the earlier failure. On
head-3, the assertion saw zero new callbacks. Its diagnostic registry contained six cumulative calls, already accounted for by the preceding one-call and five-call scenarios; those are not six completions of the failed twenty-call batch. The successful-scenario metric was never emitted, so neither its matched-turn duration nor its individual hook durations are available. The file's 296.26 s wall and the duration of the whole matched-policy test must not be substituted for a failing hook's duration. External timeout, startup delay, and lifecycle behavior remain unresolved alternatives; no captured failing hook event distinguishes them.The independently fixed SQLite locator contention issue landed in #161822 as
71156a00c9ddc6838489c1f5d07a959281a8c85b. It was not present in these sixteen historical runs. Its separate constrained passing runs and reduced locator overhead are useful evidence for that fix, but are not causal proof that it resolves the 0/20 pressure failure. CI-prefix replays and locator-candidate runs are excluded from the 8/8 and 7/8 totals. These historical measurements also do not replace current-head CI after refreshing this branch.A separate bounded replay of the original first-three-file CI prefix, with CI's Node/Vitest cache environment, also passed on both revisions: main 310.30 s, head 270.08 s; 20/20 callbacks; slowest hooks 3.561 s and 3.248 s. This checks the remaining ordering/cache difference without adding those runs to the 8-run standalone counts. The test lease is stopped. Provisioning run 36704384209; test results come from retained remote-command receipts, not the provisioning workflow's cleanup conclusion.
The earlier 7.884–9.282 s successful diagnostic hook batch was on the PR head, not main, and is separate from the sixteen standalone cells. It is not included in their totals. The original failed/cancelled CI run 36689169374 remains historical evidence; all five Windows jobs passed in that attempt. The refresh completed without conflicts. Range-diff preserves all six patches; only surrounding context changed in the macOS docs and update command. Prior Codex reviews remain applicable to that unchanged patch. Fresh exact-head CI and ClawSweeper review are required after this refresh.
Inherited Windows runtime-preparation failure: native head/main comparison reproduces the same refusal without this PR. On one native Windows Testbox, Node 24.21.0 and Git Bash, head
33df06335464and captured origin/mainf3672acef8623both reject\Microsoft\Windows\Hotpatch\Monitoringduring strict managed-Gateway inventory, then throw the same discovery error and return the fence refusal. Imports succeed and the invoking Gateway service is absent. The two valid native JSON records match; failed direct PowerShell launcher attempts are excluded. Eight targeted local discovery/Startup/fence files pass (207 tests, one existing skip). The original CI log did not retain its task inventory, so the historical runner's exact offending task is not claimed known. The coordinator accepted this independent-main proof for the native inherited-failure exception and authorized a separate Windows owner fix after landing.The previous attempt also exposed a PR-caused
update.runregression when the launch directory had disappeared: the new ownership lookup evaluated bareprocess.cwd()and threw before managed handoff. Follow-upfd83e8fdaceeereusestryProcessCwd()so the package-root owner keeps its module/argv hints with an absent cwd. A full-PR diff audit found no other new bare cwd lookup in production Gateway code (the other occurrence is a QA test fixture). The existing regression failed before this fix (exit 1, 113.20 s). All 48update.test.tstests now pass (104.46 s), including the unavailable-cwd case, and the host-owned RPC refusal test passes (21.99 s). Core types (11.13 s), targeted core lint (16.07 s), formatting and whitespace checks pass. Codex review of the correction is scoped-clean through P2. No test assertions or timeouts changed. Fresh exact-head CI is run 36689169374; its new QA failure is recorded below. Prior failed attempts are historical evidence, not current-head clearance.The required evidence comment preceded the one
gh run rerun 36681218454 --failedinvocation. It records the first attempt's unrelated native-declaration timeout and both passing local reproductions (67.73 s and 57.55 s). Those passing reproductions were not represented as a source fix.ClawSweeper revision 17 completed on exact head
3eef870c0a772369c5b8530b33ce7b25ed9d8b4cat 2026-09-30T12:37:16.863Z: ready for maintainer review, sufficient terminal proof, no source/security findings, and no before-merge items. It accepts the native-service smoke and records the historical pressure uncertainty under normal current-head gates. Fresh CI is 36715201857.Fresh CI attempt 1 failed a separate requester-wake cleanup observation in job 109886872609; the pressure job was cancelled. The evidence comment records unchanged source-path independence and two passing local reproductions (original eight-file cohort: 235 pass/one existing skip, 302.55 s; isolated file: 25 pass, 162.23 s). No source/assertion/timeout change was made. The single coordinator-authorized failed-jobs rerun completed successfully: run 36715201857 attempt 2, exact head
3eef870c0a772, Actions gate job 109908553967. The pressure, requester-wake and Windows jobs passed. These passing results clear the test gate; no causal fix for either historical flake is claimed.Refreshed-head focused proof passed all 57 tests: lifeline 6/6 (4.94 s), Codex stdio 21/21 (30.64 s), pending recovery 21/21 (42.73 s), registered host CLI 4/4 (10.79 s), locator admission 4/4 (12.11 s), and host-owned RPC refusal 1/1 (21.29 s). Each used
node scripts/run-vitest.mjs <file> --maxWorkers=1. Core types (15.82 s), root-test types (56.21 s), formatting (0.68 s), targeted update-command lint (70.58 s), docs sanity (0.61 s), and whitespace (0.50 s) passed. Gateway-profile setup/build completed; build phases totaled 47.3 s. Unchanged-owner proof above remains retained; fresh CI is not substituted by those historical results.Separate CLI → marked native service: passed
A real macOS LaunchAgent smoke on exact head
fd83e8fdaceecloses the service-custody proof requested by ClawSweeper revision 16. Two independent package roots used current built runtime/launcher/AI bytes and dependencies copied from the earlier installed first-hop fixture. This proves real CLI/native-service behavior from copied packages; it is not fresh npm installation or macOS packaging proof. Git and launchd discovery used real subprocesses.The fixture started its own uniquely named profile/service from the app package, then wrote the marker only into that package. The invoking CLI package remained unmarked. Its real
node "$CLI/openclaw.mjs" --profile "$PROFILE" update --yes --jsonrefused in 1.973 s, exit 1:{"status":"error","reason":"managed-service-preflight","failureFact":{"check":"managed-service","code":"service-mutation-refused","message":"Managed by OpenClaw.app. Update OpenClaw.app to update this Gateway."}}Before/after complete file-content, mode and symlink snapshots matched for both packages (44,334 CLI entries; 44,335 app entries). LaunchAgent definition, generated environment/wrapper, and profile config hashes matched. Native PID, run count (1), running state, program/arguments and working directory remained identical; real health checks passed before (10.213 s) and after (1.966 s). Service installation took 3.641 s. The fixture used an isolated named profile, npm prefix/cache, workspace and port; the default profile/operator Gateway were untouched. One exact bootout cleaned up its service; PID, package processes, plist/profile and listening port were verified absent, and a fresh port bind succeeded. Temporary package copies were removed.
This closes the separate-service final-effect coverage gap. Pressure attribution remains inconclusive as recorded above.
Data-model compatibility proof
The two compatibility cells below cover the published 2026.9.7 updater completing an ordinary unmarked candidate upgrade and the installed candidate refusing after the app marker is added. Configuration and synthetic workspace state were preserved; the marked refusal launched no subprocesses and left package/state hashes unchanged. The marker is an opt-in packaging contract; no database/configuration/protocol schema or existing stored user data is changed. The coordinator accepted this evidence for the generic compatibility checkbox; no additional proof is required.
Published updater × candidate: passed
A real macOS/Node 26.10.0 first-hop cell used npm's current
latest, pinned to openclaw 2026.9.7 (published buildc074824a27c9), installed into a fresh canonical/private/tmpprefix. The candidate package was built fromd1de10a203f5; canonical build, package inventory, dist import graph, and tarball integrity checks passed. Candidate archive SHA-256:20f06fc73f41638cbc147c328512be2e3fd7f0c8e6fa946181f80e3c284d35d9.The repository's first-hop fixture helper stamped
2026.9.99-first-hop.0to force an actual update. It changed onlypackage.json,dist/build-info.json, anddist/postinstall-content-inventory.json; all candidate code and compatibility chunks were retained. HOME, state, npm prefix/cache, temp files, and the service label were isolated. No managed service was installed;--no-restartand the updater's isolated-state service skip preserve that absence. This cell covers package upgrade and state preservation; managed-service restart remains outside its scope.The child environment set
HOME=$PROOF/home,OPENCLAW_STATE_DIR=$PROOF/state,OPENCLAW_CONFIG_PATH=$PROOF/state/openclaw.json,NPM_CONFIG_PREFIX=$PREFIX, an isolated npm cache, and the uniqueb1-first-hop-canonical-20260930profile/service label.Commands (paths shortened to the recorded proof variables):
The installed published CLI performed the update:
{"exit":0,"status":"ok","mode":"npm","before":"2026.9.7","after":"2026.9.99-first-hop.0","markerPresent":false,"installedBuildMatches":true,"configValid":true,"gatewayModePreserved":true,"syntheticWorkspacePreserved":true}Candidate admission's config, database-schema, node-runtime, and plugin-availability checks all returned
ok. Candidate Doctor, config validation, plugin discovery, recovery check, Gateway startup canary, package swap, post-core Doctor, and post-plugin lint all exited 0. Build/pack wall: 1263.01 s; fixture generation: 25.07 s; published updater: 507.14 s; installed candidate config validation: 2.74 s.Second cell: write the required app marker into that installed candidate and run its real
update --jsonentry. All child-process launch APIs were instrumented to record and throw, so any Git/npm/service subprocess would fail the probe:{"exit":1,"status":"host-managed","reason":"host-owned-install","installKind":"host","message":"Managed by OpenClaw.app. Update OpenClaw.app to update this Gateway.","steps":[],"subprocessAttempts":0,"packageUnchanged":true,"stateFilesUnchanged":true}Marked-cell wall: 0.97 s. An initial fixture attempt used macOS's
/tmpalias and failed the updater's canonical publication-directory guard before replacing the old package (219.30 s). A fresh prefix using/private/tmpthroughout corrected that fixture input; no updater guard or source code was changed to obtain the passing cell.The coordinator's main fix
b872697936000supplies the missing route resolver in the unrelated scenario-flow fixture. This branch was then rebased onto79fded8bf552; the update consumers and all four repair patches are unchanged. The one mechanical run-loop conflict preserves main's direct synchronous lifecycle-owner calls with this PR's host-aware formatter. After rebase, all 6 host-lifeline tests passed (2.61 s), all 227 run-loop tests passed (78.20 s), and all 46 scenario-flow tests passed (43.67 s). Core types passed (13.16 s), targeted run-loop lint passed (10.73 s), formatting/whitespace passed, and fresh full-branch Codex review was scoped-clean through P2. Current-head CI and completed ClawSweeper review remain required before landing.Follow-up
d1de10a203f5applies the same read-only retained-recovery admission toupdate repairbefore install-root discovery and host-owner refusal, preserving the later pre-write check. The new repair regression failed on the previous ordering (20.06 s). Recovery, registered host CLI, repair command, and repair history tests then passed 100/100, with command walls of 67.75 s, 16.14 s, 39.94 s, and 70.26 s respectively. Targeted lint, formatting, whitespace checks, and Codex review through P2 passed.CI run 36671428988 hit
EADDRINUSEin the unchanged legacy-listener fixture. Inspection confirms it already claims the full[0, 1, 2]block, and the allocator's probes honor those claims. No unreserved-neighbor defect or competing socket owner was established, so no speculative allocation change is included. The observed 43-file Node slice passed locally (1,182 tests, 81.63 s), followed by the listener file (13 tests, 10.67 s); three further requested one-worker listener runs passed in 18.10 s, 42.60 s, and 51.30 s. These passing runs do not prove that collision is fixed. No assertions, timeouts, or CI jobs were weakened or rerun.All three full type-aware extension lint jobs passed in run 36671428988, closing the earlier local declaration-preparation gap. Superseded-head CI remains historical evidence; landing requires the new head's CI gate and completed ClawSweeper review.
Follow-up
39de352d173f5restores read-only pending-recovery admission before install discovery in finalization, while retaining the later pre-write recheck and the no-subprocess host refusal. The unchanged recovery regression failed before the fix. Afterward, pending-recovery tests passed 20/20 (249.41 s command wall), registered host-owned CLI tests passed 4/4 (68.42 s), and finalization-refusal tests passed 5/5 (74.95 s). Targeted lint/format and fresh Codex review passed; compiler/setup work dominates these cold command walls.Follow-up
f7c5ee89fc901moves the unchanged install-kind union to a dependency-free type module, removing two reverse type imports found by CI. Both cycle checks now report zero cycles. The fullpnpm check:architecturepassed (508.59 s), core typecheck passed (22.53 s), targeted lint passed (18.42 s), and fresh Codex review was clean through P2. No runtime behavior, tests, or baselines changed in this correction.Refreshed onto
df2a29cac9ad3after main's CI repair; the rebase was conflict-free and range-diff preserved the original feature patch. Follow-up6067c6dce1091fixes the ClawSweeper parent/child-environment finding. Both new override cases failed before the fix; all 21 stdio transport tests now pass (3.01 s command wall), along with 13 real process-group cleanup tests (12.20 s). Targeted formatting/lint and fresh Codex review passed for the correction. Current-head CI and ClawSweeper gates are required before landing.825 tests passed across 29 focused files, with one existing skip. Each source test command used
node scripts/run-vitest.mjs <file> --maxWorkers=1; the QA child/env files shared one invocation. The new EOF/restart/EPIPE run-loop cases each took 49–52 ms and use no sleeps. The inherited QA recovery fixture took 90.06 s and exercised a real mock-provider Gateway, queued follow-up, and cleanup.pnpm tsgo:core(11.69 s),pnpm tsgo:test:root(31.20 s), targeted core and extension lint, oxfmt, line/environment ratchets (476/476),git diff --check, andpnpm docs:listpassed. The finalpnpm build qaRuntimepassed in 70.04 s. Full SDK declaration preparation for an earlier type-aware extension lint attempt timed out; focused extension syntax lint passed, and the later native E2E build completed its declaration stages.Real built-entry smokes used isolated HOME/state and free ports. Closing the stdin pipe produced exit 0 in 776 ms on Node 26.10.0 and 779 ms on Bun 1.4.2, within the shutdown budget, with no restart. A copied package containing the marker returned exit 1 with
status: "host-managed", the app hint, and no attempted subprocesses, stderr, or state entries. Child-process APIs were instrumented to fail any Git/npm or other subprocess launch.Codex review found no actionable P0–P2 findings on the final source. The requested committed-branch review also returned
scoped-cleanthrough P2, with its verdict line verified. Historical CI failures and their resolutions are recorded above; no workflow was dispatched or rerun to manufacture this proof.Focused tests and measured command walls
extensions/codex/src/app-server/transport-stdio.test.tssrc/cli/gateway-cli/host-lifeline.test.tssrc/cli/gateway-cli/run-loop.test.tssrc/cli/signal-exit-barrier.test.tssrc/cli/update-cli.host-owned.test.tssrc/cli/update-cli/update-command-service-root-plan.test.tssrc/commands/doctor-gateway-daemon-flow.test.tssrc/commands/doctor-gateway-services.test.tssrc/commands/doctor-host-runtime.test.tssrc/commands/doctor-install.test.tssrc/commands/doctor-stale-runtime-build.test.tssrc/commands/doctor-ui.repair.test.tssrc/commands/doctor-ui.test.tssrc/commands/doctor-update.test.tssrc/commands/doctor/shared/plugin-runtime-symlinks.test.tssrc/commands/node-runtime-diagnostics.test.tssrc/commands/status-overview-surface.test.tssrc/flows/doctor-core-checks.runtime.test.tssrc/gateway/server-methods/update-host-owned.test.tssrc/gateway/server-methods/update-status-schedule.test.tssrc/gateway/server-qa-diagnostic-timings.test.tssrc/infra/install-owner.test.tssrc/infra/update-check-install-kind.test.tssrc/infra/update-startup-host-owned.test.tssrc/infra/update-startup.test.tssrc/node-host/auto-update.test.tsextensions/qa-lab/src/gateway-child.test.ts+gateway-child-env.test.tstest/e2e/qa-lab/runtime/gateway-repeated-request-recovery.e2e.test.tsCold command walls include compiler/setup work, which dominated the initial entry-point files (up to 16,746 compiled inputs). The QA E2E wall includes native runtime preparation of 29m 56.8s plus a 21.5s declaration invocation. The QA spawn assertion extends an existing fixture; the E2E only changes its environment-contract assertion. The larger run-loop file retains its existing process-lifecycle cases. These timings do not represent new sleeps or per-case Gateway boots.
Earlier failed attempts exposed a missing-marker ENOENT retry delay and fake-clock coordination; both were corrected and their regressions pass. A separate compiler-namespace failure occurred before tests because runtime preparation was replacing artifacts; serializing artifact preparation resolved it. Review also caught malformed generated QA fixture imports, which were fixed before the passing QA runs.