Repository navigation
fix: stabilize chat interactions and async tests - #153277
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 20, 2026, 4:24 AM ET / 08:24 UTC (Revision 22). ClawSweeper reviewWhat this changesThe branch fixes chat navigation markers during resizing, rechecks task ownership after cancellation cleanup, and replaces timing-sensitive test coordination with explicit synchronization. Merge readiness⛔ Blocked before merge - 2 items remain The PR retains useful fixes absent from current main and is protected maintainer-owned work. No actionable introduced defect was found. Priority: P2 Review scores
Verification
How this fits togetherThe chat position rail converts transcript visibility and scrolling into navigation markers. Separately, the task registry publishes agent events to task readers after persistence and cancellation work settle. flowchart TD
A[Transcript navigation and resize] --> B[Chat position rail]
B --> C[Visible current marker]
D[Agent task events] --> E[Persistence and cancellation cleanup]
E --> F{Registry owners still current?}
F -->|Yes| G[Task readers and observers]
F -->|No| H[Reject retired publication]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +3, Tests +778. Total +781 across 19 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the existing rail and task-publication owners, with deterministic regression coverage and a landing candidate free of temporary investigation diagnostics. Do we have a high-confidence way to reproduce the issue? Yes for the targeted defects: source and controlled regression evidence identify simultaneous navigation/resize and flow-owner replacement during cancellation. Tests were not executed in this read-only review; the separate intermittent Swarm failure remains unreproduced reliably. Is this the best way to solve the issue? Yes: the remaining production edits repair existing owners without adding configuration, parallel APIs, or a stored-data migration. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 85270990eb97. 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 (21 earlier review cycles; latest 8 shown)
|
Treat verified publication supersession as an intentional nonpublication while preserving genuine errors and replacement guards. Handle rail navigation and resize in the same observation. Replace scheduler-sensitive test assertions with explicit readiness, controlled deadlines, and cleanup that joins accepted work.
Reserve inline space for the existing inset focus ring and let dense tool summaries inherit it while retaining their block padding. Preserve the renderer-containment repair now on main.
15e263a to
c1080b1
Compare
Treat verified publication supersession as an intentional nonpublication while preserving genuine errors and replacement guards. Handle rail navigation and resize in the same observation. Replace scheduler-sensitive test assertions with explicit readiness, controlled deadlines, and cleanup that joins accepted work.
Reserve inline space for the existing inset focus ring and let dense tool summaries inherit it while retaining their block padding. Preserve the renderer-containment repair now on main.
Merge main while preserving virtualized rail markers and the same-frame navigation fix. Replace the redundant delayed reset fixture with the deterministic accepted-event ordering from PR #153302.
Keep task and flow owner retirement distinct from a superseded row. Settle publication and retire pending mutations synchronously before observer microtasks wake readers.
Preserve the updated reset fixture and main integration while keeping publication settlement synchronous before observer readers resume.
Wait for the parent acknowledgment in the terminal fallback scenario and preserve exact-count failure coverage. Supply the acquired send claim during delivery-worker fixture cleanup. Integrate current main and preserve the reviewed publication settlement owner.
Preserve current main and the cancellation owner repair, limit its check to unfinished publication work, and retain successful native completion. Include the measured-end rail repair with deterministic regression coverage.
Preserve the reviewed async and chat fixes while incorporating main. Await the canonical SQLite worker shutdown before Doctor captures its non-mutation baseline, and update the prepared-model factory test import to its lifecycle owner. All original assertions remain.
Reuse main’s canonical Doctor baseline shutdown and model-runtime test import repairs. Register temp cleanup before the awaited database hook so Vitest’s reverse hook order drains SQLite workers before deleting their files. Controlled hook-order proof fails with ENOENT before the repair and passes afterward; all 23 Doctor cases retain their assertions and pass.
Integrate current main and preserve its canonical parent acknowledgment fix. Add bounded synthetic browser diagnostics around the unchanged Swarm final-outcome assertion to diagnose the observed Linux CI failure.
Retain the reviewed remote integration and its SQLite-before-directory cleanup order alongside the bounded Swarm CI diagnostics. All 23 Doctor tests and the combined independent review passed.
|
Updated keyboard-focus proof against main These synthetic before/after captures use the registered tool-turn-outcome browser test, keyboard Tab focus, and desktop (1200 × 800) and mobile (390 × 844) viewports. Both runs retained and passed the existing assertions. Captures were inspected for sensitive content before upload. The merged candidate also passes all 89 settlement/persistence cases and all 15 rail/Swarm browser cases. Independent review found no actionable P0–P2 issue. Swarm diagnostics improve failure evidence; they do not establish a fix for the historical intermittent failure. |
Retain the canonical shared settlement helper and preserve horizontal disclosure padding while applying the vertical summary inset. Keep the reviewed Swarm diagnostics for CI investigation.
Reuse main’s shared settlement helper and post-registration fixture while retaining early accepted-event fences. Preserve main’s wider disclosure padding in dense summaries. The reset suite, scoped lint, styles, and independent review passed.
Preserve the concurrent branch ancestry without changing the reviewed and validated candidate tree. Retain the early event fences before broader asynchronous cleanup.
Establish the rail clipping geometry through real wheel input before composer growth, preserving all navigation and recovery assertions. Read bounded Gateway event history instead of overriding WebSocket dispatch or adding a lint suppression.
|
Merged via squash.
|
* fix: stabilize task reads, chat navigation, and async tests Treat verified publication supersession as an intentional nonpublication while preserving genuine errors and replacement guards. Handle rail navigation and resize in the same observation. Replace scheduler-sensitive test assertions with explicit readiness, controlled deadlines, and cleanup that joins accepted work. * fix(ui): keep inset focus rings clear of disclosure labels Reserve inline space for the existing inset focus ring and let dense tool summaries inherit it while retaining their block padding. Preserve the renderer-containment repair now on main. * fix(tasks): retain publication ownership across supersession * fix: stabilize task reads, chat navigation, and async tests Treat verified publication supersession as an intentional nonpublication while preserving genuine errors and replacement guards. Handle rail navigation and resize in the same observation. Replace scheduler-sensitive test assertions with explicit readiness, controlled deadlines, and cleanup that joins accepted work. * fix(ui): keep inset focus rings clear of disclosure labels Reserve inline space for the existing inset focus ring and let dense tool summaries inherit it while retaining their block padding. Preserve the renderer-containment repair now on main. * fix(tasks): retain publication ownership across supersession Keep task and flow owner retirement distinct from a superseded row. Settle publication and retire pending mutations synchronously before observer microtasks wake readers. * fix(tasks): recheck flow owner after cancellation cleanup * fix(ui): refresh stale rail resize targets at the measured end * test: stabilize rail resize setup and simplify Swarm diagnostics Establish the rail clipping geometry through real wheel input before composer growth, preserving all navigation and recovery assertions. Read bounded Gateway event history instead of overriding WebSocket dispatch or adding a lint suppression.
Rebase onto current main: drop the Feishu hunk (main already has the socket-close wait from openclaw#153277) and keep the Google Chat timing fixes. - await responseClosedPromise instead of racing a 100ms timer - await stream cancel via canceledPromise instead of setTimeout(0)
Rebase onto current main: drop the Feishu hunk (main already has the socket-close wait from #153277) and keep the Google Chat timing fixes. - await responseClosedPromise instead of racing a 100ms timer - await stream cancel via canceledPromise instead of setTimeout(0)
…nclaw#136768) Rebase onto current main: drop the Feishu hunk (main already has the socket-close wait from openclaw#153277) and keep the Google Chat timing fixes. - await responseClosedPromise instead of racing a 100ms timer - await stream cancel via canceledPromise instead of setTimeout(0)




What Problem This Solves
Fixes chat-rail markers lost during simultaneous navigation and resize, prevents retired task-publication owners from being marked settled, and removes scheduler-dependent waits from asynchronous regression tests. Related: #153184.
User Impact
The chat rail keeps the current message visible during navigation and composer resizing. Task reads preserve valid terminal results while rejecting superseded publication owners. Tests wait for real readiness and settlement without longer deadlines, assertion-weakening retries, or removed coverage.
Why This Change Was Made
Main owns ordinary task-publication supersession through #153371. This PR rechecks the current publication and both registry owners before terminal work and after awaited cancellation settlement. Registered-reader coverage preserves native completion, replacement/ABA, retired-owner, and genuine-error cases. The paged-read fixture arms its yield hook after creation and joins outstanding operations during cleanup.
The rail processes scroll movement independently of resize handling and replaces a stale startup target when measured content reaches the end. This prevents a five-message rail from moving by 13 pixels during composer growth.
Readiness and cleanup fixtures now join accepted work across task, plugin, process, and realtime tests. Contention tests release their real lock after the responsiveness assertion instead of waiting for the worker's fallback deadline; the fallback and final joins remain. All 34 task-read cases are retained across two registered sibling suites.
Main already owns the Doctor teardown, shared reset settlement, parent/child acknowledgment join (#153249), containment repair (#153260), and disclosure padding (#153231). Their integration and regression evidence remain relevant; they are not additional production changes in this PR.
Evidence
1ca41bb7a7595252376df7688a3a20d02d41f38f.Remaining QA Investigation
Earlier Linux CI run 35492615791 failed the Swarm final-parent-outcome visibility assertion in the desktop-many case. The retained job log shows the mobile cases passed. The failure did not reproduce in the isolated case, the full seven-case lifecycle file, the exact tested merge probe, or the final exact-head CI run. Its root cause remains unexplained. A controlled stale-response probe preserved the final outcome, but does not establish the cause of the historical failure. The independently verified fixes in this PR should not be taken as proof that this Swarm flake is repaired.
Bounded, read-only failure diagnostics remain in the lifecycle test to capture parent, disclosure, connection, and RPC facts if it recurs. Fixtures, events, assertions, and deadlines are unchanged. Passing CI and the stale-response probe are current evidence, not a claim that this historical flake is repaired. Investigation continues separately.
Visual Proof
The inspected rail screenshots below use synthetic data. Disclosure-focus images document the integrated main repair, not a remaining production delta.
Additional desktop and mobile keyboard-focus proof is retained. The fresh pair below uses the current 4px shared padding and the dense-summary correction. All four collapsed/expanded states passed at 1440px and 390px, with unchanged height and keyboard behavior; the inset focus ring clears both icon and text.