feat(okf): enforce §3 okf_version shape, bump convention 0.1 -> 0.2
The 2026-07-23 reservation said enforcement waits until "the emitters have
migrated". Measured rather than assumed, and the emitter set turned out to be
TWO, not three:
okr @0059da7 okf_version: 0.1 + okf_layout: kb-layout-2026-06. Migrated.
linkedin-studio scaffold.ts:38 -> okf_version: 0.1. Never carried a layout
string; has no okf_layout and needs none.
ms-ai-architect NOT an emitter. Zero index.md in the repo; okf_version
appears in one planning doc. The status table already said
"designed, not built" -- only the word "emitters" implied it.
Swept the whole marketplace plus the sibling consumer repos: every live
okf_version value is 0.1. The flip is a no-op today and locks the invariant.
The gate checks SHAPE (/^\d+(\.\d+)*$/), never membership: the upstream value
set is Google's (spec §12), so a bundle targeting a newer version passes. A
membership check would be the convention claiming a set it says it does not own
-- the over-reach class this round has corrected three times. Presence stays
unenforced (reported, not failed) as a separate §3 MUST.
Convention bumped 0.1 -> 0.2 by this log's own criterion: the set of conforming
bundles changed (the spec explicitly said a layout string "conforms today", and
rollout rule 6 defines conformance as gate output). The §12 per-plugin re-check
is pre-measured as finding zero violations.
Also closes a parity blind spot found while landing this: check-okf-parity
compared the okf_version VALUE, which is identical exactly when two impls
disagree about whether it is acceptable -- a false "agree" on the axis the gate
exists to watch. The signature now carries a boolean shape verdict, with
red-marker-layout as the committed red proof. Its "diverge" expectation encodes
okr's lag (they still pure-echo) and flips to "agree" when they mirror it.
And a correction the round earned: portfolio-optimiser enumerated their own
bundle surface and it is four, not three. The dormant fourth
(reference_domain.py:49 -> package data at :70) has no flag form at all, so our
published claim that the re-measurement surfaced "one" unreported entry was
itself one-of-two. Sharpens the standing rule: a search shaped like one entry
type cannot see another; install-vs-fixture is one instance, not the class.
Suite 73 -> 78. coord: PO replied, okr + llm-ingestion-okf notified (the latter
under the standing promise to flag any okf-check.mjs change).
This commit is contained in:
parent
3dad1f51ce
commit
6a72b26985
9 changed files with 227 additions and 11 deletions
|
|
@ -16,7 +16,8 @@
|
|||
//
|
||||
// CONTRACT: comparison unit is the PER-FILE outcome, not the bundle verdict — two
|
||||
// checkers can both say "OK" while disagreeing on what IS a concept file. Each impl's
|
||||
// existing checkBundle(root) return is normalized to { conceptCount, untyped[], okfVersion };
|
||||
// existing checkBundle(root) return is normalized to
|
||||
// { conceptCount, untyped[], okfVersion, okfVersionAccepted };
|
||||
// the gate diverges iff those normalized outcomes are not identical across the
|
||||
// available impls. Defined over DEFAULT read-mode (strictIngest OFF, not files-scoped).
|
||||
//
|
||||
|
|
@ -59,12 +60,19 @@ export async function normalizedOutcome(impl, root) {
|
|||
conceptCount: r.scanned,
|
||||
untyped: [...(r.missingType ?? [])].sort(),
|
||||
okfVersion: r.okfVersion ?? null,
|
||||
// spec §3 marker axis. Normalized to a BOOLEAN verdict, not the message: two impls that
|
||||
// both enforce must agree even if they word the rejection differently. An impl that does
|
||||
// not check at all reports no error, i.e. "accepts" — which is exactly the signal we want
|
||||
// when one enforces and another still pure-echoes.
|
||||
okfVersionAccepted: !(r.okfVersionError ?? null),
|
||||
};
|
||||
}
|
||||
|
||||
// Signature over the fields that define per-file parity. Distinct signatures => divergence.
|
||||
// The okf_version VALUE alone could not carry the marker axis: when impls disagree about
|
||||
// whether a value is acceptable, the value itself is identical, so the axis read as "agree".
|
||||
function signature(o) {
|
||||
return `${o.conceptCount}|${o.untyped.join(',')}|${o.okfVersion}`;
|
||||
return `${o.conceptCount}|${o.untyped.join(',')}|${o.okfVersion}|${o.okfVersionAccepted}`;
|
||||
}
|
||||
|
||||
// Run all impls on one bundle root; decide agree vs diverge among the comparable ones.
|
||||
|
|
@ -145,7 +153,10 @@ if (isMain) {
|
|||
r.status === 'PASS' && r.expected === 'diverge' ? 'PASS (red-proof)' : r.status;
|
||||
out.push(`${r.fixture.padEnd(22)} [${(r.axis || '').padEnd(16)}] expect=${(r.expected || '').padEnd(8)} ${tag}`);
|
||||
for (const o of r.outcomes ?? []) {
|
||||
out.push(` ${o.name.padEnd(10)} count=${o.conceptCount} untyped=[${o.untyped.join(', ')}] okf=${o.okfVersion}`);
|
||||
// The shape verdict is printed because the value alone cannot show this axis: on a
|
||||
// marker divergence both impls print the SAME okf= value and only the verdict differs.
|
||||
const verdict = o.okfVersionAccepted ? 'accepted' : 'REJECTED';
|
||||
out.push(` ${o.name.padEnd(10)} count=${o.conceptCount} untyped=[${o.untyped.join(', ')}] okf=${o.okfVersion} (${verdict})`);
|
||||
}
|
||||
if (r.skipped?.length) out.push(` (skipped, unavailable: ${r.skipped.join(', ')})`);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue