Skip to content

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

Merged
adamjohnwright merged 8 commits into
mainfrom
t029/book-4
Nov 4, 2026
Merged

adamjohnwright merged 8 commits into
mainfrom
t029/book-4

Conversation

@adamjohnwright

Copy link
Copy Markdown
Contributor

Spec 001, task T029. Replaces #158 after its review (two mediums, fixed in the second-last commit); #158 replaced #157 and #156.

Everything in #158 (pdf-export book, end to end), plus, from #158's review, the leftover-folder failures fixed as a class: each book run and each serve process makes one private temporary folder (src/print/temporary.ts), points TMPDIR at it so the printer and Playwright's launcher make theirs inside it, and removes it whole in an exit handler kept last (after Playwright's, which ends the browser first). Every signal path reaches process.exit: serve registers its handlers before starting the service, with on, and a signal before it serves or while it closes exits with 128+n. Tested at the launcher's folders, the browser's spawn and double signals, in book and serve; each must leave TMPDIR empty.

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

🤖 Generated with Claude Code

adamjohnwright and others added 8 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>
…hecked

A signal is handled from the run's start and held while the browser
launches, the report written naming it; an unwritable or mounted --out and
an existing or unwritable --report are refused at the start; a figure file
removed mid-run is a missing-file fault; and the printed PDFs are read for
every substituted field and a figure's label.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…elds

The browser is launched without Playwright's signal handlers, so book's own
decide; serve sets its handlers, SIGHUP among them, before it says it serves.
A second signal stops a held launch at once. An unreadable or linked --out
and a --report inside --out are refused. A reaction's type and the
references are checked where printed. The licence test removes its folder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
book and serve each make one temporary folder at their start, point TMPDIR,
and so the printer and the browser launcher, at it, and remove it whole as
the process exits, after the launcher has ended the browser. serve sets its
signal handlers before it starts, and exits on a signal it cannot close for.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@adamjohnwright
adamjohnwright merged commit e3cbde1 into main Nov 4, 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