---
model: claude-fable-5[1m]
service: claude
timestamp: 2026-06-25T23:25:06Z
git_ref: 3a5cfde0
diff_cmd: git diff 3a5cfde0~1..3a5cfde0
---

# Raw output pointers (diff-ref mode)

The generated patch is committed; per the diff-ref decision
rule the verbatim content is the diff itself:

> `git diff 3a5cfde0~1..3a5cfde0 -- docs/_ext/d2diagrams.py`

## Generation notes (non-code, verbatim)

- `RenderResult` enum added; `render_svg()` return type changed
  `bool -> RenderResult`. Mapping in `run()`: `FAILED` ->
  `state_machine.reporter.error(...)`, `NO_OUTPUT` -> raw `.d2`
  source as a `literal_block`, `OK`/`FELL_BACK` -> `image`.
- Atomicity via `tempfile.mkstemp(dir=out.parent, ...)` +
  `os.replace(tmp, out)`; temp unlinked on any failure path.
- Collision guard: module-level `_seen_outputs: dict[str,str]`
  keyed by output basename, cleared by a `builder-inited`
  handler connected in `setup()`.
- `parallel_read_safe`/`parallel_write_safe` kept `True` but
  now justified by the atomic swap (documented inline).
- Empirical verification performed before commit:
  - broken `.d2` + `sphinx-build -W` -> exit 1, ERROR node
    rendered, committed `actor_tree.svg` md5 unchanged,
  - duplicate-stem orphan page -> "d2 output collision" error,
  - `nix run nixpkgs#d2` forced re-render -> deterministic
    (no git drift), no `.tmp` residue,
  - `ruff check` clean.
