Skip to content

fix(bench): write heap-retention records through the evidence writer - #268

Merged
Huxpro merged 1 commit into
new-lynxfrom
fix/heap-retention-evidence-format
Aug 31, 2026
Merged

Huxpro merged 1 commit into
new-lynxfrom
fix/heap-retention-evidence-format

Conversation

@Huxpro

@Huxpro Huxpro commented Aug 31, 2026

Copy link
Copy Markdown
Owner

Summary

  • Route the heap-retention probe's JSON records through writeEvidenceJson, and rewrite the three checked-in records through it, so prettier --check accepts stages/results/ again.

Why

  • Run 540 — the push run for the Train 3 head — failed on exactly one root cause: lint checks flagged c230-retention-10000.json, c252-array-owner-10000.json, and c252-postcausea-10000.json. The probe wrote them with a bare tab-indented JSON.stringify while scripts/evidence.mjs exists precisely to emit records prettier --check accepts unchanged; the CI outage meant nothing flagged the deviation while those records landed.
  • (This also exposed a hole in my own gate chain: piping validation commands to tail swallowed non-zero exit codes, so the local repo-wide format:check "pass" for Train 3 was masked. Chain re-run unpiped for this PR.)

Changes

  • stages/heap-retention.mjs: fs.writeFileSync(..., JSON.stringify(record, null, '\t')) → await writeEvidenceJson(jsonPath, record), with a comment naming why.
  • The three records rewritten through the same writer — parsed and re-emitted, values untouched, whitespace only (verified by JSON parse before/after).

Validation

  • repo-wide prettier --check . — clean, exit code checked directly (not piped)
  • pnpm typecheck — n/a, one .mjs write-site and three JSON records
  • pnpm test — n/a, stages/ is outside every Vitest project; the red job's own command is the oracle
  • node --check stages/heap-retention.mjs
  • pnpm sync — clean

Risk / follow-ups

  • None expected; this PR's CI re-running the exact job that failed is the arbiter.

Provenance

  • An agent produced this diff (agent-authored)

Generated by Claude Code

The probe wrote its records with a bare tab-indented JSON.stringify, and
prettier --check owns stages/results/, so the three checked-in records
turned the first live lint job red (run 540) the moment CI came back.
The writer exists for exactly this; the probe now uses it, and the three
records are rewritten through it — values untouched, whitespace only.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YHfFsy9CLaRovTFH8pTGyY
@Huxpro
Huxpro marked this pull request as ready for review August 31, 2026 16:21
@Huxpro
Huxpro merged commit 820ed3d into new-lynx Aug 31, 2026
43 of 46 checks passed
Huxpro pushed a commit that referenced this pull request Aug 31, 2026
Three gate items of one class:
- the checked-in census record was hand-assembled and prettier-red;
  rewritten through writeEvidenceJson, values untouched.
- the census build CLI silently dropped a typo'd --scales entry and
  accepted a negative one; parses before filtering and refuses both.
- bts-profile and papi-floor still wrote records with a bare tab
  stringify — the same latent defect #268 fixed in heap-retention;
  both now write through the evidence writer.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YHfFsy9CLaRovTFH8pTGyY
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants