Fix GoldenPath CI and add arithmetic and boolean agg functions#30
Open
trevornelson wants to merge 9 commits into
Open
Fix GoldenPath CI and add arithmetic and boolean agg functions#30trevornelson wants to merge 9 commits into
trevornelson wants to merge 9 commits into
Conversation
trevornelson
commented
Feb 12, 2026
| fold_inline: "= $0.none?" | ||
| identity: | ||
| boolean: false | ||
| finalize: "= !$0" No newline at end of file |
Author
There was a problem hiding this comment.
finalize was needed so that none? could be calculated correctly when the function is used as an accumulator.
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.
Summary
AUTOLOADERinto theKuminamespace and explicitly ignoringgolden_schema_modules.rbround,floor,ceil,between?, andnone?with Ruby and JavaScript kernelsfinalizesupport to allow reducers whose final result differs from their accumulator (used bynone?which accumulates with OR then inverts)fold_inlineto boolean aggregate kernels (any,all,none) to fix "Can't fold - no template defined" error when these reducers are applied to collection typesAutoloader fix
The top-level
AUTOLOADERconstant caused Zeitwerk namespace errors in CI. I moved it inside the Kumi namespace and added an explicit ignore forgolden_schema_modules.rb, which is now loaded viarequire_relativeonly when golden tests are invoked.New functions
round(value, precision)floor(value)ceil(value)log(value)between?(value, lo, hi)none?(source_value)Kernel finalize step
The
none?reducer accumulates the same way asany?(boolean OR), then inverts the result. To support this, afinalizeattribute was added to the kernel schema. During codegen,emit_loadaccumulatorin both Ruby and JS emitters now checks for afinalizetemplate and applies it to the accumulator before assigning the output.Boolean aggregate fold_inline
When a reduce function is called on a collection type (tuple), the compiler generates a
FoldLIR instruction.emit_foldrequires afold_inlinetemplate on the kernel. The numeric aggregates (sum,min,max,count) already had this, but the boolean aggregates did not, causing a runtime error. Addedfold_inlinefor all three boolean aggregates.