Skip to content

Spec 001 T030: check-book - #160

Closed
adamjohnwright wants to merge 2 commits into
mainfrom
t030/check-book
Closed

adamjohnwright wants to merge 2 commits into
mainfrom
t030/check-book

Conversation

@adamjohnwright

Copy link
Copy Markdown
Contributor

Spec 001, task T030 (FR-011, SC-007, contracts/cli.md).

What: pdf-export check-book <folder> (src/check/book.ts) reads the graph's top-level pathways and each PDF's text, links and outline (the book is untagged) and reports, in the contract's three line forms: missing-pathway, extra-file, and per PDF and event not-in-contents, not-in-outline, no-name, no-stable-id, missing-figure (where the source exists) and broken-link. book now runs it on the folder before moving it into place, exits 0 only when it passes, and records each check in the run report.

From #159's review: Printer.close removing its folder is tested; a second live privateTemporary throws; everything after it is in a try/finally with the report written first; the serve contract names the signals that leave nothing; a signal after the book is in place reports it written (exit 0).

Tests: test/check/book.test.ts (10), each fault planted one at a time in a copy of a printed fixture book; book, printer and temporary-folder tests; 433 in all. Mutants in tasks.md. Known gaps: the thresholds are tested on the fixture only (T031 runs them on release 98's book).

🤖 Generated with Claude Code

adamjohnwright and others added 2 commits November 4, 2026 02:21
…place

pdf-export check-book <folder> reads each PDF's outline, links and text
with pdf.js and reports FR-011's faults in the contract's three line
forms: missing-pathway, extra-file, and per PDF not-in-contents,
not-in-outline, no-name, no-stable-id, missing-figure (where the source
is in --files) and broken-link. book closes its printer, runs the check
on its folder and moves the folder into place only when it passes;
faults are exit 1 with no book, and the run report gives each check
with its count of faults.

From #159's review: a test that a printer's close removes its folder;
one private temporary folder live a process; bookCommand's cleanup in a
finally, the report written before the folder is removed; the serve
contract says which signals leave nothing; a signal once the book is in
place reports it written, with the signal, and exits 0.

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 overflowing summation shrinks its whole part, which the check reads as missing names; never-drawn characters gave false faults.

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