tractor/docs/_diagrams
Gud Boi 43216c8d4a Show error/cancel teardowns in the `Context` diagram
The `context_handshake` sequence diagram only showed the graceful
`Return` ending - underselling the whole SC pitch (errors + cancels
propagate *both* ways across the wire). Add a "... or, instead of a
graceful Return" group with the non-graceful endings,

- parent-initiated: `ctx.cancel()` (or a parent-side error) ->
  child relays `Error: ContextCancelled`,
- child-initiated: child ships `Error: <raised>` (or
  `ContextCancelled`).

Labelled `Error: ...` since `ContextCancelled` is an exception that
rides inside an `Error` wire msg, not its own msg type - keeping
the diagram's wire-level labels honest. Re-render the committed
`_diagrams/context_handshake.svg` fallback (CI has no `d2` bin) to
match.

Also cache-bust d2 images in `d2diagrams.py`: sphinx tags css/js
with `?v=<hash>` but not images, so an edited diagram kept serving
the browser's stale copy at the stable `_images/<stem>.svg` url
(cost us a manual hard-refresh). Hash each rendered svg + rewrite
only the d2 `<img src>` to `...svg?v=<hash8>` via the
`html-page-context` hook - content-addressed, so unchanged diagrams
keep their query.

(this patch was generated in some part by [`claude-code`][claude-code-gh])
[claude-code-gh]: https://github.com/anthropics/claude-code
2026-06-28 21:55:39 -04:00
..
actor_tree.svg Add `d2` diagram sources + rendered SVGs 2026-06-28 13:29:01 -04:00
context_handshake.svg Show error/cancel teardowns in the `Context` diagram 2026-06-28 21:55:39 -04:00
debug_lock.svg Add `d2` diagram sources + rendered SVGs 2026-06-28 13:29:01 -04:00
error_propagation.svg Add `d2` diagram sources + rendered SVGs 2026-06-28 13:29:01 -04:00
infected_aio.svg Add `d2` diagram sources + rendered SVGs 2026-06-28 13:29:01 -04:00
runtime_stack.svg Add `d2` diagram sources + rendered SVGs 2026-06-28 13:29:01 -04:00
streaming_pipeline.svg Add `d2` diagram sources + rendered SVGs 2026-06-28 13:29:01 -04:00