Repository navigation
[codex] Fix selector, initializer, and output-history regressions - #220
Merged
Merged
Conversation
Contributor
Benchmark Results (Julia v1.12.1)Time benchmarks
Memory benchmarks
|
VEZY
marked this pull request as ready for review
September 18, 2026 20:09
VEZY
referenced
this pull request
Sep 19, 2026
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.
This fixes incorrect source selection and output history in
CompositeModelsimulations. An explicitMany(..., application=:foo)could include another application's values, while adding a consumer with a longer temporal window could silently truncate its calculation. The same review also found incorrect newborn initializer bindings, shared relation bindings, ambiguous mixed-type ID ordering, and mutable output-request history.The compiler now filters local and distributed producers using current object/application membership, including pending newborns. Filtering is preserved when objects are added or reparented; unfiltered selectors still support a mixture of modeled and supplied values. Positional
Relation(...)selectors keep bindings specific to their consumer, and mixed-type object IDs are ordered consistently without conflating identities that print alike. Initializer lookup indexes all pending additions incrementally, including fully initialized sources registered without an initializer call.Temporal buffers grow in place when a new consumer needs more history, preserving shared references and the samples still available. Bounded history retains the preceding publication across sparse cadences. Output requests snapshot their initial mutable values on entry and reentry, so continuation cannot rewrite earlier rows. Growing a buffer cannot restore samples already discarded before the new consumer appeared.
Regression tests cover all eight reviewed cases, including application/process filters, unrelated distributed outputs, dynamic additions, positional/keyword relations, numeric/symbol IDs, wrapped buffers, fractional clocks, continuation, and selector reentry. The changelog describes the corrected behavior.
Validation on the final commit with Julia 1.12.1 and the repository's test environment: 1,436 / 1,436 assertions passed across the multirate, object-ID, API-stabilization, Many-filter, initializer, BoundMany, output-boundary, and PreviousTimeStep-view test files. The Kaimon wrapper encountered an output-restoration error after Julia printed the successful test summary; there were no test failures in that run.
git diff --checkpasses.An earlier complete local run finished with 5,818 passing assertions, three failed assertions in fixtures relying on the old selection/ordering behavior, and one missing initial value in the new PreviousTimeStep fixture. Those fixtures were corrected and passed in the final focused run above. A clean full-suite result for the final commit remains pending in CI.