feat(core): Slice 0 — core-runtime ↔ ReferenceRunner parity probe (th…#453
Merged
Conversation
…in adapter)
The first cross-check of KERN's two disjoint TS interpreters: core-runtime
(the product tree-walking interpreter) and ReferenceRunner (the differential
oracle). A THIN adapter reduces both legs to the same CoreFixtureValue through
EXISTING serializers (kernValueToCoreFixtureValue on core; the assign-event
value on reference) — no invented semantics — proving the parity gate is viable
for the scalar surface (the class/value-model unification stays deferred).
The gate immediately earns its keep: it surfaces a BIDIRECTIONAL divergence map
across 4 honest buckets —
- AGREE: arithmetic, same-type comparison, concat, short-circuit, templates,
String() coercion, -0 preservation, JS remainder sign (-5 % 3 = -2).
- DIVERGENCE (core accepts, reference abstains): cross-type (in)equality
(1 === "1" -> core false, matching the emitted TS/Py legs; reference throws
on un-same-typed operands), bitwise (5 | 0, ~5).
- REVERSE-DIVERGENCE (reference accepts, core rejects): truthiness ! over a
non-boolean (!"" -> reference true; core's ! is boolean-only).
- BOTH-REJECT: strict + mixed, /0, %0, cross-type comparison, **, non-finite
(Infinity / NaN sources refused — KERN numbers are finite-only).
Helper hardened per agon review (agy/codex/kimi consensus): only the engines'
genuine reject paths are caught — a probe-side serializer or trace-shape failure
now propagates loudly instead of masquerading as a language reject, so the gate
can never silently report false parity. A missing/non-assign first event throws
rather than returning an ambiguous { ok: true, value: undefined }.
51 tests green. Helper is thin (no per-fixture / per-value-kind branching).
⚔️ Forged by [Agon](https://github.com/KERNlang/agon)
Co-Authored-By: agon (KERN) <292465531+KERN-Agon@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…in adapter)
The first cross-check of KERN's two disjoint TS interpreters: core-runtime (the product tree-walking interpreter) and ReferenceRunner (the differential oracle). A THIN adapter reduces both legs to the same CoreFixtureValue through EXISTING serializers (kernValueToCoreFixtureValue on core; the assign-event value on reference) — no invented semantics — proving the parity gate is viable for the scalar surface (the class/value-model unification stays deferred).
The gate immediately earns its keep: it surfaces a BIDIRECTIONAL divergence map across 4 honest buckets —
Helper hardened per agon review (agy/codex/kimi consensus): only the engines' genuine reject paths are caught — a probe-side serializer or trace-shape failure now propagates loudly instead of masquerading as a language reject, so the gate can never silently report false parity. A missing/non-assign first event throws rather than returning an ambiguous { ok: true, value: undefined }.
51 tests green. Helper is thin (no per-fixture / per-value-kind branching).
⚔️ Forged by Agon
What
Why
How
Checklist
tsc -bpassespnpm testpassespnpm test:kernpassespnpm lintpasseskern review packages/ --recursivechecked