Repository navigation
refactor(gateway): deslop gateway - #157976
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 25, 2026, 4:58 AM ET / 08:58 UTC (Revision 4). ClawSweeper reviewWhat this changesThe branch consolidates Gateway session, node, Talk, HTTP, and secret-handler logic and adjusts related HTTP and reload tests, with no intended user-visible change. Merge readiness⛔ Blocked before merge - 3 items remain Keep open: current main still has the duplicated Gateway paths, and the branch is a coherent consolidation. The inspected changes reveal no concrete introduced correctness or security defect. Priority: P3 Review scores
Verification
How this fits togetherThe Gateway receives client and node requests, validates authority, and routes work to sessions, agents, and plugins. Its handlers return responses and publish events to the requesting clients. flowchart LR
A[Client and node requests] --> B[Gateway validation]
B --> C[Authority checks]
C --> D[Session, Talk, and node handlers]
D --> E[Agents and plugins]
E --> F[Responses and events]
Before merge
Agent review detailsSecurityNone. PR surfacePR surface statistics unavailable: the file list is incomplete. Review metricsNone. Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep one Gateway owner for each validation and result path while preserving response, approval, session, and operator-state contracts through normal landing checks. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a duplication cleanup, and the older paths remain visible in current-main source. Is this the best way to solve the issue? Yes: the inspected changes reuse existing validation, normalization, and error owners without establishing a competing policy path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 79399a653aab. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles) |
d0291d5 to
9aa1fe0
Compare
9aa1fe0 to
0bb1b5a
Compare
|
Merged via squash.
|
* refactor(gateway): deslop gateway * refactor(gateway): consolidate remaining session and HTTP helpers * test(gateway): await deferred reload replay * refactor(gateway): share session validators and errors
What Problem This Solves
Gateway session, node, Talk, and HTTP handlers repeat validation, result construction, projections, and forwarding code, increasing the number of places that must stay consistent.
User Impact
No intended user-visible change. RPC names and payloads, authorization and post-await revalidation, configuration, SDK exports, and persisted data retain their contracts.
Why This Change Was Made
Route each operation through its existing owner and remove redundant intermediate data and wrappers. The validated-handler adapter retains the original request object, including its opaque mutation-authority binding.
The reload fixture now observes the actual replay-deferral signal before checking its state, rejecting premature receipt settlement. All existing assertions, real watcher behavior, fake-timer advances, and timeouts remain intact; repeated fixture-listener guards use the existing assertion helper.
Compatibility review:
server-methods/doctor.tsreadsresolved.phasesand retains the sameresolved.enabled && phase.enabledcondition assrc/memory-host-sdk/dreaming.ts:513; its repair/write handlers are unchanged. The shared cron status still comes from the same single list operation.worker-environments/placement-row-codec.tsreplaces equivalent null-or-required branches with its existingnullableRequiredhelper. No config definitions, defaults, database schemas, persisted representation, migration, or upgrade behavior changes; no migration is needed. ClawSweeper reported no concrete introduced defect; its broad config/data prompts were checked against these owners and the complete local diff.Consolidations and rationale
Evidence
Coordinator approved
d0291d59a30017c578fa87530d613da267cf121f. Landing head0bb1b5a54d046d5fa401dc9ec33bd1dd90517bb9was rebased without conflicts onto2d94121bb0ac7a4404e8a81fc00ffd735a89eac5, including owner fixes #157836/449fc2e6c57and #157996/6f51289a1e5. The production delta remains identical to the approved version after excluding only Git index and hunk-location headers: 82 files / +2018 / -3035; no semantic change. CI run36111367166attempt 2 completed SUCCESS on this exact head, and the aggregate gates passed. The coordinator authorized exactly one failed-job rerun after the bounded verifier A/B; no second rerun occurred. The earlier verifier failure is not claimed fixed or exonerated by passing replays. A separate constrained-resource, 20+ iteration investigation is authorized after landing. Native review/prepare/merge retains all required gates; earlier validation below remains source-bound historical evidence.Landing: pre-existing survivor fixture failure and merged owner fix
Linux Testbox 36109709023: the unchanged
test/scripts/upgrade-survivor-baseline-order.test.tsran once in native order on candidate9aa1fe0556f6dd34e5cd93059243720a9ee10876and clean base0316fd13237ea1d1a7f62f3bccad7f208bcff608, using Node 24.19.0/pnpm 12.4.2. Each returned 8 passes, 2 failures, 0 skips (30.272s/28.051s).Both legacy-operator-state registry cases reproduced CI's
baseline_version: unbound variableat shell line 79/assertion 149:56. Full diagnostic bodies were byte-identical across candidate, base, and original CI. Full-source attestations stayed exact; the baseline worktree was removed and the single warmed lease was stopped/verified completed. No edits, broader tests, or repeats.Owner fix #157996 was verified merged at
6f51289a1e55fe508b6870e0f5ea6ec03c06a15cand included by the subsequent rebase. No local repair, assertion change, or CI rerun was made.Verifier failure evidence and separately authorized follow-up
Command:
node --import tsx scripts/ci-run-node-test-shard.mts, with the original packedagentic-cli-process-hosted-5group.Testbox 36113143686: original 16-file group once per
0bb1b5a5/base2d94121b; each 448 passed, 8 skipped. Group walls 205.271s/224.627s; target passed in 456/458ms. Original order, 2 workers, CI env and Node 24.19.0/pnpm 12.4.2 retained. Testbox 4 CPUs/16.6 GB versus CI 2 CPUs/8.2 GB limits timing reproduction. Failure remains unreproduced; passes are no fix or exoneration. Source checks passed, baseline worktree removed and single warmed lease stopped/independently confirmed completed. No repeats.Reviewed head before landing rebase:
d0291d59a30017c578fa87530d613da267cf121f; baseab4408c54fc5b9f3edb4ca5f6a7ceff8c45c37c8; treed52f6a91ffb7419159995db0085a418686e60127.node scripts/check-changed.mjs --base ab4408c54fc5b9f3edb4ca5f6a7ceff8c45c37c8pnpm protocol:checkpnpm buildCurrent-head runtime commands and clean-base comparison
Current registry E2E attribution
Candidate
d0291d59a30017c578fa87530d613da267cf121f(treed52f6a91ffb7419159995db0085a418686e60127) was compared with clean baseab4408c54fc5b9f3edb4ca5f6a7ceff8c45c37c8using the identical three-file native E2E command on Linux, Nodev24.19.0, pnpm12.4.2. Testbox run. All three test files are byte-identical across heads. Native prerequisites passed before comparison: candidate 525.598 s, base 566.532 s; successful owner receipts and full source attestations were verified.All 18 candidate failures reproduce on the exact base with byte-identical full diagnostics and identical assertion/helper/stack locations, including expected/received values and meaningful state. They comprise five archive failures and thirteen requester-wake failures. There are no candidate-only failures, no consequential shared diagnostic differences, and no native unhandled/runtime-error summaries. Both copies of the native reporter output were checked and counted once.
All fourteen lifecycle/grace cases pass on both heads. The sole outcome difference is base-only:
requester settle wake product flow > settles overlapping caller turns with alpha first (same ownership, yielded=alpha)passes on the candidate and fails on the base atrequester-wake.e2e.test.ts:513:63, with missingcleanupCompletedAtwhile the shown terminal execution status andrearmGeneration: 1match. The base reporter omits 58 matching properties; that full diagnostic is retained.This base-only difference provides no candidate-regression signal. No additional repetition matrix is recommended for branch attribution, and the candidate pass is not presented as proof of a fix. Earlier characterization matrices remain historical. Final source attestations passed on both heads, and native base-worktree cleanup completed successfully in 2.323 s. The raw nonzero test exits remain recorded. The overall wrapper retained exit 1 (4702.104s). The exact owned Testbox lease was stopped successfully, and its provider independently confirmed completion.
Exact-head CI failure: four-revision attribution
Bounded hosted-tail CI attribution
Original PR job failed with
expected 71 to be less than or equal to 70atci-node-test-plan-hosted-tail.test.ts:24:23. Its checkout was the CI merge below (pull_request, headd0291d59a30017c578fa87530d613da267cf121f).All four controls used Linux, Node 24.19.0, pnpm 12.4.2,
CI=true OPENCLAW_CI_TEST_TIMINGS=1, and:node scripts/run-vitest.mjs test/scripts/ci-node-test-plan-hosted-tail.test.tsd0291d59a30017c578fa87530d613da267cf121fab4408c54fc5b9f3edb4ca5f6a7ceff8c45c37c8f0eae1f598f20ab870945f187edad8066cb119dad14eb19ce5b81232aacf2f778e94c6690020690fSHA-256 of complete public-owner
jobsJSON (sorted keys, compact encoding):a211980225d0133bd85e47fdb9d686c5484737e274be416bd9592c9c7f520946b152a72bc020b3a1012db512af833791ad716f92155aa3c8538d111ac3e92385Owner options were
compactMode=push,runnerBackend=github, cap 70, with release-only plugin/tooling/runtime tests excluded; all plans contained 121 owners. Both failing controls match the original full diagnostic, assertion and source frame byte-for-byte after removing only ANSI and CI log prefixes. Duplicate reports were counted once.The failure is present on the exact CI main-parent inputs without the PR delta; its full job plan matches the merge. This does not identify an introducing commit or establish full-main CI health. All 23 source/carrier attestations passed, all three temporary worktrees were removed, and the owned lease was stopped (exit 0) and independently confirmed completed. No source changes or hosted CI reruns were made.
Native command walls, in table order: 27.803s / 27.799s / 31.920s / 30.702s, one case per revision, zero skips. Linux control run. Recent merged controls #157978, #157964, and #157955 had green CI gates and no failed checks; this comparison makes no broader main-health claim. After backing off, main was fetched at
fc3b2dca233a87134ff9b37d045128c1e002dbe8; no owning planner repair was identified. The branch still merges cleanly with that main.A single import conflict required the latest rebase: the transcript reader retains main’s
readFileWindowFullyimport from@openclaw/fs-safe/advancedand the refactor’s canonicalisRecordimport. Main’s safe-open implementation is preserved. Range comparison shows the same refactor patches apart from that import context. The required reduction below is unchanged. Earlier proof, including completed requester-wake matrices, remains bound to its recorded source revisions.Production reduction: 1,176 net lines. The requested filter also includes the 168-line sampling test-support module and nine deleted baseline rows:
The required filter reports 1,017 net lines removed. All baseline changes decrease existing allowances; no test budgets, assertions, skips, or ignores were weakened.
Before the final rebase, three requester-wake cases failed on both captured base and candidate in every repetition: ten isolated executions and ten executions in original declaration order per case/head. This is pre-existing failing behavior, not passing validation; the full 80-invocation results and assertion stages are below.
The earlier captured-source runtime selection contained 856 paths, with one live Android prerequisite excluded. The unchanged native guards also skip
session-create-collision.benchmark.test.ts,session-list-selection.benchmark.test.ts, and the Windows-onlysrc/media/local-media-path.windows.test.ts. That earlier full captured-source union observed all 855 eligible files: 852 executed and three skip-only. Repeated-comparison executions are counted separately below.Changed-test invocation costs
Earlier costs on one Linux Testbox (Node 24.19.0, pnpm 12.4.2), before the syntax-only lint repairs and final rebase, using
pnpm test <file> --maxWorkers=1. These compare base5331425e597912be4b7113a4e045d60b3b5d9170with staged tree9e7767212507dbf0f0ec4d8ef5316ba95d80da5a:openai-http.test.tsuser-profiles-http.test.tssession-lifecycle-state.persistence.test.tsThe later reload-fixture correction was measured separately on the same Linux Testbox (Node 24.19.0, pnpm 12.4.2):
pnpm test src/gateway/server-reload-handlers.test.ts --maxWorkers=1passed all 269 cases without skips on both clean879662e97a969313369a11f054dbee048b49c630(42.494s) and staged tree98a71dd1a1af8614f9114cf031e85e21906a4859(41.664s). Both tracked-file inventories matched afterward. These are invocation costs, not a performance claim.All eight cost invocations passed. The added sampling and both deferred-cancellation cases passed. Counts differ between revisions; these are invocation costs, not normalized performance claims. Hosted CI timings will be recorded when available.
Validation recovery and limitations
The first post-rebase snapshot stopped at the early assertion ratchet (33.068s): companion/observer adapters had removed four casts while two old allowance rows remained. Those exact rows were deleted without increasing any allowance. No later gates or runtime tests ran in that attempt; final source verification and native baseline cleanup passed. The corrected snapshot has fresh scoped-clean review.
The earlier changed check on
879662e97a969313369a11f054dbee048b49c630reported one unrelatedeslint(max-lines)error:src/agents/workspace.test.tshas 1,017 counted lines against 1,000. The branch does not change it. Its candidate/base bytes and freshly checked main6a8547cfccd219ebcc1d4975d2db6eabc8200ef6match (SHA256c0fbb41e55a36d254e3993b723776d73eb9b35016ee5af8422ef926628e6a049). This qualifies for the maintainer’s explicit unchanged-file size waiver. The raw exit 1 is retained; all nine downstream checks were executed through their native commands and passed. No file, limit, rule, or ignore was altered.src/infra/agent-run-registry.tsat 704 against 700, andsrc/agents/failover-error.test.tsat 1,032 against 1,000. Rebases included main fixes92635da2912(refactor: share active run state precedence #157168) andf3c9e47bcb2(fix(tests): restore failover lint checks #157406). No waiver was used..artifacts/release-speedup-pr-body.md. Main removed it in8488c7c2285(fix: remove tracked release scratch blocking source capture #157308), which this branch includes. A supported local fallback passed type/guard stages but all three unused-export scans reached their unchanged native 600-second timeout under host contention; that invocation remains failed. A separate local two-file test attempt reached the native 900-second no-output timeout during preparation, without test outcomes. Those scans and tests subsequently passed on Linux.a1c1f962f563e2e9cbf00b790119b08368f2409dcompleted every non-runtime gate and runtime groups 01–16, then lost transport during group 17 (wrapper exit 255). GitHub reports that the self-hosted runner lost communication; no specific timeout or underlying cause was established. Its completed test outcomes remain recorded; final source attestation and base-worktree cleanup receipts did not arrive. Fresh complete runtime invocations subsequently provided final source checks and base-worktree cleanup receipts. The next rebase incorporated changes to shared runtime test setup, requiring affected completed groups to be rerun as well. Older results remain bound to their source tree. Run: https://github.com/openclaw/openclaw/actions/runs/36045666299.prepareE2eVitestRuntime. Candidate source verification and base cleanup passed. Corrected native preparation and the full runtime selection subsequently completed; no repository source, assertion, timeout, or skip was changed.src/gateway/android-node.capabilities.live.test.tswas not run because it requires a live Android node. Existing benchmark skips remain unchanged. No live-device or benchmark execution is claimed.Requester-wake failure attribution before rebase
Repeated requester-wake comparison: 80 valid native Vitest invocations, 120 selected case executions, on one Linux Blacksmith Testbox. Ten repetitions per case/head in isolation, plus ten grouped A→B→C repetitions per head. Paired order alternated base→candidate and candidate→base.
Base
3b808da9456a5a4e70b1d933c405b20abcba2346; candidate staged tree96f2b83863454a963260bcceddf05b286f611d7d. Node24.19.0, pnpm12.4.2, frozen installs, unchangednode scripts/run-vitest.mjsdefaults. Exact title suffix selection admitted one case with 17 filtered cases or three cases with 15 filtered cases. No selected native skips; no selection errors in the 80 valid invocations.Exact selected case names:
settles overlapping caller turns with alpha first (same ownership, yielded=alpha)preserves serial continuation without replaying an accepted wave (cli, next child accepted=true, requester final=false)preserves serial continuation without replaying an accepted wave (native, next child accepted=true, requester final=false)Failure stages in
src/agents/subagents/registry/subagent-registry.requester-wake.e2e.test.ts:513= missingcleanupCompletedAt;911=firstWakeReturnedremained false;338= delivered-cleanup helper, called from948;954= duplicate beta wake identity.These are failing results, not a passing validation. Every selected case also fails on the clean base; failure-stage frequencies and the grouped duplicate-wake outcome remain visible rather than being collapsed into an equivalence claim.
Full tracked-file byte inventories matched before/after on both heads. Base inventory:
d46525224280b9f72d1323b5068c44e8a361312bd7da304db6f82fe8d920100e; candidate inventory:47c1902255157966fbede3b5902eb979acd92e73696a3b056e6a352631c409c1. Fresh detached base worktree was removed through native Git cleanup after source verification.Two setup failures were excluded from these counts: an incorrect Vitest 5 full-name separator selected zero tests; a later receiver refresh invalidated retained linked-worktree metadata. Both attempts stopped before a valid product result. The successful matrix used a fresh detached base created after sync and completed wholly within one native invocation.
Provider
blacksmith-testbox, leasetbx_01m393tgsdwx7d3z1zdam0kj2y, run https://github.com/openclaw/openclaw/actions/runs/35967897140. The native payload preserves aggregate exit code 1 for observed failures.Native lease stop completed successfully; exact-lease status was rechecked as completed.
Pre-rebase runtime and repeated failure attribution
Captured-source runtime evidence
Candidate C:
879662e97a969313369a11f054dbee048b49c630, treece68f49ad3a4dbf8116bb51a3b6e3f6ed050502f. Base B:688c3e936aa110b033fa8c2722632afb75b331b5, treed0abf8fa44264ec2d109101f5e4fe72119e7b0e2. Linux Testbox, Nodev24.19.0, pnpm12.4.2. Native source capsules use carrier commits; full tracked-byte inventories, the candidate tree, and the exact base revision were verified. The later reload-fixture correction is separate proof and is not included in these results.The original selected runtime union contains 856 paths: 855 observed, 852 actually executed, 3 skip-only, and 1 unrun live test. Native totals are 19,718 passed / 36 failed / 10 skipped cases, across 848 passed / 4 failed / 3 skipped files. These totals count each native shard once, deduplicate repeated reporter summaries, reuse the two SDK files from that snapshot’s gates, and exclude all characterization repetitions.
The three wholly skipped files retained their native guards:
src/gateway/session-create-collision.benchmark.test.ts,src/gateway/session-list-selection.benchmark.test.ts, andsrc/media/local-media-path.windows.test.ts.src/gateway/android-node.capabilities.live.test.tsremains unrun.Original runtime runs: Gateway batch, remaining runtime and E2E, and pre-rebase gates / reused SDK tests.
The remaining-runtime harness initially failed before tests because its external prerequisite call omitted the required environment argument. It was corrected to
prepareE2eVitestRuntime(process.env)and rerun through the supported route; that initial preparation failure is not counted as a test result. The raw changed-check result was exit 1 for unchangedsrc/agents/workspace.test.ts(1,017 > 1,000 lines), covered by the explicit unchanged-file size waiver after candidate/base/pinned-main byte verification. Its remaining nine native checks passed; this is not an unconditional green changed-check claim.Original failures and attribution
The original Gateway candidate command exited 1 after 2,484.821 s with 10,405 passed / 1 failed / 3 skipped cases. Its only failure was
deferred channel reload abort generation > settles a deferred channel receipt after watcher handoff: same writeinsrc/gateway/server-reload-handlers.test.ts:7465:36:logReload.warnexpected twice, observed once. The base control passed that target and its three handoff siblings but failed a different case inworker-environments/service-prepare.test.tsat the unsettled-mutation guard. Equal nonzero exits do not establish parity.The original built E2E group had 218 passed / 35 failed candidate cases and 219 passed / 34 failed base cases. All 34 shared failures had equivalent full first diagnostics and identical assertion/stack locations: 21 byte-identical and 13 differing only in clock origins or lifecycle-generation values while preserving their equality/order relationships. They span archive (6), lifecycle retry grace (12), and requester wake (16). Matching failure stages do not establish a shared root cause.
The extra candidate observation was
requester settle wake product flow > settles overlapping caller turns with alpha first (same ownership, yielded=alpha)atrequester-wake.e2e.test.ts:513:63: missingcleanupCompletedAt, with the shown terminal status andrearmGeneration: 1matching. The original base run passed it. The fresh characterization below reproduced that visible assertion in 20/20 candidate and 20/20 base invocations. This establishes that the failure occurs on the base too; it does not claim a fix or identify its root cause.Reload characterization: 40 requested invocations
Reload matrix run. Ten isolated and ten original whole-file-order invocations per head, with balanced AB/BA ordering and no timeout, worker, assertion, or guard changes. The test source was byte-identical across heads. All 40 target observations passed, and every full-file invocation passed all 269 cases. The original larger-batch failure was not reproduced; passing repetitions do not fix or erase it. The subsequent latch-only fixture correction and its proof are tracked separately, with no effect claimed here.
In both tables,
Imeans the exact target in isolation, andWmeans the entire file in its original order.P/F/Sare native passed/failed/skipped case counts; isolation skips come from the name filter. Wall time measures the native test command, including its setup, and excludes installation and the separately recorded prerequisite builds.Alpha characterization: 40 requested invocations
Alpha matrix run. Both heads completed the same fresh native E2E prerequisite before comparison: candidate 524.952 s, base 542.234 s, both exit 0. The initial skip/reuse guard was preserved, and only each successful owner-returned
OPENCLAW_E2E_USE_PREBUILT_DIST=1receipt was used for that head. Source inventories matched immediately after both builds, every completed pair, and finally.All 40 selectors were valid: each isolation invocation executed exactly one case, and each whole-file invocation executed all 18 cases. The target failed in every invocation at the same visible
513:63assertion. Two raw reporter variants show 57 or 58 matching properties omitted; both variants occurred on both heads. All subsequent diagnostic bytes, the visible missing-field diff, and the stack location are identical. The omitted-property counts are retained below, and no unseen field identity is inferred.Whole-file outcomes are not claimed equivalent: six of ten A/B whole-file pairs had different failure sets, and three had shared cases with different raw diagnostics or states. Across all ten whole-file runs, candidate totals were 16 passed / 164 failed case instances and base totals were 13 passed / 167 failed. Four serial-continuation cases had a candidate-only diagnostic variant in these repetitions, while each also failed on the base at other stages:
These variations remain observed differences without causal attribution. Assertions, native timeouts, skips, and worker settings were unchanged throughout both matrices. The earlier 80-invocation matrix is separate evidence and is not replaced or included in these totals.
All five leases used for this captured-source gates/runtime evidence and the two characterization matrices were stopped and independently verified completed. Both matrix base worktrees were removed successfully; the reload matrix has 46 matching source-inventory receipts and the alpha matrix has 48. The separately owned reload-fixture proof lease remains retained for post-rebase proof; its completed delta run passed and its baseline worktree was removed.
Reload fixture completion before final rebase
The fixture candidate tree
98a71dd1a1af8614f9114cf031e85e21906a4859passednode scripts/run-vitest.mjs src/gateway/server-reload-handlers.test.ts src/gateway/config-reload.test.ts src/gateway/config-reload.activation.integration.test.ts: 3 files / 760 cases, zero skips, 50.533s. The original owning-project selection passed all 104 selected files and 2,346 cases, zero skips, 749.644s. Both candidate and clean fixture-baseline inventories matched all 49,518 tracked blobs through final cleanup. This evidence is bound to that pre-rebase tree; it is not relabeled as current-head proof. Testbox run.Prior broad gates before final rebase
Historical source:
879662e97a969313369a11f054dbee048b49c630, based on688c3e936aa110b033fa8c2722632afb75b331b5. Native Linux snapshots are byte-verified against treece68f49ad3a4dbf8116bb51a3b6e3f6ed050502f.node scripts/check-changed.mjs --base 688c3e936aa110b033fa8c2722632afb75b331b5node scripts/check-changed.mjs --base 879662e97a969313369a11f054dbee048b49c630 -- src/gateway/server-reload-handlers.test.tspnpm protocol:checkpnpm plugin-sdk:surface:checkpnpm plugin-sdk:check-exportsnode scripts/run-vitest.mjs test/scripts/plugin-sdk-surface-report.test.ts src/plugin-sdk/session-visibility.test.tspnpm buildnode scripts/run-vitest.mjs <focused and cross-shard paths>This repository has no
plugin-sdk:api:checkscript; the native surface/export checks and SDK owner tests above cover that gate. The prior review remained clean across earlier patch-identical rebases. The latest fixture-inclusive Codex review is scoped-clean at P0–P2 (294.460s), with source verification before and after review. Main’s new parent-preparation and provenance owners are preserved.Final-candidate runtime selection
Each group uses
node scripts/run-vitest.mjswith the listed paths and native defaults. Built E2E execution consumes only the successful flags returned byprepareE2eVitestRuntime(process.env); UI E2E requires the native Chromium prerequisite. These 41 paths cover the final rebase and additional session-owner cleanup. Earlier unchanged areas retain their source-bound broad proof above.Group 1:
test/vitest/vitest.gateway-database-workers.config.tsGroup 2:
test/vitest/vitest.gateway.config.tsGroup 3:
test/vitest/vitest.runtime-config.config.tsGroup 4:
test/vitest/vitest.infra.config.tsGroup 5:
test/vitest/vitest.agents-tools.config.tsGroup 6:
test/vitest/vitest.tui.config.tsGroup 7:
test/vitest/vitest.e2e.config.tsGroup 8:
test/vitest/vitest.ui-e2e.config.tsFinal-tree E2E attribution and runtime evidence
Full proof and first characterization lease. The final candidate tree
1635b4f04a72e0929dc635159319c9d5590e9c31was compared with clean base691d2e5cd48c0ddda650123b8b9ee0089fa39004on one Linux Testbox, Node 24.19.0 and pnpm 12.4.2. All 41 selected runtime files were observed with no extras: 918 passed / 35 failed / 0 skipped cases. The 43 passing SDK-owner cases are separate. The wrapper retained raw exit 1. Candidate and base final inventories matched all 49,582 / 49,581 tracked blobs; native baseline cleanup passed.The source groups passed 893 cases across 36 files. The UI guest-question group passed one case in 38.937s. The four-file built E2E group had 24 passed / 35 failed candidate cases (60.607s), versus 25 passed / 34 failed base cases (59.023s). Native private-QA prerequisites succeeded on each head (531.925s / 530.872s), and each head consumed only its own successful owner-returned preparation flags. All four E2E test files are byte-identical between the two heads.
All 34 shared failures match assertion/helper/stack locations and full first diagnostic state: 21 are byte-identical; 13 differ only by one clock-origin shift or lifecycle-generation identifiers, preserving equality, ordering, deltas, statuses, counts, run IDs, and field presence. They comprise archive (6), lifecycle/retry-grace (12), and requester wake (16). Matching observations do not establish a shared root cause.
The sole candidate-only observation was
settles overlapping caller turns with alpha first (same ownership, yielded=alpha)atrequester-wake.e2e.test.ts:513:63: missingcleanupCompletedAt, with the shown terminal execution status andrearmGeneration: 1matching. The base passed it in 1,079ms. The fresh-host matrix below reproduced that visible failure in 20/20 candidate and 20/20 clean-base invocations; ten isolated and ten original-file-order runs per head. This establishes the failure on that clean base, without claiming a fix or root cause.Recent merged-PR controls #157810, #157805, and #157804 all had successful CI gates and actual core-lint checks, with no failed checks. Those hosted results are separate from this local E2E comparison.
The first final-tree alpha matrix lost transport with wrapper exit 255 during trial 12. Eleven trials had closed, all target failures, with exact source attestations through completed pair 5 and no native unhandled/runtime-error markers in those closed logs. Trial 12 is unknown, and final source/base-cleanup receipts did not arrive. Both providers subsequently reported the task-owned lease completed; its old key was rejected, and native cleanup confirmed completion. The termination cause remains unproven despite the recorded 240-minute workflow input. This partial cohort does not count toward the replacement cohort’s required 40 invocations. The already-closed full runtime/gate proof above retains its final attestations.
Completed alpha40 on base 691d2e5
Alpha characterization before the import-only rebase
Candidate C: tree
1635b4f04a72e0929dc635159319c9d5590e9c31(captured checkout HEADa111c4aaece9e056fd5050842bff865735f483e8plus its frozen staged changes). Base B:691d2e5cd48c0ddda650123b8b9ee0089fa39004, treea28040b258355e894de0ee538228fe791f18f662. Linux Testbox, Nodev24.19.0, pnpm12.4.2. Native run.This fresh cohort contains exactly 40 validated invocations: ten isolated target runs and ten complete original-file-order runs per head, with balanced AB/BA ordering and the two modes interleaved. The identical test source was verified on both heads. Every isolated command executed exactly one case; every whole-file command executed all 18 cases. Native assertions, timeouts, worker settings, and guards were unchanged.
Target:
src/agents/subagents/registry/subagent-registry.requester-wake.e2e.test.ts—requester settle wake product flow > settles overlapping caller turns with alpha first (same ownership, yielded=alpha). Both modes usenode scripts/run-vitest.mjswith that file; isolation adds-twith the exact regexsettles overlapping caller turns with alpha first \(same ownership, yielded=alpha\)$, while whole-file runs omit the filter.Candidate target outcomes: 0 passed / 20 failed across its 20 invocations.
Base target outcomes: 0 passed / 20 failed across its 20 invocations.
Equivalent native E2E prerequisites passed before comparison: candidate 547.911 s, base 513.192 s. Inherited skip/prebuilt flags were cleared, and only each successful owner-returned
OPENCLAW_E2E_USE_PREBUILT_DIST=1receipt was reused. Full tracked-byte identities matched after preparation, after all 20 pairs, and finally; the base worktree was removed successfully.Every observed target failure reaches
requester-wake.e2e.test.ts:513:63with missingcleanupCompletedAt; the shown terminal execution status andrearmGeneration: 1match. Full diagnostic bytes after the first two reporter lines are identical. Reporter variants show 57 or 58 omitted matching properties, recorded per row below. Every raw reporter variant occurred on both heads.I= exact target in isolation;W= complete file in original order.P/F/S= native passed/failed/skipped cases; isolated skips are name-filter exclusions. Wall time covers the native test command and its setup, excluding the prerequisite builds.Whole-file totals across ten invocations per head: candidate 11 passed / 169 failed case instances; base 11 passed / 169 failed. 2/10 whole-file pairs had different failure sets; 4/10 had shared failures with diagnostic differences beyond the permitted common clock-origin/lifecycle-generation normalization. These observations do not establish whole-file parity.
All shared diagnostic differences beyond clock/generation origins are confined to the alpha reporter's 57/58 omitted-property headline variant; no other shared assertion or meaningful-state difference was observed.
Whole-file repetition 2:
preserves serial continuation without replaying an accepted wave (cli, next child accepted=false, requester final=false)failed only on candidate in that pair; the other head passed it. Its failure diagnostic also appeared on the other head elsewhere in this fresh cohort.Whole-file repetition 3:
preserves serial continuation without replaying an accepted wave (native, next child accepted=true, requester final=false)failed only on base in that pair; the other head passed it. Its failure diagnostic also appeared on the other head elsewhere in this fresh cohort.No native unhandled/runtime-error headers or error-count summaries were observed in the 40 closed logs.
The raw matrix wrapper exit is 1, retained as observed. Matching failures are characterization, not a fix or a root-cause finding. The original four-file run for this captured tree remains recorded as candidate 35 failed / 24 passed and base 34 failed / 25 passed, with 34 full-diagnostic baseline matches and one alpha candidate-only observation before this matrix.
The earlier interrupted cohort contributes zero invocations to this 40-run table. It retains eleven closed results, an unknown twelfth result, last source attestations after pair 5, and no final source/base-cleanup receipt; its transport exited 255 and the provider lease was reconciled completed, with cause unproven. Older alpha40, old80, and reload40 remain separate historical evidence.
The fresh proof lease was stopped and independently verified completed.
Completed proof on tree 1635b4f before the import-only rebase
The captured candidate was based on
691d2e5cd48c0ddda650123b8b9ee0089fa39004, staged tree1635b4f04a72e0929dc635159319c9d5590e9c31. It was committed as35a67ecbb928b19baeb9b7dd57f349089183b25fwith the same tree.node scripts/check-changed.mjs --base 691d2e5cd48c0ddda650123b8b9ee0089fa39004pnpm protocol:checkpnpm plugin-sdk:surface:check/pnpm plugin-sdk:check-exportsnode scripts/run-vitest.mjs test/scripts/plugin-sdk-surface-report.test.ts src/plugin-sdk/session-visibility.test.tspnpm buildnode scripts/run-vitest.mjsacross the 41 listed affected pathsplugin-sdk:api:checkis absent in this checkout; the native surface/export checks and SDK owner tests above cover that gate.That captured changed check’s only failures are
eslint(max-lines)in four files absent from this branch’s diff. Local and remote full-byte checks verify each against exact base/main691d2e5cd48c0ddda650123b8b9ee0089fa39004; the maintainer’s explicit unchanged-file size waiver applies. The raw exit remains recorded, and no unrelated file or limit was edited.packages/ai/src/transports/openai-responses-prompt-observer.test.tssrc/agents/workspace.test.tssrc/agents/auth-profiles/oauth-refresh-fence.test.tssrc/commands/auth-choice.apply.plugin-provider.test.tsThat rebase retained main’s asynchronous session creation custody, authority preparation, creation-publication binding, and prepared session resolution. The six additional session cleanups reuse the same existing validation/error owners. Earlier broad proof and repeated failure characterizations are retained below with their exact historical source identities; they are not presented as current-head results.