Repository navigation
engine: close array gaps - #390
Conversation
Add promote_active_dim_ref field to Context to distinguish between reducer builtins (SUM, MEAN, MIN, MAX, SIZE, STDDEV) and array-producing vector builtins (VectorSortOrder, VectorElmMap, VectorSelect, AllocateAvailable). Reducers use with_preserved_wildcards() which keeps promote_active_dim_ref=false, so ActiveDimRef subscripts resolve to concrete element offsets. This means SUM(matrix[DimA, *]) inside an arrayed variable iterating over DimA correctly sums each row independently rather than the entire matrix. Vector builtins use the new with_vector_builtin_wildcards() which sets promote_active_dim_ref=true, preserving the existing behavior where dimension references like vals[DimA] keep their full array view.
Add flag_split_tests module to array_tests.rs verifying that: - Reducer builtins (SUM, MEAN) do NOT promote ActiveDimRef to Wildcard, so partial reductions like SUM(matrix[DimA, *]) sum per-row instead of the entire matrix. - Vector builtins (VECTOR SORT ORDER) DO promote ActiveDimRef so the full array view is available for sorting. Both interpreter and VM paths are tested for each case.
ArrayMax and ArrayMin previously returned NEG_INFINITY and INFINITY respectively for zero-size views (the init values passed to reduce_view). ArrayMean and ArrayStddev produced NaN incidentally via IEEE division by zero. This adds explicit size==0 guards to all four opcodes so they return NaN intentionally. ArraySum (returns 0.0) and ArraySize (returns 0) already handled empty views correctly.
array_mean returned 0.0 for empty arrays instead of NaN. array_stddev returned 0.0 for size==0 (conflated with the size<=1 guard). Min and Max single-arg handlers returned INFINITY and NEG_INFINITY respectively for empty arrays. All four now return NaN for zero-size views, matching the VM behavior and the mathematical convention that these operations are undefined on empty sets.
Two test suites covering the empty-view guard behavior: vm::empty_view_reduce_tests -- constructs a RuntimeView with dims=[0] and verifies reduce_view returns the correct init values, while the opcode guards return NaN for MAX/MIN/MEAN/STDDEV. Zero-element dimensions cannot currently arise through the model compilation pipeline but the guards protect against future edge cases. array_tests::array_reducer_tests -- model-level integration tests for all six reducers (SUM, SIZE, MEAN, MIN, MAX, STDDEV) verifying both interpreter and VM agree on non-empty arrays. Includes single-element STDDEV boundary case (size==1 should return 0.0).
The MEAN and STDDEV tests in empty_view_reduce_tests only asserted that view.size()==0 without actually exercising reduce_view or documenting what would happen without the size guard. Replace them with tests that call reduce_view to show the helper returns 0.0 for empty views, and add explicit assertions that explain why the guard is necessary: without it, ArrayMean would compute 0.0/0.0=NaN implicitly, and ArrayStddev would overflow on the usize(0)-1 divisor calculation. Also add interpreter_empty_view_tests, a new #[cfg(test)] module inside interpreter.rs that directly exercises array_mean, array_stddev, Min, and Max via a constructed ModuleEvaluator with a zero-element StaticSubscript expression. Zero-element dimensions cannot arise through the model compilation pipeline, so the tests build a minimal real Simulation (for valid module/sim references) and synthesize the StaticSubscript manually.
Add a bool as the 4th field of the Equation::Arrayed tuple variant to explicitly track whether an arrayed equation was derived from EXCEPT syntax during MDL conversion. This replaces the text-comparison heuristic that will be removed in the next commit. All existing construction sites default to false except those that represent known EXCEPT-derived equations in tests. The SourceEquation enum in db.rs is updated in parallel. No behavioral change yet -- the field is threaded through but not used for decision-making until the heuristic replacement.
…ult flag Set has_except_default to the value of has_except_eq when constructing Equation::Arrayed during MDL conversion. This means EXCEPT-derived equations now carry an explicit flag rather than relying on text comparison at parse time. Remove the should_apply_default_to_missing function entirely and use the has_except_default bool directly at the call site. The old heuristic compared each element's equation text against the default equation to guess whether the equation came from EXCEPT syntax -- this was fragile and could produce wrong results when override-style sparse arrays happened to have elements matching the default.
Threads the new has_except_default bool from Equation::Arrayed through protobuf and JSON serialization layers. Uses Option<bool> in both formats for backward compatibility -- absent means false. Includes round-trip tests for proto serialization verifying the flag survives encode/decode and that missing values default to false.
Three changes that together enable EXCEPT equations with mapped dimensions to compile and simulate correctly: 1. Extend find_matching_dimension to check dimension mappings after name-match and indexed-size-match. Adds has_mapping_to to the Expr2Context trait, implemented on ArrayContext via DimensionsContext. This prevents MismatchedDimensions errors for cross-dimension refs. 2. In build_element_context, resolve cross-dimension mapping substitutions using DimensionsContext::translate_via_mapping. When iterating k[DimA] at element A2 and the RHS references j[DimD], the converter now substitutes DimD with the element of DimD that maps to A2 (e.g., D1). 3. Fix has_except_default to only be true when EXCEPT equations coexist with separate override equations. Previously the flag was set for all EXCEPT equations, causing excepted elements with no override to incorrectly receive the default value instead of 0. 4. Un-ignore simulates_except and simulates_except2 integration tests which now pass. XMILE variants remain ignored (xmutil limitation). Also includes the generated schema update from the previous commit's hasExceptDefault JSON field addition.
When promote_active_dim_ref is true (inside array-producing builtins like VectorElmMap), subscripts that collapse all dimensions to Single (e.g. b[B1]) are promoted back to the full array by replacing Single ops with Wildcard. This matches Vensim semantics where b[B1] inside VECTOR ELM MAP means "full b array". Also suppresses MismatchedDimensions for partial collapses like d[DimA,B1] where the remaining view dimensions differ from the output dimensions -- expected when the source lives in a different dimension space.
renumber_opcode was missing match arms for VectorElmMap, VectorSortOrder, and AllocateAvailable opcodes. Their write_temp_id fields were not offset during fragment concatenation, so when multiple arrayed variables used these builtins, later variables wrote to temp slot 0 (clobbering earlier results) while LoadTempConst read from the correctly-renumbered slot and got uninitialized zeros. The vector_simple integration test is upgraded from interpreter-only to the full simulate_mdl_path (both interpreter and VM legs).
When Pass 1 hoists expressions from array reducer arguments (SUM, MEAN, etc.) into AssignTemp pre-computations, the hoisted expression may contain cross-dimension wildcards (e.g. c[*] with DimA in a DimB context). Two fixes: 1. AssignTemp lowering now uses with_preserved_wildcards() so that cross-dimension wildcards in hoisted subexpressions are preserved rather than erroneously matched against the outer active dimensions. 2. Positional size matching is skipped when preserve_wildcards_for_iteration is active, since the view describes what the reduction iterates over and is independent of the output dimensions. The vector.xmile comment is updated to reflect the partial progress: cross-dim subscripts, SUM wildcards, and AssignTemp wildcards are now handled, but y[DimA] = VECTOR ELM MAP(x[three], (DimA-1)) still fails in the VM incremental path and additional VECTOR SELECT cross-dimension patterns need compiler work.
…dimension mappings Extend the proto schema with default_equation on ArrayedEquation, a DataSource message on Compat, and a DimensionMapping message on Dimension. Update serde.rs to round-trip these fields (with backward compatibility for old protos that lack them) and refactor the four variable types to share compat_to_proto/compat_from_proto helpers. For XMILE, add DataSourceElement and MappingElement/MappingElem structs using simlin: vendor-extension elements. Fix serde rename annotations to use local names without namespace prefix, matching quick-xml's deserialization behavior. Remove validate_for_protobuf and validate_for_xmile guard functions since all previously-rejected constructs are now serializable. Convert the eight rejection tests to round-trip success tests and add a backward compatibility test for old protos.
Extends the MDL converter to resolve arrayed GET DIRECT CONSTANTS and GET DIRECT LOOKUPS by adjusting cell references per array element. When a variable is arrayed and its equation uses a GET DIRECT function, each element needs a different cell from the external data file. The element's 0-based position within its LHS subscript dimension determines the row/column offset applied to the base cell reference. Key semantics for GET DIRECT CONSTANTS cell adjustment: - Without star: first dim -> rows, second dim -> columns - With star: first dim -> columns, second dim -> rows (transposed) - For 3+ dimensions, only the last two participate in the 2D grid For GET DIRECT LOOKUPS, each array element reads from a different row while sharing the same x-column. Un-ignores directconst, directlookups, and directsubs integration tests. The directdata test remains ignored (requires ext_data feature).
Add "vector rank" to the BUILTINS set so the MDL classifier recognizes VECTOR RANK as a builtin function. Add the "vector rank" -> "RANK" rename in xmile_compat format_function_name so MDL equations using VECTOR RANK map to the existing Rank AST node.
VECTOR RANK(A, direction) assigns each element its ordinal position in the sorted order. direction=1 sorts ascending (smallest gets rank 1), direction=0 sorts descending. This matches the companion VECTOR SORT ORDER semantics already implemented. The implementation handles all four interpreter entry points: find_array_dims, eval_at_index, scalar eval, and bulk AssignTemp.
Add Rank opcode to bytecode, compiler codegen, symbolic IR, and VM. The opcode pops a direction scalar (1=ascending, 0=descending) and reads one view from the view stack. It writes each element's 1-based ordinal position in the sorted order to temp storage -- the inverse of VectorSortOrder which writes original indices in sorted position. Register Rank as an array-producing builtin in the compiler's A2A hoisting logic so it routes through AssignTemp like VectorSortOrder.
The Rank builtin was returning TodoArrayBuiltin during Expr3-to-Expr lowering in context.rs, preventing compilation entirely. Implemented proper lowering using with_vector_builtin_wildcards() for the array argument (matching VectorSortOrder pattern). Also added Rank to find_expr_array_view() so A2A hoisting computes the correct output dimensions. Added 14 unit tests covering ascending/descending ranking, named dimensions, ties, single elements, and interpreter/VM agreement.
When a range subscript produces fewer elements than the target dimension (e.g. source[1:3] assigned to a 5-element target), the compiler now emits NaN for out-of-bounds positions instead of reading past the range bounds. This requires two changes: 1. The positional size check in A2A context now allows range-originated view dimensions to be smaller than the target dimension. 2. After computing the relative offset within the range view, a bounds check emits Expr::Const(NaN) when the offset exceeds the view dimension size. The range_basic test expectations are updated from last-element-repeat to NaN fill semantics.
…ntext When a range subscript has dynamic variable bounds (e.g. data[start:end] where start and end are scalar variables), normalize_subscripts3 cannot resolve the bounds statically. In A2A context this previously fell through to dynamic subscript handling, which produced Range subscript indices that codegen rejects in scalar per-element context. For dynamic ranges in 1D A2A context, the compiler now emits a conditional per-element access: for each target element at 0-based index i, it computes the 1-based source index (start + i) and checks whether it falls within [start, end]. In-bounds elements produce a dynamic single subscript load; out-of-bounds elements produce NaN. The range_with_expressions test expectations are updated from the old last-element-repeat pattern to proper NaN fill, and the test now explicitly checks element values rather than using assert_interpreter_result. The complex_expression test (SUM(profit[*, Product.*])) already passes -- the parser and existing StarRange lowering handle qualified wildcards correctly.
Fix the transpose_and_slice test to use an intermediate transposed variable rather than the unsupported matrix'[1:3, *] syntax. The parser currently only handles subscripts on identifiers, not on arbitrary postfix expressions. Using an explicit intermediate (transposed[Col, Row] = matrix') followed by subscripting (result[SliceCol, Row] = transposed[1:3, *]) correctly exercises the transpose + range subscript chain. Also fix the test's expected dimensions and values: the original test declared result without dimensions and had incorrect expected values.
Add parent: Option<String> to datamodel::Dimension, enabling compute_subdimension_relation to handle Indexed/Indexed pairs. When a child indexed dimension declares a parent, the relation maps the child's elements to the first N positions of the parent. Updated across all serialization formats (protobuf, JSON, XMILE) with backward-compatible defaults (absent = None / empty string).
Remove #[ignore] from range_basic, range_with_expressions, transpose_and_slice, complex_expression, out_of_bounds_iteration_returns_nan, bounds_check_in_fast_path, and star_to_indexed_subdimension. All tests pass with the compiler changes from prior commits.
…ymmetry Document that VectorElmMap uses 0-based offset indexing while VectorSortOrder returns 1-based rank indices. This asymmetry reflects Vensim's original API design and was previously undocumented in the VM (issue #351). Also verified that #344 tests for multi-target positional mappings and mappings-takes-precedence-over-maps_to are passing.
Remove stale #[allow(dead_code)] from Opcode enum (all array opcodes are now emitted by codegen), ByteCodeContext fields (arrays, names), and dimensions.rs types/methods now reachable after close-array-gaps phases. Update the ByteCodeContext impl-block comment to explain why the builder methods remain suppressed (ByteCodeCompiler builds tables directly). Update tech-debt.md items 12 and 13: - dead_code: 58 -> 49 (removed 8 stale suppressions across bytecode.rs and dimensions.rs) - ignored tests: 36 -> 23 (close-array-gaps enabled 8 array_tests + 5 simulate.rs EXCEPT tests)
The comment claimed datamodel lacked parent mapping metadata for indexed subdimensions, but the `parent` field now exists and the test passes.
Reflects contract changes from the close-array-gaps branch: new VECTOR RANK builtin and Rank opcode, has_except_default flag on Equation::Arrayed and SourceEquation::Arrayed, Dimension.parent for indexed subdimension relationships, DimensionsContext.has_mapping_to() and Expr2Context has_mapping_to() trait method, split wildcard-preservation contexts (with_preserved_wildcards vs with_vector_builtin_wildcards), empty-view NaN semantics for array reducers, and simlin: XMILE vendor extensions for dimension mappings and EXCEPT metadata.
0e1f90a to
1db2cd0
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #390 +/- ##
==========================================
+ Coverage 76.39% 76.80% +0.41%
==========================================
Files 143 143
Lines 36233 36633 +400
==========================================
+ Hits 27680 28137 +457
+ Misses 8553 8496 -57 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0e1f90a582
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if let Some((direction, _)) = rest { | ||
| self.walk_expr(direction)?.unwrap(); |
There was a problem hiding this comment.
Honor or reject RANK's third argument
RANK is represented as Option<(direction, tiebreak)>, but this path drops the tiebreak argument (_) and emits an opcode that only consumes direction, so RANK(arr, dir, tie_break) silently behaves like RANK(arr, dir). That produces incorrect ranks whenever input values tie and callers rely on the third argument to disambiguate, and it is hard to detect because compilation succeeds instead of reporting unsupported arguments.
Useful? React with 👍 / 👎.
| let target_dim = &active_dims[0]; | ||
| let subscript = &active_subscripts[0]; |
There was a problem hiding this comment.
Match dynamic range index to the correct active dimension
This dynamic-range A2A fallback always derives the element position from active_dims[0]/active_subscripts[0]. For multi-dimensional active contexts, a 1D ranged source can correspond to a different active axis, so using index 0 computes the wrong offset and returns shifted/NaN-filled values for otherwise valid models (e.g., 2D targets where the ranged source aligns with the second dimension).
Useful? React with 👍 / 👎.
Code Review[P1] VM
|
Code Review: engine: close array gapsFindings[P1]
|
Code Review for PR #390: engine: close array gapsThis is a substantial PR covering array/subscript improvements across multiple subsystems. The changes are well-structured with good test coverage. I found one bug that affects production correctness. Findings[P1]
|
Fix GET DIRECT CONSTANTS offset computation to filter pinned (singleton) dimensions from element_offsets before passing to adjust_call_for_element. Previously, a variable like x[Region, B1, Product] where B1 is pinned would include the always-0 B1 offset, causing the last-two-offsets logic to use the wrong dimensions for row/col mapping. Fix MCP edit path to infer has_except_default from input shape: when both a default equation and per-element overrides are present, that is EXCEPT semantics and has_except_default must be true. Previously hardcoded to None, which caused EXCEPT defaults to be lost on MCP upserts. Add why-comments for promote_active_dim_ref usage explaining the shared semantic: inside array-producing builtins, source arrays may live in a different dimension space than the output. Document that the RANK tiebreak parameter (optional 3rd arg) is parsed but not yet implemented in codegen or VM.
acb47fb to
63e2d94
Compare
Code Review: PR #390 — engine: close array gapsThis is a large, well-structured PR that closes many array/subscript gaps. The implementation plans are thorough and the test coverage is strong. I found two bugs worth flagging: [P1]
|
SourceDimension was hardcoding parent: None in source_dims_to_datamodel, dropping indexed subdimension relationships through the salsa DB round-trip. Propagate the parent field through From and back. Arrayed GET DIRECT CONSTANTS variables were losing their data_source metadata because build_variable_with_elements used Compat::default(). Extract data_source from the first expanded equation's raw expression and set it on the constructed variable's compat field. Move conversion_tests to external db_conversion_tests.rs to keep db.rs under the 6000-line lint threshold.
Code ReviewReviewed the full diff across all changed source files (excluding docs and implementation plans). This is a large PR touching the compiler, VM, interpreter, serde/protobuf, XMILE, MDL converter, and AST layers. Areas Reviewed
FindingsNo bugs found. The changes are consistent and well-structured:
Overall CorrectnessCorrect. The patch should not break existing code or tests, and introduces no bugs that I can identify. The protobuf changes are backward-compatible with existing serialized instances. |
Add bounds check in positional dimension matching for vector builtins. When promote_active_dim_ref suppresses the MismatchedDimensions error, a source array with more dimensions than the output could panic with an out-of-bounds index instead of returning a proper compiler error. Change the proto Dimension.parent field from string to optional string for consistency with maps_to, so absent parent is distinguishable from empty string in serialized form.
Code ReviewI've reviewed the full diff across all 48 changed files. This is a large, well-structured PR that closes 12 issues with comprehensive test coverage. The protobuf schema changes are backward-compatible (additive FindingsNo bugs found that meet the review criteria. The changes are internally consistent and well-tested:
Overall Correctness VerdictCorrect. The patch is free of blocking bugs. Existing code and tests will not break. The protobuf and XMILE schema extensions are backward-compatible, the compiler flag split is logically sound, and all new functionality has corresponding tests. |
Legacy JSON files without the hasExceptDefault field would default to false, silently changing behavior for arrayed equations with a default equation. Old files relied on the default equation being applied when present; defaulting to false breaks that contract. Infer has_except_default from the presence of the default equation field when the explicit flag is absent: true if a default equation exists, false otherwise.
Code Review[P1] STDDEV uses different formulas in VM vs interpreterFile: The VM computes population standard deviation (divides variance by N: Overall Correctness VerdictNot fully correct. The STDDEV formula inconsistency between VM and interpreter is a real behavioral bug that will cause different simulation results depending on which execution path is used. All other changes (flag split, empty-view guards, RANK implementation, renumbering fix, serialization, dimension mappings) look correct and well-tested. |
Only serialize has_except_default when a default equation exists; the flag is meaningless without one and writing Some(false) for every arrayed variable broke round-trip expectations. This also fixes the interaction where omitting false + inferring true from equation presence would incorrectly fill EXCEPT-only elements on reload.
Code Review[P1]
|
Review cycle summaryFive review iterations addressed feedback from both codex and claude reviewers. Key improvements made during the review cycle: Correctness fixes:
Metadata preservation:
Code organization:
Tech debt tracked:
|
…nge dimension matching Three bugs flagged by PR reviewers: 1. Interpreter STDDEV used sample stddev (N-1 divisor) while the VM used population stddev (N divisor). Vensim's VSSTDEV uses population stddev, so the interpreter was wrong. Unified both to N divisor. 2. adjust_call_for_element preserved the original col field after computing an A1-style cell reference for 4-arg GET DIRECT CONSTANTS. Downstream, load_constant sees a non-empty col and overrides the column parsed from the A1 cell, silently discarding the column adjustment. Fixed by clearing col since the adjusted row_or_cell encodes both row and column. 3. Dynamic-range A2A fallback always used active_dims[0] to determine element position, which is wrong when the source dimension matches a later active dimension. For target[DimA, DimB] = data[start:end] where data is indexed by DimB, the code would use DimA's position instead of DimB's. Fixed by finding the matching active dimension.
|
@codex review |
Code Review: PR #390 — engine: close array gapsThis is a substantial PR (30 commits, ~8K lines of diff across Rust source) implementing 6 phases of array/subscript improvements. The changes span the compiler, interpreter, VM, serialization layers, and MDL converter. I reviewed the full diff with particular attention to correctness in the compiler context, execution engines, and serialization backward compatibility. FindingsNo blocking bugs found. The implementation is thorough, well-tested (2634 unit tests + 53 integration tests), and the architectural decisions are sound. The flag split, empty-view guards, and serialization extensions all follow clean patterns. Below are observations for the author's consideration: [P3]
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c089233a15
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| .collect(), | ||
| None, | ||
| arrayed.default_equation, | ||
| arrayed.has_except_default.unwrap_or(false), |
There was a problem hiding this comment.
Preserve EXCEPT semantics when proto flag is absent
This deserialization path defaults has_except_default to false whenever the field is missing, which breaks backward compatibility for older protobuf payloads that predate this field but still contain default_equation for EXCEPT-style sparse arrays. After this commit, those models load with apply_default_to_missing = false, so omitted elements no longer receive the default equation and simulation results change silently; the JSON loader already handles this legacy case by inferring from default-equation presence.
Useful? React with 👍 / 👎.
| let match_idx = active_dims | ||
| .iter() | ||
| .position(|ad| ad.name() == dim.name()) | ||
| .unwrap_or(0); |
There was a problem hiding this comment.
Resolve dynamic range index using mapped dimension
When lowering dynamic range subscripts in A2A context, this code falls back to active dimension index 0 if no name match is found. In multi-dimensional targets where the source range dimension matches via mapping (different dimension name) and corresponds to a later active dimension, the computed element position is taken from the wrong axis, producing shifted/wrong values instead of a mapping-aware index lookup (or a compile-time mismatch error).
Useful? React with 👍 / 👎.
| // TODO: the optional 3rd tiebreak arg is lowered | ||
| // in context.rs but not yet emitted here; models | ||
| // using VECTOR RANK(a, dir, tiebreak) will ignore | ||
| // the tiebreak parameter. | ||
| if let Some((direction, _tiebreak)) = rest { |
There was a problem hiding this comment.
Emit VECTOR RANK tiebreak argument
The compiler explicitly drops the optional third VECTOR RANK argument (tiebreak) during bytecode emission, so calls like VECTOR RANK(a, dir, tiebreak) are executed as if the tiebreak argument were never provided. That yields incorrect ranking behavior whenever equal values require non-default tie handling, and the issue is silent because the expression parses and compiles successfully.
Useful? React with 👍 / 👎.
…mension matching Proto deserialization defaulted has_except_default to false when the field was absent, breaking legacy protos that predate this field but have a default_equation for EXCEPT semantics. Now infers from default_equation presence, matching the JSON loader behavior. Dynamic-range A2A dimension matching now also checks subdimension and mapping relationships before falling back to index 0, so mapped or parent/child dimensions are correctly resolved.
Code ReviewThis is a large, well-structured PR that closes multiple array/subscript gaps across 6 phases. The implementation follows the detailed phase plans closely and includes thorough test coverage. I reviewed the key logic changes across the compiler, interpreter, VM, serialization, and MDL converter. FindingsNo blocking bugs found. The changes are internally consistent and well-tested. Observations (non-blocking):
Overall Correctness VerdictCorrect. The patch is well-tested (2634 unit tests + 53 integration tests per the PR description), introduces no regressions, and the new functionality (flag split, empty-view guards, EXCEPT detection, cross-dimension mapping, RANK builtin, serialization round-tripping) is implemented consistently across both the interpreter and VM paths. The previously-ignored integration tests being enabled ( |
Summary
Comprehensive array/subscript improvements across 6 phases, closing multiple open issues:
preserve_wildcards_for_iterationinto separate reducer vs vector builtin paths via newpromote_active_dim_refflag, preventing ActiveDimRef promotion in SUM/MEAN/etc.has_except_defaultboolean flag onEquation::Arrayedfind_matching_dimensionand MDL converter to resolve cross-dimension references via dimension mappingsb[B1]in DimA context) now treated as full arrays in vector builtin contextrenumber_opcodematch arms for VectorElmMap/VectorSortOrder/AllocateAvailablevalidate_for_protobuf/validate_for_xmileguardsarray_tests.rstests + 5 integration tests (except, except2, directconst, directlookups, directsubs)parentfield toDimensionfor indexed subdimensions, dead code suppressions reduced 58->49, ignored tests reduced 36->23Test plan
project_io.gen.rsregenerates correctly viapnpm build:gen-protobufs(protoc was unavailable during implementation)Fixes #341
Fixes #342
Fixes #344
Fixes #345
Fixes #348
Fixes #351
Fixes #356
Fixes #357
Fixes #358
Fixes #359
Fixes #365
Fixes #388