Merge pull request 'docs(vault): documentation exists for point of use — destroy the ledgers (−13.7k lines)' (#31) from docs/vault-destruction-20261019 into main

This commit was merged in pull request #31.
This commit is contained in:
2026-10-19 10:59:51 -07:00
157 changed files with 2344 additions and 15158 deletions
+36 -2
View File
@@ -15,7 +15,7 @@ load helpers
# service name is the docs slug: RomM -> serverAppConfigs-docs/Dankserver/RomM.md
# matched case-insensitively (vault uses Title Case)
local doc
doc=$(find "$REPO_ROOT/serverAppConfigs-docs" -iname "${svc}.md" 2>/dev/null | head -1)
doc=$(find "$REPO_ROOT/serverAppConfigs-docs" -iname "${svc}.md" -not -path '*/.AGENTTRASH/*' 2>/dev/null | head -1)
if [ -z "$doc" ]; then
echo "service '$svc' (from $f) has no docs page: expected serverAppConfigs-docs/**/${svc}.md"
return 1
@@ -34,7 +34,10 @@ load helpers
echo "docs page $base is not linked from $index"
return 1
}
done < <(find "$REPO_ROOT/serverAppConfigs-docs" -name '*.md' -not -name 'index.md' -not -path '*/.obsidian/*' | sort)
# `.AGENTTRASH` is deleted-but-held state per the repo's deletion policy, not
# vault content: trashed pages need no index row, and a trashed page must not
# answer as the docs page for a live compose service.
done < <(find "$REPO_ROOT/serverAppConfigs-docs" -name '*.md' -not -name 'index.md' -not -path '*/.obsidian/*' -not -path '*/.AGENTTRASH/*' | sort)
}
@test "no unresolved links in the docs vault" {
@@ -74,3 +77,34 @@ load helpers
return 1
}
}
@test "the vault conforms to OKF v0.1" {
# Frontmatter contract (type/description/timestamp), the 500-line split
# hint, log.md's date-heading shape and newest-first order, and index rows
# that restate a fleet quantity instead of pointing at its owner. The only
# length exemptions are the live endpoint pages, derived from scripts/ --
# see scripts/check-okf.py.
run "$REPO_ROOT/scripts/check-okf.py" "$REPO_ROOT/serverAppConfigs-docs"
[ "$status" -eq 0 ] || { echo "$output"; false; }
}
@test "vault indices are generated, not hand-carved" {
# serverAppConfigs-docs/index.md is regenerated from page frontmatter and
# every sub-index is synced against its siblings. A hand-edited row is how
# a page silently leaves the index, so regeneration must be a no-op. The
# vault is copied first: the seam never mutates the checkout.
local work="$BATS_TEST_TMPDIR/vault"
cp -r "$REPO_ROOT/serverAppConfigs-docs" "$work"
run "$REPO_ROOT/scripts/gen-vault-index.py" "$work"
[ "$status" -eq 0 ] || { echo "$output"; false; }
local stale=0 f rel
while IFS= read -r f; do
rel=${f#"$REPO_ROOT"/serverAppConfigs-docs/}
if ! diff -q "$f" "$work/$rel" >/dev/null; then
echo "stale index row(s) in $f -- run scripts/gen-vault-index.py"
diff "$f" "$work/$rel" | head -20
stale=1
fi
done < <(find "$REPO_ROOT/serverAppConfigs-docs" -name index.md -not -path '*/.AGENTTRASH/*' | sort)
[ "$stale" -eq 0 ]
}