Repository navigation
Conversation
XN137
reviewed
Nov 11, 2026
| if (astIss.hasIssues()) { | ||
| throw new ScriptCreateException("check failed", astIss.getIssues()); | ||
| } | ||
| ast = astIss.getAst(); |
Contributor
There was a problem hiding this comment.
codex finding:
- [P2] Checked planning changes membership results in ScriptHost — ScriptHost.java:136. Using the checked AST enables constant-set optimization by default. For example, dyn(1.0) in [1] previously returned true through CEL numeric equality; it now reaches EvalSetMembership, whose type-name check rejects double versus int, causing ScriptExecutionException. The set optimization needs to preserve list-membership semantics before enabling it for existing scripts
| }; | ||
| } | ||
|
|
||
| static Interpretable maybeOptimizeConstUnary(Interpretable i, InterpretableCall call) { |
Contributor
There was a problem hiding this comment.
codex finding
- [P2] Optimizer extraction removes public methods — InterpretableDecorator.java:107–110. The removed maybeOptimizeConstUnary and maybeOptimizeSetMembership methods were implicitly public interface methods with public parameter types. Existing callers will fail compilation or encounter NoSuchMethodError. Keep forwarding methods delegating to BuiltInOptimizer to preserve compatibility.
if it used to be part of the public and we remove it intentionally, we might want to call it out in PR description
Evaluate eligible checked scalar expressions without intermediate `Val` wrappers. Preserve established fallback for incompatible adapters, overloads, and decorators; compose native islands with built-in constant folding and retain differential, root-shape, policy, and public API coverage. `ScriptHost` now plans from the checked AST, enabling checked-expression optimizations. Constant-list membership preserves CEL numeric equality, including mixed numeric types and NaN behavior. Existing public optimizer helper methods remain available as forwarding methods, preserving source and binary compatibility.
snazy
force-pushed
the
native-scalar-planning
branch
from
November 11, 2026 10:05
e91750b to
e4ed978
Compare
Member
Author
|
Good findings! Addressed in the commit. |
XN137
reviewed
Nov 11, 2026
| boolean selectTruthy = selectTruthy(activation); | ||
| try { | ||
| return selectTruthy ? truthy.evalBoolean(activation) : falsy.evalBoolean(activation); | ||
| } catch (ValueSignal valueSignal) { |
Contributor
There was a problem hiding this comment.
more codex finding:
- [P2] Preserve exception handling in native conditionals — NativeScalarNodes.java:806–812. Native conditionals catch only ValueSignal, whereas the established EvalAttr converts all evaluation exceptions into CEL errors. With b=true and s=StringT.stringOf(null), (b ? s == 'value' : false) || true previously returns true: the conditional converts the comparison’s NullPointerException into an error, which || true suppresses. Native evaluation instead throws an internal-error exception. Preserve the exception conversion around both the condition and selected branch.
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.
Evaluate eligible checked scalar expressions without intermediate
Valwrappers. Preserve established fallback for incompatible adapters, overloads, and decorators; compose native islands with built-in constant folding and retain differential, root-shape, policy, and public API coverage.ScriptHostnow plans from the checked AST, enabling checked-expression optimizations. Constant-list membership preserves CEL numeric equality, including mixed numeric types and NaN behavior.Existing public optimizer helper methods remain available as forwarding methods, preserving source and binary compatibility.