Repository navigation
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 28, 2026, 3:16 PM ET / 19:16 UTC (Revision 11). ClawSweeper reviewWhat this changesThe branch reuses relationships during Gateway session lists, waits for chat history to establish a session ID before new Goal actions, and updates related tests, documentation, and the pinned Bun download retry. Merge readiness✅ Ready for maintainer review Keep this PR open. Current main still lacks its central session-list optimization, and the merged related fixture repair does not replace it. The introduced changes show no blocking correctness finding. Priority: P2 Review scores
Verification
How this fits togetherThe Gateway combines stored sessions, subagent runs, and profile identities into filtered session rows for clients. The Control UI uses those rows and chat history to present Goal controls and recover uncertain requests. flowchart LR
A[Stored sessions] --> C[Gateway list projection]
B[Subagent runs and profiles] --> C
C --> D[Filtered session roster]
D --> E[Control UI chat]
F[Startup history] --> E
E --> G[Goal requests and recovery]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +84, Tests +187, Docs +1, Config 0. Total +272 across 17 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep the relation caches with their existing lifecycle owners and preserve Goal recovery across startup, then land the branch through the native exact-head gates. Do we have a high-confidence way to reproduce the issue? Yes. Current-main source still repeats the relationship work, and the held-startup Goal path remains visible in source; the PR records before/after runs, though this read-only review did not execute them. Is this the best way to solve the issue? Yes. The caches sit with the registry and identity projection owners, while Goal admission uses the existing authoritative history state. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against fd28e926dcb1. 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 (10 earlier review cycles; latest 8 shown)
|
Incorporate main through a08479a to resolve the 150-job preflight rejection. The eight reviewed performance files and their lifecycle review context are unchanged. Testbox proof retains all executable plan facts while reducing 151 rows to 83; 92 focused tests pass on this base.
Integrate the existing test-helper export, updater runtime, and custody assertion fixes from main. Keep canonical skills primary for managed-worktree sessions, await successor admission after heartbeat completion, and route the real hot-reload dispatcher through the existing SQLite host fork pool. Preserve assertions, deadlines, and runtime policy.
Keep the independently landed version of the same tested successor-admission wait. The only conflict resolution adds its explanatory comment; the reviewed performance and remaining fixture changes are byte-identical.
|
The canonical-skill fixture and SQLite host-fork registration from your commit The focused fixture prerequisite has landed as #160349 (commit |
Remove the obsolete stderr readiness byte from the PID-synchronized process tree fixture. Publish one completed session row to both mock history and the canonical roster for session-only Stop. Reuse main's UI component type-shard split (52ae7e3) to retain the existing root budget without dropping compiler coverage.
Integrate the exact main revision used by CI so the fixtures exercise its sampled session snapshots. Seed progress-widget liveness in the canonical row as well as the list response. Hold personal-visibility mutation replies until their requests are checked and committed mock state is published. Preserve the visible Hide/Show and reload assertions, and require exactly two writes to expose duplicates.
A selected descriptor can render Goal controls before history establishes its physical session ID. An uncertain mutation then loses its Check outcome control when history changes the recovery lookup identity. Gate new Goal operations on authoritative history and session identity, preserving saved receipt replay and current-authority checks. Publish the Stop fixture's completed state only after capturing its abort request. Hold startup and Talk catalog replies until their rendered readiness is observed before the camera fixtures' single microphone click. Integrate the already-landed sidebar, model and member-fixture repairs from main. Testbox proof reproduced the Goal identity race and both Stop failures. The corrected 80-file Stop inventory passed 367 tests; four related UI files passed 27 tests. Goal owner/view tests passed 47 cases and recovery E2E passed six. Both extended Goal regressions fail against the old production code. Fresh complete-candidate review found no actionable P0-P2 issues. Release-note context: session list allocation measurements are unchanged. Goal actions wait for initial history so uncertain updates remain recoverable across reloads. No configuration, schema or migration change is required.
Take main's exact e256cbe Talk fixture and shared readiness helper, which supersede this branch's two-case startup synchronization. The owner commit records 113 integrated E2E cases, 21 fixture-owner tests, types, lint, guards and review. Existing camera, transcript and lifecycle assertions remain intact. The remaining sixteen PR files are byte-identical to reviewed and validated 6f7d358. All performance production files remain identical to the measured 3846004. Fresh complete-candidate review is clean through P2.
Take main's exact lifecycle fixture from 93a13da. It publishes the canonical completed row after the abort request and additionally holds history across an authoritative roster refresh. Its owning PR records all 16 lifecycle cases passing, with the existing assertions and deadlines. The remaining fifteen PR files are byte-identical to the previously validated candidate. Fresh complete-candidate review is clean through P2.
The create-notices case only invokes directSessionReq and seeds its own profile. Its persisted provenance, session events and Home notices come from the real session-creation handler, not a running Gateway listener. Use the existing handler fixture while retaining the same state setup, cleanup and assertions as sibling session-creation tests. CI failed during the unused beforeAll Gateway startup with a shared-state worker opening-path mismatch. That underlying admission error remains unexplained; no worker identity guard or storage code is changed here. The original 99-file group passed 1,026 cases, and the exact 27-file failing group passed 211 cases both before and after this fixture correction. The changed file passed with one worker in 15.47s wrapper wall / 13.08s Vitest. Targeted type, lint, formatting, guard and dead-export checks passed on Blacksmith Testbox tbx_01m3mghftex88penky6z5z64js. Fresh review found no actionable P0-P2 issues. No test cases or deadlines are added.
Cover curl exit 35 and other transport errors within the existing three retries and time limits. Keep the artifact URL, both checksums and TLS verification unchanged. Controlled TLS proof on Blacksmith Testbox reproduces old exit 35 after one connection. The updated action retries, receives an unpinned response, and rejects it at the checksum before creating a binary or publishing PATH. The real pinned action then verifies both checksums and executes successfully. The changed-file gate and independent P0-P2 review pass. Integrate main's 4bd1054 scheduler fixture repair for the inherited runtime/type failures. The reloader, scheduler and projection dependencies match the failed CI base, and all sixteen previously validated PR files are unchanged. Reuse the owning commit's passing focused test and Gateway typegraph proof; an extra Testbox check never received a runner and was stopped before execution. Fresh complete-candidate review found no actionable defects.
…160198) * perf(sessions): reuse registry relations across list reads * test: repair CI fixture ownership and typecheck routing Remove the obsolete stderr readiness byte from the PID-synchronized process tree fixture. Publish one completed session row to both mock history and the canonical roster for session-only Stop. Reuse main's UI component type-shard split (e7f5a85) to retain the existing root budget without dropping compiler coverage. * test(gateway): avoid unused startup in session notice proof The create-notices case only invokes directSessionReq and seeds its own profile. Its persisted provenance, session events and Home notices come from the real session-creation handler, not a running Gateway listener. Use the existing handler fixture while retaining the same state setup, cleanup and assertions as sibling session-creation tests. CI failed during the unused beforeAll Gateway startup with a shared-state worker opening-path mismatch. That underlying admission error remains unexplained; no worker identity guard or storage code is changed here. The original 99-file group passed 1,026 cases, and the exact 27-file failing group passed 211 cases both before and after this fixture correction. The changed file passed with one worker in 15.47s wrapper wall / 13.08s Vitest. Targeted type, lint, formatting, guard and dead-export checks passed on Blacksmith Testbox tbx_01m3mghftex88penky6z5z64js. Fresh review found no actionable P0-P2 issues. No test cases or deadlines are added.
What Problem This Solves
Repeated session lists over large stores allocate descendant traversal state, child-owner arrays, and profile-involvement projections even when those relationships have not changed.
User Impact
Large session lists allocate less memory and spend less time on the Gateway main thread. Membership, ordering, visibility, navigation ownership, expiry, and live-run semantics remain unchanged. No configuration or migration is required.
CI recovery also exposed a Goal recovery bug: Resume could send before initial history established the physical session ID. If its response was uncertain, admitting history changed the recovery lookup identity and hid Check outcome while its saved request remained. New Goal mutations now wait for authoritative history and a session ID. Existing receipt replay and authority checks remain intact.
Why This Change Was Made
The existing registry topology owns sparse frozen descendant arrays, invalidated on each topology patch. Empty sessions allocate no traversal state or negative-cache entries. Child-owner arrays reuse the registry revision and session-entry identity while checking time and live authority on every read. The existing identity projection indexes profile-involvement facts, invalidated by profile/config publication or entry replacement.
The resident list owner already acquires full run snapshots only at initialization/source replacement, then applies keyed publications. Repeated lists consume that index. The separate caller-private mutable Map contract used by control/scoped reads is preserved; generic run-snapshot APIs are unchanged. Public descendant-list arrays also remain caller-private.
Net production change: +84 lines across eight files (+75 for list reads, +9 for Goal admission). The Bun setup action also extends its existing bounded curl retry policy to include TLS connection resets; its URL, checksums, TLS verification, retry count, and time limits are unchanged. The mention fixture publishes Hide/Show outcomes after capturing the mutation request and keeps canonical mock rows consistent with wire responses. The create-notices handler test now uses the existing handler fixture, removing an unasserted full Gateway boot while preserving profile setup, real handler calls, persisted provenance, events, notices, and cleanup. Main now owns the Talk startup-readiness and Stop snapshot-ordering repairs. Existing assertions and deadlines remain; the mention case also requires exactly two writes. No test cases, retry loops, sleeps, or timeout increases were added by these CI repairs.
Measurement
Synthetic fixture: 8,000 sessions, 200 runs (30 retained unended), 90 calls at a simulated three calls/second, ten warmups. Timings run without allocation sampling; byte measurements use V8 sampling at 1 KiB including objects collected by minor/major GC. Bytes include call/fixture overhead. Each before/after pair ran on the same lease, comparing baseline
54a0ea673bb1with performance commit384600436ee8. The six performance files remain byte-identical to that commit.The three independent owner exercises together allocate 6.2× fewer bytes and run 2.6× faster. The complete
listProjectedSessionscall allocates 34% fewer bytes and runs 18% faster. Benchmark-process RSS was 1.76 GB before / 1.44 GB after; this includes the fixture and sampling harness, not production steady-state memory.Proof
All heavy validation used provider blacksmith-testbox, profile openclaw-check.
tbx_01m3k5wepsjn9a1mj6zysg6xez: owner measurements and focused tests passed. The involvement-reuse regression fails on baseline with six repeated metadata reads and passes on the candidate.tbx_01m3k7a31msf81c0g5hn9v65h4: full-list measurements passed. The 79-file list/registry selection passed 1,708 tests, with four skips and two retry-grace failures also reproduced on untouched baseline in the original four-file shard (61 passed / the same two failed). Their owner fix, c4954bf / fix(state): prevent migration lease loss after database relocation #159835, is integrated.tbx_01m3kecv6dj0dkw2j5y2czn508: updated-base query/filter/resident-context/index tests passed 92 cases across four files (63.22 s wrapper wall).tbx_01m3kssvfa1mm91eyez5as7mpd: core types, 26 core test graphs, scripts, four root test graphs, formatting, guards and dead-export checks passed. Its unrelated line-limit finding is fixed by integrated main commit f8ae4fc. Remaining lint and guards passed separately.tbx_01m3m44y5s6aekc6ygm4mbdmqa: the mention fixture passed 20 standalone runs, three cases each, including the exact two-write assertion. Three original 79-file replays passed 354 tests each (460.77 s, 480.11 s, 392.56 s), plus the focused changed-file gate.tbx_01m3mb6npzkhmjgz026fx4gbk9(run): original Stop shard reproduced both failures (365 passed / two failed). A forced pre-click authoritative refresh failed both cases with the old fixture ordering and passed both with completion publication moved after the captured abort. The Goal probe sent Resume without a session ID, then lost its recovery control after history admission; both membership-fixture variants reproduced it without renderer errors.tbx_01m3mbxwgrg08xyp4h19d79b9n(run): corrected original Stop shard passed all 367 tests (408.77 s). Four complete Talk/model/avatar/sidebar files passed 27 tests (63.22 s). Both extended Goal regressions failed on old production for the intended assertion; before/after capture runs passed. The first owner/view run exposed four incomplete view fixtures, corrected to supply their admitted session ID. A subsequent native sync timed out before any tests ran; validation moved to a fresh lease.tbx_01m3md7w0pf730ye51063bt6ym(run): Goal owner/view tests passed 47 cases (10.64 s wrapper / 9.78 s Vitest), and the full recovery E2E file passed six cases (40.77 s Vitest). All 14 workspace-recovery cases passed in original file order. The changed-file gate passed formatting, guards, i18n, seven test type graphs, UI types, dead exports, and lint. Its shallow-history budget comparison was rerun successfully with complete ancestry on the following lease.Commands use
crabbox run --id <id> --timing-json -- ..., withnode scripts/run-vitest.mjs <explicit files>andnode scripts/check-changed.mjs --base <pinned base> -- <changed files>. UI E2E usesrun --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner; standalone runs use--maxWorkers 1. Original UI inventories use--maxWorkers 3,OPENCLAW_VITEST_MAX_WORKERS=3,OPENCLAW_UI_E2E_SKIP_REAL_GATEWAY=1, andOPENCLAW_VITEST_INCLUDE_FILEwith the captured inventory. Replays do not repartition or use retries.Performance-test cost: filters 40 tests in 15 s wrapper / 12.78 s Vitest; queries 31 tests in 7 s / 5.01 s. Added performance cases cost about 0.67 s and 1 ms respectively. CI-repair tests extend existing cases; their measured file/suite times are above. Fresh complete-candidate review is scoped-clean through P2.
CI Recovery And Limits
Run 36441951866 tested
df232520e5c6merged into main1a94ee9ed7e2. Main's sidebar startup repair 6b9da9d and model/member-fixture repair f03d64f are integrated. The subsequent Talk overlap takes main's exact e256cbe version at pinned base4f94275e92cc; its owner records 113 integrated E2E cases, 21 fixture-owner cases, types, lint, guards, and review. All sixteen remaining PR files are byte-identical to validated6f7d358d734c. Main's Stop repair 93a13da is also integrated at pinned base14cc3a4da8ac; its owning PR records 16 passing lifecycle E2E cases. The Goal admission fix addresses the remaining product failure. The fifteen remaining PR files are unchanged by this integration. Earlier matrix, process-tree, type-shard, skill-refresh and progress-widget repairs are already on main and are absent from the net PR diff.That run also reported
SQLite database file identity changed before existing-only openinserver.sessions.workspace-recovery.test.ts, Archive / stale pending epoch, before the handler's recovery logic. The untouched file passed all 14 cases in its original order; that replay does not prove a fix. The exact original 99-file inventory passed all 1,026 tests (703.81 s), using explicit file arguments and the original configuration/two-worker limit. The earlier selector-only attempt repartitioned files and is not counted as that proof. No database identity check, storage behavior, or fixture assertion was weakened.Run 36457316687 for
e6b8c67201d4finished with 120 successful jobs, 18 skips, and one executable failure plus its downstream gate. The failure wasserver.sessions.create-notices.test.tsbeforeAll startup:Shared-state worker opening path changed, wrapped as a secrets-activation error. Its test body never ran. The case uses only direct handler calls, explicitly seeds its profile, and does not rely on a Gateway listener. Switching to the existing handler fixture removes that unused setup without claiming to fix the actor-binding mismatch. The exact 27-file failed group passed 211 cases both before and after the fixture change; the actor mismatch remains unproven.Run 36463017855 for
b3ead1f00354had three executable failures: the UI job stopped before tests on curl exit 35 during the pinned Bun TLS download; a newly landed config-commit fixture omitted its required scheduler, causing both a runtime failure and TS2741. The scheduler repair is main commit4bd105408ccd, now integrated. Its recorded focused test and Gateway typegraph proof are reused: the reloader/scheduler/projection dependencies match the failing CI base, and all sixteen previously validated PR files are unchanged. An extra combined Testbox check ontbx_01m3mmwqfy0jzdh3tvnngfj9nznever received a runner and was stopped before execution.tbx_01m3mm6cgcxtdbg066dmxp09s9(run) validated the actual Bun setup shell: the old action failed after one TLS-reset connection with exit 35; the updated action made a second connection, received unpinned bytes, and correctly failed its checksum without creating a binary or publishing PATH. Running the action against the unchanged pinned GitHub artifact then passed both checksums and executed Bun successfully. Its changed-file gate and review passed. No test retry or integrity check was weakened.Final head
44b087fce7f0: CI run 36469984809 completed successfully with 140 successful jobs, 17 skips, and no failures, includingopenclaw/ci-gate. The Gateway-root test typegraph passed on that exact head (61.6 s). Full integrated review is scoped-clean through P2. The campaign auto-merge completed at 2026-09-28 19:57:42 UTC asf809da538f5191baca67c31ef07b6c29e1aaed47. All task leases are stopped. Leasetbx_01m3met94tnsv3t6n46wwvqzdvpassed the ancestry-aware budget check and the preceding 294-case delivery file, then was stopped for the actual main conflict. The replacement leasetbx_01m3mfgfhyt0p4k38xv6m2g07ewas stopped while queued after the second actual main conflict; no tests ran there. All leases from earlier heads are stopped. The final replay usedtbx_01m3mghftex88penky6z5z64js(run): ancestry-aware budget check passed; preceding delivery file passed 294 cases; the corrected 99-file invocation passed 1,026 cases, followed by 32 Talk/Goal/Stop E2E cases (52.61 s). A script quoting error prevented the first 99-file attempt from starting and is excluded from passing proof. The exact create-notices 27-file group passed 211 cases before the fixture change (203.76 s) and afterward (138.71 s / 140.89 s wrapper). Its standalone case passed with one worker in 15.47 s wrapper / 13.08 s Vitest. The targeted changed-file gate passed types, lint, formatting, guards, and dead exports; the two-line fixture change received a clean P0–P2 review. All task leases are stopped.No production Gateway was changed. Measurements cover resident synthetic list/read paths, not network serialization, production workload latency, or deployment behavior.
Goal Startup: Before / After
The same synthetic session while initial history is held. Before, mutation controls are available before the recovery identity is known. After, the goal remains readable and expandable while mutations wait for history. Controls become available after admission; uncertain requests remain recoverable across reloads.