Skip to content

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

Closed
adamjohnwright wants to merge 4 commits into
mainfrom
t024/preflight-2
Closed

adamjohnwright wants to merge 4 commits into
mainfrom
t024/preflight-2

Conversation

@adamjohnwright

Copy link
Copy Markdown
Contributor

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

Everything in #149 (pdf-export preflight: file names, the release's files, the figures' folder against its manifest, and FR-017's characters in the book's fault mode), plus, from #149's review:

  • An error mid-run lost the faults found and exited 1 with no fault line. An unreadable diagram file is now the fault bad-file <name> and the run goes on; any other error prints the faults found so far and exits 2 with the error on stderr (contracts/cli.md updated).
  • The start check has its own short retry bound; the book's reads keep the driver's default retries.
  • Diagram files' attachment labels (nodeAttachments[].label, drawn as modifications) are now read.
  • "A stale folder is refused as a whole" and two manifest checks are now tested.
  • Recorded: the fingerprint's content not compared by book; case-insensitive names by toLowerCase; unprinted strings checked; T047 needs the fingerprint comparison separately; truncated .graph.json not detected; graph-side modification labels and the normal diagram under a disease diagram unchecked.

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

🤖 Generated with Claude Code

adamjohnwright and others added 4 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>
@adamjohnwright

Copy link
Copy Markdown
Contributor Author

Replaced after review: an unparsable graph URI still exited 1 with no fault line.

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