Skip to content

fix(ci): check:proto-reads does not scan the remaining production trees — 194 undispositioned table reads across 17 packages (merman, tui, client, latex, stats, …) #1369

Closed

Description

@dezren39

Problem

script/check-proto-reads.ts:31 scans exactly one tree:

export const SCAN_ROOT = "packages/core/src"

The gate is the regression net for the prototype-chain dictionary-read class (#865, follow-up to the #833 audit): a bare record[key] read walks the prototype chain, so an externally supplied key like "constructor" resolves to an inherited member and a ?? fallback never fires. Two extensions are already tracked — #912 (packages/ai, PR #919) and #1361 (packages/plugin-github) — and #912 explicitly scopes every other package out. Every other production tree remains unscanned, and the class has already bitten in unscanned trees: latex (#937), web (#851), console (#1323).

Evidence (main 6eb5339, verified this run)

Replicating the gate's exact three patterns (P-A / P-C / P-D) over the remaining packages/*/src trees (plus the console/stats subtrees; services/* and server/sdk/plugin/web/function return 0) yields 194 hits across 17 trees, none dispositioned — the allowlist has zero entries for any of them:

tree hits tree hits
packages/merman/src 77 packages/stats/app/src 6
packages/tui/src 25 packages/desktop/src 5
packages/client/src 24 packages/latex/src 5
packages/gui-extensions/src 16 packages/cli/src 4
packages/app/src 11 packages/console/app/src 4
packages/stats/core/src 9 packages/codemode/src, packages/theme/src 2 each
packages/httpapi-codegen/src, packages/plugin-browser/src, packages/ui/src, packages/util/src 1 each

Control: the same replication over packages/core/src returns 45 hits, all allowlisted — the replication matches the gate.

Spot-reads of the dangerous shape (externally influenced key, ?? fallback that can never fire):

Many hits are plainly dispositionable (numeric-index reads; dot-prefixed extension keys like packages/tui/src/component/prompt/local-attachment.ts:22; server-generated session IDs in packages/client/src/solid/data.ts) — but today none of that is recorded, so the next bare read in any of these trees lands silently.

Why it matters

The fleet has fixed this bug class at least nine times (#792, #851, #906, #907, #908, #916, #937, #1085, #1319, #1323). The net that prevents recurrence covers one tree, with two more in flight. Until the remaining production trees are scanned and dispositioned, each new table read in them is an unguarded recurrence risk — including in packages that parse untrusted input (latex, merman) or consume provider-supplied strings (stats).

Acceptance criteria

Scope notes

Activity

  1. added
    kind/ciCI/CD pipelines, workflows, and build automation
    task/triageQueue packet kind: verify, reproduce, and route this item
    source/creatorFiled by the new-issue-creator job
    priority/normalOrdinary priority (the default)
    area/ciCI, workflows, and build infrastructure
    app/scriptPackage: script (pkgs/ or apps/ in this repo)
    effort/mMedium: expected under 1 day of work
    on Nov 2, 2026
  2. dezren39 commented on Nov 2, 2026

    @dezren39
    Author

    🤖 Agent note · filed

  3. dezren39 commented on Nov 2, 2026

    @dezren39
    Author

    Triage — CONFIRMED (task 6117)

    Verified on fresh main 6eb53396b58967b7896788d055e24b77a5a92bae (gh api, 2026-11-02):

    • script/check-proto-reads.ts:31 still exports the singular export const SCAN_ROOT = "packages/core/src" — the gate scans only packages/core/src; no multi-root conversion has landed.
    • script/check-proto-reads.allowlist.txt has 46 entries, all packages/core/src, and 0 entries for any of the 17 remaining trees — none of the 194 filed hits is dispositioned.
    • Dangerous-shape spot-reads confirmed verbatim on current main:
    • Filed replication counts (gate P-A/P-C/P-D patterns, creator run on the same main, control over core matching its allowlisted hits): 194 hits / 17 trees — merman 77, tui 25, client 24, gui-extensions 16, app 11, stats/core 9, stats/app 6, desktop 5, latex 5, cli 4, console/app 4, codemode 2, theme 2, httpapi-codegen 1, plugin-browser 1, ui 1, util 1.

    Sequencing gate (fresh check): PR #919 (#912, packages/ai) is still OPEN (head bb538bf95a, branch queue/3577-912-proto-reads-ai) and converts SCAN_ROOT → SCAN_ROOTS = [core, ai], touching the same four files (script/check-proto-reads.ts, script/check-proto-reads.test.ts, script/check-proto-reads.allowlist.txt, .github/workflows/test.yml). Fix task 6078 (#1361, plugin-github as third root) is parked on the same gate. No competing conversion may be created.

    Routing: one fix task enqueued — task 6121 (packet-opencode-1369-fix.json, small_fix, effort/m scope): extend SCAN_ROOTS to every remaining production tree on top of PR #919's merged shape, disposition all 194 hits (site guard or specific allowlist reason; file any live bug separately), keep bun run check:proto-reads green. The fix task parks naming PR #919 if it is still open when claimed.

    No hard-stop labels present on #1369 at claim; labels synced: triage claimed → triage complete, issue now queue/queued for task 6121, status/needs-triage removed.

  4. dezren39 commented on Nov 2, 2026

    @dezren39
    Author

    Fix task 6121 — PARKED on sequencing gate PR #919

    Claimed by Lane A (repo-worker-opencode, task 6121) on 2026-11-02 and revalidated fresh:

    Resume condition: PR #919 merged. Then build on the merged SCAN_ROOTS shape (composing with #1361 / task 6078's plugin-github root if landed), extend the gate to the remaining 17 production trees, and disposition all 194 hits. Parked 24h.

    Labels synced: queue/parked + status/parked + work/assigned.

  5. added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 2, 2026
  6. 24 remaining items

  7. removed
    queue/claimedA queue worker has claimed the task for this item
    on Nov 4, 2026
  8. dezren39 commented on Nov 4, 2026

    @dezren39
    Author

    🤖 Agent note · picked up

  9. dezren39 commented on Nov 4, 2026

    @dezren39
    Author

    🤖 Agent note · parked

  10. added
    status/parkedDeliberately paused with a recorded resume condition
    queue/claimedA queue worker has claimed the task for this item
    and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 4, 2026
  11. removed
    queue/claimedA queue worker has claimed the task for this item
    work/assignedAn agent holds this item via the queue (claimed task)
    on Nov 4, 2026
  12. dezren39 commented on Nov 4, 2026

    @dezren39
    Author

    🤖 Agent note · done

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    app/scriptPackage: script (pkgs/ or apps/ in this repo)area/ciCI, workflows, and build infrastructureeffort/mMedium: expected under 1 day of workkind/ciCI/CD pipelines, workflows, and build automationpriority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobtask/triageQueue packet kind: verify, reproduce, and route this item

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions