Repository navigation
refactor(dashboard): enforce strict checks for small modules - #1141
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed August 12, 2026, 11:45 AM ET / 15:45 UTC. ClawSweeper reviewWhat this changesThe PR adds a strict TypeScript ratchet for 13 small dashboard modules, updates their types, and records Worker-equivalence proof. Merge readinessKeep open. The strict dashboard check is not on current main, and the prior baseline-removal finding is fixed on the current PR head with strong real-Worker proof. Priority: P3 Review scores
Verification
How this fits togetherThe dashboard Worker builds review-queue and status API responses from durable queue state. This change adds compile-time enforcement around selected dashboard modules while preserving those runtime outputs. flowchart LR
A[Dashboard source modules] --> B[Strict TypeScript allowlist]
B --> C[Baseline consistency check]
C --> D[Static checks and CI]
A --> E[Dashboard Worker]
E --> F[Review queue API]
E --> G[Status API]
Before merge
Agent review detailsSecurityNone. Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the narrow strict ratchet after current-head CI completes, retaining the paired baseline checks so promoted modules cannot silently leave enforcement. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR hardens compile-time checks rather than addressing a reported user-facing failure. Is this the best way to solve the issue? Yes. An isolated strict configuration plus an exact baseline check is a narrow way to ratchet selected modules without changing the relaxed dashboard-wide configuration. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 6ca63d912cb1. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Related: #1128
What Problem This Solves
The small dashboard modules were still compiled only through the relaxed dashboard configuration,
so future edits could silently reintroduce implicit-any, unchecked-index, or inaccurate optional-
property assumptions even after those modules had become small enough to migrate safely.
Why This Change Was Made
This is Phase 2, slice 1 of #1128. It brings every
requested small module under
strict,noUncheckedIndexedAccess, andexactOptionalPropertyTypeswithout changing the main dashboard tsconfig or touching the excludedmonoliths.
The chosen ratchet is
tsconfig.dashboard-strict.jsonwith an explicit monotonicfilesallowlist.TypeScript follows type-only imports into excluded modules, so direct
tsc -pwould also report 417known diagnostics owned by later-slice files.
check:dashboard-stricttherefore resolves and checksthe real import closure, but fails only on diagnostics whose source file is an allowlisted root. It
also verifies that all three flags remain enabled and that the resolved roots exactly match the
checker-owned 13-file baseline. Removing a baseline root fails and names it; adding a root without
recording it in the baseline also fails. Future strict promotions add one line to both lists in the
same PR. The check runs through
check:static, and thereforecheck:paralleland CI.Current-head diagnostics eliminated:
dashboard/github-api.tsdashboard/exact-review-decision.tsdashboard/exact-review-read-model.tsdashboard/exact-review-queue-shared.tsdashboard/exact-review-publication-retry.tsdashboard/review-run-telemetry.tsdashboard/review-observability.tsdashboard/operational-health.tsdashboard/dashboard-health.tsdashboard/automerge-metrics.tsdashboard/apply-observability.tsdashboard/error-safety.tsdashboard/state-blobs.tsNo runtime-reachable latent bug was found. The indexed-access findings were internal nonempty
collections; the new empty-case branches make those invariants safe without assertions. All
production edits are annotations, narrowing, or honest undefined handling, and no
anyor non-nullassertion was added.
User Impact
There is no intended user-visible behavior change. Developers now get CI enforcement whenever one
of these 13 modules regresses under the Node-matching strict flags, and no allowlisted root can
silently leave or enter the checker-owned baseline.
OpenClaw Bay Impact
None. No queue, lifecycle, telemetry, route, response-schema, or observer-control contract changes.
The real-Worker proof includes the status projection and shows normalized status bytes unchanged;
Bay remains observer-only.
Documentation Lifecycle
The page under
docs/proof/dashboard-strict-slice-1/is historical proof for this change. It doesnot add or change an active runbook.
Evidence
pnpm run check:dashboard-strict— all 13 allowlisted modules green.unrecorded addition rejection.
pnpm run checkon Node 24 — 3,360 tests; 3,352 passed, 8 skipped, 0 failed; coverage thresholdspassed.
origin/main— no accepted/actionable findings after fixing the first review's unrecorded-additionloophole.
addition is
github-api.tsat +39 lines; no requested module exceeded the slice churn limit.Real Behavior Proof
and status behavior byte-identical.
wrangler dev --localWorkers, signed exact-review enqueue, independentSQLite-backed
ExactReviewQueuestores, and public/api/exact-review-queueand/api/statusreads.
only volatile time/request/lease fields are normalized before byte comparison.
docs/proof/dashboard-strict-slice-1/run-proof.sh; Node 24, pinned pnpm,Wrangler 4.107.0. The committed container run used Crabbox
provider=aws, leasecbx_901b91555bcc(crimson-hermit-e90b), runrun_011ffe49ee37, machinec7a.8xlarge, andDocker image
node:24-bookwormat digestsha256:934240a162082fd8b8a2f90cd5114446443f1eba1c5378f6687167ca405e6584.pnpm run checkpassed with 3,352tests passed and 8 skipped;
PROOF_RECEIPT=COMMITTED;PROOF_RC=0; both normalized responseswere byte-identical. Queue hash
c4e7a44913eba76959cf4e77a7013280f8ab8a8c44cfb363de43f0935680e1fe;status hash
314392ffddd90227440036562863ec4a69bd2b1636f9f5930724cec2f6f6ade8.docs/proof/dashboard-strict-slice-1/container-receipt.jsonrecords provider, lease, run,image, timing, hashes, exit 0, and automatic lease cleanup. The tested implementation head is
ffb10b0d664fad354d4ef6648573efad1d117c13; final headd7308fa7034596f5886b594ad9a340194b0ebe2dadds only this refreshed receipt.deployment, Worker-side lease acquisition, record publication, or production mutation.