Feat/runner native decimal slice2#442
Merged
Merged
Conversation
…acle (RED-at-base spec) The discriminating 3-leg oracle for runner-native Decimal Slice 2: the runner (referenceRun) becomes the THIRD leg for the COMPARATORS (eq/ne/lt/lte/gt/gte → bool, cmp → int -1|0|1) and VARIABLE Decimal operands, asserting refOut === tsOut === pyOut byte-exact (operands stay within the Slice-1 producer surface of/add/mul; the slice-3 test already proves ts===py for comparators). RED-at-base for the right reason: 25 comparator/variable-operand cases fail because the runner ABSTAINS today (Decimal.eq is an unknown member-call → Preconditions failed); 5 abstain/defensive guard-rails already pass. The composability cases (Decimal.cmp(...) + 1, Decimal.eq(...) ? "Y" : "N") prove the comparator result is a genuine portable scalar the evaluator carries downstream. This is the SPEC for the runner implementation (next commit). Emitters untouched. ⚔️ Forged by [Agon](https://github.com/KERNlang/agon) Co-Authored-By: agon (KERN) <292465531+KERN-Agon@users.noreply.github.com>
…s, +round-trip/symmetry fixtures) agon impl-review (full roster, kimi winner conf 0.86) found NO correctness blockers — the three "blocking" items resolved to safe-or-coverage: #1 the comparator throw is already caught by the expression-v1 precondition try/catch (green runtime_abstain tests prove the clean abstain); #2 the variable round-trip is correct (-0 ≡ 0 in value compare on all legs; precision-28 is lossless); #3 no current false-admit. Applied the worthwhile hardening + coverage: - portable-scalar: EMPTY_DECIMAL_ENV (a shared module-level mutable Map) → a freshDecimalEvalEnv() factory, so the default env can never leak across evaluations. - docs: isCanonicalDecimalLiteralFailure rationale (the DECIMAL_SCALE_FAILCLOSE prefix is unique + slice-1's fail-close test guards a reword); isDecimalExpression invariant now states the variable-operand binding error the precondition routes to abstain (the ident over-accept is fail-SAFE, never a divergent value). - oracle: +variable-bound computed signed-zero (eq+cmp == "0"/"true"), +variable-bound precision-28 round-trip (cmp == 0), +operand-order symmetry, +cmp-result-fed-as-a-Decimal-operand ABSTAINS. Out of scope (noted): the shadow guard's flat env.bindings.has("Decimal") matches slice-1's existing check (pre-existing, not new); div/mod/pow producer breadth is runner-slice-3. Gate: build + slice-2 (incl. new fixtures) + slice-1 + slice-3 + ir-semantics + browser-spine pin (exactly 5 typescript importers) all GREEN. Emitters untouched. ⚔️ 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.
What
Why
How
Checklist
tsc -bpassespnpm testpassespnpm test:kernpassespnpm lintpasseskern review packages/ --recursivechecked