Skip to content

refactor(gateway): deslop gateway - #157976

Merged
steipete merged 4 commits into
mainfrom
deslop/l25-gateway-owners-0923
Sep 25, 2026
Merged

steipete merged 4 commits into
mainfrom
deslop/l25-gateway-owners-0923

Conversation

@steipete

@steipete steipete commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

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.ts reads resolved.phases and retains the same resolved.enabled && phase.enabled condition as src/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.ts replaces equivalent null-or-required branches with its existing nullableRequired helper. 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
  • Session creation, recovery, reset, resolution, parent preparation, patching, and search share one invalid-request result constructor. The duplicate patch factory is removed; main’s extracted lifecycle-intent validators retain their contracts.
  • Agent admission/execution share aborted payload construction, preserving serialized field order; unused phase fields and parameter plumbing disappear.
  • Node registry reads share pairing-result projection and WebSocket sending; node catalog/invocation types derive from their owners. Private runtime state is initialized as a complete typed object.
  • Approval forwarding shares its decision path while retaining allow-once consumption, provenance distinctions, and all current-authority checks.
  • Talk, companion, and observer handlers use the existing validation adapter. Talk configuration uses canonical normalization and shared input types; current operator capture and post-await revalidation remain unchanged.
  • Send handling shares deferred settlement, media-list normalization, and runtime-config selection; secret and plugin methods reuse their existing normalization/error owners.
  • Transcript readers use one typed numeric accumulator with fixed output order, canonical record/string coercion, and the filesystem archive owner directly. The lazy runtime archive boundary remains.
  • Session list enrichment uses the existing canonical-readiness loop. Companion helpers reuse record/timestamp/usage owners and the actual ask signature.
  • Session model projection removes redundant default/identity forwarding while retaining cache ownership, partial-identity caching, and uncached behavior. Title fallback stays lazy; custom-label uniqueness remains separate from automatic labels.
  • Sharing-target parsing calls its existing group/record owners directly and drops an unused configuration callback.
  • Config, system, agent-file, compaction, embeddings, and sampling paths consume already-validated parameter types. Public schema validation and reachable error messages remain unchanged.
  • Doctor reads one resolved dreaming configuration and one managed-cron status. Gravatar byte limits use the existing bounded-response primitive while retaining awaited cancellation, reader cleanup, and byte representation.
  • CLI history, runtime subscriptions, compression, and placement-row normalization use their canonical owners.

Evidence

Coordinator approved d0291d59a30017c578fa87530d613da267cf121f. Landing head 0bb1b5a54d046d5fa401dc9ec33bd1dd90517bb9 was rebased without conflicts onto 2d94121bb0ac7a4404e8a81fc00ffd735a89eac5, including owner fixes #157836/449fc2e6c57 and #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 run 36111367166 attempt 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.ts ran once in native order on candidate 9aa1fe0556f6dd34e5cd93059243720a9ee10876 and clean base 0316fd13237ea1d1a7f62f3bccad7f208bcff608, 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 variable at 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 6f51289a1e55fe508b6870e0f5ea6ec03c06a15c and 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 packed agentic-cli-process-hosted-5 group.

Testbox 36113143686: original 16-file group once per 0bb1b5a5/base 2d94121b; 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; base ab4408c54fc5b9f3edb4ca5f6a7ceff8c45c37c8; tree d52f6a91ffb7419159995db0085a418686e60127.

Reviewed-head proof Result
node scripts/check-changed.mjs --base ab4408c54fc5b9f3edb4ca5f6a7ceff8c45c37c8 Pass, exit 0, 2064.242s; core tsgo, all 25 test-type shards, all three unused-export scans, lint, formatting, and native guards passed; no size waiver
pnpm protocol:check Pass, exit 0, 2.294s; all 49,638 tracked blobs unchanged afterward
Native SDK surface/export checks and owner tests Surface check passed (3.221s); export check passed (0.133s); two SDK owner files passed all 43 cases, no skips (21.175s)
pnpm build Pass, exit 0, 553.286s; all 49,638 tracked blobs unchanged afterward
Focused and cross-shard tests 14 affected source files passed all 433 cases, no skips (147.441s across native groups). Three registry E2E files: candidate 40 passed / 18 failed (55.522s), base 39 passed / 19 failed (55.047s); every candidate failure has byte-identical base diagnostics, no candidate-only failure
Fresh isolated Codex autoreview Scoped-clean P0–P2, exit 0, 311.151s; final source verification passed
Current-head runtime commands and clean-base comparison
node scripts/run-vitest.mjs test/scripts/plugin-sdk-surface-report.test.ts src/plugin-sdk/session-visibility.test.ts
node scripts/run-vitest.mjs src/gateway/session-utils.fs.test.ts src/gateway/session-transcript-index.fs.test.ts src/gateway/session-transcript-readers.test.ts src/gateway/session-transcript-readers.markers.test.ts src/gateway/session-archive.imports.test.ts src/gateway/agent-turn/agent-run-dispatch.legacy.test.ts src/gateway/server-reload-handlers.test.ts src/gateway/session-utils-model.acp-owner.test.ts src/gateway/server-methods/validation.test.ts src/gateway/session-companion-rpc.test.ts src/gateway/session-observer-rpc.test.ts
node scripts/run-vitest.mjs src/config/sessions/session-transcript-match.worker.test.ts
node scripts/run-vitest.mjs src/tasks/detached-task-lookup.worker.test.ts
node scripts/run-vitest.mjs src/agents/prepared-model-runtime.native-renewal.test.ts
node scripts/run-vitest.mjs src/agents/subagents/registry/subagent-registry.archive.e2e.test.ts src/agents/subagents/registry/subagent-registry.lifecycle-retry-grace.e2e.test.ts src/agents/subagents/registry/subagent-registry.requester-wake.e2e.test.ts

Current registry E2E attribution

Candidate d0291d59a30017c578fa87530d613da267cf121f (tree d52f6a91ffb7419159995db0085a418686e60127) was compared with clean base ab4408c54fc5b9f3edb4ca5f6a7ceff8c45c37c8 using the identical three-file native E2E command on Linux, Node v24.19.0, pnpm 12.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.

Head Passed Failed Skipped Native exit Wall
Candidate 40 18 0 1 55.522 s
Base 39 19 0 1 55.047 s

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 at requester-wake.e2e.test.ts:513:63, with missing cleanupCompletedAt while the shown terminal execution status and rearmGeneration: 1 match. 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 70 at ci-node-test-plan-hosted-tail.test.ts:24:23. Its checkout was the CI merge below (pull_request, head d0291d59a30017c578fa87530d613da267cf121f).

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.ts

Revision Test (exit) Planned jobs Plan hash
PR head d0291d59a30017c578fa87530d613da267cf121f pass (0) 70 A
Exact base ab4408c54fc5b9f3edb4ca5f6a7ceff8c45c37c8 pass (0) 70 A
CI main parent f0eae1f598f20ab870945f187edad8066cb119da fail (1) 71 B
CI merge d14eb19ce5b81232aacf2f778e94c6690020690f fail (1) 71 B

SHA-256 of complete public-owner jobs JSON (sorted keys, compact encoding):

  • A: a211980225d0133bd85e47fdb9d686c5484737e274be416bd9592c9c7f520946
  • B: b152a72bc020b3a1012db512af833791ad716f92155aa3c8538d111ac3e92385

Owner 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 readFileWindowFully import from @openclaw/fs-safe/advanced and the refactor’s canonical isRecord import. 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:

git diff --shortstat $(git merge-base origin/main HEAD) -- . ':(exclude)**/*.test.*' ':(exclude)**/test/**' ':(exclude)docs/**'
82 files changed, 2018 insertions(+), 3035 deletions(-)

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-only src/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 base 5331425e597912be4b7113a4e045d60b3b5d9170 with staged tree 9e7767212507dbf0f0ec4d8ef5316ba95d80da5a:

File Clean base Candidate
openai-http.test.ts 139 cases, 53.359s 140 cases, 47.960s
user-profiles-http.test.ts 22 cases, 22.812s 23 cases, 21.729s
session-lifecycle-state.persistence.test.ts 9 cases, 48.739s 9 cases, 38.155s

The 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=1 passed all 269 cases without skips on both clean 879662e97a969313369a11f054dbee048b49c630 (42.494s) and staged tree 98a71dd1a1af8614f9114cf031e85e21906a4859 (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 879662e97a969313369a11f054dbee048b49c630 reported one unrelated eslint(max-lines) error: src/agents/workspace.test.ts has 1,017 counted lines against 1,000. The branch does not change it. Its candidate/base bytes and freshly checked main 6a8547cfccd219ebcc1d4975d2db6eabc8200ef6 match (SHA256 c0fbb41e55a36d254e3993b723776d73eb9b35016ee5af8422ef926628e6a049). 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.

  • The first fresh-base changed check found two candidate-only lint errors, confirmed by a targeted base/candidate comparison: a shadowed local name and an expression-bodied Promise executor. Both received syntax-only fixes, preserving assertions and asynchronous ordering. That snapshot’s full lint then reported only its separately documented untouched size violation.
  • Earlier size gates failed on untouched files: src/infra/agent-run-registry.ts at 704 against 700, and src/agents/failover-error.test.ts at 1,032 against 1,000. Rebases included main fixes 92635da2912 (refactor: share active run state precedence #157168) and f3c9e47bcb2 (fix(tests): restore failover lint checks #157406). No waiver was used.
  • One Testbox attempt stopped before allocation because the source-capsule privacy guard rejected main's tracked .artifacts/release-speedup-pr-body.md. Main removed it in 8488c7c2285 (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.
  • An earlier Linux run on tree a1c1f962f563e2e9cbf00b790119b08368f2409d completed 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.
  • A remaining-runtime preparation attempt exited before any test because the external proof wrapper omitted the required environment argument to 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.ts was 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 tree 96f2b83863454a963260bcceddf05b286f611d7d. Node 24.19.0, pnpm 12.4.2, frozen installs, unchanged node scripts/run-vitest.mjs defaults. 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:

  • A: settles overlapping caller turns with alpha first (same ownership, yielded=alpha)
  • B: preserves serial continuation without replaying an accepted wave (cli, next child accepted=true, requester final=false)
  • C: preserves serial continuation without replaying an accepted wave (native, next child accepted=true, requester final=false)
Mode Head A failures B failures C failures
isolation base 10/10 10/10 10/10
isolation candidate 10/10 10/10 10/10
group base 10/10 10/10 10/10
group candidate 10/10 10/10 10/10

Failure stages in src/agents/subagents/registry/subagent-registry.requester-wake.e2e.test.ts: 513 = missing cleanupCompletedAt; 911 = firstWakeReturned remained false; 338 = delivered-cleanup helper, called from 948; 954 = duplicate beta wake identity.

Mode Head Case Failure frames (count)
isolation base A 513 (10)
isolation base B 338 (1), 911 (9)
isolation base C 338 (6), 911 (4)
isolation candidate A 513 (10)
isolation candidate B 338 (1), 911 (9)
isolation candidate C 338 (9), 911 (1)
group base A 513 (10)
group base B 338 (3), 911 (7)
group base C 338 (7), 911 (1), 954 (2)
group candidate A 513 (10)
group candidate B 338 (1), 911 (9)
group candidate C 338 (7), 911 (2), 954 (1)

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, lease tbx_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.

Run Mode Rep Head Selected outcomes and first assertion lines Wall seconds
1 isolation 1 base A: failed@513 379.131
2 isolation 1 candidate A: failed@513 449.830
3 isolation 1 base B: failed@911 29.306
4 isolation 1 candidate B: failed@911 26.555
5 isolation 1 base C: failed@338 29.586
6 isolation 1 candidate C: failed@338 29.024
7 isolation 2 candidate A: failed@513 23.478
8 isolation 2 base A: failed@513 24.225
9 isolation 2 candidate B: failed@911 25.477
10 isolation 2 base B: failed@911 26.665
11 isolation 2 candidate C: failed@338 25.925
12 isolation 2 base C: failed@911 24.431
13 isolation 3 base A: failed@513 33.555
14 isolation 3 candidate A: failed@513 25.494
15 isolation 3 base B: failed@911 33.728
16 isolation 3 candidate B: failed@911 25.782
17 isolation 3 base C: failed@338 26.263
18 isolation 3 candidate C: failed@338 24.558
19 isolation 4 candidate A: failed@513 23.912
20 isolation 4 base A: failed@513 29.413
21 isolation 4 candidate B: failed@911 24.927
22 isolation 4 base B: failed@911 26.242
23 isolation 4 candidate C: failed@338 27.809
24 isolation 4 base C: failed@911 32.259
25 isolation 5 base A: failed@513 28.637
26 isolation 5 candidate A: failed@513 26.430
27 isolation 5 base B: failed@911 27.386
28 isolation 5 candidate B: failed@911 27.236
29 isolation 5 base C: failed@338 29.176
30 isolation 5 candidate C: failed@338 27.890
31 isolation 6 candidate A: failed@513 27.754
32 isolation 6 base A: failed@513 25.800
33 isolation 6 candidate B: failed@911 25.834
34 isolation 6 base B: failed@911 25.292
35 isolation 6 candidate C: failed@338 28.309
36 isolation 6 base C: failed@338 24.883
37 isolation 7 base A: failed@513 24.691
38 isolation 7 candidate A: failed@513 25.896
39 isolation 7 base B: failed@911 25.711
40 isolation 7 candidate B: failed@911 29.789
41 isolation 7 base C: failed@911 31.381
42 isolation 7 candidate C: failed@911 29.609
43 isolation 8 candidate A: failed@513 26.741
44 isolation 8 base A: failed@513 25.138
45 isolation 8 candidate B: failed@911 26.186
46 isolation 8 base B: failed@338 23.024
47 isolation 8 candidate C: failed@338 23.917
48 isolation 8 base C: failed@338 24.529
49 isolation 9 base A: failed@513 23.501
50 isolation 9 candidate A: failed@513 23.049
51 isolation 9 base B: failed@911 22.337
52 isolation 9 candidate B: failed@338 22.701
53 isolation 9 base C: failed@338 22.966
54 isolation 9 candidate C: failed@338 24.553
55 isolation 10 candidate A: failed@513 23.869
56 isolation 10 base A: failed@513 23.018
57 isolation 10 candidate B: failed@911 23.493
58 isolation 10 base B: failed@911 24.067
59 isolation 10 candidate C: failed@338 28.861
60 isolation 10 base C: failed@911 31.089
61 group 1 base A: failed@513, B: failed@911, C: failed@954 32.933
62 group 1 candidate A: failed@513, B: failed@338, C: failed@338 29.192
63 group 2 candidate A: failed@513, B: failed@911, C: failed@338 30.125
64 group 2 base A: failed@513, B: failed@911, C: failed@338 29.736
65 group 3 base A: failed@513, B: failed@911, C: failed@911 35.647
66 group 3 candidate A: failed@513, B: failed@911, C: failed@911 37.812
67 group 4 candidate A: failed@513, B: failed@911, C: failed@911 37.446
68 group 4 base A: failed@513, B: failed@911, C: failed@338 35.965
69 group 5 base A: failed@513, B: failed@911, C: failed@338 29.072
70 group 5 candidate A: failed@513, B: failed@911, C: failed@338 26.561
71 group 6 candidate A: failed@513, B: failed@911, C: failed@954 28.523
72 group 6 base A: failed@513, B: failed@911, C: failed@338 29.021
73 group 7 base A: failed@513, B: failed@338, C: failed@338 27.500
74 group 7 candidate A: failed@513, B: failed@911, C: failed@338 28.073
75 group 8 candidate A: failed@513, B: failed@911, C: failed@338 27.885
76 group 8 base A: failed@513, B: failed@338, C: failed@338 27.844
77 group 9 base A: failed@513, B: failed@338, C: failed@338 27.628
78 group 9 candidate A: failed@513, B: failed@911, C: failed@338 27.391
79 group 10 candidate A: failed@513, B: failed@911, C: failed@338 28.071
80 group 10 base A: failed@513, B: failed@911, C: failed@954 27.471
Pre-rebase runtime and repeated failure attribution

Captured-source runtime evidence

Candidate C: 879662e97a969313369a11f054dbee048b49c630, tree ce68f49ad3a4dbf8116bb51a3b6e3f6ed050502f. Base B: 688c3e936aa110b033fa8c2722632afb75b331b5, tree d0abf8fa44264ec2d109101f5e4fe72119e7b0e2. Linux Testbox, Node v24.19.0, pnpm 12.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, and src/media/local-media-path.windows.test.ts. src/gateway/android-node.capabilities.live.test.ts remains 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 unchanged src/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 write in src/gateway/server-reload-handlers.test.ts:7465:36: logReload.warn expected twice, observed once. The base control passed that target and its three handoff siblings but failed a different case in worker-environments/service-prepare.test.ts at 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) at requester-wake.e2e.test.ts:513:63: missing cleanupCompletedAt, with the shown terminal status and rearmGeneration: 1 matching. 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, I means the exact target in isolation, and W means the entire file in its original order. P/F/S are 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.

Run Head Mode Rep Target stage Wall (s) Native overall outcome
1 B I 1 Passed 31.355 exit 0; 1P/0F/268S
2 C I 1 Passed 30.391 exit 0; 1P/0F/268S
3 C W 1 Passed 27.774 exit 0; 269P/0F/0S
4 B W 1 Passed 27.204 exit 0; 269P/0F/0S
5 C I 2 Passed 19.130 exit 0; 1P/0F/268S
6 B I 2 Passed 19.437 exit 0; 1P/0F/268S
7 B W 2 Passed 27.797 exit 0; 269P/0F/0S
8 C W 2 Passed 27.028 exit 0; 269P/0F/0S
9 B I 3 Passed 18.687 exit 0; 1P/0F/268S
10 C I 3 Passed 20.222 exit 0; 1P/0F/268S
11 C W 3 Passed 27.425 exit 0; 269P/0F/0S
12 B W 3 Passed 27.641 exit 0; 269P/0F/0S
13 C I 4 Passed 19.980 exit 0; 1P/0F/268S
14 B I 4 Passed 18.171 exit 0; 1P/0F/268S
15 B W 4 Passed 27.876 exit 0; 269P/0F/0S
16 C W 4 Passed 29.621 exit 0; 269P/0F/0S
17 B I 5 Passed 20.309 exit 0; 1P/0F/268S
18 C I 5 Passed 19.580 exit 0; 1P/0F/268S
19 C W 5 Passed 28.532 exit 0; 269P/0F/0S
20 B W 5 Passed 27.046 exit 0; 269P/0F/0S
21 C I 6 Passed 18.482 exit 0; 1P/0F/268S
22 B I 6 Passed 19.763 exit 0; 1P/0F/268S
23 B W 6 Passed 27.864 exit 0; 269P/0F/0S
24 C W 6 Passed 26.543 exit 0; 269P/0F/0S
25 B I 7 Passed 18.651 exit 0; 1P/0F/268S
26 C I 7 Passed 18.322 exit 0; 1P/0F/268S
27 C W 7 Passed 26.752 exit 0; 269P/0F/0S
28 B W 7 Passed 25.984 exit 0; 269P/0F/0S
29 C I 8 Passed 18.853 exit 0; 1P/0F/268S
30 B I 8 Passed 18.532 exit 0; 1P/0F/268S
31 B W 8 Passed 27.279 exit 0; 269P/0F/0S
32 C W 8 Passed 26.731 exit 0; 269P/0F/0S
33 B I 9 Passed 20.044 exit 0; 1P/0F/268S
34 C I 9 Passed 20.250 exit 0; 1P/0F/268S
35 C W 9 Passed 29.066 exit 0; 269P/0F/0S
36 B W 9 Passed 30.956 exit 0; 269P/0F/0S
37 C I 10 Passed 20.121 exit 0; 1P/0F/268S
38 B I 10 Passed 18.613 exit 0; 1P/0F/268S
39 B W 10 Passed 27.950 exit 0; 269P/0F/0S
40 C W 10 Passed 27.503 exit 0; 269P/0F/0S

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=1 receipt 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:63 assertion. 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.

Run Head Mode Rep Target stage Wall (s) Native overall outcome
1 B I 1 513:63; cleanupCompletedAt missing; 58 omitted 26.352 exit 1; 0P/1F/17S
2 C I 1 513:63; cleanupCompletedAt missing; 58 omitted 24.718 exit 1; 0P/1F/17S
3 C W 1 513:63; cleanupCompletedAt missing; 58 omitted 31.501 exit 1; 2P/16F/0S
4 B W 1 513:63; cleanupCompletedAt missing; 58 omitted 31.026 exit 1; 2P/16F/0S
5 C I 2 513:63; cleanupCompletedAt missing; 58 omitted 18.311 exit 1; 0P/1F/17S
6 B I 2 513:63; cleanupCompletedAt missing; 58 omitted 18.036 exit 1; 0P/1F/17S
7 B W 2 513:63; cleanupCompletedAt missing; 58 omitted 29.378 exit 1; 1P/17F/0S
8 C W 2 513:63; cleanupCompletedAt missing; 58 omitted 27.957 exit 1; 3P/15F/0S
9 B I 3 513:63; cleanupCompletedAt missing; 58 omitted 18.971 exit 1; 0P/1F/17S
10 C I 3 513:63; cleanupCompletedAt missing; 58 omitted 18.224 exit 1; 0P/1F/17S
11 C W 3 513:63; cleanupCompletedAt missing; 58 omitted 28.005 exit 1; 1P/17F/0S
12 B W 3 513:63; cleanupCompletedAt missing; 58 omitted 28.919 exit 1; 2P/16F/0S
13 C I 4 513:63; cleanupCompletedAt missing; 57 omitted 17.571 exit 1; 0P/1F/17S
14 B I 4 513:63; cleanupCompletedAt missing; 57 omitted 21.238 exit 1; 0P/1F/17S
15 B W 4 513:63; cleanupCompletedAt missing; 58 omitted 31.587 exit 1; 1P/17F/0S
16 C W 4 513:63; cleanupCompletedAt missing; 58 omitted 29.705 exit 1; 2P/16F/0S
17 B I 5 513:63; cleanupCompletedAt missing; 57 omitted 20.469 exit 1; 0P/1F/17S
18 C I 5 513:63; cleanupCompletedAt missing; 57 omitted 20.427 exit 1; 0P/1F/17S
19 C W 5 513:63; cleanupCompletedAt missing; 57 omitted 36.780 exit 1; 1P/17F/0S
20 B W 5 513:63; cleanupCompletedAt missing; 57 omitted 39.870 exit 1; 2P/16F/0S
21 C I 6 513:63; cleanupCompletedAt missing; 57 omitted 18.647 exit 1; 0P/1F/17S
22 B I 6 513:63; cleanupCompletedAt missing; 58 omitted 18.761 exit 1; 0P/1F/17S
23 B W 6 513:63; cleanupCompletedAt missing; 58 omitted 33.977 exit 1; 1P/17F/0S
24 C W 6 513:63; cleanupCompletedAt missing; 57 omitted 48.925 exit 1; 2P/16F/0S
25 B I 7 513:63; cleanupCompletedAt missing; 57 omitted 17.830 exit 1; 0P/1F/17S
26 C I 7 513:63; cleanupCompletedAt missing; 57 omitted 21.755 exit 1; 0P/1F/17S
27 C W 7 513:63; cleanupCompletedAt missing; 57 omitted 33.981 exit 1; 1P/17F/0S
28 B W 7 513:63; cleanupCompletedAt missing; 57 omitted 30.999 exit 1; 1P/17F/0S
29 C I 8 513:63; cleanupCompletedAt missing; 57 omitted 20.084 exit 1; 0P/1F/17S
30 B I 8 513:63; cleanupCompletedAt missing; 57 omitted 20.332 exit 1; 0P/1F/17S
31 B W 8 513:63; cleanupCompletedAt missing; 58 omitted 31.267 exit 1; 1P/17F/0S
32 C W 8 513:63; cleanupCompletedAt missing; 58 omitted 27.742 exit 1; 2P/16F/0S
33 B I 9 513:63; cleanupCompletedAt missing; 58 omitted 18.471 exit 1; 0P/1F/17S
34 C I 9 513:63; cleanupCompletedAt missing; 58 omitted 17.463 exit 1; 0P/1F/17S
35 C W 9 513:63; cleanupCompletedAt missing; 58 omitted 28.585 exit 1; 1P/17F/0S
36 B W 9 513:63; cleanupCompletedAt missing; 58 omitted 28.582 exit 1; 1P/17F/0S
37 C I 10 513:63; cleanupCompletedAt missing; 57 omitted 19.543 exit 1; 0P/1F/17S
38 B I 10 513:63; cleanupCompletedAt missing; 57 omitted 19.623 exit 1; 0P/1F/17S
39 B W 10 513:63; cleanupCompletedAt missing; 58 omitted 30.518 exit 1; 1P/17F/0S
40 C W 10 513:63; cleanupCompletedAt missing; 58 omitted 30.783 exit 1; 1P/17F/0S

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:

Serial continuation parameters Candidate pass/fail Base pass/fail Additional candidate diagnostic observed
(cli, next child accepted=true, requester final=false) 1/9 0/10 firstWakeReturned false at 911:41 (run 19)
(cli, next child accepted=false, requester final=false) 5/5 3/7 firstWakeReturned false at 911:41 (run 19)
(native, next child accepted=true, requester final=false) 0/10 0/10 firstWakeReturned false at 911:41 (run 8, 19)
(cli, next child accepted=true, requester final=true) 0/10 0/10 pending delivery and pending wake at 338:11 / 948:15 (run 8)

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 98a71dd1a1af8614f9114cf031e85e21906a4859 passed node 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 on 688c3e936aa110b033fa8c2722632afb75b331b5. Native Linux snapshots are byte-verified against tree ce68f49ad3a4dbf8116bb51a3b6e3f6ed050502f.

Command Result
node scripts/check-changed.mjs --base 688c3e936aa110b033fa8c2722632afb75b331b5 Exit 1, 1,735.261s: sole pre-existing size failure waived as detailed below; all nine remaining native checks pass
node scripts/check-changed.mjs --base 879662e97a969313369a11f054dbee048b49c630 -- src/gateway/server-reload-handlers.test.ts Fixture-only delta: pass, 265.516s; no waiver
pnpm protocol:check Pass, 2.299s; zero tracked-source drift
pnpm plugin-sdk:surface:check Pass, 3.520s
pnpm plugin-sdk:check-exports Pass, 0.137s
node scripts/run-vitest.mjs test/scripts/plugin-sdk-surface-report.test.ts src/plugin-sdk/session-visibility.test.ts Pass, 43 observed cases, 20.280s
pnpm build Pass, 465.227s; final source inventories unchanged
node scripts/run-vitest.mjs <focused and cross-shard paths> Captured-source union: 19,718 passed / 36 failed / 10 skipped; failure attribution below. Fixture-only delta: 3 files / 760 cases and original owning context 104 files / 2,346 cases pass, zero skips
Isolated Codex autoreview Fresh fixture-inclusive review scoped-clean at P0–P2, 294.460s; source verification passed

This repository has no plugin-sdk:api:check script; 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.mjs with the listed paths and native defaults. Built E2E execution consumes only the successful flags returned by prepareE2eVitestRuntime(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.ts

node scripts/run-vitest.mjs \
  src/gateway/session-create-preparation.test.ts \
  src/gateway/session-create-atomic-initialization.test.ts \
  src/gateway/server.sessions.create.projects.test.ts \
  src/gateway/server-methods/sessions-mutations.sticky-model.test.ts \
  src/gateway/session-sharing-preparation.creation-settlement.test.ts \
  src/gateway/session-lifecycle-state.persistence.test.ts \
  src/gateway/operator-run-authority.worker.test.ts \
  src/gateway/session-companion-runtime.test.ts

Group 2: test/vitest/vitest.gateway.config.ts

node scripts/run-vitest.mjs \
  src/gateway/session-create-collision.test.ts \
  src/gateway/server.sessions.create.lifecycle.test.ts \
  src/gateway/server.sessions.create.authority.test.ts \
  src/gateway/server.sessions.create.accounts.test.ts \
  src/gateway/server.sessions.create.incognito.test.ts \
  src/gateway/server.sessions.create.stores.test.ts \
  src/gateway/sessions-resolve.resident.test.ts \
  src/gateway/sessions-resolve-projection.test.ts \
  src/gateway/sessions-resolve.test.ts \
  src/gateway/talk/handlers/index.test.ts \
  src/gateway/user-profiles-http.test.ts \
  src/gateway/session-companion-rpc.test.ts \
  src/gateway/session-companion-ask.test.ts \
  src/gateway/session-observer-rpc.test.ts \
  src/gateway/server-methods/validation.test.ts \
  src/gateway/server.sessions.create.forks.test.ts \
  src/gateway/server-methods/sessions-create.child-custody.test.ts \
  src/gateway/sessions-patch.test.ts \
  src/gateway/sessions-patch.operator-model-policy.test.ts \
  src/gateway/server.sessions.patch-expected-identity.test.ts \
  src/gateway/server-methods/sessions-patch-native-recovery.test.ts \
  src/gateway/server-methods/sessions-search-scope.test.ts \
  src/gateway/server-methods/sessions-search.test.ts

Group 3: test/vitest/vitest.runtime-config.config.ts

node scripts/run-vitest.mjs \
  src/config/sessions/session-accessor.sqlite-creation-worker.test.ts

Group 4: test/vitest/vitest.infra.config.ts

node scripts/run-vitest.mjs \
  src/state/openclaw-agent-execution.creation-witness.test.ts \
  src/state/openclaw-state-db.coordinator.test.ts

Group 5: test/vitest/vitest.agents-tools.config.ts

node scripts/run-vitest.mjs \
  src/agents/tools/subagents-tool.acp-cancellation.test.ts

Group 6: test/vitest/vitest.tui.config.ts

node scripts/run-vitest.mjs \
  src/tui/embedded-backend.test.ts

Group 7: test/vitest/vitest.e2e.config.ts

node scripts/run-vitest.mjs \
  src/agents/subagents/registry/subagent-registry.archive.e2e.test.ts \
  src/agents/subagents/registry/subagent-registry.lifecycle-retry-grace.e2e.test.ts \
  src/agents/subagents/registry/subagent-registry.requester-wake.e2e.test.ts \
  src/gateway/sessions-patch-catalog-queue.e2e.test.ts

Group 8: test/vitest/vitest.ui-e2e.config.ts

node scripts/run-vitest.mjs \
  ui/src/e2e/question-guest.e2e.test.ts
Final-tree E2E attribution and runtime evidence

Full proof and first characterization lease. The final candidate tree 1635b4f04a72e0929dc635159319c9d5590e9c31 was compared with clean base 691d2e5cd48c0ddda650123b8b9ee0089fa39004 on 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) at requester-wake.e2e.test.ts:513:63: missing cleanupCompletedAt, with the shown terminal execution status and rearmGeneration: 1 matching. 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 HEAD a111c4aaece9e056fd5050842bff865735f483e8 plus its frozen staged changes). Base B: 691d2e5cd48c0ddda650123b8b9ee0089fa39004, tree a28040b258355e894de0ee538228fe791f18f662. Linux Testbox, Node v24.19.0, pnpm 12.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 use node scripts/run-vitest.mjs with that file; isolation adds -t with the exact regex settles 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=1 receipt 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:63 with missing cleanupCompletedAt; the shown terminal execution status and rearmGeneration: 1 match. 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.

Run Head Mode Rep Target stage Wall (s) Native overall outcome
1 B I 1 513:63; cleanupCompletedAt missing; 57 omitted 26.337 exit 1; 0P/1F/17S
2 C I 1 513:63; cleanupCompletedAt missing; 58 omitted 30.658 exit 1; 0P/1F/17S
3 C W 1 513:63; cleanupCompletedAt missing; 58 omitted 33.530 exit 1; 1P/17F/0S
4 B W 1 513:63; cleanupCompletedAt missing; 57 omitted 36.561 exit 1; 1P/17F/0S
5 C I 2 513:63; cleanupCompletedAt missing; 57 omitted 22.850 exit 1; 0P/1F/17S
6 B I 2 513:63; cleanupCompletedAt missing; 57 omitted 22.557 exit 1; 0P/1F/17S
7 B W 2 513:63; cleanupCompletedAt missing; 57 omitted 30.964 exit 1; 2P/16F/0S
8 C W 2 513:63; cleanupCompletedAt missing; 58 omitted 31.686 exit 1; 1P/17F/0S
9 B I 3 513:63; cleanupCompletedAt missing; 57 omitted 21.392 exit 1; 0P/1F/17S
10 C I 3 513:63; cleanupCompletedAt missing; 57 omitted 20.603 exit 1; 0P/1F/17S
11 C W 3 513:63; cleanupCompletedAt missing; 58 omitted 28.780 exit 1; 2P/16F/0S
12 B W 3 513:63; cleanupCompletedAt missing; 58 omitted 28.710 exit 1; 1P/17F/0S
13 C I 4 513:63; cleanupCompletedAt missing; 57 omitted 19.643 exit 1; 0P/1F/17S
14 B I 4 513:63; cleanupCompletedAt missing; 57 omitted 20.886 exit 1; 0P/1F/17S
15 B W 4 513:63; cleanupCompletedAt missing; 57 omitted 35.514 exit 1; 1P/17F/0S
16 C W 4 513:63; cleanupCompletedAt missing; 57 omitted 34.902 exit 1; 1P/17F/0S
17 B I 5 513:63; cleanupCompletedAt missing; 57 omitted 23.130 exit 1; 0P/1F/17S
18 C I 5 513:63; cleanupCompletedAt missing; 57 omitted 22.607 exit 1; 0P/1F/17S
19 C W 5 513:63; cleanupCompletedAt missing; 57 omitted 33.786 exit 1; 1P/17F/0S
20 B W 5 513:63; cleanupCompletedAt missing; 57 omitted 32.905 exit 1; 1P/17F/0S
21 C I 6 513:63; cleanupCompletedAt missing; 57 omitted 20.999 exit 1; 0P/1F/17S
22 B I 6 513:63; cleanupCompletedAt missing; 57 omitted 23.454 exit 1; 0P/1F/17S
23 B W 6 513:63; cleanupCompletedAt missing; 57 omitted 35.500 exit 1; 1P/17F/0S
24 C W 6 513:63; cleanupCompletedAt missing; 57 omitted 34.134 exit 1; 1P/17F/0S
25 B I 7 513:63; cleanupCompletedAt missing; 57 omitted 22.417 exit 1; 0P/1F/17S
26 C I 7 513:63; cleanupCompletedAt missing; 57 omitted 23.350 exit 1; 0P/1F/17S
27 C W 7 513:63; cleanupCompletedAt missing; 57 omitted 32.393 exit 1; 1P/17F/0S
28 B W 7 513:63; cleanupCompletedAt missing; 57 omitted 33.213 exit 1; 1P/17F/0S
29 C I 8 513:63; cleanupCompletedAt missing; 57 omitted 21.031 exit 1; 0P/1F/17S
30 B I 8 513:63; cleanupCompletedAt missing; 57 omitted 19.875 exit 1; 0P/1F/17S
31 B W 8 513:63; cleanupCompletedAt missing; 57 omitted 32.265 exit 1; 1P/17F/0S
32 C W 8 513:63; cleanupCompletedAt missing; 58 omitted 31.139 exit 1; 1P/17F/0S
33 B I 9 513:63; cleanupCompletedAt missing; 57 omitted 20.215 exit 1; 0P/1F/17S
34 C I 9 513:63; cleanupCompletedAt missing; 57 omitted 20.242 exit 1; 0P/1F/17S
35 C W 9 513:63; cleanupCompletedAt missing; 58 omitted 30.840 exit 1; 1P/17F/0S
36 B W 9 513:63; cleanupCompletedAt missing; 57 omitted 32.032 exit 1; 1P/17F/0S
37 C I 10 513:63; cleanupCompletedAt missing; 57 omitted 19.504 exit 1; 0P/1F/17S
38 B I 10 513:63; cleanupCompletedAt missing; 58 omitted 19.235 exit 1; 0P/1F/17S
39 B W 10 513:63; cleanupCompletedAt missing; 58 omitted 29.619 exit 1; 1P/17F/0S
40 C W 10 513:63; cleanupCompletedAt missing; 58 omitted 29.474 exit 1; 1P/17F/0S

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 tree 1635b4f04a72e0929dc635159319c9d5590e9c31. It was committed as 35a67ecbb928b19baeb9b7dd57f349089183b25f with the same tree.

Captured candidate proof Result
node scripts/check-changed.mjs --base 691d2e5cd48c0ddda650123b8b9ee0089fa39004 Raw exit 1, 1,783.618s: four unchanged size violations qualify for the explicit waiver below. All nine remaining native checks passed.
pnpm protocol:check Pass, 2.759s; zero generated diff
pnpm plugin-sdk:surface:check / pnpm plugin-sdk:check-exports Pass, 4.203s / 0.177s
node scripts/run-vitest.mjs test/scripts/plugin-sdk-surface-report.test.ts src/plugin-sdk/session-visibility.test.ts 2 files / 43 cases pass, 0 skips, 25.406s
pnpm build Pass, 452.743s; all 49,582 tracked blobs unchanged afterward
node scripts/run-vitest.mjs across the 41 listed affected paths Source: 36 files / 893 cases pass; UI: 1 file / 1 case passes. E2E: candidate 24 passed / 35 failed; clean base 25 passed / 34 failed. The remaining alpha case also failed 20/20 per head in its completed fresh-host matrix below.
Fresh isolated Codex autoreview Scoped-clean P0–P2, exit 0, 209.278s; final source verification passed

plugin-sdk:api:check is 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/main 691d2e5cd48c0ddda650123b8b9ee0089fa39004; the maintainer’s explicit unchanged-file size waiver applies. The raw exit remains recorded, and no unrelated file or limit was edited.

Unchanged file Count Limit
packages/ai/src/transports/openai-responses-prompt-observer.test.ts 1,010 1,000
src/agents/workspace.test.ts 1,017 1,000
src/agents/auth-profiles/oauth-refresh-fence.test.ts 1,046 1,000
src/commands/auth-choice.apply.plugin-provider.test.ts 1,025 1,000

That 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.

@clawsweeper

clawsweeper Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@github-actions

github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

This maintainer PR changes sensitive security components. This comment is informational because the PR author has repository Maintain or Admin access.

  • Current SHA: 0bb1b5a54d046d5fa401dc9ec33bd1dd90517bb9
  • Maintainer: @steipete
  • Repository role: admin

These security sensitive changes were made:

  • src/gateway/server-methods/secrets.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.

Carefully review these changes before merging.

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 25, 2026
@clawsweeper

clawsweeper Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 25, 2026, 4:58 AM ET / 08:58 UTC (Revision 4).

ClawSweeper review

What this changes

The 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
Reviewed head: 0bb1b5a54d046d5fa401dc9ec33bd1dd90517bb9

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The coherent, mostly subtractive patch has substantial boundary validation and no supported introduced finding, though its breadth limits review confidence.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: This maintainer-authored internal Gateway refactor has no contributor proof gate. The PR body supplies linked Testbox Gateway and E2E comparisons on prior attested trees plus a current-head candidate/base shard replay; it does not claim that replay fixed the CI failure. No stored-data contract change was identified.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored internal Gateway refactor has no contributor proof gate. The PR body supplies linked Testbox Gateway and E2E comparisons on prior attested trees plus a current-head candidate/base shard replay; it does not claim that replay fixed the CI failure. No stored-data contract change was identified.
Evidence reviewed 7 items Current main still has the older handler path: The fetched main revision uses inline Talk validation, while the PR routes these handlers through the existing validated-handler adapter.
Introduced consolidation: The pinned merge-base-to-head diff replaces repeated session error construction and Talk validation with shared owners; the new session error helper is absent from fetched main.
Approval boundary: The combined approval branch still checks the projected decision, rejects mismatched provenance, requires a plan for auto-reviewed allow-once approval, and consumes allow-once authority before forwarding.
Findings None None.
Security None None.

How this fits together

The 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]
Loading

Before merge

  • Resolve review confidence - ClawSweeper must reach high confidence before merge readiness is known.
  • Review config compatibility - Confirm compatibility and upgrade impact for the changed config or default surface before merge.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

PR surface statistics unavailable: the file list is incomplete.

Review metrics

None.

Stored data model

Persistent data-model change detected: migration/backfill/repair: src/gateway/server-methods/doctor.ts, unknown-data-model-change: src/gateway/server-methods/doctor.ts, unknown-truncated-pull-files. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best 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.

Labels

Label changes:

No label changes.

Label justifications:

  • P3: This is an internal cleanup with no intended user-visible behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored internal Gateway refactor has no contributor proof gate. The PR body supplies linked Testbox Gateway and E2E comparisons on prior attested trees plus a current-head candidate/base shard replay; it does not claim that replay fixed the CI failure. No stored-data contract change was identified.

Evidence

What I checked:

  • Current main still has the older handler path: The fetched main revision uses inline Talk validation, while the PR routes these handlers through the existing validated-handler adapter. (src/gateway/talk/handlers/client.ts:36, 79399a653aab)
  • Introduced consolidation: The pinned merge-base-to-head diff replaces repeated session error construction and Talk validation with shared owners; the new session error helper is absent from fetched main. (src/gateway/session-request-error.ts:1, 0bb1b5a54d04)
  • Approval boundary: The combined approval branch still checks the projected decision, rejects mismatched provenance, requires a plan for auto-reviewed allow-once approval, and consumes allow-once authority before forwarding. (src/gateway/node-invoke-system-run-approval.ts:438, 0bb1b5a54d04)
  • Secret normalization: The changed secret handler calls the shared array-backed normalizer; that helper retains undefined for absent arrays and preserves explicit empty arrays without adding deduplication. (src/gateway/server-methods/secrets.ts:220, 0bb1b5a54d04)
  • Captured validation evidence: The captured PR body, source hash 52719c09592e245a3376bada46f94906cde23d3e2c32a9dea350c4acd55ee406, reports byte-attested Testbox Gateway and E2E comparisons. It records the current-head verifier CI failure as unreproduced in one candidate/base shard comparison and does not claim a fix.
  • Separate fixture repair: The open related PR addresses a deferred-restart test lease deadlock in the reload fixture. Its stated problem is narrower than this production-handler consolidation.

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Shakker: Raw commit 9b8d77e adds src/gateway/session-list-read-result.ts:87 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 9b8d77e806a9; files: src/gateway/session-list-read-result.ts)
  • Galin Iliev: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (3 earlier review cycles)
  • reviewed 2026-09-25T07:00:33.041Z sha d0291d59a30017c578fa87530d613da267cf121f :: blocked before merge. :: none
  • reviewed 2026-09-25T07:42:43.498Z sha 9aa1fe0 :: blocked before merge. :: none
  • reviewed 2026-09-25T08:20:49.376Z sha 0bb1b5a :: blocked before merge. :: none

@steipete
steipete force-pushed the deslop/l25-gateway-owners-0923 branch from d0291d5 to 9aa1fe0 Compare September 25, 2026 07:32
@steipete
steipete force-pushed the deslop/l25-gateway-owners-0923 branch from 9aa1fe0 to 0bb1b5a Compare September 25, 2026 08:09
@steipete
steipete merged commit 30a2198 into main Sep 25, 2026
417 of 419 checks passed
@steipete
steipete deleted the deslop/l25-gateway-owners-0923 branch September 25, 2026 09:14
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 26, 2026
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. security-sensitive-changed size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant