Repository navigation
fix(nodes): apply the same tool policy to node sessions as Gateway sessions - #160444
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: blocked before merge. Reviewed September 30, 2026, 3:54 AM ET / 07:54 UTC (Revision 27). ClawSweeper reviewWhat this changesThe branch prepares one Gateway tool policy and catalog for local and node-hosted sessions, routes Gateway-owned tools through a worker transport, and moves durable session-tool operations to the SQLite worker broker. Merge readiness⛔ Blocked before merge - 3 items remain Keep open: current main still has the reported node policy gap. The current head repairs the released decoder compatibility finding from the previous review, and this review found no new actionable defect. Priority: P0 Review scores
Verification
How this fits togetherThe Gateway receives session turns and configured tool settings, then admits a node worker with an allowed tool catalog. The worker runs local tools or asks the Gateway to run Gateway-owned tools, and the results enter the session transcript. flowchart LR
A[Session turn and tool settings] --> B[Gateway prepares tool catalog]
B --> C[Node worker admission]
C --> D{Tool owner}
D --> E[Node-local execution]
D --> F[Gateway execution with live claim]
E --> G[Session transcript]
F --> G
Before merge
Agent review detailsSecurityNone. PR surfacePR surface statistics unavailable: the file list is incomplete. Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep the Gateway as the tool-policy owner, retain released decoder imports until an announced breaking package release, and use the documented node-host update path for incompatible hosts. Do we have a high-confidence way to reproduce the issue? Yes, from current-main source: the node worker constructs tools with an isolated config and empty image limits. This read-only review did not run the failing path. Is this the best way to solve the issue? Yes. Gateway preparation is the appropriate policy owner, and retaining released decoder imports avoids a package upgrade break. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 1caaef4b6f10. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (26 earlier review cycles; latest 8 shown)
|
d5a6343 to
4d4953e
Compare
9b809fc to
49a58fd
Compare
49a58fd to
bc06aa5
Compare
|
Merged via squash.
|
…d pass (#161737) Third-pass maintainer-requested Gateway cleanup following #159752 and #161284. Reuse canonical validation, stable bounded sorting and placement matching; consolidate RPC and workspace projections and remove forwarding wrappers. Preserve protocol, RPC results and errors, live-owner authority, worker lifecycle/fencing and persisted state. No user-visible behavior change is intended. Drop overlaps already landed in #160444, #161085 and #161642. Validation: independent Codex review clean at P0-P2; both import-cycle checks report zero; lint clean; 401 tests passed across 28 files and five Vitest shards, with one existing opt-in Podman skip. Rebased protocol generation has zero drift and SDK export/surface checks pass. Full source reading covered 645 production files at the starting base. Hosted CI run 36693161484 executed its build/test lanes. The sole failed test, session-activity-summaries.test.ts relocated-store recovery (expected 2 to be 3), also fails on unrelated PR #161714 head 8080a45, run 36692028664 job 109811633901. The changed RPC/workspace code is outside the failing execution path. Land under the explicitly authorized pre-existing-failure exception; retain this failure for the main-CI coordinator.
…ssions (openclaw#160444) * fix(nodes): apply the same tool policy to node sessions as Gateway sessions Share Gateway tool preparation and resolved filesystem/apply_patch policy with worker turns. Deliver the issued surface during admission and route Gateway-owned tools through one build-gated transport. Move session-tool grants and durable operation journals to the SQLite worker broker while preserving live authority, replay, cancellation, and recovery. * fix(nodes): repair worker tool surface CI contracts Keep worker-only schemas outside the operator registry, distinguish worker tool proxies from Gateway executors, and split runtime and receipt contracts from their implementations. Extract coherent source and test siblings without weakening authority checks or removing coverage. Remove unused profile inputs and migrate their internal callers. Validation: 67 focused test files pass on the isolated Linux lease; core, package, source-test, extension, and UI-test typechecks pass. Protocol generation, export contracts, architecture, formatting, assertion safety, and line-cap checks pass. The changed-set Node matrix has 93 rows against its 130-row cap; aggregate production LOC remains negative. * refactor(nodes): retire unused worker tool exports Keep worker protocol primitives, local tool grouping, and the Skill Workshop descriptor private now that shared constructors own their callers. Remove the unused worker session-tool name type; no runtime implementation or public package entry point changes. Validation: full Knip production and export scans, protocol generation/checks, core and package typechecks, and nine affected test files pass on the isolated Linux lease. The export-only diff passed independent review through P2. * fix(nodes): preserve authority receivers and async fixture ordering Bind portal authority methods to their owner, await worker recovery and authorization in affected fixtures, and preserve immutable tool descriptors while projecting tools. Enforce required braces and exhaustive operation handling, remove obsolete policy inputs and duplicate projections, and retire the no-longer-needed max-lines allowance. Validation: typed lint on all changed files, core and complete source-test typechecks, and 88 focused test files pass on the lease. The portal receiver regression fails against the prior implementation. Independent repair review is clean through P2. * refactor(agents): colocate configured main-session helpers Keep configured-main lookup and creation with the existing sessions-send delivery owner after rebasing. Preserve roster, sentinel, optional agent identity, and Cron authority behavior while removing the line-cap growth. The main-key constructor is the same owner called by the previous constant-main adapter. * test(workers): reuse the shared gateway tool capability The attached environment fixture already advertises worker-gateway-tools-v1. Appending it again violated the admission schema uniqueItems contract and rejected both queued launches before the browser custody assertions could complete. Remove only the redundant import and entry; keep skill-resource admission and every custody assertion unchanged. * fix(workers): register tool cancellation before yielding Admission already prepares and issues the exact tool handles. Consume those validated handles synchronously during invocation so immediate cancellation and close can see the call before it yields. Preserve live authority checks, FIFO barriers, active-call joining, four-call bounds, and cooperative settlement. The Gateway RPC regression fails on the prior implementation and passes with the fix. All 210 tests in 11 affected files pass; production LOC is unchanged by this repair. * fix(tooling): include worker tool protocol dependencies in PR wrapper Keep the trusted wrapper extraction inventory closed over the worker-admission runtime imports by including the worker Gateway-tool schema and its validation-error dependency. Preserve the extracted-context and inventory closure assertions. * fix(workers): preserve control budgets across mixed-media results Share encoded frame accounting with transcripts and keep unreadable input rejection inside its owner. Verify fresh catalogs and handles across warm retained turns, preserve current node launch limits, and align the async authority fixture after the main rebase. * fix(workers): preserve protocol imports and live sender authority Share canonical session-tool schemas and collapse duplicate tool, receipt, and teardown plumbing. Preserve published 2026.9.6 decoding imports without advertising retired RPCs. Carry sender authority through direct steering to the final enqueue. * fix(agents): retain the typed tool description projection * style(workers): retain compact type import layout * refactor(tools): construct projected tools in a single pass * fix(workers): preserve acyclic tool and receipt contracts Keep cross-owner tool and receipt types in leaf modules. Consolidate preparation and live/abort checks without changing validation order, and reuse the canonical timeout and captured caller facts. * style(workers): distinguish the prepared catalog binding * fix(workers): project claim data before database dispatch * refactor(workers): share publication settlement and string normalization Preserve commit, rollback, invalidation, and tool binding order after main integration. Reuse the canonical string normalization owner and keep the complete production diff net negative. * test(gateway): track lazy prepared tool construction * fix(cron): use the prepared capability profile contract * test(agents): restore real tools in prepared delivery fixture * fix(protocol): preserve published worker presence decoders Retain the schemas, types, validator, and feature constant shipped in @openclaw/gateway-protocol 2026.9.7 as decoding-only APIs. Keep the retired worker RPC unadvertised and preserve the published error-code schema shape. Extend the compatibility regression and share static inventory transport normalization. Production remains net -11 lines against the PR base.
…d pass (openclaw#161737) Third-pass maintainer-requested Gateway cleanup following openclaw#159752 and openclaw#161284. Reuse canonical validation, stable bounded sorting and placement matching; consolidate RPC and workspace projections and remove forwarding wrappers. Preserve protocol, RPC results and errors, live-owner authority, worker lifecycle/fencing and persisted state. No user-visible behavior change is intended. Drop overlaps already landed in openclaw#160444, openclaw#161085 and openclaw#161642. Validation: independent Codex review clean at P0-P2; both import-cycle checks report zero; lint clean; 401 tests passed across 28 files and five Vitest shards, with one existing opt-in Podman skip. Rebased protocol generation has zero drift and SDK export/surface checks pass. Full source reading covered 645 production files at the starting base. Hosted CI run 36693161484 executed its build/test lanes. The sole failed test, session-activity-summaries.test.ts relocated-store recovery (expected 2 to be 3), also fails on unrelated PR openclaw#161714 head 8080a45, run 36692028664 job 109811633901. The changed RPC/workspace code is outside the failing execution path. Land under the explicitly authorized pre-existing-failure exception; retain this failure for the main-CI coordinator.
What Problem This Solves
Node-hosted session turns reconstructed a different tool surface and could ignore the Gateway's configured filesystem containment and
apply_patchpolicy. This change prepares one tool catalog and policy for local and node execution, and refreshes the catalog on every admission into a retained worker.User Impact
Node sessions honor the same global and agent-specific filesystem/patch settings, permission precedence, read budgets, and image sanitization as Gateway sessions. Older nodes retain their declared launch-tool limits. No configuration or stored-data migration is required.
Gateway-owned session, portal, skill-workshop, and presence tools use the generic
worker.gatewayTooltransport. Handles remain bound to the exact live run, turn claim, placement generation, and environment owner epoch. The existing SQLite worker broker owns durable spawn/send election, replay, cancellation, settlement, and restart recovery. Mixed-media results share the transcript transport's byte-budget owner: encoded image data may use the media allowance, while text, details, and overhead remain within the control budget.Why This Change Was Made
Integrated main through
fad7d345a0c7, preserving warm retention, prompt caching, completion waits, workspace reconciliation, capability negotiation, and busy-child steering before follow-up custody. The directsessions_sendsteering path carries sender authority through asynchronous transcript preparation and revalidates it at the final enqueue, including its supported retry. Main’s selected-person wrappers, notification dispatch, and recipient-owned steering custody remain intact; the non-operator enqueue guard does not reattach sender lifetime to accepted operator guidance. A revoked sender cannot enqueue new input; revocation after successful admission does not withdraw accepted input.Published
@openclaw/gateway-protocol2026.9.6/2026.9.7 spawn/send/portal/presence decoding imports remain available. Prepared spawn/send argument schemas have one canonical protocol owner, with core reexports and legacy envelopes composed from it. Retired RPCs remain unadvertised. The package README names removal in an announced breaking package release after consumer migration.Production LOC and Deletion Ledger
Production means all files except tests/test support/harnesses/suites and documentation. Against merge base
fad7d345a0c7: +4,546 / −4,557 = −11.Shared protocol argument schemas, tool construction and inventory projection, durable operation kernels, and one generic transport replace the former parallel paths. Published decoding imports remain covered by the compatibility contract above. Gateway-tool and operation-receipt types remain leaf contracts to preserve the acyclic import graph. Transport concurrency and durable-operation limits remain separate because their lifetimes differ.
The exact claim/owner projection excludes host callbacks from database-worker payloads. The landing refresh preserves main's workspace-result receipt checks and recipient-owned steering custody. A final 14-line reduction shares once-only publication settlement, reuses canonical string normalization, and maps tool bindings directly without changing ordering or authority.
Evidence
Merged through the native maintainer workflow at
2026-09-30T08:14:32Z: reviewed head92da8c64608d3d6af5b132c8a7180441f6354521, squash commit10ea4739bd0f3d72663fd924197530bef1c4f6b6on main. No admin exception or CI rerun was used.@openclaw/[email protected]artifact (published2026-09-30T03:29:18.678Z) exports the presence schemas, types, feature constant, and validator. These now remain in the existing decoding-compatibility owner. The shared error-code schema retains its published literal-union representation. Retired presence RPCs remain absent from active method, feature, and schema registration.fad7d345a0c7. Fresh isolated autoreview is clean at P0–P2 after fixing its test-assertion finding.4dcc44aa9022c4a3f72e471ced2abb34e58ceb47before its runtime build and live run. The QA runtime build passed in 61 seconds.measure.sh npl23 3returned all six expected local/node responses; warm node final times were 2,744/2,525 ms. The optional phase-marker display exits 1 on this uninstrumented build; all responses were independently asserted.openclaw/ci-gate; no rerun was used. ClawSweeper review completed for this head at2026-09-30T07:54:53.891Z, confirmed the released presence API repair, and reported no actionable defect. The compatibility regression costs 3 s wall / 58 ms test body locally; per-file CI timing was unavailable. Both prior refreshed heads also passed CI without a rerun. The original settlement timeout reproduced 5/5 on clean main and 5/5 on the original PR head, and existing main repair52e60fb42bc3eis incorporated. The historical Windows declaration timeout remains unexplained; Windows is required for ordinary PR CI and was never treated as advisory.Previous-head evidence and investigations
Previous candidate
0fe1ee3af92deLanding candidate:
0fe1ee3af92defb8220825820207149debc94054.85547eb360609passed exact-head CI run36675923646on attempt 1 with no rerun. Main advanced during native merge admission and introduced a conflict between adjacent type-only imports inservice.types.ts. The native wrapper confirmed a pre-dispatch abort with no merge request or outcome record, and its exact operation lock was recovered after all child tools exited.fad7d345a0c7, retaining bothAnyAgentToolandCloudWorkerSetupMutationAdmissionimports. Main's node-enrollment admission callback and equivalent portal property-update loop compose with the existing tool surface; no prepared-tool or transport implementation changed. Production remains +4,499 / -4,503 (net -4). Fresh two-pass whole-candidate autoreview found no actionable P0–P2 issue.4599b496a7ca0ef9e9db6dc02645dc7243793960, which is the committed candidate tree. Core and extension typechecks passed in 16/26 seconds. All 331 focused tool/worker/portal/enrollment tests passed across 20 files in 199 seconds. All 56 Codex sibling tests passed across seven files in 39 seconds, including the original six-file CI settlement composition and native-hook fallback.measure.sh npl23 3returned all six expected local/node responses; warm node final times were 3,060/3,501 ms. Its optional phase-marker display exits 1 on the uninstrumented build; responses were independently asserted. Exact-head CI run36680607340passed. ClawSweeper subsequently identified the released-presence API issue repaired by the current candidate; this prior head was not merged. The previous candidate's full production build, 4,861-test app-server suite, and live proof are retained below with their original head rather than presented as new-head runs.52e60fb42bc3eis included; no parallel runtime repair was added. The historical Windows declaration timeout is outside the PR runtime and remains unexplained; Windows is required for ordinary PR CI, and the prior refreshed head passed it. Details and limitations are retained below.Previous reviewed candidate
85547eb360609Landing candidate:
85547eb3606094ffacc7e7da7745dcea3c6afc69.bcd3cace19112: retain main's removal of unused browser runtime forwarding exports and keep only the prepared browser-tool definition export required by this PR. Production remains +4,499 / -4,503 (net -4). Whitespace checks pass. Fresh isolated whole-candidate autoreview completed both passes with no actionable P0–P2 findings.run-attempt.settlement.test.tsfailure on AWS withnode scripts/run-vitest.mjs extensions/codex/src/app-server/run-attempt.settlement.test.ts --maxWorkers=1, five times on clean main merge-basedf2a29cac9adand five times on PR head3c200c006909. Every run failed onlysettles timeout at final with writer release after cutoffat 120 seconds; six sibling cases passed each time. Baseline wall times: 190/150/150/150/150 seconds. PR-head wall times: 194/151/149/151/151 seconds. The conditional original-shard replay was unnecessary because the single-file comparison reproduced the defect on both revisions.5367527c271rejects reuse of a rotated predecessor's thread ID. The successor fixture still returnedthread-1for freshthread/start, so the runtime refused it and the fixture waited for an unreachableturn/start. Main already repaired this in52e60fb42bc3e; that fix is incorporated here without a parallel Codex patch. The fixture setssupportsTools: false, returning before shared tool construction. Personally inspected sibling Codex source atade0ccacf9182e665cf784de041c51a79e35bc31, includingrequest_processors/thread_processor.rsfresh thread creation andbespoke_event_handling.rsterminal notifications.109739667913timed out in the unchanged synthetic declaration fixture after 186,285 ms (configured timeout 120,000 ms). Its declaration/build inputs are outside the changed tool runtime. Recent hourly main Windows runs36661253850,36653919235, and36645461605passed; no matching timeout was found in the bounded sample. The earlier Windows failure in36640080821was preparation rejection before tests. The timeout cause remains unresolved. Windows is required for ordinary PR CI; the Full Release Validation advisory exception does not apply.b5e81afe550f6f5140477a81f9bdbcb54569b4f6.tsgo:corepasses in 14 seconds andtsgo:extensionsin 16 seconds. All 280 focused tool/worker tests pass across 18 files in 213 seconds. The normal Codex app-server suite passes 4,861 tests with 11 skips across 319 files in 572 seconds; the formerly hanging final-writer cutoff case passes in 822 ms. Fullpnpm buildpasses in 472 seconds. Livemeasure.sh npl23 3returned all six expected local/node responses; warm node final times were 2,624 and 2,860 ms. The script exits 1 only because its optional phase-marker display is empty on this uninstrumented build; all six responses were independently asserted. Exact-head CI run36675923646passed on attempt 1, and ClawSweeper completed this exact head at2026-09-30T06:05:14.205Zwith no actionable code finding. Native admission later stopped before dispatch because main introduced a type-import conflict; no merge request or outcome record was created.The records below are historical evidence, not current-head CI claims. The reproduced settlement cause and landed owner fix above supersede the earlier unresolved attribution.
Landing candidate:
3c200c0069090a4f93905d8d3fd8127372a20704.df2a29cac9ad37c31a0f5a0d977ba3e4fd833cb0, including the CI-harness fixes6c07ebfaf475anddf2a29cac9ad. The former competing repair fix(ci): unblock extracted manifest checks #161569 was closed as superseded. The sibling parity PR perf(nodes): load only what a worker turn needs #160442 remained open at publication.git range-difffrom the prior candidate; the rebase had no conflicts or changed PR code. Main's overlapping files contain disjoint changes to session-list validation, test bootstrap naming, wrapper inventory, and shrinking ratchets.git diff --checkpasses, and production LOC remains net −4. Existing focused tests, types, builds, live proof, and clean autoreviews below remain prior-candidate evidence; no new lease run is claimed for this mechanical refresh.36667758773attempt 1 passed preflight, build, and lint, then failed in two unrelated lanes; 23 other jobs were cancelled, and their coverage is not claimed as passing. Job109736332740passed its Node subset (962 tests plus 1 skip) and storage subset (716 tests plus 4 skips), but Bun Canary1.4.3-canary.1(6b9148b17) crashed withSIGSEGV/ address0x2459 ms intovitest.gateway-client.config.ts, before any Bun test result. Job109736332407timed out at 120,000 ms inrun-attempt.settlement.test.ts/settles timeout at final with writer release after cutoff; its other 44 tests passed.4e05d7d7e88d1882081f27aa4342aef791bfbe19is identical at the merge base, PR head, and main7894445e4ea54. The Codex implementation/harness, session/transcript owners, relevant Vitest configs, worker bootstrap, package manifest, and lockfile are unchanged by this PR. The fixture setssupportsTools: false; the dynamic-tool builder returns beforecreateToolSurface, so the prepared-tool change does not enter this timeout path. No competing fix was found in current main or the targeted open-PR search. The timeout cause remains unresolved; source attribution is not a reproduced root cause. Per the mechanical-refresh proof constraint, no new lease suite was run. The single permittedgh run rerun 36667758773 --failedrequest for this refreshed head was submitted after this investigation. No further rerun allowance remains for this head; a passing retry will not be claimed as a fix.109739678335(44 sibling tests passed). The Bun retry lane was cancelled after this failure, so no successful Bun replay is claimed. No further rerun or source change was made. Landing is held for the unchanged Codex settlement failure; its exact awaited stall is unresolved. Open PRs fix(codex): retain complete answers while previews are pending #139260, fix(codex): use monotonic clock for attempt execution deadline #155801, and fix(codex): stop recovery warnings after delivered final replies #153758 concern different preview, execution-clock, or recovery behaviors and do not establish a fix for this writer-cutoff test.109739667913:test/scripts/tsdown-declaration-resolution.test.ts/honors resolved dts=true over the opposite workspace defaulttimed out at 120,000 ms (161 tests passed, 7 skipped). The fixture blob2e6958e1e8b50f2c3ce96756e909f96b4e98f093, declaration helpers/config, manifest, and lockfile are unchanged by the PR; it builds synthetic declarations rather than worker tool code. Its cause remains unresolved; no matching open repair was found. Latest maine2f73b9c69473still has both identical failing fixtures and unchanged Codex terminal/transcript owners.3c200c0069090a4f93905d8d3fd8127372a20704at2026-09-30T04:20:20.979Z, with no actionable code findings. Its published-host upgrade concern remains the explicitly accepted proof limitation described below; protocol schemas are not a changed persisted database model. No merge request has been submitted.Previous candidate (
31eec699c275)The following records preserve prior-head results and investigations; they are not current-head CI claims.
agentDirprofile argument; its real tool and MCP consumers still receive the directory.presenceandexecon both turns; canonical history contains all four successful tool results. The final three-turn local/node measurement returned all six expected pong responses. Warm node final times were 3,183 and 2,762 ms; main baselineca8f24d05fc4was 2,449 and 4,219 ms. The optional phase-marker display exits 1 on an uninstrumented build; all six responses were independently checked.36660633932, job109714839098, timed out only in the unchanged synthetic package-mode fixture (package-openclaw-for-docker.e2e.test.ts, 120,000 ms; 66 other tests passed, 3 skipped). Its offlinenpm pack <normalized archive> --dry-run --json --ignore-scripts --offlinereceipt child was still alive at job cleanup. The test, packaging driver, inventory/subprocess helpers, fixture/env helpers, manifest, lockfile, and tsconfig are byte-identical between base6562480a495d, this PR, and main snapshotf1fc708f75c7; changed worker/tool code does not enter that child. No competing main fix was found. An original-order replay with the CI prebuilt/build flags and two workers passed 67 tests plus 3 skips in 59.13 s on Node 24.19.0. The npm stall cause remains unresolved; the passing replay is not a fix. The single permitted failed-jobs rerun was used; packaging passed as job109719153581in attempt 2. No rerun allowance remained for that prior candidate. The first attempt also cancelled 70 jobs; that coverage is not claimed as passing.run.prepared-harness-source-delivery.integration.test.ts(job109719151079). The complete original-order shard reproduced the same sole failure (648 passed; that first replay had the prebuilt-dist flag set, unlike CI); the CI main parent9cda3b850b5cpassed the full test file while the PR failed it. Exposing the resolver rejection identified an incompleteask_usermock, not lost TTS provenance: the shared constructor table readscreateAskUserTool, but the dispatch fixture mocked only prompt readiness. The integration now restores the real module during harness setup and explicitly checks the resolver promise so dispatcher error handling cannot hide the cause. All ten cases pass in 60.08 s wall (28.18 s Vitest duration, one worker). No production code changed; prior runtime/build/live proof remains applicable. Fresh scoped autoreview is clean; the affectedagents-othertypecheck, typed lint, and formatting pass.36666025793is blocked bycheck-lintjob109731099094: 20 diagnostics in main-ownedscripts/ci-build-manifest.mjs, introduced by9d75a8fe87af5(ci(release): regain ci.yml headroom, pin the QA runtime-pair lane, and split Codex plugin tests #161534). This PR does not change that file. Its blob750ebafba61436189d054bdd63db888e5f130235is identical at the tested main parent9c11a9917c51and current mainbc5bc240913e. The exact-main targeted script lint reproduces all 20 errors on the isolated lease (0.358 s). The lockfile, lint config, and lint runner are unchanged; manifest differences are unrelated package files/Windows test commands. The existing repair is fix(ci): unblock extracted manifest checks #161569, still open at this observation. No duplicate repair, CI rerun, or merge request was submitted. Cancelled CI coverage is not claimed as passing.31eec699c27588069b88d4b422ed65a5b3d602c2at 2026-09-30T04:01:22.937Z with no actionable code findings. Its published-host upgrade concern and schema/config classifications are addressed in the compatibility response below. This is prior-head evidence; the refreshed head requires its own completed review.Earlier landing refresh (
bd740f53b74b/9223952e3a53)2a0a65c4ae69is patch-identical to the reviewed candidate.pnpm buildpassed in 471.96 s. The remote staged source tree matched the final candidate exactly. Runtime/build proof precedes only the disjoint main type-import fix; its architecture proof ran after composition.presenceandexecsuccessfully on both turns; canonical history contains all four successful tool results. The three-turn local/node measurement returned all six expected pong responses. Warm node final times were 2,437 and 2,669 ms; the refreshed main baseline was 2,449 and 4,219 ms. The optional phase-marker display exits 1 on an uninstrumented build; all six responses were independently checked.36656041787, job109700902583, found one PR-caused stale source assertion inserver-import-boundary.test.ts: it required the retired promise-chain loader spelling after the new tool factory switched toawait. The exact-head focused replay reproduced the failure (19.42 s). The assertion now names the current lazy call; eager-import and lazy-factory guards remain, and the sibling runtime lazy-startup suite still verifies actual loading behavior. All 15 tests in both files pass (52.38 s), and fresh focused autoreview is clean. Production code and its earlier proof are unchanged. Other unfinished CI shards were cancelled; no CI rerun was used.Earlier-head evidence (
10e831d58093)copyBeforeToolCallWrapperMetadatadirectly callscopyPluginToolMetabefore copying other metadata. No accepted finding remains.tsgo:alllanes and extension test types pass on final head10e831d58093. The full architecture check passes with zero runtime/Madge cycles. Protocol generation/checks, the PR wrapper inventory, formatting, the Control UI catalog, and line-cap/max-lines/assertion-safety ratchets passed. Extension lint (10,563 files), script lint (1,254 files), and affected core files pass with zero warnings/errors.presenceandexecon both turns. Canonical history contains all four successful tool results, and both node-journal rows bind the same physical worker owner.sessions_spawnandsessions_sendpassed through the generic transport. The child canonical history contains exactly one message with matching inter-session provenance, sender session, and idempotency key. A cross-tree send returned the expected family-boundary denial; the unrelated root retained zero history messages.measure.sh <lease> 3returned all six expected local/node pong responses. Warm node final times were 2,270 and 3,219 ms (baseline: 2,339 and 2,574 ms). The optional phase-marker display returns exit 1 on an uninstrumented build; all six client results were independently asserted. The baseline fixture needed the canonical Doctor schema migration after main integration; repair completed before this successful rerun.36524003513stopped atcheck-additional-runtime-topology-architecture: type-only imports through runtime implementations created two cycles. Other unfinished jobs were cancelled. Restored leaf contracts fix the cause; the full architecture check now passes with zero runtime and Madge cycles. The repair passed review, core types, typed lint, line caps, the wrapper inventory, and 135 focused tests. One earlier focused process ended with SIGKILL without an assertion or kernel OOM record; the same-order replay passed, but the termination cause remains unknown.36531874830, job109287556130, exposed an inherited fixture defect inci-node-worker-owner-boundary.test.ts:OPENCLAW_E2E_USE_PREBUILT_DIST=1leaked from the host CI job into a deliberately sparse historical runner. This triggered an unrelated missing build-prerequisite import before the ownership assertions. Reproduced the same two failures with that CI flag; clearing it only in the fixture makes all six cases pass (3.90 s wall). Production validation stays unchanged, every existing assertion remains, and fresh scoped autoreview is clean. The failure was inherited from main; the same fixture repair subsequently landed there asbb4573cd427cand composes cleanly with this branch. No blind CI rerun was used.36533312569, job109292121329, found a PR-caused claim-adapter regression: cloning the whole structural input included a personal-publication authority callback. The real personal-publication suite reproduced both failures. The adapter now captures exactly the claim scalars and owner variant before yielding, and the handoff wrapper captures its exact outer fields. Host callbacks stay with the existing admission guard. All 162 affected publication, claim, worker-tool, workspace-guard, and inventory tests pass (150.75 s); core types, five receipt-worker tests, full architecture, typed lint, line caps, and the wrapper inventory pass. Fresh autoreview is clean. Existing publication failures supply the regression coverage.36537574384was cancelled after two roots: an unchanged projection timing test measured 107.36 ms against 100 ms; its original Node subshard replay passed 1,044 tests (plus2 skips), with requests 25.98/16.50 ms and no assertion changes. Replay is not claimed as a fix. The other root is inherited from main’sb4ae783fbfd2(feat: connect Agents API sessions to HTTP MCP servers #160931): three documented callable SDK exports raised actual counts to 4594/2698 while budgets remain 4591/2695. The PR head passes all10 SDK tests; the exact CI main baseline reproduces the mismatch. A two-number correction passes all 10 tests on the CI baseline and current main52992fb086a7, and fresh review is clean; the budget correction subsequently landed on main asa49e76e18625and is included in the refreshed base. No CI rerun has been used.10e831d58093at 2026-09-29T07:45:00.670Z. Its failed CI and completed review are retained here as historical evidence.Full core lint also reported five inherited line-count warnings in files unchanged by this PR:
draft-submission-flow.test.ts,sessions.dispatch.device.test.ts,talk/relay/session-create.ts,node-worker-supervisor.ts, andopenai-responses-stream-internal.ts. Its two PR-caused errors were repaired and verified with targeted typed lint.ClawSweeper review response: allowed family delivery and cross-tree denial are exercised through the real node-origin generic transport and verified in canonical target histories. Revocation during asynchronous transcript preparation is deterministic boundary proof using the real session loop and SQLite transcript, with no accepted message or persisted input from the revoked sender. This is not claimed as a live revocation-race trace. The published-node-host upgrade run has not been performed: node-host/supervisor code and bundle admission are unchanged;
admission.tsalready requires the exact Gateway bundle/version/features, andworker-tool-authority.tsstill intersects the catalog with the node’s declared launch names. The new feature belongs to that current worker bundle, not a new node-host protocol. These source contracts and focused sibling tests support the unchanged upgrade boundary; no published-driver proof is claimed. No config option, SQLite schema, stored journal shape, retention, or permission grant changes. Protocol wire schemas are not database schemas.Live proof uses isolated loopback node hosts on a disposable AWS lease, not physical-device or wide-area-network proof. No baselines, ignores, limits, or assertions were weakened.
Measured cost of changed test files
The new sender test includes cold worker compilation and real session-loop/SQLite transcript preparation; its test bodies take about five seconds. A mock queue would not prove the final enqueue/persisted-transcript boundary.
Single-file measurements use
pnpm test <file> --maxWorkers=1on the isolated 32-core Linux lease. The two new regression costs are from this refresh. Earlier per-file measurements are retained for cost context; the aggregate verification above covers the candidate. Longer inherited integration suites cover real admission, SQLite workers, replay, and process cleanup. The added warm-turn case takes about 0.3 s and uses deferred events, without new timers or polling.src/agents/embedded-agent-runner/run.prepared-harness-source-delivery.integration.test.tssrc/gateway/server-import-boundary.test.tspnpm testwith--maxWorkers=1src/agents/openclaw-tools.media-workspace.test.tssrc/agents/tools/openclaw-tools.spawn-session-key.test.tssrc/gateway/github-personal-publication.test.tstest/scripts/ci-node-worker-owner-boundary.test.tspackages/gateway-protocol/src/worker-session-tools-compat.test.tssrc/agents/tools/sessions-send-tool.queue-authority.test.tspackages/gateway-protocol/src/schema/worker-admission.test.tspackages/gateway-protocol/src/schema/worker-gateway-tool.test.tssrc/agents/agent-tools.prepared-surface.test.tssrc/agents/apply-patch.operator-hint.test.tssrc/agents/conversation-capability-profile.test.tssrc/agents/embedded-agent-runner/run.overflow-compaction.loop.test.tssrc/agents/prepared-tool-surface.test.tssrc/agents/tools-effective-inventory.policy.test.tssrc/agents/tools-effective-inventory.test.tssrc/agents/tools-effective-mcp-inventory.test.tssrc/agents/tools/scoped-session-access.test.tssrc/gateway/github-repository-publication-restart.test.tssrc/gateway/portals/portal-service.test.tssrc/gateway/server-methods/portals.session.test.tssrc/gateway/server-worker-environment-startup.lazy.test.tssrc/gateway/server.placement-abandonment.test.tssrc/gateway/server/ws-connection/message-handler.worker.test.tssrc/gateway/server/ws-connection/worker-connection.gateway-tools.test.tssrc/gateway/skill-library-authoring.test.tssrc/gateway/worker-environments/computer-transport.connection.test.tssrc/gateway/worker-environments/placement-abandon-lifecycle.test.tssrc/gateway/worker-environments/placement-dispatch-continuity.test.tssrc/gateway/worker-environments/placement-dispatch-staged-results.test.tssrc/gateway/worker-environments/placement-dispatch.test.tssrc/gateway/worker-environments/placement-force-abandon.test.tssrc/gateway/worker-environments/placement-move-abandon.test.tssrc/gateway/worker-environments/placement-session-tool-operations.worker.test.tssrc/gateway/worker-environments/placement-store-terminal.test.tssrc/gateway/worker-environments/placement-turn-authority.test.tssrc/gateway/worker-environments/placement-worker-gate.test.tssrc/gateway/worker-environments/provider-runtime-refresh.test.tssrc/gateway/worker-environments/worker-gateway-tool-runtime.test.tssrc/gateway/worker-environments/worker-portal-tool-executor.test.tssrc/gateway/worker-environments/worker-session-tool-executor.send.test.tssrc/gateway/worker-environments/worker-session-tool-executor.test.tssrc/gateway/worker-environments/worker-tool-authority.test.tssrc/gateway/worker-environments/worker-turn-rpc.gateway-tools.test.tssrc/gateway/worker-environments/worker-turn-rpc.test.tssrc/worker/worker-connection.test.tssrc/worker/worker-gateway-tools.test.tssrc/worker/worker.runtime-imports.test.tssrc/worker/worker.runtime.test.tssrc/gateway/worker-environments/worker-turn-execution.test.ts