Skip to content

docs(adr): fix and enrich the ADR book PDF build - #570

Merged
alpergundogdu merged 3 commits into
mainfrom
claude/ecstatic-haibt-994e15
May 15, 2026
Merged

alpergundogdu merged 3 commits into
mainfrom
claude/ecstatic-haibt-994e15

Conversation

@alpergundogdu

@alpergundogdu alpergundogdu commented May 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Fix the broken book build. The ADR 011 and ADR 028 appeal mermaid sequence diagrams used ; inside message text, which Mermaid treats as a statement separator — mermaid-filter aborted the entire adrs-book.pdf / adrs.pdf build (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 — / ,.
  • Make the reading-order book exhaustive. appendix-binaries.md and appendix-bundles.md were never added to architecture.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.
  • Reading-mode chapter dividers. Added full-page chapter/appendix divider pages (adr/_build/part-*.md) — a title plus a 2–3 sentence intro derived from architecture.md's Reading Order — interleaved into the adrs-book.pdf command only. The numeric adrs.pdf build is unchanged.
  • Cleanup. Dropped the redundant cd adr from both README build commands (README.md lives in adr/); excluded adr/_build/ from markdownlint (pandoc concatenation fragments, not standalone documents).

Test plan

  • adrs-book.pdf builds clean — 451 pages, no mermaid/pandoc errors
  • Divider pages verified isolated via the typst intermediate: #pagebreak(weak:true) → = Chapter N — … + prose → #pagebreak() → next ADR
  • Every appendix-*.md on disk is in the reading-order command (exact match, no phantom entries); numbered ADRs match architecture.md's chapter order
  • pre-commit run hooks pass (markdownlint, trailing-whitespace, etc.)
  • Reviewer spot-check the rendered adrs-book.pdf divider pages

🤖 Generated with Claude Code

- 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]>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread adr/README.md
Comment on lines 153 to 154
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 \

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
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
  1. Ensure documentation is internally consistent and accurately reflects implementation interfaces. Avoid contradictory statements regarding architectural decisions and verify that all internal references are valid.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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]>
@github-actions

github-actions Bot commented May 15, 2026 •

Copy link
Copy Markdown

Coverage report

Total: 88.91% (was 88.91%, ● 0.00%) — 14592/16412 lines

No Rust files changed in this PR.

History
Commit Total Δ vs base
cc8bf25 88.91% ● 0.00%
eaabf6a (HEAD) 88.91% ● 0.00%

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]>
@alpergundogdu
alpergundogdu merged commit 08cae18 into main May 15, 2026
9 checks passed
@alpergundogdu
alpergundogdu deleted the claude/ecstatic-haibt-994e15 branch May 15, 2026 13:06
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