Repository navigation
fix(ui): isolate chat fixtures after cleanup - #201781
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper review Please review exact head |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. What this changesThis PR retires chat fixture connections and history reads before asynchronous cleanup can affect another test. Example: A held history response finishes after the next test queues “Next fixture owns this row”.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR provides a focused fixture-lifetime repair that preserves shared ownership; no actionable correctness findings were identified at the reviewed head. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherChat test helpers construct hosts around production history and outbox code; cleanup must retire each host before browser storage and globals are replaced. flowchart TD
A[Chat test] --> B[Fixture host]
B --> C[History and outbox owners]
D[Test completion] --> E[Invalidate connection]
E --> F[Cancel effects and retire history]
F --> G[Join lazy imports]
G --> H[Release browser fixtures]
Technical reviewBest possible solution: Keep the shared host cleanup sequence and its cross-test regression while completing the existing exact-head CI gates. Do we have a high-confidence way to reproduce the issue? Source establishes the history-to-outbox continuation and missing host retirement; the supplied regression targets that path, but this read-only review ran no tests. Is this the best way to solve the issue? The patch repairs fixture lifetime at existing owners, handles copied hosts, preserves shared clients and sessions, and retains the original deadline assertions. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8a23d7c11d37. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests +134. Total +134 across 6 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 19, 2026, 6:32 AM ET / 11:32 UTC. |
|
Merged via squash.
|
(cherry picked from commit 35181e6) Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit 7e8eec5de0ea59e9bdf23bbd81241ed44f8f8e46)
Related: #200486
What Problem This Solves
A completed chat test could leave a history request attached to a host that still looked connected. Releasing that response in the next test let the retired host send the next fixture’s queued message and delete its stored row. This made fixture lifetime cross test boundaries.
User Impact
No user-visible behavior changes. Chat test fixtures now retire their connection and history ownership before cleanup can release asynchronous work. Shared clients and session capabilities keep their existing owners.
Why This Change Was Made
One cleanup sequence invalidates the host’s connection identity, cancels its effects, and retires its history read before joining lazy imports. Copied page hosts register their own cleanup after overrides; redundant session disposal is removed. A two-case regression exercises the old history response against a different fixture’s queue while the original seventeen deadline cases remain unchanged.
This test-only repair is a scoped prerequisite for validating the change in the related PR. It does not establish the cause of the earlier CI deadline failure. Production code, assertions in the existing cases, and timeouts are unchanged; the diff is six test files, +149/−15.
Evidence
26b971ee932f87974cd0a69748ab6dbb94916889: 80 Node and 19 Bun cases passed with no skips, including the held-history regression on both runtimes. Targeted formatting, type-aware lint, and the UI-chat type graph passed. Source remained unchanged. Run: https://github.com/openclaw/openclaw/actions/runs/44512910753. The delegated workload exited successfully and its lease closed; the carrier Actions run is cancelled by normal lease cleanup, not a required-CI success. Independent workload and custody reviews accepted these results.0e369a37117866134ec9fe3fb99c0b96ebe33da0: 44 cases passed with no skips (browser 3 + deadline 19 on each Node/Bun), including both original UI regression files and the held-history pair. Run: https://github.com/openclaw/openclaw/actions/runs/44514086897. Source and all 931 workflow inputs matched; the delegated workload and lease closed successfully. Independent workload and custody reviews accepted this scoped proof. The cancelled carrier is normal lease cleanup, and this result is not attributed to the ordinary PR head or the whole parent validation.26b971ee932f87974cd0a69748ab6dbb94916889: one P0-only pass, zero findings, final source verification passed. Independent owner/sibling source reviews separately accepted the six-file repair. Hosted CI, security, and exact-head hosted review are pending.Named follow-ups from the passing fixture logs: theme fixture cleanup does not restore bootstrap styles; pane-retirement mock responses omit the model/session arrays expected by their consumers. Both defects are unchanged from the parent and M996. They are outside this connection/history lifetime repair; no warnings were suppressed.
The private UI run also retained 104
STRICT_READ_UNTRACKEDwarnings, matching the baseline sequence, messages, locations, and per-case distribution. Named follow-up: file-view untracked reactive reads (solid-bridge-view.tsx:20,chat-sidebar-file-view.tsx:311). These are existing diagnostics, not intentional negative cases or proof of harmlessness; no warning was suppressed.