test(okf): add running n-way per-file parity gate + adversarial corpus (STEG 3)
Make OKF §3 checker parity a RUNNING per-file red/green signal instead of a
stale one-shot claim. The catalog and okr checkers provably diverge on the same
input (catalog walks everything + no BOM/CRLF norm; okr skips innboks/dot-dirs +
normalizes); this gate turns that divergence into a monitored, tested fact.
- scripts/check-okf-parity.mjs: n-way runner, zero-dep. Normalizes each impl's
existing checkBundle(root) return to {conceptCount, untyped[], okfVersion} and
compares per file over default read-mode. Impl registry is availability-guarded
so a catalog-only checkout degrades gracefully; a documented subprocess seam
awaits llm-ingestion-okf's Python checker (fase 2) + Node port (fase 4).
- test/okf-parity-corpus/: committed byte-exact adversarial corpus + manifest.
Red-proof fixtures (expected: diverge) the gate MUST go red on — byte axis
(BOM+CRLF) and tree axis (innboks, dot-dir) each carry one; canon = both.
.gitattributes -text pins the BOM/CRLF bytes. Green fixtures pin agreement
incl. a SHARED gap (both descend into node_modules).
- check-okf-parity.test.mjs: 8/8. Corpus assertions + byte-tracking red-proof +
runtime-materialized symlink/NFC-NFD meta-tests + graceful-skip seam.
Honest scope: only 2 impls expose a runnable per-file checker today, so the gate
runs 2-way and is architected n-way — no faked third impl, no cross-repo code.
spec §7 + log.md updated (no self-certified parity; fixes stay upstream-first).
Verified: parity 8/8, CLI exit 0; regression 33/33; check-versions 10 OK.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NeK9hkxrU9wFPBYGYnSV1V
This commit is contained in:
parent
3be4321a79
commit
09521f8f2d
31 changed files with 531 additions and 10 deletions
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
title: hidden untyped
|
||||
---
|
||||
# no type
|
||||
3
test/okf-parity-corpus/red-tree-dotdir/index.md
Normal file
3
test/okf-parity-corpus/red-tree-dotdir/index.md
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
okf_version: 0.1
|
||||
|
||||
# Bundle root
|
||||
8
test/okf-parity-corpus/red-tree-dotdir/typed.md
Normal file
8
test/okf-parity-corpus/red-tree-dotdir/typed.md
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
type: Note
|
||||
title: A concept
|
||||
description: A typed concept file.
|
||||
resource: about
|
||||
timestamp: 2026-07-23
|
||||
---
|
||||
# Note
|
||||
Loading…
Add table
Add a link
Reference in a new issue