Skip to content

Spec 001 T046: the figures step - #154

Closed
adamjohnwright wants to merge 2 commits into
mainfrom
t046/figures-step
Closed

adamjohnwright wants to merge 2 commits into
mainfrom
t046/figures-step

Conversation

@adamjohnwright

Copy link
Copy Markdown
Contributor

Spec 001, task T046 (contracts/figures.md, contracts/render.md, SC-010).

What: pdf-export figures (src/figures/step.ts) draws the book's figures into a folder for book to read:

  • lists them by the Figure rules (the code book uses), runs T024's release-file and character checks before any request, then refuses a render service whose health isn't files: local or whose build is unknown, and a content service of another release;
  • draws each through the client, checks its labels, writes it beside its name, syncs and moves it into place, reads the services again, and only then appends its manifest line (one writer); a change in either service between render and read removes the file and stops the run;
  • stops on a breaker (consecutive unanswered figures, or a silence), aborting work in flight; complete is written only on a clean run; the run report is always written.

The client now gives a missing figure's cause (unanswered, failed, refused, invalid) and, for figures only, retries a 504 or a timeout once; serve is unchanged. The render stub gains 500/504 refusals and a settable health; a content stub is added.

Tests: test/figures/step.test.ts (22) and stub and client tests; 391 in all. The complete manifest is checked by T024's checkFolder. 40 mutants, all killed (tasks.md).

🤖 Generated with Claude Code

adamjohnwright and others added 2 commits November 3, 2026 21:17
Draws the book's figures into a folder before the book: the Figure rules by
the book's own code, T024's release-file and character checks before any
request, the render service's health and the content release checked, each
figure drawn, label-checked, written beside its name and moved into place,
its manifest line appended only once the deployment reads unchanged. A
figure's own fault leaves it out while the rest are drawn; a deployment
changed or gone, or the breaker, stops the run at once. The client names
each missing figure's cause and, for figures only, retries a 504 or a
timeout once. The render stub gains 500/504, health, a hook, silence and
slowness; a content stub is added.

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 unanswered figure's path to 'complete' untested; --report could overwrite an earlier report or turn a refusal into exit 1.

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