Skip to content

feat(core): Slice 0 — core-runtime ↔ ReferenceRunner parity probe (th…#453

Merged
cukas merged 2 commits into
mainfrom
feat/core-parity-slice0
Jun 19, 2026
Merged

feat(core): Slice 0 — core-runtime ↔ ReferenceRunner parity probe (th…#453
cukas merged 2 commits into
mainfrom
feat/core-parity-slice0

Conversation

@cukas

@cukas cukas commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

…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

What

Why

How

Checklist

  • tsc -b passes
  • pnpm test passes
  • pnpm test:kern passes
  • pnpm lint passes
  • kern review packages/ --recursive checked

KERN-Agon and others added 2 commits June 19, 2026 17:23
…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>
@cukas cukas merged commit a6f3197 into main Jun 19, 2026
4 checks passed
@cukas cukas deleted the feat/core-parity-slice0 branch June 19, 2026 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants