Repository navigation
docs(adr): fix and enrich the ADR book PDF build - #570
Conversation
- Fix mermaid-filter build failure: the ADR 011 and ADR 028 appeal sequence diagrams used `;` in message text, which Mermaid parses as a statement separator. Replace with `—` / `,`. This broke both the adrs.pdf and adrs-book.pdf builds. - Make the reading-order book exhaustive: add appendix-binaries.md and appendix-bundles.md to architecture.md's Appendices index and the README adrs-book command (they were never wired in — hand-maintained list drift, same class as the ADR 031 omission #566 fixed). - Reading-order book only: add full-page chapter/appendix divider pages (_build/part-*.md) with a title and 2–3 sentence intro derived from architecture.md's Reading Order. The numeric adrs.pdf is unchanged. - Drop the redundant `cd adr` from both README build commands — README.md lives in adr/, so the reader is already there. - Exclude adr/_build/ from markdownlint (pandoc concatenation fragments, not standalone documents). Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
There was a problem hiding this comment.
Code Review
This pull request organizes the Architecture Decision Records (ADRs) into a structured book format by introducing chapter header files and updating the Pandoc build command. It also standardizes Mermaid diagram formatting and adds new appendices for directory bundles and binary structure. Feedback points out that the fraud-detection appendix is missing from the build sequence in README.md, creating an inconsistency with the architecture documentation.
| 014-on-chain-verification.md 008-reputation.md 011-content-takedown.md 028-slashing-appeals.md \ | ||
| 032-safety-reserve-appeals-contract.md 031-content-blacklist-appeals-contract.md 030-node-region-self-attestation.md \ |
There was a problem hiding this comment.
The adrs-book.pdf build command is missing appendix-fraud-detection.md in the Chapter 5 section. In architecture.md, this appendix is explicitly listed as part of the Chapter 5 reading order (line 98). To maintain consistency with the thematic flow described in the Architecture Overview, it should be included here as well as in the Appendices section.
| 014-on-chain-verification.md 008-reputation.md 011-content-takedown.md 028-slashing-appeals.md \ | |
| 032-safety-reserve-appeals-contract.md 031-content-blacklist-appeals-contract.md 030-node-region-self-attestation.md \ | |
| 014-on-chain-verification.md 008-reputation.md 011-content-takedown.md 028-slashing-appeals.md \ | |
| 032-safety-reserve-appeals-contract.md 031-content-blacklist-appeals-contract.md 030-node-region-self-attestation.md appendix-fraud-detection.md \ |
References
- Ensure documentation is internally consistent and accurately reflects implementation interfaces. Avoid contradictory statements regarding architectural decisions and verify that all internal references are valid.
There was a problem hiding this comment.
Resolved in eaabf6a — but by fixing architecture.md, not by duplicating into the README command.
Listing appendix-fraud-detection.md in the README Chapter 5 block would make pandoc compile it twice (it's already in the appendices block at the end), rendering the appendix twice in the PDF.
The real inconsistency was in architecture.md: the fraud-detection layer was demoted from an ADR to an appendix (#422), but Chapter 5's reading order still listed it as item 8 — a stale leftover. Every other chapter lists only ADRs, and the adrs-book build groups all appendices at the end rather than interspersing them, so the Chapter 5 entry contradicted both the Appendices section and the README command. Removed that line; architecture.md and the README command now reference the appendix exactly once (in the appendices section/block).
The CI markdownlint job uses DavidAnson/markdownlint-cli2-action, which does not read .markdownlintignore (that is a markdownlint-cli v1 feature, used by the local pre-commit hook). Add !adr/_build/** to the workflow glob negation list so the pandoc build fragments are excluded in CI too, matching the existing !.github/agents/** pattern. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Coverage reportTotal: 88.91% (was 88.91%, ● 0.00%) — 14592/16412 lines No Rust files changed in this PR. History
|
The Permissionless Fraud-Detection Layer was demoted from an ADR to an appendix (#422), but architecture.md's Chapter 5 reading order still listed it as item 8 — a stale leftover. It already appears in the Appendices section, and the adrs-book build groups appendices at the end (not interspersed in chapters), so the Chapter 5 entry contradicted both the Appendices section and the README command. Remove the line. Resolves the inconsistency flagged in PR review; the suggested alternative (also listing it in the README Chapter 5 block) would have compiled appendix-fraud-detection.md twice into the PDF. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Summary
;inside message text, which Mermaid treats as a statement separator —mermaid-filteraborted the entireadrs-book.pdf/adrs.pdfbuild (has been broken since early May, docs(adr): add ADR 028 slashing appeals path #419 / docs(adr): add per-entry blacklist appeal mechanism to ADR 011 #430). Replaced the offending;with—/,.appendix-binaries.mdandappendix-bundles.mdwere never added toarchitecture.md's Appendices index or the README adrs-book command (hand-maintained list drift — same class as the ADR 031 omission docs(adr): add ADR 032 — SafetyReserve appeal-surface contract surface #566 fixed). Added both in thematic position; index renumbered 1→12.adr/_build/part-*.md) — a title plus a 2–3 sentence intro derived fromarchitecture.md's Reading Order — interleaved into theadrs-book.pdfcommand only. The numericadrs.pdfbuild is unchanged.cd adrfrom both README build commands (README.md lives inadr/); excludedadr/_build/from markdownlint (pandoc concatenation fragments, not standalone documents).Test plan
adrs-book.pdfbuilds clean — 451 pages, no mermaid/pandoc errors#pagebreak(weak:true)→= Chapter N — …+ prose →#pagebreak()→ next ADRappendix-*.mdon disk is in the reading-order command (exact match, no phantom entries); numbered ADRs matcharchitecture.md's chapter orderpre-commit runhooks pass (markdownlint, trailing-whitespace, etc.)adrs-book.pdfdivider pages🤖 Generated with Claude Code