test(catalog): flip red-nested-key -> green-nested-key (okr's checker converged)

okr closed patch-lane #2 (commit 35a0bb8): scripts/okf-check.mjs now reads
type: at root level only, so a type nested only in a sources[] entry no
longer passes as typed. Both implementations now agree the fixture's
concept is untyped, so the manifest's own note2 prediction ("flips to
'agree' only if okr scopes the checker's reader without touching inject")
has come true. Renamed the fixture (manifest key + corpus directory) to
match the red-*/green-* naming convention the parity unit test enforces,
and updated okf-frontmatter.mjs's header comment to match.

check-okf-parity.mjs: 10/10 fixtures pass. Full suite: 120/120.
This commit is contained in:
Kjell Tore Guttormsen 2026-08-09 20:49:32 +02:00
commit d2169a42c3
4 changed files with 11 additions and 10 deletions

View file

@ -7,12 +7,13 @@
// two have diverged and are no longer byte-identical (parity is the parity-gate's job,
// not this file's).
//
// SECOND, DELIBERATE DIVERGENCE (2026-08-01): the key is anchored at column 0 here, while
// okr keeps `^\s*key:`. That is not okr lagging — their reader is SHARED, and the nested
// match is load-bearing for their injector (lib/frontmatter.mjs:7-9 -> inject:69). A
// conformance checker needs the opposite: §4.1's keys are top-level, and `sources[]`
// entries carry their own `resource`/`title`/`type`. Pinned as parity fixture
// `red-nested-key`.
// SECOND DIVERGENCE, NOW CLOSED ON OKR'S CHECKER SIDE (2026-08-01, converged 2026-08-09):
// the key is anchored at column 0 here. okr's shared reader (lib/frontmatter.mjs) still
// keeps `^\s*key:` — that lookup remains load-bearing for their injector
// (lib/frontmatter.mjs:7-9 -> inject:69) — but okr's patch-lane #2 (commit 35a0bb8) scoped
// their CHECKER's caller (okf-check.mjs) to root-level fields only, so the two checkers now
// agree: §4.1's keys are top-level, and `sources[]` entries carry their own
// `resource`/`title`/`type`. Pinned as parity fixture `green-nested-key`.
const FM_RE = /^---\n([\s\S]*?)\n---/;