Repository navigation
docs(diagrams): author the architecture and persistence diagrams with archify - #309
Merged
Merged
Conversation
… archify The d2 diagrams had drifted from the code: MCP listed 9 tools instead of 20, the group admission window was 20 ms instead of 10, and the anomaly detector, alert inputs, and webhook targets were missing. Each diagram now has one archify JSON source in docs/diagrams/ whose components cite repository evidence at a pinned revision. `just diagrams` renders it with a local archify 3.1.0 install (ARCHIFY_HOME), exports one dual-theme SVG that follows the reader's color scheme, and copies it to the docs site. The d2 sources and the pinned d2 generator are removed.
The anomaly detector runs SQL over raw spans and logs, not over rollups; the architecture diagram now says so and cites its queries. Archify verifies that the evidence checkout's origin matches the pinned repository, so a fork clone could not regenerate diagrams. DIAGRAMS_EVIDENCE_ROOT selects a labstack/fanout clone that contains the pinned revision, and the script checks origin and revision up front with one clear error.
The script compared origin URLs as strings, rejecting equivalent upstream forms such as SSH, HTTPS without .git, and insteadOf rewrites. Archify already normalizes and verifies repository identity and the pinned revision, so the script defers to it and adds the DIAGRAMS_EVIDENCE_ROOT hint when archify reports a repository-evidence failure.
vishr
force-pushed
the
docs/archify-diagrams
branch
from
October 14, 2026 21:03
c73b78f to
42c8dc8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
The architecture and persistence diagrams had drifted from the code: MCP listed 9 tools instead of 20, the group admission window was 20 ms instead of 10, and the anomaly detector, the alert engine's inputs, and webhook targets were missing.
Both diagrams are now authored with archify (MIT):
docs/diagrams/. Every component cites repository evidence at the revision pinned inmeta.repository, and archify verifies those references.just diagramsrenders each source with a local archify 3.1.0 install (ARCHIFY_HOME, never npm), exports one dual-theme SVG that follows the reader's color scheme, and copies it tosite/public/diagrams/. The README and docs site use the same files.Rendering stays outside
just buildandjust check;just diagrams-checkstill verifies the site copies match.Verification
just checkjust test-racewhen auth, API, ingest, query, MCP, or agent paths changed (documentation only)just diagramsregenerates both SVGs; archify validation, delivery, strict check, and browser check pass for both