Repository navigation
fix(test): isolate shared state between test files - #118781
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 4, 2026, 3:12 AM ET / 07:12 UTC. ClawSweeper reviewWhat this changesThe branch resets session-suspension test state between shared files, isolates three stateful Control UI suites, and adds an exact Undici 7.29.0 workspace override. Regression provenancePossible regression — probable (reproduction; reviewed change). No predecessor PR is attributed. Merge readinessThe PR is still necessary: current main retains the shared-state leak, while the branch repairs the owner boundary and routes the affected UI tests through the existing isolation mechanism. It is maintainer-authored and has an accepted dependency decision; wait for exact-head CI before merge. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw’s shared Vitest runner reuses a worker and module graph across files, so it must reset owner-managed global state before the next file. The UI test configuration separately routes registry-sensitive tests to an isolated jsdom worker, while workspace overrides determine resolved package versions. flowchart LR
A[Test files] --> B[Shared Vitest worker]
B --> C[After-file cleanup]
C --> D[Session suspension state owner]
C --> E[Next shared test file]
F[Stateful UI tests] --> G[Isolated UI worker]
H[Workspace override] --> I[Resolved dependency graph]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +2, Tests +127, Config +1, Other +1. Total +131 across 7 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Merge the clean three-way result after exact-head CI confirms the state-reset regressions and accepted Undici v7 resolution remain intact. Do we have a high-confidence way to reproduce the issue? Yes: source shows the shared runner omitted this owner reset, and the added ordered runner regression plus pending-write race test establish the affected current code path without executing it in this read-only review. Is this the best way to solve the issue? Yes: the fix invalidates state at its owner and uses the canonical UI isolation list, avoiding consumer-side cleanup or a duplicate test-routing flow. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 8393b37779d9. LabelsLabel 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)
|
a28a0b6 to
cd1faee
Compare
cd1faee to
f59b7c9
Compare
1b136d0 to
a81734a
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
ba52e58 to
89c4280
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Dependency GuardThis PR changes dependency-related files. Maintainers should confirm these changes are intentional. Changed files:
Maintainer follow-up:
|
Dependency graph changes notedThis PR includes dependency graph changes. The dependency guard is informational because the PR author is a repository admin or a member of
Security review is still recommended before merge when the dependency graph change is intentional. |
|
Maintainer decision: the workspace-wide exact The other ClawSweeper rank-up move is also complete: exact-head scheduled CI for |
5b540b4 to
3b7d8e2
Compare
|
Merged via squash.
|
* origin/main: fix(test): isolate shared state between test files (#118781) fix(telegram): use monotonic polling liveness fix(setup): keep compatible Claude wrappers selectable fix(agents): gate Claude live session protocol fix(agents): preserve Claude fork successor on stalls fix(agents): preserve Claude follow-up replies after background tasks fix: unblock macOS release validation (#119110) improve(qa): cover vision channel offload (#118862) test(qa): cover sandboxed exec behavior (#119053) fix(ai): preserve Google simple completion sanitation fix(macos): keep setup activation within app checks fix(tts): use prepared completion transport fix(ai): prefer provider-owned completion streams test(setup): type provider kind fixture fix(setup): complete prepared model activation fix(protocol): regenerate Swift wizard models fix(ollama): activate the model selected during setup fix(setup): preserve the prepared model handoff
* fix(test): isolate session suspension state * fix(test): isolate nonzero worker exit coverage * fix(test): keep suspension reset generations monotonic * fix(test): isolate archived session UI mocks * fix(deps): patch fast-uri and undici advisories * fix(test): isolate stateful UI suites
* origin/main: fix(test): isolate shared state between test files (openclaw#118781) fix(telegram): use monotonic polling liveness fix(setup): keep compatible Claude wrappers selectable fix(agents): gate Claude live session protocol fix(agents): preserve Claude fork successor on stalls fix(agents): preserve Claude follow-up replies after background tasks fix: unblock macOS release validation (openclaw#119110) improve(qa): cover vision channel offload (openclaw#118862) test(qa): cover sandboxed exec behavior (openclaw#119053) fix(ai): preserve Google simple completion sanitation fix(macos): keep setup activation within app checks fix(tts): use prepared completion transport fix(ai): prefer provider-owned completion streams test(setup): type provider kind fixture fix(setup): complete prepared model activation fix(protocol): regenerate Swift wizard models fix(ollama): activate the model selected during setup fix(setup): preserve the prepared model handoff
* origin/main: fix: prevent live updater from leaving Gateway offline indefinitely (openclaw#119116) test(qa): restore memory tools primary ownership (openclaw#119142) fix(agents): settle yielded fanout at harness boundary (openclaw#118703) fix(codex): cap compaction override warning cache via createDedupeCache (openclaw#101745) fix(daemon): skip unlabeled launchd plists (openclaw#119091) test(qa): repair QA catalog integrity (openclaw#119140) fix(test): isolate shared state between test files (openclaw#118781) test(xai): cover delayed OAuth connection setup fix(voice): start socket timeout after auth preparation
* origin/main: fix: prevent live updater from leaving Gateway offline indefinitely (openclaw#119116) test(qa): restore memory tools primary ownership (openclaw#119142) fix(agents): settle yielded fanout at harness boundary (openclaw#118703) fix(codex): cap compaction override warning cache via createDedupeCache (openclaw#101745) fix(daemon): skip unlabeled launchd plists (openclaw#119091) test(qa): repair QA catalog integrity (openclaw#119140) fix(test): isolate shared state between test files (openclaw#118781) test(xai): cover delayed OAuth connection setup fix(voice): start socket timeout after auth preparation
What Problem This Solves
Resolves release-gate failures from shared test workers carrying state across files:
0.Why This Change Was Made
The non-isolated runner now invokes the session-suspension owner's existing test reset after every file. The owner reset advances its generation before clearing state, so older pending writes cannot become current again.
The archived-sessions, memory-panel, and custom-theme UI suites now use the existing isolated UI lane. Their module mocks and custom-element registrations receive a matching fresh graph without slowing the rest of the shared UI suite.
The workspace retains the maintainer-accepted
undici@7override at 7.29.0. Current main already carries the direct Slack 7.29.0 dependency andfast-uri4.1.2.User Impact
No product behavior changes. Maintainers get deterministic agent and UI release-gate tests, and current Undici 7 consumers remain on the accepted patched release.
Evidence
3b7d8e28e5d5580b6b1832b40ae0c39d2b0204e8.check:changedpassed dependency pins, package locks, typecheck, lint, dead-code, database-first, sidecar, and import-cycle guards.git diff --checkpasses.scripts/pr prepare-runremains the final pre-merge gate after hosted CI completes.