Skip to content

Spec 001 T029: book, end to end - #156

Closed
adamjohnwright wants to merge 2 commits into
mainfrom
t029/book
Closed

adamjohnwright wants to merge 2 commits into
mainfrom
t029/book

Conversation

@adamjohnwright

Copy link
Copy Markdown
Contributor

Spec 001, task T029 (contracts/cli.md, data-model.md's run report).

What: pdf-export book (src/book/): the flags and environment variables T029 lists; --out absent or empty; the preflight first (faults exit 1, errors exit 2); figures read from --figures on demand (no render service), each drawing's labels checked as its part is laid out; printBook with, for each joined PDF, reprintFront, rewriteLinks, writeOutline and stampPages, then saved with object streams off; the PDFs written beside --out and moved into place only at the end, a refused PDF failing the run whole with nothing left; each PDF named from its pathway's name; the run report (release, FR-017 substitutions by code point and count of printed occurrences, stage times, pages and sizes, figures by kind, missing figures and files). On SIGINT/SIGTERM/SIGHUP the temporary folder is removed; the printer removes its page folder on exit.

Also: lows from earlier reviews: the preflight's graphs opened and closed safely; stamp.ts comments and an unreachable fallback; T024's test counts. package.json's test script gains --test-timeout (a leaked handle fails instead of hanging) and --test-concurrency=4 (the suite otherwise peaks near 3 GiB).

Left for T031: the join's memory on the real book; defaults stay --joins 1, object streams off. T030 adds check-book, so exit 0 is provisional until then.

Tests: test/book/book.test.ts (8), on the fixture with planted characters and faults through a wrapper graph; 409 in all. Mutants in tasks.md.

🤖 Generated with Claude Code

adamjohnwright and others added 2 commits November 3, 2026 22:08
The preflight, then each top-level pathway's PDF printed in parts from the
figures' folder, its contents numbered, links rewritten, outline written and
pages stamped, saved with object streams off into a folder moved into place
only once every PDF is written. A figure's labels are checked before its part
prints; FR-017's substitutions are counted as printed; the run report is
written however the run ends. The join's memory on the real book is left to
T031. Folded in: a test timeout and concurrency bound, the preflight's graph
open and close guarded, and stamp.ts's lows.

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: signal and start-up failures left folders or no report; figure-label and several section substitutions untested.

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