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: blocked before merge. Reviewed September 13, 2026, 8:12 AM ET / 12:12 UTC (Revision 21). ClawSweeper reviewWhat this changesThe branch reads child sessions through their correct storage owner, fences delayed cleanup across resets and waits, and bounds task-index scans when registry records disappear. Merge readiness⛔ Blocked before merge - 2 items remain Keep open as the maintainer-owned combined-acceptance tracker. The central repairs have landed separately, but the latest discussion explicitly retains the Swarm acceptance hold. No new blocking defect was established in the pinned patch. Priority: P1 Review scores
Verification
How this fits togetherOpenClaw’s subagent registry reconciles child execution with stored sessions and task outcomes. Its lifecycle and cleanup owners determine when completed work can be retained, reset, or deleted. flowchart TD
A[Child execution and stored sessions] --> B[Scoped session reader]
B --> C[Subagent reconciliation]
C --> D[Task outcomes and retained results]
E[Session reset request] --> F[Durable cleanup revocation]
F --> G[Publish reset generation]
C --> H[Cleanup with captured session identity]
F --> H
Before merge
Agent review detailsSecurityNone. PR surfaceSource +48, Tests +922, Docs +7. Total +977 across 17 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the landed owner-level repairs and complete composed-system acceptance; durable pre-publication revocation justifies the remaining production growth without another store or fallback. Do we have a high-confidence way to reproduce the issue? No current-main failure was established in this read-only review. The original ordering and stress failures have concrete recorded reproductions, while the targeted repairs are now on main. Is this the best way to solve the issue? Yes for the owner-level design: canonical reads and durable revocation address the producers of stale cleanup authority; a downstream delete workaround would not. The appropriate integration path is the landed splits and combined acceptance. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8d37c8a52ff2. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (20 earlier review cycles; latest 8 shown)
|
|
Holding this PR for a confirmed lifecycle gap found during follow-up validation. The published head remains The canonical failed-collector path can retain pending session cleanup after a transport failure. If The reproduction uses actual collector registration with required task persistence, The relevant owners are The local structural cleanup passes 269 owner/sibling tests and all 29 changed-file checks, with production +292/-301 (net -9). Those checks do not cover this between-attempt ordering and do not establish readiness to merge. Proposed design for acceptance: the registry owner durably suppresses the outgoing terminal cleanup owners before reset publishes its replacement, using the existing This changes cross-store publication and crash semantics, so implementation is held at the persistent-store review checkpoint. The explicit tradeoff is that a crash after durable revocation but before reset commit may retain the original session with cleanup suppressed. Acceptance, rollback behavior, write-failure/restart proof, unchanged-owner retries, and active-continuation sibling coverage are required before proceeding. No approval or implementation is claimed here. |
e1afc70 to
d13b787
Compare
|
Follow-up to the reset/cleanup hold: the maintainer-approved pre-publication revocation design is implemented in d13b7876e7b2702b73935acfa5eed5cafaaf21c2. The original failed-launch collector → failed first delete → reset → later sweep reproduction now preserves the successor. The existing lifecycle controller and synchronous reset guard persist The exact rebased head passed a full build, 798 tests in 27 files, all 30 changed-check stages, and fresh independent Codex review through P2. The full real-OpenAI Swarm matrix passed, as did completion/Stop/recovery in the actual Control UI. Inspected synthetic-only videos and reset before/after images are now in the updated PR body. Normal child reset was acknowledged, and separate read-only storage checks verified persisted suppression with the completed task and cached collector result retained. Unmodified managed Codex 0.153.0 also passed a fresh two-child direct collector smoke on this exact build. The first observer attempt remains failed: it did not understand Codex history's Production delta is +55: the original scoped-reader refactor is −39, the approved durable ownership repair adds 79, and indexed scoped task selection adds 15. Tests add 1,140. The PR body records the necessary ownership tradeoff and measured helper improvements without claiming a universal model-latency speedup. The previous review is from August 27, and this refresh includes the accepted hold repair plus the task-selection improvement. @clawsweeper re-review Exact-head CI and the native prepare/merge gates still precede landing; this comment is not a merge announcement. |
d13b787 to
9bf4294
Compare
Persist terminal cleanup revocation before publishing a reset successor, including previously best-effort suppression and missing-row recreation. Preserve collector results, unchanged retries, and active/yielded continuations; a later reset failure retains durable suppression rather than reviving cleanup. Complete the existing requester/owner/child task index and use it for scoped pages without weakening revision, cursor, fairness, or access checks. Together with the retained scoped reader repair, this removes unrelated scan work from Swarm completion and observation. No schema, config, or dependency changes. Context: #130741
Pass the resolved canonical session key directly to cleanup revocation instead of reparsing global aliases. Existing selected-agent rejection and lifecycle guards remain authoritative. Fixes the two global reset-hook failures exposed by PR #130741 CI; 476 focused tests and changed gates pass.
|
Final live verification is holding this PR open at 9bf42940e021f083a9e99fb3f043c7ff7e72b6f8. The global-session reset failure caught by CI was reproduced and repaired by removing redundant agent-ID parsing after canonical target resolution. The required rebase also preserved current-main restart recovery and reset-transcript header initialization. The combined candidate passed a full build, all changed gates, 877 regression tests, and fresh three-part independent review. None of that overrides the failed final live check below. A new twenty-child Code Mode run on the retained isolated Gateway state produced 19 completed children and one failed child. The failed child hit Closed profiles and source identify a wait cycle in the existing SQLite reclamation owner: the cleanup worker waits for a parent-thread commit checkpoint while retaining the write transaction, while foreground synchronous transcript/trajectory writers block that parent thread on the same database lock. The sampled worker wait spans about five seconds; parent authorization is first sampled after that wait expires. This is sampled timing, not CPU accounting or an exact lock trace. The relevant checkpoint/reclamation code is unchanged between this candidate and inspected main Separately, the session-list availability repair landed independently on main and now overlaps this branch. The next refresh will remove duplicate source/tests where that canonical implementation already provides the behavior. The latest ClawSweeper review found no actionable code defect and listed the preservation-first reset failure contract as its remaining maintainer risk. That specific tradeoff was explicitly accepted and remains the intended design: failed revocation blocks reset; a later failure must not restore stale deletion authority. This acceptance does not waive the new live failure, current merge conflict, exact-head CI, or native prepare/merge gates. Nothing is merged. |
Persist terminal cleanup revocation before publishing a reset successor, including previously best-effort suppression and missing-row recreation. Preserve collector results, unchanged retries, and active/yielded continuations; a later reset failure retains durable suppression rather than reviving cleanup. Complete the existing requester/owner/child task index and use it for scoped pages without weakening revision, cursor, fairness, or access checks. Together with the retained scoped reader repair, this removes unrelated scan work from Swarm completion and observation. No schema, config, or dependency changes. Context: #130741
Pass the resolved canonical session key directly to cleanup revocation instead of reparsing global aliases. Existing selected-agent rejection and lifecycle guards remain authoritative. Fixes the two global reset-hook failures exposed by PR #130741 CI; 476 focused tests and changed gates pass.
9bf4294 to
96f043a
Compare
Maintainer decision: repair the SQLite wait cycle before landingExplicit acceptance was received in chat on September 5, 2026 for asynchronous admission of conflicting transcript, trajectory, and borrowed-memory writes through the existing per-agent owner. The selected decision is to repair this before landing, not defer the known failed stress case. A follow-up SDK decision explicitly approves one generic Bulk deletion must remain off-thread. Preserve the exact live authorization and worker-settlement guarantees, rollback and postcommit publication, caller completion ordering, and the existing 500 ms responsiveness target. Revalidate applicable authority after admission waits before mutation. No schema, configuration, authority-lease, timeout, or concurrency-cap expansion is approved, and the measured 3.52-second main-thread bulk-deletion shortcut is not accepted. The implementation will cover participating foreground and borrowed-memory writers at their canonical persistence/admission boundaries, rather than adding a Swarm retry or disabling cleanup. Required proof includes the deterministic concurrent-write/reclamation regression, authority retirement while waiting, worker/rollback failures, large-deletion responsiveness, and fresh retained-state Swarm completion/Stop/recovery. The earlier failed trials remain failed evidence. A separate explicit decision waives fresh autoreview for this PR only. It does not waive hands-on source/dependency review, applicable regression and live verification, green exact-head CI, or the native prepare/merge gates. No shared authentication, model configuration, reviewer permissions, or isolation controls will be changed to bypass the unavailable review route. The tested deduplicated head |
* test(gateway): cover native reclamation and abort admission Exercise conversation directory, synthetic send, and durable completion while native reclamation awaits commit authorization. Cover admitted direct child cancellation through successful and failed terminal persistence. Mutation controls verify sensitivity to bypassed writer admission and restart misclassification; they do not diagnose current main as defective. Related: #130741 * fix(ci): preserve shard planning without map spreads
Keep selected session entries complete while child discovery omits unused saved prompt payloads. Find direct children through the existing parent and spawn indexes in one ordered, deduplicated query. Preserve persisted and retained-run children, visibility and ownership, and deletion freshness. Extend prompt-decoding regression coverage at sessions.describe and single-row reads. Related: #130741.
Use the existing parent and spawn indexes for direct child discovery, and load child metadata without unused skill snapshots or prompt reports. Preserve complete selected entries and current ownership, lineage, and deletion behavior for persisted and retained-run children. Keep resident list and describe ownership intact. Exercise the cold loader used by embedded history while retaining current resident lifecycle tests. Related: #130741; the broader Gateway latency target remains open. Source review is scoped-clean through P2. Runtime proof and exact-head CI for this integration remain pending; earlier proof belongs to fa202e5c.
Use the existing parent and spawn indexes for direct child discovery, and load compact child metadata without unused skill snapshots or prompt reports. Preserve complete selected entries, current ownership and lineage, and fresh deletion results. Keep ordinary list/describe reads with the resident owner; cover the real cold loader used by embedded history. Related: #130741. On Linux/Node 24.19.0, the full 35-case baseline/candidate comparison produced exactly four intended failures on baseline and 35 passes on candidate. Nine current consumer selections added 159 passes. All 194 selected candidate cases passed; the TUI history filter intentionally left 128 other cases unselected. All 13 native reports and assertion identities were independently verified. Exact-head CI run 35231150085 succeeded with 142 successful jobs and 16 skipped. The full selected gate passed, including production/core-test types, export scans, lint, formatting and contract guards. The Linux command exited 0; a subsequent portal-sync request timed out. Reports and source bindings were verified before owned cleanup. Fresh source review and the trusted exact-head ClawSweeper review found no introduced correctness/security defect. Prior SQL medians of 4.119 ms and 0.091 ms belong to b918ab/7a3160e5 and were not repeated. The original live campaign's 17 of 1,316 observations above 500 ms and historical recursive-failure attribution gap remain documented; the broader Gateway target remains open.
Skip unrelated pending archive publication for fresh session upserts with maintenance disabled. Preserve publication for existing entries, resets, removal retries, maintenance, and Doctor work. A real archive collision reproduces creation failing after its session row and transcript committed; verify successful creation and later archive recovery through the lifecycle entry points. Related: #130741
* test(gateway): cover native reclamation and abort admission Exercise conversation directory, synthetic send, and durable completion while native reclamation awaits commit authorization. Cover admitted direct child cancellation through successful and failed terminal persistence. Mutation controls verify sensitivity to bypassed writer admission and restart misclassification; they do not diagnose current main as defective. Related: openclaw#130741 * fix(ci): preserve shard planning without map spreads
Use the existing parent and spawn indexes for direct child discovery, and load compact child metadata without unused skill snapshots or prompt reports. Preserve complete selected entries, current ownership and lineage, and fresh deletion results. Keep ordinary list/describe reads with the resident owner; cover the real cold loader used by embedded history. Related: openclaw#130741. On Linux/Node 24.19.0, the full 35-case baseline/candidate comparison produced exactly four intended failures on baseline and 35 passes on candidate. Nine current consumer selections added 159 passes. All 194 selected candidate cases passed; the TUI history filter intentionally left 128 other cases unselected. All 13 native reports and assertion identities were independently verified. Exact-head CI run 35231150085 succeeded with 142 successful jobs and 16 skipped. The full selected gate passed, including production/core-test types, export scans, lint, formatting and contract guards. The Linux command exited 0; a subsequent portal-sync request timed out. Reports and source bindings were verified before owned cleanup. Fresh source review and the trusted exact-head ClawSweeper review found no introduced correctness/security defect. Prior SQL medians of 4.119 ms and 0.091 ms belong to b918ab/3d08e342 and were not repeated. The original live campaign's 17 of 1,316 observations above 500 ms and historical recursive-failure attribution gap remain documented; the broader Gateway target remains open.
…148958) Skip unrelated pending archive publication for fresh session upserts with maintenance disabled. Preserve publication for existing entries, resets, removal retries, maintenance, and Doctor work. A real archive collision reproduces creation failing after its session row and transcript committed; verify successful creation and later archive recovery through the lifecycle entry points. Related: openclaw#130741
Keep pending reasoning, speed and context choices attached to their field owners while creation receipts adopt the physical session identity. Preserve FIFO dispatch and each field's visible failure when later writes settle. Validated with 125 focused and sibling cases, a failing preview regression control, changed-source checks, the unchanged UI performance budget, and a Chromium comparison that reproduces the missing error on the incoming PR and retains it on this candidate. Independent review through P2 is clean. Related: #154807, #130741, #152375
* fix(ui): preserve queued settings across session creation Keep pending reasoning, speed and context choices attached to their field owners while creation receipts adopt the physical session identity. Preserve FIFO dispatch and each field's visible failure when later writes settle. Validated with 125 focused and sibling cases, a failing preview regression control, changed-source checks, the unchanged UI performance budget, and a Chromium comparison that reproduces the missing error on the incoming PR and retains it on this candidate. Independent review through P2 is clean. Related: #154807, #130741, #152375 * test(ui): provide preview capability in chat fixtures Keep existing composer and identity fixtures aligned with the session capability contract. An undefined preview represents no pending settings; existing overrides and rendering assertions stay unchanged. Independent review through P2 and pinned formatter checks pass. This fixes the missing-method failures observed on both Node and Bun; test replay is pending on the updated candidate. Related: #154807 * test(ui): return complete chat header patch receipts * test(ui): preserve real session capabilities in permission controls
…law#154807) * fix(ui): preserve queued settings across session creation Keep pending reasoning, speed and context choices attached to their field owners while creation receipts adopt the physical session identity. Preserve FIFO dispatch and each field's visible failure when later writes settle. Validated with 125 focused and sibling cases, a failing preview regression control, changed-source checks, the unchanged UI performance budget, and a Chromium comparison that reproduces the missing error on the incoming PR and retains it on this candidate. Independent review through P2 is clean. Related: openclaw#154807, openclaw#130741, openclaw#152375 * test(ui): provide preview capability in chat fixtures Keep existing composer and identity fixtures aligned with the session capability contract. An undefined preview represents no pending settings; existing overrides and rendering assertions stay unchanged. Independent review through P2 and pinned formatter checks pass. This fixes the missing-method failures observed on both Node and Bun; test replay is pending on the updated candidate. Related: openclaw#154807 * test(ui): return complete chat header patch receipts * test(ui): preserve real session capabilities in permission controls
Split landing progress
Twenty-nine focused fixes have merged while the remaining Swarm repair continues.
dec9fe0a197327a5b1a67807e609bd9df4c3075acontains all 29 merge commits. The final conversation slice passed 366 distinct runtime cases, normal Worker/SDK/UI build, public/private SDK consumers, canonical changed checks, isolated P0/P1 review, native maintainer review, and required CI on its exact published head. Native prepare and merge completed without changing that head. Final combined-source normal build and real-provider acceptance remain pending; the original branch is unchanged and is not being merged as a stale aggregate.Each split receives independent review and exact-head required CI. Optional scanner acquisition or SARIF-upload failures are recorded separately and are not described as an all-checks-green result. The unchanged 500 ms responsiveness target has not yet passed; final composed-source, real-provider UI and active-deletion acceptance remain outstanding. Historical test and media evidence below predates these split heads and does not establish current acceptance.
What Problem This Solves
Subagent reconciliation could miss completed Incognito or secondary-agent children, and copied store snapshots could miss completion committed while a sweep awaited another child. Real OpenAI Swarm stress testing also exposed avoidable
tasks.listinstability: a session-scoped page scanned unrelated task history and could exhaust its revision attempts during churn.The existing reset/cleanup hold identified a separate reachable ownership failure. If a failed collector launch's first cleanup attempt failed, a reset between sweeps could publish a successor that the old collector subsequently deleted. This refresh retains the scoped-reader repair and resolves that hold at the reset owner; it does not attribute the pre-existing between-sweep defect to this PR.
Why This Change Was Made
Reconciliation now uses one canonical
loadSessionEntryReadOnlycall with the child's agent, configured store, and session key. The whole-store reconstruction/cache plumbing and duplicate reader are removed. Completion metadata stays fresh across awaits, while cleanup retains the session ID and lifecycle revision captured before the sweep's first await, bound to the exact run object. New or replaced group members wait for the next pass.Session reset now durably sets the existing terminal-run
execution.suppressSessionEffectsflag before publishing its next lifecycle generation. The existing lifecycle controller, completion lock, strict targeted persistence, and synchronous reset commit guard own this transition. A failed revocation blocks reset; a later reset-store or postcommit failure cannot revive deletion authority. Pending completion capture, retained kill claims, earlier memory-only suppression, missing-row recreation, and yielded continuations are covered explicitly.Session-scoped task pages now enumerate the existing related-session index rather than global history. That index includes requester, owner, and child relationships and is maintained when they change. Global/cursor revision checks, 32-entry fairness, ordering before pagination, detached output, and final authorization remain intact. ACP generation lookup explicitly retains its former owner/child scope.
User Impact
Completed Swarm work is reconciled through its correct session owner, unrelated history no longer expands small scoped task scans, and delayed terminal cleanup cannot delete a reset successor. Swarm remains enabled by default; the existing 8 concurrent / 50 live / 200 lifetime / 600-second wait limits are unchanged. Code Mode remains a separate opt-in.
The maintainer explicitly accepted the fail-closed reset tradeoff: if revocation cannot persist, reset fails; if reset fails after revocation persists, the original session may remain with old cleanup suppressed. Reset asks the caller to retry when completion is still settling. Collector results, task outcomes, normal retention, unchanged-session retries, and active/yielded continuations remain available. Ordinary reset retains the session ID and transcript history while advancing the lifecycle revision/context boundary.
No schema, persistent field, config key, protocol, dependency, or public Plugin SDK surface is added. The assertion baseline changes only to record a removed assertion (4 → 3). No changelog is edited.
Evidence
Source and regression proof
The original cleanup hold was reproduced before editing with real collector registration, required task persistence, real SQLite stores, and real reset/delete handlers. The unchanged-session retry passed while reset-between-retries lost its successor. Additional failing regressions caught completion rollback, kill-claim resurrection, memory-only suppression, and yielded-continuation mistakes before the final repair.
The integrated candidate passed 703 tests across the standalone reset boundary suite and grouped registry, task, Gateway, and archive siblings, plus the full changed gate and a full build. Independent Codex autoreview found no actionable P0–P2 findings. The clean rebase retains every changed source/test/doc file byte-for-byte; current-main dependency/owner drift is separately checked.
The exact rebased head
d13b7876e7b2702b73935acfa5eed5cafaaf21c2, above frozen main903980a972d4ea2652290bcd7bc9a8f71ef7624a, passed a full build, 798 tests across 27 files, and all 30 changed-check stages. This includes 95 focused tests for relevant upstream owner/dependency drift. A fresh two-part Codex review was scoped-clean through P2. No source changes followed those checks.Write-failure proof uses real temporary SQLite abort triggers. Reopen proof closes both database owners, clears in-memory registry/task state, and reloads durable rows. It is not described as an OS-kill crash experiment.
Real OpenAI stress
A session-owned local Gateway used isolated home/state/workspace/auth, loopback port 19489, no channels, and
openai/gpt-5.6-lunawith a real API key. The operator's Gateway and state were untouched. Source, complete build tree, exact Gateway boot, observer version, and parent/child/group identities were frozen and checked.The original baseline matrix failed
tasks.list: UNAVAILABLEduring its second warm twenty-child burst; a separate baseline UI20 run reproduced the same error. Later independent observations found all children and parents settled, but neither failed trial was relabeled as passing.The candidate passed native-tool collection and the complete nine-case Code Mode matrix: 2/8/9/20-child bursts, three additional twenty-child bursts, Stop with eight running tasks plus one queued task, and recovery afterward. Real UI20, Stop9, and recovery2 also passed. The queued child was never admitted; started children and the parent settled. Gateway task state is not claimed to prove eight simultaneous physical guest starts or OS-worker exit.
On the exact rebased build, unmodified managed Codex 0.153.0 completed two direct collector spawns, collected both structured results, emitted both exact child terminal events, and left parent/children idle in 13.741 seconds after Send. Its first observer attempt rejected Codex's
toolResultcontent envelope because the decoder handled only plaintextparts. The original history reproduces that decoder defect; a separate source-backed observer correction and one fresh live run passed without changing runtime, model, limits, or error/identity assertions. The original attempt remains failed.A new synthetic-avatar UI recording pass also completed UI20, Stop9, and recovery2 with all 79 task-page requests successful. One normal child
/clearaction was acknowledged; separate read-only verification showed cleared context, persisted cleanup suppression, the still-completed task, and byte-identical cached collector completion. That extra reset script initially expected a new physical session ID, which is not the reset contract; its failed assertion is retained, and the separate readback—not a retried reset—established the resulting state. This is ordinary live reset proof, not a substitute for the SQLite write-failure/order regressions.Performance and LOC
On canonical SQLite fixtures containing 1,000 completed sessions with 16 KiB prompts, the warm median selected-session read was 24.613 ms through the old whole-store path versus 0.109 ms through the canonical singleton. Parsed session JSON fell from roughly 16.8 MB to 16.8 KB per warm read. Real baseline main-thread profiles independently show full-listing/parsing work beneath collector completion and cleanup.
For a stable in-memory page selecting 20 related tasks from 10,000 total records, the bounded benchmark median was 5.001 ms versus 0.016 ms, and event-loop yields fell from 312 to zero. These are helper/selection measurements, not a claimed universal live Swarm speedup. Live model timings varied, and some validation shared the host; all original measurements and failures were retained.
The production reduction goal was not achieved overall: the original reader simplification removes 39 lines, the approved durable ownership guarantee adds 79, and complete scoped task selection adds 15. The repair uses existing owners and persistence instead of adding another authority store, cache, or fallback. Removing the new ownership checks would weaken the accepted guarantee.
Historical sidebar-readiness and persistence-resume timing observations from the earlier PR proof remain separate follow-ups; this refresh does not claim to fix them.
Browser proof
These recordings use the real running Gateway, real OpenAI responses, the OpenClaw runtime, and synthetic task data. They were captured on the integrated build before the clean rebase; every changed source/test/doc file matches the rebased PR byte-for-byte. They are not presented as Codex UI recordings or as a live reproduction of the storage-fault race.
Twenty children complete and return the exact aggregate:
swarm-completion.webm
Stop cancels the active swarm, including its queued child:
swarm-stop.webm
Completed child before reset:
Same child after context reset; its old collector result remains retained in the registry:
Earlier initials-containing recordings remain local and are not uploaded. The final fixture uses a neutral synthetic avatar through the normal profile API; it does not hide UI elements or alter rendered behavior. Agent transcripts and credentials are not attached.