Repository navigation
Closed
Labels
app/corePackage: core (pkgs/ or apps/ in this repo)Package: core (pkgs/ or apps/ in this repo)effort/mMedium: expected under 1 day of workMedium: expected under 1 day of workkind/ciCI/CD pipelines, workflows, and build automationCI/CD pipelines, workflows, and build automationmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)Ordinary priority (the default)source/design-architectFiled by the repo design architect jobFiled by the repo design architect job
Description
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: scanspackages/core/src,packages/ai/srcANDpackages/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-boundariesin the rootpackage.jsonalongsidecheck:proto-reads/check:doc-env-vars, with script tests in the style ofscript/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
-
bun run check:numeric-boundariespasses on current main with the initial allowlist; every allowlist entry carries a reason. - A planted bare
Number(conversion in a scanned package makes the check fail and names the file (covered by the script's tests). - Removing an allowlist entry for a conversion that still exists makes the check fail (stale-entry detection works in both directions, per the fix(ci): check:proto-reads fails on main — variant.ts guarded read is unlisted and its pre-#878 allowlist entry is stale #896 lesson).
- Scope is exactly the three packages above; no other check script's behaviour changes.
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.tsexists and scanspackages/core/src,packages/ai/src, andpackages/cli/srcfor bareNumber(,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.
Metadata
Metadata
Assignees
Labels
app/corePackage: core (pkgs/ or apps/ in this repo)Package: core (pkgs/ or apps/ in this repo)effort/mMedium: expected under 1 day of workMedium: expected under 1 day of workkind/ciCI/CD pipelines, workflows, and build automationCI/CD pipelines, workflows, and build automationmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)Ordinary priority (the default)source/design-architectFiled by the repo design architect jobFiled by the repo design architect job
Activity
dezren39 commentedon Oct 30, 2026
🤖 Agent note · filed
script/check-numeric-boundaries.ts+ allowlist, wired ascheck:numeric-boundaries, scanning packages/core/src, packages/ai/src AND packages/cli/src for bareNumber(/parseInt(/parseFloat(conversions, modelled on check:proto-reads (all three packages from day one — the fix(ci): check:proto-reads scans only packages/core/src — packages/ai, where the class keeps biting, has no regression net #912 lesson).dezren39 commentedon Oct 30, 2026
🤖 Agent note · picked up
script/check-numeric-boundaries.ts+ reasoned allowlist + script tests, wired ascheck:numeric-boundariesin rootpackage.json, scanningpackages/core/src,packages/ai/src, andpackages/cli/srcfor bareNumber(/parseInt(/parseFloat(conversions (design design(core): one numeric contract at the service boundary — shared normalisation primitives for limits, durations and timeouts #992, phase 3)bun run check:numeric-boundariespasses on main with a reasoned allowlist, and script tests prove planted conversions fail and stale/missing allowlist entries are detectedqueue/3999-995-check-numeric-boundaries· design design(core): one numeric contract at the service boundary — shared normalisation primitives for limits, durations and timeouts #992dezren39 commentedon Oct 31, 2026
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.40 remaining items
fix(ci): quote Linux string in numeric-boundaries workflow condition (#…
dezren39 commentedon Nov 1, 2026
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.
Merge pull request #1235 from developing-today/queue/5465-995-numeric…
dezren39 commentedon Nov 1, 2026
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.