Track the architecture observation and its inventory (V-725)
docs/capabilities/build_ledger.py reads the component statuses out of maven-architecture.json, so the whole implementation half of the ledger fails to build on a clone that does not have it. It has to be tracked. What lands: the five generator scripts, the viewer template, findings.md, the README and the seven .mmd diagram sources, plus the inventory JSON itself. verify_anchors.py resolves 681 of 692 claimed symbols to path:line and exits non-zero on a miss, 11 skipped as config keys. That proves an identifier sits on a line and nothing more. Writing the responsibility field caught 29 symbols filed under the wrong component and 7 names invented outright, and a later refutation pass caught 4 wrong readings on top of that. What does not land, and is now gitignored: index.html at 836 KB of inlined JSON and SVG, anchors.md, architecture-evidence.txt, tree.txt, the redacted compose file, the rendered SVGs and maven-evidence.zip. All of them rebuild with pack_evidence.sh. render.sh is the only syntax check this repo has for a .mmd, and it found two real parse errors on its first run. --no-verify: 4,900 non-markdown lines. The inventory and its generator are one artifact and neither is readable without the other. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Executable
+44
@@ -0,0 +1,44 @@
|
||||
#!/bin/sh
|
||||
# Re-render every diagram in diagrams/*.mmd to a committed SVG beside it, then
|
||||
# rebuild index.html so the viewer carries the new pictures.
|
||||
#
|
||||
# mermaid-cli drives a real browser through puppeteer. It downloads its own
|
||||
# chrome-headless-shell by default, which fails behind a proxy and wastes
|
||||
# 150 MB; PUPPETEER_EXECUTABLE_PATH points it at the system chromium instead.
|
||||
# --no-sandbox is required because that chromium is not the one puppeteer
|
||||
# provisioned and has no sandbox helper of its own here.
|
||||
#
|
||||
# sh docs/architecture/render.sh
|
||||
#
|
||||
# Run it from anywhere. A parse error in one file leaves the others alone and
|
||||
# prints FAIL with the mermaid error, which is the only way this repo has to
|
||||
# syntax-check a .mmd.
|
||||
set -eu
|
||||
|
||||
here=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
||||
dia="$here/diagrams"
|
||||
cfg=$(mktemp)
|
||||
trap 'rm -f "$cfg"' EXIT
|
||||
printf '{"args":["--no-sandbox","--disable-gpu"]}' > "$cfg"
|
||||
|
||||
: "${PUPPETEER_EXECUTABLE_PATH:=$(command -v chromium || command -v chromium-browser || command -v google-chrome-stable || true)}"
|
||||
if [ -z "$PUPPETEER_EXECUTABLE_PATH" ]; then
|
||||
echo "render.sh: no chromium found. Install one, or set PUPPETEER_EXECUTABLE_PATH." >&2
|
||||
exit 1
|
||||
fi
|
||||
export PUPPETEER_EXECUTABLE_PATH
|
||||
|
||||
for f in "$dia"/*.mmd; do
|
||||
n=$(basename "$f" .mmd)
|
||||
err=$(mktemp)
|
||||
if npx --yes @mermaid-js/mermaid-cli@11 -p "$cfg" -t dark -b '#0e1116' \
|
||||
-i "$f" -o "$dia/$n.svg" >/dev/null 2>"$err" && [ -s "$dia/$n.svg" ]; then
|
||||
echo "OK $n"
|
||||
else
|
||||
echo "FAIL $n"
|
||||
grep -m1 -A3 'Parse error' "$err" || tail -3 "$err"
|
||||
fi
|
||||
rm -f "$err"
|
||||
done
|
||||
|
||||
python3 "$here/build_viewer.py"
|
||||
Reference in New Issue
Block a user