Skip to content

docs(formal): index the challenges and mutants; read an entry with where.mjs - #235

Merged
lan17 merged 1 commit into
mainfrom
claude/formal-catalog-views
Oct 15, 2026
Merged

lan17 merged 1 commit into
mainfrom
claude/formal-catalog-views

Conversation

@lan17

@lan17 lan17 commented Oct 15, 2026 •

Copy link
Copy Markdown
Owner

Phase 3 of #220, item D1, reshaped after review. One commit, stacked on #233 until it lands, then retargeted to main.

What changed since the first version

The first version mirrored the challenge and mutant catalogs into 8,190 lines of Markdown. That earned its lines badly: a 345 KB mirror is no easier to read than the JSON it copies, it costs a regeneration on every catalog edit, and it is worse for an agent, which parses JSON fine. What a reader needs is a skimmable list and one entry at a time.

What this does now

  • formal/generated/CHALLENGES.md (91 lines) and MUTANTS.md (76 lines): one row per challenge (contract, source, invariant, native mutant, reproducer run, detected and excluded counts) and per mutant (case, description, detections per port, challenges mapped to it). Generated by the same --write, checked by the same --check in the audit lane.
  • where.mjs reads an entry in full on demand: node formal/tools/where.mjs recovery-inclusive-maximum prints the edit, the invariant, the mapping with its cross-contract note and evidence checkpoint, the reproducer and every exclusion with its reason; node formal/tools/where.mjs M01 prints the rationale, the edits per port including the Rust mirror, the required detections and the challenges mapped to it.

Net: +167 generated lines instead of +8,190, no new reading surface, and the lookup the mirror was really for.

Tests

formal-catalog-docs.test.ts pins all three views to the renderers and checks that every challenge and every mutant has one row and that the indexes stay within a few lines of the entry count. formal-where.test.ts covers the challenge and mutant lookups and their error paths.

Verification

make audit green; vitest run test/formal-catalog-docs test/formal-where pass; tsc --noEmit clean; node scripts/check-docs.mjs green (32 pages). Indexes and AUTHORING re-keyed with --refresh; parity inputs re-pinned.

🤖 Generated with Claude Code

@codecov-commenter

codecov-commenter commented Oct 15, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.73%. Comparing base (e75a04b) to head (a611a51).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #235   +/-   ##
=======================================
  Coverage   93.73%   93.73%           
=======================================
  Files          78       78           
  Lines       11357    11357           
  Branches      656      656           
=======================================
  Hits        10645    10645           
  Misses        642      642           
  Partials       70       70           
Flag Coverage Δ
go 91.12% <ø> (ø)
python 92.08% <ø> (ø)
rust 94.29% <ø> (ø)
typescript 96.56% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lan17
lan17 force-pushed the claude/formal-catalog-views branch from 384972b to a970189 Compare October 15, 2026 01:33
@lan17
lan17 force-pushed the claude/formal-profiles-doc branch from 807d90f to 5df88f1 Compare October 15, 2026 02:00
@lan17
lan17 force-pushed the claude/formal-catalog-views branch from a970189 to 684d926 Compare October 15, 2026 02:03
@lan17 lan17 changed the title docs(formal): generate CHALLENGES.md and MUTANTS.md from the catalogs docs(formal): index the challenges and mutants; read an entry with where.mjs Oct 15, 2026
Base automatically changed from claude/formal-profiles-doc to main October 15, 2026 02:40
@lan17
lan17 changed the base branch from claude/formal-profiles-doc to main October 15, 2026 02:40
…ere.mjs

The first shape of this change mirrored the challenge and mutant catalogs
into 8,190 lines of Markdown. A mirror of 345 KB is no easier to read than
the JSON it copies, costs a regeneration on every catalog edit and is
worse for an agent, which parses JSON fine. What a reader needs is a
skimmable list and one entry at a time.

CHALLENGES.md and MUTANTS.md are now one-row-per-entry indexes (91 and 76
lines): challenge, contract, source, invariant, native mutant, reproducer
run and detected/excluded counts; mutant, case, description, detections
per port and the challenges mapped to it. The entry itself is read on
demand: `node formal/tools/where.mjs recovery-inclusive-maximum` prints
the edit, the invariant, the mapping with its cross-contract note and
evidence checkpoint, the reproducer and every exclusion with its reason;
`node formal/tools/where.mjs M01` prints the rationale, the edits per port
including the Rust mirror, the required detections and the challenges
mapped to it. The indexes are checked in the audit lane; the lookups are
tested on the committed catalogs.
@lan17
lan17 force-pushed the claude/formal-catalog-views branch from 684d926 to a611a51 Compare October 15, 2026 02:40
@lan17
lan17 merged commit 5030320 into main Oct 15, 2026
26 of 28 checks passed
@lan17
lan17 deleted the claude/formal-catalog-views branch October 15, 2026 02:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants