Repository navigation
fix(m4): require safe integer run lengths in Observatory artifacts (#836) - #837
Conversation
Head evidence:
|
| Check | Outcome | Measured | Evidence |
|---|---|---|---|
build-and-test |
passed | 2026-10-24T16:07:07Z | https://github.com/drevendev/trade_simulation/actions/runs/40110032461/job/120919632745 |
typescript |
passed | 2026-10-24T16:07:30Z | https://github.com/drevendev/trade_simulation/actions/runs/40110032461/job/120919632494 |
policy-guard |
passed | 2026-10-24T16:06:53Z | https://github.com/drevendev/trade_simulation/actions/runs/40110032461/job/120919632604 |
mergeability |
passed | 2026-10-24T16:06:47Z | merges cleanly into the base branch (blocked) |
What moved the head
This head carries content of its own: the pull request's diff (2 files, diff identity f44174379d521149) is not the one its parent had. A handoff or a verdict that names an earlier head does not cover it.
Producer QA handoff — exact HEAD
|
Verdict: ACCEPTExact reviewed HEAD: Independent review of both changed files and surrounding published-script validation/rendering, existing JSDOM tests, Issue #836 acceptance criteria, repository instructions, prior discussion/review threads, and same-head checks found no blocking defect.
Verification on this HEAD: CI run 40110032461 is Acceptance: the bounded fix satisfies the verifiable criteria of #836. This is an independent scheme/8 exact-head verdict, not a merge or release instruction. Re-review if the PR's own diff changes; all merge gates must remain valid on the head being merged. |
Closes #836
Achieved outcome
M4 Observatory refuses JSON artifacts whose
scenario.ticksExecutedis an unsafe integer (e.g.2^53), preventing the selected-run summary from presenting an inexact binary64 run length as authoritative. The existing sample-tick contract already required safe integers; this aligns the run boundary with it.Exact implementation head
14078f32e008a16c4ea7fca6a7170c3f1902d441(source readback confirmed for both touched paths; not yet independently QA-approved).Changed artifacts / declared scope
docs/m4.js— requireNumber.isSafeIntegerforscenario.ticksExecuted; distinguish the schema error message.src/diagnostics/m4PageTimeAxis.test.ts— a real published-script JSDOM regression: 2^53 rejected before any chart/table, 2^53-1 retains all five charts and the table.Acceptance status
Verification
14078f32e008a16c4ea7fca6a7170c3f1902d441; static boundary calculation (Number.isInteger(2**53)permits an unsafe count,Number.isSafeIntegerrejects it).npm ci,npm run typecheck,npm test,npm run build(execution environment has no npm registry DNS/network). Native JSDOM/Vitest evidence must come from the PR's GitHub CI.Assumptions and unknowns
The browser uses IEEE-754 Numbers for JSON tick metadata, so run counts above
Number.MAX_SAFE_INTEGERcannot be faithfully represented. This change validates metadata only; it does not claim that a quadrillion-tick run can actually execute.Highest-risk area for review
Boundary compatibility for selected-run artifacts claiming extremely long run lengths. Confirm no valid artifact intentionally relies on unsafe integer counts and that the schema error path renders safely.
Remaining gate
Four required same-head CI gates + independent SLOPSTER content-head acceptance, followed by separate VERIFY_INTEGRATE.