Skip to content

Spec 001 T024: the book's preflight - #153

Merged
adamjohnwright merged 6 commits into
mainfrom
t024/preflight-3
Nov 3, 2026
Merged

adamjohnwright merged 6 commits into
mainfrom
t024/preflight-3

Conversation

@adamjohnwright

Copy link
Copy Markdown
Contributor

Spec 001, task T024. Replaces #150 after its review (one medium, fixed in the second-last commit); #150 replaced #149.

Everything in #150, plus, from #150's review:

  • An unparsable graph address (no scheme, or http://) exited 1 with a stack trace, against the contract's "exit 1 always means faults"; the start driver is now opened inside the try, so it exits 2 with the error on stderr.
  • Faults are printed before the error; both drivers are closed (a child-process test requires the command to exit promptly); contracts/cli.md lists bad-file for book and figures and says faults are kept check by check.

Tests: 352 in all. Mutants in tasks.md.

🤖 Generated with Claude Code

adamjohnwright and others added 6 commits November 3, 2026 20:25
src/preflight/ checks, before anything is printed: the book's file names
(bad-file-name), the release's files the figures need (missing-file), the
figures' folder against the graph's release, checksum and EHLD summary
(incomplete-folder, no-checksum, stale-folder, stale-summary, stale-figure,
missing-file), and FR-017's characters in the texts, the reactions'
figures' names and the drawn diagram files' labels
(uncovered-character). `pdf-export preflight` runs it alone.

The book's mode of FR-017 is BookCharacters in src/layout/characters.ts
and labelsInBook in src/figures/labels.ts. The release reader gains
releaseInfo with the DBInfo checksum, read as its digits, and figureNames;
the fixture gains a checksum and a compartment only a participant holds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An error during the preflight is now exit 2 with the error on stderr,
after the faults found before it are printed; exit 1 means faults only.
A diagram file that cannot be read as JSON is a fault, bad-file <name>,
and the run goes on. The start's graph read has a bounded retry of its
own driver; the checks' reads keep the driver's default. The diagram
files' node attachments' labels are read. Tests for a stale folder
refused as a whole, a selection's length and its ids' type.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The start's driver is opened inside the try, so a graph address the
driver cannot parse is exit 2 with its error on stderr, not a stack trace
with exit 1. On an error the faults found are printed before it. A test
runs the command as a child process, so a driver left open is caught.
contracts/cli.md: bad-file in book's preflight and figures' exit 1, book's
exit 2 on an error, and faults kept check by check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@adamjohnwright
adamjohnwright merged commit 926f7e2 into main Nov 3, 2026
2 checks passed
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.

1 participant