Skip to content

fix(ui): prevent order-dependent Workboard dashboard failures - #115173

Merged
steipete merged 1 commit into
mainfrom
codex/cron-workboard-chaos-stress
Jul 28, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/cron-workboard-chaos-stress

Conversation

@steipete

@steipete steipete commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an intermittent Control UI test failure where running chat-board and Workboard dashboard tests together caused the dashboard to stop requesting board.get, never attach its real Gateway provider, and fail provider-disposal assertions. This surfaced during a fresh 280-file cron, Workboard, gateway, task, CLI, and Control UI stress campaign on main; isolated reruns incorrectly appeared healthy.

Why This Change Was Made

The non-isolated UI Vitest project intentionally shares its jsdom environment. The chat-board surface test enabled ?mockBoard=1 before every test but never restored the original URL, so later Workboard dashboard tests sometimes silently selected a mock board provider instead of the requested real Gateway client. Save the original path, query, and hash and restore them in the test that changes them. Production board-provider behavior is unchanged.

User Impact

No production behavior changes. Developers and CI get deterministic, order-independent Workboard and Gateway board coverage, avoiding false failures that can obscure real scheduling, dispatch, and dashboard regressions.

Evidence

AI-assisted. Fresh main baseline: 20eda756fae6599bc9d776815016f555a64d77d6.

Before: the eight-shard, 280-file mixed stress run failed in ui/src/pages/workboard/workboard-card-dashboard.test.ts because board.get was called zero times and the real provider lease was never acquired. The same six UI files passed independently, demonstrating the file-order-dependent shared-state leak.

After, on the same isolated Blacksmith Testbox:

  • The original mixed campaign passed all 280 test files across 8 shards: CHAOS_FIXED_ALL_8_SHARDS_PASSED FILES 280.
  • Six deliberately shuffled runs each passed all 6 files / 70 tests: WORKBOARD_MOCK_ISOLATION_ALL_6_SHUFFLED_PASSES_OK.
  • Real system Chromium passed 12 browser files / 61 tests, including Workboard create/edit/move/reload, routing and persistence, dispatched-session/dashboard links, board widgets, Gateway reconnects, and cron filters: Test Files 12 passed (12); Tests 61 passed (61).
  • Six real isolated-Gateway scheduling scenarios passed with a mock-openai provider; the generated QA summary was independently verified: QA_ARTIFACT_SUMMARY {"total":6,"passed":6,"failed":0,"skipped":0,"missing":[]}.
  • Remote pnpm check:changed -- ui/src/pages/chat/board-session-surface.test.ts passed, including conflict guards, formatting, dependency guards, UI i18n validation, TypeScript, and lint: QA_ARTIFACT_AND_CHANGED_GATE_PASSED.
  • Independent .agents/skills/autoreview/scripts/autoreview --mode uncommitted: autoreview clean: no accepted/actionable findings reported.

ClawSweeper's review reported sufficient behavior proof but could not complete its own source read because its sandbox returned bwrap: loopback: Failed RTM_NEWADDR: Operation not permitted. Its requested source/history rank-up check has been completed independently against the real maintained checkout and exact PR head: ui/AGENTS.md, test/vitest/vitest.ui.config.ts (isolate: false), the changing hooks in ui/src/pages/chat/board-session-surface.test.ts, the downstream assertions in ui/src/pages/workboard/workboard-card-dashboard.test.ts, the production consumer in ui/src/pages/workboard/workboard-card-dashboard.ts, and the mock-selection and lease ownership in ui/src/lib/board/provider.ts. git blame -L 13,30 -- ui/src/pages/chat/board-session-surface.test.ts confirms the existing history and original mockBoard mutation (06480d767cef). Native scripts/pr review-checkout-main, review-checkout-pr, and review-validate-artifacts independently verified the current-main baseline and exact head; the validated recommendation is READY FOR /prepare-pr, with zero findings. No source or history inspection is outstanding.

The owned Testbox was stopped after proof. No browser recordings, QA artifacts, production files, configuration, or unrelated changes are included in the PR.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: XS maintainer Maintainer-authored PR labels Jul 28, 2026
@steipete
steipete marked this pull request as ready for review July 28, 2026 12:04
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Jul 28, 2026
@clawsweeper

clawsweeper Bot commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 28, 2026, 8:18 AM ET / 12:18 UTC.

ClawSweeper review

What this changes

The PR restores the pre-test browser URL after chat-board tests enable mock-board mode, preventing later Workboard dashboard tests from inheriting mock provider selection.

Merge readiness

✅ Ready for maintainer review

The narrow test-isolation repair appears correct and has strong after-fix stress, browser, and Gateway proof. This PR must remain open for explicit maintainer handling because it carries the protected maintainer label; no source-backed correctness blocker is identified.

Priority: P3
Reviewed head: 627497f25f42d0a012f2625698bdb5aaa00253a1

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A focused, source-explained test isolation fix with strong after-fix behavior evidence and no actionable correctness or security finding.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The PR body supplies after-fix real Testbox evidence for the formerly order-dependent mixed suite, repeated shuffled runs, real Chromium UI flows, and isolated Gateway scheduling scenarios; redact any private runtime details if this evidence is reposted.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The PR body supplies after-fix real Testbox evidence for the formerly order-dependent mixed suite, repeated shuffled runs, real Chromium UI flows, and isolated Gateway scheduling scenarios; redact any private runtime details if this evidence is reposted.
Evidence reviewed 5 items Patch scope: The supplied PR diff changes only ui/src/pages/chat/board-session-surface.test.ts, capturing the path, query, and hash before each test and restoring that exact URL in cleanup.
Shared-environment mechanism: The PR evidence identifies the UI Vitest project as intentionally non-isolated and traces the failure from the leaked mockBoard query flag through mock provider selection to downstream Workboard Gateway lease assertions.
After-fix behavior proof: The PR body reports an after-fix 280-file, eight-shard mixed campaign; six shuffled 70-test runs; 12 real Chromium browser files; and six isolated-Gateway scenarios, all passing on the same Testbox.
Findings None None.
Security None None.

How this fits together

The Control UI’s chat-board tests change the shared jsdom URL to select a mock board provider. Workboard dashboard tests subsequently read that URL to choose a real Gateway-backed provider and assert its lifecycle behavior.

flowchart LR
  A[Chat-board tests] --> B[Shared jsdom URL]
  B --> C[Mock-board query flag]
  C --> D[Board provider selection]
  D --> E[Workboard dashboard tests]
  E --> F[Gateway provider lease assertions]
  A --> G[Restore original URL]
  G --> B
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +4. Total +4 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 4 0 +4
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 4 0 +4

Review metrics

None.

Technical review

Best possible solution:

Land the focused URL-restoration cleanup after the protected-label maintainer review, preserving the shared-jsdom test model while preventing mock provider state from crossing test boundaries.

Do we have a high-confidence way to reproduce the issue?

Yes, at source level: in the non-isolated UI test environment, a chat-board test leaves ?mockBoard=1 in the shared URL and later Workboard tests select the wrong provider. The supplied before/after shuffled and mixed-suite results provide high-confidence confirmation, although this read-only reviewer could not rerun the checkout because its sandbox failed before command execution.

Is this the best way to solve the issue?

Yes. Restoring the complete original URL at the test boundary removes the leaked mutable shared state without changing production board-provider behavior or introducing a second fixture mechanism.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 10c6c0cb98dd.

Labels

Label changes:

  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body supplies after-fix real Testbox evidence for the formerly order-dependent mixed suite, repeated shuffled runs, real Chromium UI flows, and isolated Gateway scheduling scenarios; redact any private runtime details if this evidence is reposted.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.

Label justifications:

  • P3: This is a low-blast-radius developer and CI test-determinism repair with no stated production behavior change.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body supplies after-fix real Testbox evidence for the formerly order-dependent mixed suite, repeated shuffled runs, real Chromium UI flows, and isolated Gateway scheduling scenarios; redact any private runtime details if this evidence is reposted.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body supplies after-fix real Testbox evidence for the formerly order-dependent mixed suite, repeated shuffled runs, real Chromium UI flows, and isolated Gateway scheduling scenarios; redact any private runtime details if this evidence is reposted.

Evidence

What I checked:

Likely related people:

  • steipete: The available review context identifies steipete as the author of the focused repair and as the only concrete person tied to the examined UI test path; checkout history could not be re-read because the read-only sandbox could not start. (role: proposed repair author and current UI test contact; confidence: low; commits: 627497f25f42; files: ui/src/pages/chat/board-session-surface.test.ts)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-07-28T12:08:20.250Z sha 627497f :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Jul 28, 2026
@steipete
steipete merged commit 2c5aff0 into main Jul 28, 2026
131 of 142 checks passed
@steipete
steipete deleted the codex/cron-workboard-chaos-stress branch July 28, 2026 12:25
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant