Skip to content

ci(core): check:numeric-boundaries regression net for bare string→number conversions (design #992, phase 3) #995

Closed

Description

@dezren39

Phase 3 of design #992 (one numeric contract at the service boundary). Design doc: files/designs/opencode-numeric-boundary-contract.md in the keep-the-four-repos-healthy goal workspace.

Task

Add a regression net for the string→number relapse class, modelled on the existing script/check-proto-reads.ts + script/check-proto-reads.allowlist.txt and check:doc-env-vars:

  • New script/check-numeric-boundaries.ts: scans packages/core/src, packages/ai/src AND packages/cli/src (all three from day one — fix(ci): check:proto-reads scans only packages/core/src — packages/ai, where the class keeps biting, has no regression net #912 records what happens when a net starts one package short) for bare string→number conversions: Number(, parseInt(, parseFloat(.
  • Allowlist file in the proto-reads format: each existing legitimate conversion listed with a one-line reason; stale entries are removable noise, not failures of the scan.
  • Wire as check:numeric-boundaries in the root package.json alongside check:proto-reads / check:doc-env-vars, with script tests in the style of script/check-proto-reads.test.ts.

The scan intentionally does NOT try to prove numeric inputs are normalised — that half of the contract is carried by phase 1's conformance tests and the primitives being the shortest path for the next fix.

Acceptance

Out of scope: banning Math.trunc/Number.isFinite or other internal arithmetic; CLI/env strict-int parsing policy (open question in the design doc).

Acceptance criteria

  • script/check-numeric-boundaries.ts exists and scans packages/core/src, packages/ai/src, and packages/cli/src for bare Number(, parseInt(, parseFloat( conversions.
  • The allowlist file follows the proto-reads format, and every allowlisted site carries a reason.
  • The check runs in CI and fails on a deliberately introduced bare conversion (verified once), without flagging the allowlisted baseline.

Activity

  1. added
    kind/ciCI/CD pipelines, workflows, and build automation
    priority/normalOrdinary priority (the default)
    app/corePackage: core (pkgs/ or apps/ in this repo)
    effort/mMedium: expected under 1 day of work
    on Oct 30, 2026
  2. dezren39 commented on Oct 30, 2026

    @dezren39
    Author

    🤖 Agent note · filed

  3. added
    work/assignedAn agent holds this item via the queue (claimed task)
    queue/claimedA queue worker has claimed the task for this item
    and removed on Oct 30, 2026
  4. dezren39 commented on Oct 30, 2026

    @dezren39
    Author

    🤖 Agent note · picked up

  5. added
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Oct 31, 2026
  6. dezren39 commented on Oct 31, 2026

    @dezren39
    Author

    Intake review

    Related: design #992 (numeric boundary contract), phases #993 (primitives) and the proto-reads check it models. This item already carries queue/claimed + work/assigned — enrichment only; no state change made. Risks: a net that starts one package short repeats #912's lesson — all three packages are in scope from day one per the body. Suggested approach: as specified in the body.

    — Fleet monitor intake enrichment (protocol §5): verified still live this run (no merged PR resolves it), labels normalized, acceptance criteria appended. Marked meta/enriched.

  7. 40 remaining items

  8. added and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 1, 2026
  9. added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    queue/claimedA queue worker has claimed the task for this item
    on Nov 1, 2026
  10. dezren39 commented on Nov 1, 2026

    @dezren39
    Author

    agent-note:v1 worker=repo-worker-opencode task=5465 stage=parked
    PR #1235 head d53ccda: Codex re-review CLEAN (no findings, receipt 2026-11-01T12:47:22Z); prior P1 dispositioned and thread resolved. CI run 41308022854 dispatched on the branch: affected-packages passed; basic unit (linux) failed at the pre-existing check:proto-reads step (model-route.ts drift, also failing on clean main runs 41306489175/41303611306/41302858259; PR does not touch those files). Remaining jobs still running at park time, so the task is parked 20m per the CI park-don't-wait rule. On resume: confirm final run state, then merge if the only failure remains the proven pre-existing one.

  11. added a commit that references this issue on Nov 1, 2026
  12. removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    work/assignedAn agent holds this item via the queue (claimed task)
    on Nov 1, 2026
  13. dezren39 commented on Nov 1, 2026

    @dezren39
    Author

    Queue task 5465 complete (fixed_merged): PR #1235 merged at 13:39:38Z, merge commit e999ff5; this issue auto-closed by the PR.

    Final verification before merging (all fresh this shift): Codex state marker clean for head d53ccda (receipt 6558142462), 0 unresolved review threads; the change itself re-verified at head in the laptop worktree — bun run check:numeric-boundaries exits 0 (145/145 candidates dispositioned) and the checker tests pass 10/10. CI run 41308022854's failures are all pre-existing/infra, not from this PR: the linux unit job fails at the proto-reads disposition step (proven failing on clean main runs), the windows unit job fails on SST Resource binding errors in EmailOctopus/Salesforce tests this diff cannot touch, and every recent main-branch test.yml run concludes failure. That proto-reads drift on main is worth its own follow-up.

    Claim-repair note: this task's claim (13:19:04Z) was held by the lane A shift whose claim output was misdelivered as an empty row; the merge + completion were finished in that shift's repair pass once the true claim state surfaced.

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/corePackage: core (pkgs/ or apps/ in this repo)effort/mMedium: expected under 1 day of workkind/ciCI/CD pipelines, workflows, and build automationmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)source/design-architectFiled by the repo design architect job

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions