octobot/OKF/learnings/validators.md
Lukasz Boryn 38eae57e6f refactor(lints): walk only what git does not ignore
link-check and render-check each held a byte-identical pages() that
walked the filesystem, so gitignored HANDOFF.md could redden a repo-wide
gate — 024 had to carry "clear HANDOFF.md first" as a run condition, and
a handoff had to be written link-free.

Both now import a shared pages() from _pages.py, whose census comes from
git ls-files --cached --others --exclude-standard: tracked plus
untracked-but-not-ignored is exactly not-ignored, so a page is walked
before it is ever added. Where git cannot answer — not a repo, no git on
PATH — the walk falls back to the old rglob rather than shrinking to
nothing, and the catch is narrow so an unnamed git failure still
surfaces.

023 and 019 each state the old walk in their Contract, so both take
superseded-by-026; their Contract and Verify are untouched, per 022.
023 also cited the docstring the walk moved out of, so that cite follows
it to _pages.py — a cite is a working pointer at every status, per 022 —
and _pages.py words that docstring on one line, because a cite symbol
that wraps never resolves.

026 passed its muster gate (matches: yes) and flips to implemented. Its
Justification loses three lines to fit the tally: block; its Contract and
Verify are byte-identical.

blueprint 026
2026-07-31 16:53:11 +02:00

2.1 KiB

type, purpose, answers, cites, status
type purpose answers cites status
Learnings Keep what the check scripts turned out to see, and what their parsers are blind to.
What did we get wrong about the OKF check scripts?
skills/loop/write-OKF/scripts/okf-check
live

octobot — learnings: the validators

  • Believed: a marker-shape check can match its markers anywhere in the page. True: octobot's own blueprint 004 documents the okf:derived markers, so an unanchored match read them as a third fence and failed the repo's own OKF. A delimiter must be anchored to its whole line, or the page that specifies it becomes invalid. Source: weave of blueprint 004.
  • Believed: okf-check can read a new nested frontmatter block (like tally:) through its generic frontmatter() parser. True: that parser flattens a nested block to an empty list — its indented key: value lines match neither its list nor its scalar branch — so a block check needs a dedicated regex grab, the way pin() handles sealed:. Source: weave of blueprint 011.
  • Believed: a lint that proves three renders byte-identical protects the rendered shape. True: it proves identity only. A rename inside the box-drawing block shifts every copy the same way, so a name that shortens by two columns leaves the right-hand column and its arrows misaligned in all three at once and the check still passes. Re-pad the trailing columns by hand. Source: rig of B-024.
  • Believed: superseding a blueprint costs one status word, so extracting shared code cannot touch the page it supersedes. True: a cites: symbol is a substring of a named file, so moving the cited lines into a new helper breaks the cite — okf-check went red on B-023 for a docstring that had moved to _pages.py, after the diff was already sealed. Per B-022 a cite is a working pointer at every status, so the pointer follows the symbol. Repointing has a trap of its own: the phrase wrapped across two lines in its new home, and a wrapped symbol never resolves, so the obvious repoint stays red. Source: rig of B-026.