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
56 lines
4 KiB
JSON
56 lines
4 KiB
JSON
{
|
|
"_doc": "Expected per-fixture parity outcome for check-okf-parity.mjs. The runner COMPARES actual vs this expectation; it does not judge the fasit. 'diverge' fixtures are the red-proof: the gate MUST go red on them, else the gate itself is broken. Axes are catalog-owned (trinn F D4), spec-adversarial, defined over DEFAULT read-mode (strictIngest OFF).",
|
|
"fixtures": {
|
|
"green-baseline": {
|
|
"axis": "baseline",
|
|
"expected": "agree",
|
|
"note": "Clean UTF-8/LF conforming bundle. Sanity anchor: proves the gate is not red-on-everything."
|
|
},
|
|
"red-byte-bom": {
|
|
"axis": "byte",
|
|
"expected": "diverge",
|
|
"note": "Concept file with UTF-8 BOM + CRLF that HAS type: -> catalog's /^---\\n/ fence misses the BOM (falsely untyped), okr normalizes (frontmatter.mjs:23) and reads the type. Diverges on the untyped-set with an IDENTICAL count (the 'agree OK / disagree on members' case)."
|
|
},
|
|
"red-tree-innboks": {
|
|
"axis": "tree",
|
|
"expected": "diverge",
|
|
"note": "innboks/ drop-zone with a raw frontmatter-less file -> catalog walks it and counts it a concept, okr skips innboks (okf-check.mjs:37-39). Diverges on conceptCount + untyped-set."
|
|
},
|
|
"red-tree-dotdir": {
|
|
"axis": "tree",
|
|
"expected": "diverge",
|
|
"note": ".hidden/ dot-dir with an untyped .md -> catalog descends, okr skips dot-dirs. Diverges on conceptCount + untyped-set."
|
|
},
|
|
"red-combined": {
|
|
"axis": "byte+tree",
|
|
"expected": "diverge",
|
|
"note": "The record's canon fixture (svar-catalog.local.md:48): a BOM+CRLF typed concept AND an innboks/ raw file in one bundle -> catalog FAIL(2 untyped) vs okr OK(0 untyped), opposite exit codes. Byte and tree axes each carry their own red proof."
|
|
},
|
|
"green-hierarchical": {
|
|
"axis": "tree-hierarchical",
|
|
"expected": "agree",
|
|
"note": "okr's added requirement (trinn-e-analyse:277): subdir pointers, per-level index.md, a cross-level body relation. No adversarial trigger -> both walk the hierarchy identically. Guards against a corpus that is accidentally flat."
|
|
},
|
|
"green-nodemodules": {
|
|
"axis": "tree",
|
|
"expected": "agree",
|
|
"note": "SHARED GAP, pinned deliberately: an untyped .md inside node_modules/. BOTH catalog and okr descend into it (okr's isWalkableDir skips only dot-dirs + innboks, not node_modules). They agree today; flagged here for future hardening of both walkers."
|
|
},
|
|
"green-dupname": {
|
|
"axis": "tree",
|
|
"expected": "agree",
|
|
"note": "Same basename (note.md) at two sibling levels -> both impls key on the full relative path, no basename-collapse. Guards the path.name-collapses-hierarchy class."
|
|
}
|
|
},
|
|
"coveredByRuntimeTests": {
|
|
"_doc": "These axes are git/FS-hostile as committed files on macOS, so they live as runtime-materialized meta-tests in check-okf-parity.test.mjs (temp dir), not in this committed corpus.",
|
|
"symlink": "Symlinked .md, symlinked dir, and a symlink loop -> both impls skip symlinks (Dirent isFile/isDirectory are false), no crash/hang. Materialized because a committed symlink degrades to a plain path-string file where core.symlinks=false.",
|
|
"nfc-nfd-filename": "Precomposed (NFC) vs combining (NFD) filename bytes. platform-sensitive + soft-gated: git core.precomposeunicode normalizes NFD->NFC on macOS checkout, so the divergence cannot be pinned as a committed filename. The test logs if the FS normalized it away and does not hard-fail on this axis alone."
|
|
},
|
|
"withdrawn": {
|
|
"verbatim-trailing-newline": "Trinn E §1 (svar-catalog.local.md:742) withdrew it: linkedin-studio's newline-free serializer applies to ingest/published/, which is excluded from the OKF bundle by design; brain/ files DO get \\n. Re-classified a writer-parameter, not a form axis."
|
|
},
|
|
"outOfScope": {
|
|
"sti-former": "Path-forms (~-expansion, Windows separators, plugin-root anchoring). Trinn E (authoritative over STATE) does not re-list it in the D4 axis enumeration; folded into the §1.2 resolution-order spec text -> STEG 5 discovery convention, not the STEG 3 parity corpus."
|
|
}
|
|
}
|