Commit graph

2 commits

Author SHA1 Message Date
9947da9edc fix(wiki-lint): make check 2 actually work + parse ledger
Some checks failed
CI / rust (pull_request) Has been cancelled
CI / markdown (pull_request) Has been cancelled
CI / port (pull_request) Has been cancelled
CI / agent-jail-pkgs (pull_request) Has been cancelled
The 'resurrected old names' check was non-functional: it ran in a pipeline
subshell (fail/pass counts and --strict exit were lost), accumulated hit files
with literal \\n (so the per-file filter never matched), and hardcoded the old
names — already stale (missing usb_nodes, the rename that motivated this).
Planting hermes-agent + usb_nodes + COLIBRI_AUTOSPAWN_PI in a source file
passed clean under --strict.

Rewrite:
- Parse old names from the Shipped table of naming-decisions.md (self-updating;
  no hardcoded list to rot).
- Loop in the main shell (read from a file) so counters and --strict propagate.
- xargs grep -nHF across the file list; filter legit contexts case-insensitively
  (migration/rename/back-compat/alias/changelog) so the serde alias and the
  setup-mother migration code don't false-positive.
- Move usb_nodes → hive_nodes from In-flight to Shipped (colibri #161 merged) so
  it is now enforced.

Verified: clean run exits 0 (PASS 37); planting hermes-agent/usb_nodes/
COLIBRI_AUTOSPAWN_PI now FAILs and --strict exits 1. Fixed a serde-alias
false-positive (multi-line attribute). sh -n + markdown gate green.
2026-06-24 10:35:39 +02:00
77061e4510 feat(wiki): deterministic wiki-lint — pilot step 2
Three checks (no LLM, CI-friendly, portable /bin/sh):

1. Dangling references — every file path cited in docs/wiki/*.md
   must exist (short names resolved via find fallback). Skips
   cross-repo paths (clawdie-iso/*), example paths (path/to/*),
   and wiki-documented absences (ADR-agent-harness-consolidation.md).

2. Resurrected old names — the five "Shipped" renames from
   naming-decisions.md must not reappear in code outside the wiki.
   Filters out legitimate migrations (setup-mother.sh sed line,
   lib.rs #[serde(alias)]) and SQL migration boilerplate.

3. Orphan pages — every docs/wiki/*.md is linked from index.md.

Advisory by default (exit 0); --strict gates with non-zero exit.
Added to AGENTS.md alongside ci-checks.sh.

FreeBSD-portable: find-based file discovery instead of GNU greps
--exclude-dir; temp files instead of process substitution.
2026-06-24 10:25:42 +02:00