Repository navigation
fix(test/ui): prevent shared history pollution - #117348
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 1, 2026, 6:34 AM ET / 10:34 UTC. ClawSweeper reviewWhat this changesThe PR changes a Control UI browser test so clicking an agent tool chip verifies its requested Merge readinessThis PR remains necessary: current main still restores real JSDOM history after the click, whereas the branch prevents the mutation at its source while asserting the requested deep link. The patch is correct, its refreshed remote terminal proof is sufficient, and the protected Priority: P2 Review scores
Verification
How this fits togetherThe Control UI renders agent tool chips that open a corresponding tool card and request a URL hash. The UI Vitest configuration deliberately runs most JSDOM tests without isolation, so a history mutation in one test can affect later route tests in the same worker. flowchart LR
A[Agent tool chip] --> B[Click handler]
B --> C[Open tool card]
C --> D[Request tool hash URL]
D --> E[Shared JSDOM worker]
E --> F[Later route tests]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +6. Total +6 across 1 file. View PR surface stats
Review metricsNone. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Merge the focused test-only repair after the designated maintainer confirms the current clean merge result; preserve the handler’s real deep-link behavior while making the shared-worker test observe it without changing global history. Do we have a high-confidence way to reproduce the issue? Yes, source and the PR’s remote transcript give a high-confidence path: run the non-isolated UI Vitest shard containing the tool-chip and route tests, where the prior click changed the shared hash. This read-only review did not rerun it locally. Is this the best way to solve the issue? Yes. Spying only during the click captures the real handler’s requested URL while preventing the harmful shared-state write; retaining cleanup alone is weaker because it allows the mutation to exist before AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b6b440d07680. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
* origin/main: fix(test/ui): prevent shared history pollution (openclaw#117348) fix(openrouter): apply image request transport policy (openclaw#117336) perf(gateway): skip clean transcript workers (openclaw#117342) test(testing): assert relay smoke readiness fix(testing): activate relay live smoke transport feat(channels): record account lifecycle facts and retire inferred health vocabularies (openclaw#117300) fix(canvas): remove unsupported snapshot delay hint (openclaw#117326) refactor(agents): fold cache TTL pruning into prompt projection (openclaw#117313) fix(canvas): honor paired-node invocation deadlines (openclaw#117316) fix(system-agent): make exit-and-run-a-terminal guidance surface-correct (openclaw#114633) fix(ai): assistant text blocks are run together on replay (openclaw#115743) refactor(agents): canonicalize subagent execution state (openclaw#117267)
Co-authored-by: Peter Steinberger <[email protected]>
* origin/main: fix(test/ui): prevent shared history pollution (openclaw#117348) fix(openrouter): apply image request transport policy (openclaw#117336) perf(gateway): skip clean transcript workers (openclaw#117342) test(testing): assert relay smoke readiness fix(testing): activate relay live smoke transport feat(channels): record account lifecycle facts and retire inferred health vocabularies (openclaw#117300) fix(canvas): remove unsupported snapshot delay hint (openclaw#117326) refactor(agents): fold cache TTL pruning into prompt projection (openclaw#117313) fix(canvas): honor paired-node invocation deadlines (openclaw#117316) fix(system-agent): make exit-and-run-a-terminal guidance surface-correct (openclaw#114633) fix(ai): assistant text blocks are run together on replay (openclaw#115743) refactor(agents): canonicalize subagent execution state (openclaw#117267)
Summary
history.replaceStatechanges into shared UI tests.Verification
isolate: falseJSDOM test and sibling suites: GREEN.Fixes #115355
Reproducible remote terminal proof
Trusted Blacksmith Testbox
tbx_01kyyc7n61p9bf0nf9rsh5y4cz; reviewed headd935f772ea9b00ec2c99a59fd50dbe991a56d9bb; exact patch SHA-256d3608595eb84ca627c4eed848b211d9eedb651c0b7e0ca1978f4544c99351179. The original test was exercised first with a temporary assertion against its existing shared-history side effect, then the reviewed patch was restored unchanged.The approved one-file patch was rebased onto
aa2a5c96f69a1be639c602649d4aa2e4de8da0a8after confirming the test, production owner, and both Vitest configuration blobs were unchanged; its exact reviewed patch SHA-256 remained identical.