Skip to content

test: split dashboard worker test monolith - #1127

Merged
steipete merged 6 commits into
mainfrom
steipete/split-dashboard-worker-tests
Aug 11, 2026
Merged

steipete merged 6 commits into
mainfrom
steipete/split-dashboard-worker-tests

Conversation

@steipete

@steipete steipete commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • split the 29,073-line dashboard Worker test monolith into eight contiguous thematic files
  • move shared imports, fixtures, storage doubles, and request builders into a non-test harness
  • preserve all 336 registration blocks byte-for-byte, representing 337 runtime tests
  • commit exact before/after full-suite name inventories, their empty diff, standalone results, and the final container receipt

Behavior proof

Claim: test ownership changes only; runtime names, counts, and bodies are unchanged.

Exercised surface: Node 24 discovery through the real scripts/run-node-tests.mjs glob, every split file in isolation, the complete local pnpm run check, and the full suite from a clean PR checkout inside Docker through Crabbox.

Observable result:

  • untouched origin/main: 3,333 tests; 3,324 passed; 9 macOS skips; 0 failed
  • final local branch: 3,333 tests; 3,324 passed; 9 macOS skips; 0 failed
  • final Linux container: 3,333 tests; 3,325 passed; 8 Linux skips; 0 failed
  • sorted reporter-name multisets have identical SHA-256 and a zero-byte committed diff
  • all eight files pass standalone; their counts sum to 337
  • all 336 original/split registration blocks have identical bytes and SHA-256
  • local pnpm run check passes at 81.58% line, 74.03% branch, and 87.39% function coverage

Container receipt

The clean --fresh-pr openclaw/clawsweeper#1127 --no-hydrate proof passed at pushed head 07d5ef9528ad69b7b4a2aaafa1050c199b2506c6. The current head adds only its reviewed receipt.

  • provider: aws
  • image: node:24-bookworm
  • lease: cbx_a6899c138d00 (jade-lobster-c3f0)
  • run: run_8980401fcc5d
  • machine: c7a.8xlarge
  • command: exit 0; 3,333 tests; 0 failures
  • toolchain: Node 24.18.1, pnpm 11.10.0, jq 1.8.2, rsync 3.2.7
  • integrity: repository-pinned official SHA-256 values for jq 1.8.2 Linux amd64 and arm64; both assets also verified locally
  • cleanup: the old run wrapper timed out acknowledging release; Crabbox 0.41.1 explicitly released the same provider-bound lease and a provider-specific list returned empty
  • receipt: docs/proof/split-dashboard-worker-tests/container-provenance.json
  • captured stdout: 522,855 bytes, SHA-256 dbc6510b36b5b50ce8bc8fb7e201fde0dcc05281871e92e20433408c5520da3e; TruffleHog 3.96.0 found zero verified or unknown secrets

Two missing-tool bootstrap attempts and one pre-pin successful run are disclosed in the receipt with their exact heads, run/lease IDs, outcomes, reasons, and cleanup states.

Finding disposition

Accepted and resolved: the prior ClawSweeper P2 finding required a repository-pinned jq trust anchor. Commit 07d5ef9528 removes the network-fetched manifest as the trust root and pins the official per-architecture jq 1.8.2 digests in the proof script. The subsequent clean fresh-PR proof passed on that exact commit.

All applicable rank-up moves are complete: pinned jq digests, current integrity-fixed container proof, committed receipt, and updated PR body.

The generic autoreview transport could not review the full mechanical move because its secret-fragment guard refuses existing synthetic credential-shaped fixtures duplicated between a deleted file and moved additions; TruffleHog was clean. The repository-native committed-range ClawSweeper review ran read-only, and every later receipt/integrity patch received a clean structured Codex review.

Limits and Bay

No production endpoint, Worker deployment, GitHub mutation path, or live queue is exercised. This is a test-only ownership split.

OpenClaw Bay: none. No data contract, lifecycle projection, queue control, telemetry, route, or observer-only boundary changes.

Do not merge.

@clawsweeper

clawsweeper Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@clawsweeper clawsweeper Bot added merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. P2 Normal priority bug or improvement with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 11, 2026
@clawsweeper

clawsweeper Bot commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 11, 2026, 6:25 PM ET / 22:25 UTC.

ClawSweeper review

What this changes

This PR replaces the Dashboard Worker’s single 29,073-line test file with eight themed test files, a shared harness, and committed equivalence and container-proof records.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

Keep open: the test split is not on current main, has strong current evidence, and no correctness or security blocker was found. The PR body explicitly says “Do not merge,” so it should remain paused rather than enter an automated landing path.

Priority: P3
Reviewed head: 19acb56b86abecd5a05f2445c8007e70e9cf5be7

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) The focused mechanical refactor has unusually strong preservation and clean-container evidence, with the remaining block being the author’s explicit merge pause.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (logs): A committed AWS Crabbox receipt and redacted terminal output show the checksum-pinned split running the complete 3,333-test suite successfully in a clean Node 24 container; the current head subsequently changes only proof receipt files.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (logs): A committed AWS Crabbox receipt and redacted terminal output show the checksum-pinned split running the complete 3,333-test suite successfully in a clean Node 24 container; the current head subsequently changes only proof receipt files.
Evidence reviewed 5 items Test-discovery boundary: The repository runner discovers only test/*.test.ts files; the new shared harness is deliberately outside that pattern, while the eight themed files remain discoverable.
Current-head proof receipt: The committed receipt records a clean AWS Node 24 container run with 3,333 tests, zero failures, checksum-verified jq, and a captured output hash; its reviewed test-split head is 07d5ef9, and the current head only changes proof receipt files.
Prior finding resolved: The proof script pins architecture-specific jq SHA-256 values before installing the downloaded binary, addressing the prior proof-integrity finding.
Findings None None.
Security None None.

How this fits together

The Dashboard Worker receives GitHub events, manages review and queue lifecycle state, and exposes dashboard status data. Its tests use in-memory Worker storage and request fixtures to cover those paths.

flowchart LR
  A[GitHub events] --> B[Dashboard Worker]
  B --> C[Queue and lifecycle state]
  C --> D[Dashboard status APIs]
  E[Shared test harness] --> B
  F[Themed test files] --> E
  F --> G[Equivalence and container proof]
Loading

Before merge

  • Resolve merge risk (P1) - The PR body explicitly requests that it not be merged; this is a workflow pause despite the sufficient proof and clean patch review.
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Test and proof surface production +0/-0; tests +29,334/-29,073; proof records +6,941 The large diff is confined to test ownership and auditable proof records rather than product runtime code.
Preservation evidence 337 runtime tests; 336 registration blocks; 3,333 full-suite tests The committed identity inventory and container receipt directly measure whether the mechanical split preserved coverage and discovery.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep the themed test split and shared harness as the maintainable replacement for the monolith, and resume landing only after the PR owner removes or clarifies the explicit merge pause.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep the themed test split and shared harness as the maintainable replacement for the monolith, and resume landing only after the PR owner removes or clarifies the explicit merge pause.

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

Not applicable: this is a test-ownership refactor rather than a reported product bug. The relevant validation is preservation of test discovery, registrations, names, and full-suite results.

Is this the best way to solve the issue?

Yes: splitting by coherent test themes while keeping shared fixtures in a non-discovered harness is the narrowest maintainable way to reduce the monolith, and the submitted evidence checks the resulting behavior.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 4b79888c3f2a.

Labels

Label changes:

  • add P3: This is a well-evidenced internal test-organization cleanup with no demonstrated user-facing regression.
  • add proof: sufficient: Contributor real behavior proof is sufficient. A committed AWS Crabbox receipt and redacted terminal output show the checksum-pinned split running the complete 3,333-test suite successfully in a clean Node 24 container; the current head subsequently changes only proof receipt files.
  • 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 (logs): A committed AWS Crabbox receipt and redacted terminal output show the checksum-pinned split running the complete 3,333-test suite successfully in a clean Node 24 container; the current head subsequently changes only proof receipt files.
  • remove P2: Current review triage priority is P3, so this older priority label is no longer current.
  • remove status: 📣 needs proof: Current PR status label is status: 👀 ready for maintainer look.
  • remove merge-risk: 🚨 automation: Current PR review selected no merge-risk labels.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.

Label justifications:

  • P3: This is a well-evidenced internal test-organization cleanup with no demonstrated user-facing regression.
  • 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 (logs): A committed AWS Crabbox receipt and redacted terminal output show the checksum-pinned split running the complete 3,333-test suite successfully in a clean Node 24 container; the current head subsequently changes only proof receipt files.
  • proof: sufficient: Contributor real behavior proof is sufficient. A committed AWS Crabbox receipt and redacted terminal output show the checksum-pinned split running the complete 3,333-test suite successfully in a clean Node 24 container; the current head subsequently changes only proof receipt files.

Evidence

What I checked:

Likely related people:

  • steipete: Recent history attributes the monolithic test surface and most recent Dashboard Worker work to Peter Steinberger. (role: recent Dashboard Worker and test-suite contributor; confidence: high; commits: 5439582beebe, 27d0dca68158, 1c4abe0c2908; files: test/dashboard-worker.test.ts, dashboard/worker.ts)
  • Martin Cleary: Recent Dashboard Worker history includes lifecycle, Bay, telemetry, and queue changes authored by Martin Cleary. (role: adjacent Dashboard Worker contributor; confidence: medium; commits: 51ac499c741b, f9a2f9493c2d, 91272a65e6ff; files: dashboard/worker.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 (4 earlier review cycles)
  • reviewed 2026-08-11T21:43:19.660Z sha 097ec97 :: needs real behavior proof before merge. :: [P2] Pin the jq digest before executing the proof binary | [P2] Commit the fresh Crabbox receipt before merge
  • reviewed 2026-08-11T21:56:54.678Z sha a1f198c :: needs real behavior proof before merge. :: [P2] Pin jq’s digest before executing the proof binary
  • reviewed 2026-08-11T22:03:22.954Z sha c54565b :: needs real behavior proof before merge. :: [P2] Pin jq's expected digest before installing it
  • reviewed 2026-08-11T22:14:19.571Z sha 07d5ef9 :: needs real behavior proof before merge. :: [P2] Regenerate the receipt for the pinned proof command

@clawsweeper clawsweeper Bot removed the merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. label Aug 11, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. proof: sufficient Contributor real behavior proof is sufficient. 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 P2 Normal priority bug or improvement with limited blast radius. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Aug 11, 2026
@steipete
steipete merged commit 83dddd6 into main Aug 11, 2026
23 checks passed
@steipete
steipete deleted the steipete/split-dashboard-worker-tests branch August 11, 2026 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. proof: sufficient Contributor real behavior proof is sufficient. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant