Skip to content

Add generated figures and diagrams to the README - #4

Merged
ebt55 merged 2 commits into
mainfrom
claude/readme-figures
Sep 6, 2026
Merged

ebt55 merged 2 commits into
mainfrom
claude/readme-figures

Conversation

@ebt55

@ebt55 ebt55 commented Sep 6, 2026

Copy link
Copy Markdown
Owner

The README opens with badges and a links line, leads the finding with a generated figure of the T1 and T4 full-chain rows side by side, and shows each scenario across its three safeguard arms. A new section carries two Mermaid diagrams: the gate chain from the frozen contract to the checkers, and the capture-and-replay path.

The figures are SVGs written by explainer/build.py from the committed artifacts, drawn by the same gate-chain code as the explainer page, with light and dark variants served through picture elements. build.py --check covers them, so the Pages workflow refuses to deploy if a figure drifts, and two new tests pin each figure's outcomes and side-effect counts to the artifacts. Every number and link in the README is unchanged from main.

Verification on this branch: build.py --check clean, explainer and README tests green, ruff check clean. explainer/index.html is byte-identical to main, so merging does not change the hosted page.

🤖 Generated with Claude Code

ebt55 and others added 2 commits September 6, 2026 16:18
…plainer

explainer/build.py now writes six standalone SVG figures under
explainer/figures/: the T1 and T4 full-chain rows side by side, and each
scenario across its three safeguard arms, in a light and a dark variant. They
are drawn by the same gate-chain code as the explainer page, which was split
into a view derivation and a drawing step so a one-step T1 leg and a
three-step T4 leg render through one path. Every value in them is read from
the committed artifacts; nothing is hand-typed.

build() returns the figures beside the two page wrappers, so main() writes
them and --check compares them byte for byte, and the Pages workflow now
refuses to deploy if a figure has drifted. Its operator hint names the figures
directory. The figures carry an inline stylesheet, system font stacks and no
external references, so GitHub can render them, and labels that sit on a gate
bar are painted with a background halo.

Two tests are added: each figure states the outcomes and side-effect counts of
the rows it draws, read independently from the artifacts, and no figure
carries a script, a link, or an external URL.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The README opens with badges and a links line, then leads the finding with the
generated T1 versus T4 figure, and embeds each scenario's three-arm figure
after its paragraph, using picture elements so GitHub serves the dark variant
under its dark theme. A new section, "How the experiment works", carries two
Mermaid diagrams: the gate chain from the frozen contract to the checkers, and
the capture-and-replay path that makes the three arms comparable.

Every number, link target and fenced block from the previous revision is
unchanged; the numeric claims were compared as a multiset before and after.

tests/test_readme_figures.py pins that every relative image path in the README
resolves to a file, that each picture element pairs a light file with its
-dark variant, and that each Mermaid fence names a diagram type.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 6, 2026 10:48
@coderabbitai

coderabbitai Bot commented Sep 6, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: b494f616-0240-4172-adcf-22e38e1525c8


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI 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.

🟢 Approval recommended

The changes are internally consistent and are guarded by targeted tests plus a Pages deploy gate that drift-checks the newly generated README figures against committed artifacts.

Pull request overview

This PR updates the project’s top-level README to embed generated, artifact-derived visuals (SVG figures + Mermaid diagrams) that summarize key experimental results and the safeguard-chain mechanics, and extends the explainer build/test pipeline so those visuals are reproducible, paired (light/dark), and drift-checked in CI/Pages.

Changes:

  • Add three generated SVG figures (each with light/dark variants) and two Mermaid diagrams to README.md.
  • Extend explainer/build.py to generate the README figures using the same gate-chain renderer as the explainer page, and emit them as build outputs.
  • Add tests that validate README image/diagram integrity and pin the generated figures’ content and “no external fetches” invariants to committed artifacts.
File summaries
File Description
tests/test_readme_figures.py New tests to ensure README image paths resolve, <picture> blocks are correctly paired, and Mermaid fences are non-empty/typed.
tests/test_explainer_is_derived_from_artifacts.py Extends explainer drift/idempotency checks to include README figures; adds SVG-content invariants.
README.md Embeds generated SVG figures (light/dark via <picture>) and adds Mermaid diagrams explaining the chain and replay model.
explainer/build.py Generates six README SVGs (3 figures × light/dark) via shared chain renderer; adds overt-steps to derived arm records; writes nested outputs safely.
explainer/figures/finding-t1-vs-t4.svg New generated README hero figure (light).
explainer/figures/finding-t1-vs-t4-dark.svg New generated README hero figure (dark).
explainer/figures/t1-three-arms.svg New generated README T1 three-arm figure (light).
explainer/figures/t1-three-arms-dark.svg New generated README T1 three-arm figure (dark).
explainer/figures/t4-three-arms.svg New generated README T4 three-arm figure (light).
explainer/figures/t4-three-arms-dark.svg New generated README T4 three-arm figure (dark).
.github/workflows/pages.yml Updates the --check gate messaging to include figures and documents why figures are verified but not published to Pages.
Review details
  • Files reviewed: 5/11 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@ebt55
ebt55 merged commit df9f063 into main Sep 6, 2026
4 checks passed
@ebt55
ebt55 deleted the claude/readme-figures branch September 6, 2026 12:25
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.

2 participants