Skip to content

Phased strict-mode migration for the dashboard tree (1,039-error probe, boundary-first plan) #1128

Description

@steipete

Finding

tsconfig.dashboard.json alone disables strict, noUncheckedIndexedAccess, and
exactOptionalPropertyTypes; both Node configs enable all three. A strict-mode probe on the
dashboard tree produced 1,039 errors: 718 in worker.ts, 273 in exact-review-queue.ts,
28 in github-api.ts — about 840 of them implicit-any parameters/bindings.

Concrete consequence today: classifyGithubWebhook and its parameter objects are implicit
any, and the accepted comment decision is eventually cast as any. A call like
{ event: 7, paylod: {} } (typo included) compiles and fails only at runtime, in hosted webhook
intake — the exact surface where malformed external input arrives.

Why not just flip the flag

1,039 errors at once is unreviewable and would freeze the dashboard tree. The recent extractions
(github-api.ts, exact-review-decision.ts, exact-review-read-model.ts,
exact-review-queue-shared.ts, dashboard-pages.ts) make a phased path practical: small
modules first, monoliths last, external-input boundaries prioritized.

Proposed phases

  1. Ingress union first (highest value): type the webhook classification path as a
    discriminated union over event kinds; kill the as any on the accepted decision. ~50–100
    lines, immediately protects the external boundary.
  2. Per-file strict adoption via a // @ts-strict allowlist (or a second tsconfig with an
    include list, whichever the build tolerates better): start with github-api.ts (28 errors)
    and the freshly extracted modules (near-zero expected), ratchet the list in CI so files never
    regress once added.
  3. Monolith conversion in slices: exact-review-queue.ts (273) then worker.ts (718),
    converted per functional region, each slice its own PR with the established container-proof
    discipline.
  4. Flip the config flags once the allowlist covers the tree; delete the allowlist.

Sizing

Phase 1: one PR. Phase 2: 2–3 small PRs. Phase 3: est. 6–10 PRs at reviewable size. Total
+500–900 lines of annotations by the probe's estimate.

Survey provenance: strict-probe run on 5439582beebe during the 2026-08-11 modernization
review; typed-signature and as any sites verified in source at that head.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low-risk cleanup, docs, polish, ergonomics, or speculative feature.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.issue-rating: 🌊 off-meta tidepoolIssue quality rating does not apply to this item.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions