Repository navigation
Description
Summary
A PER-ELEMENT-EQUATION owner (Equation::Arrayed, one equation per slot) whose slots hold an I1-declined strict-slice multi-source reducer never reaches try_cross_dimensional_link_scores' cartesian arm. Instead the edge falls through to emit_per_shape_link_scores with shape Bare, which emits ONE arrayed link score whose simulated value is ~-0.0 at every step -- a silent near-zero stand-in for an edge the equation genuinely depends on, with no per-edge warning.
This is the per-element spelling of the GH #791 shape. Neither the pre-791 cartesian garbage nor the new #791 strict-slice loud skip applies here: the gate's Ast::Arrayed => NotDescribable arm in ltm_agg::unhoisted_reducer_source_read is unobservable for this shape because the edge never gets that far.
Fixture (verified empirically 2026-06-12 at commit c1a16df4, branch ltm-phase1-residuals; PRE-EXISTING -- the per-element path is untouched by that commit)
Region = {nyc, boston}, D2 = {p, q}
pop[Region, D2] -- source (fed by a stock)
w[D2] -- co-source
share[Region] -- Equation::Arrayed, EACH slot:
share[nyc] = SUM(pop[nyc,*] * w[*])
share[boston] = SUM(pop[boston,*] * w[*])
inflow[Region] = share[Region] * 0.01 -- closes the loop back into pop
(TestProject fixture array_with_ranges_direct shape; sim 0..8, dt 1.)
Observed behavior
- One arrayed
$:ltm:link_score:pop->share(2 slots) is emitted via the Bare per-shape path; its simulated value is -0.0 at every step, althoughsharegenuinely depends onpop. - Only ONE warning surfaces -- a single loop-score fragment-compile failure (
$:ltm:loop_score:u5). The other enumerated loops compile and consume the silent ~0 link score, so their loop scores are unwarned wrong (near-zero) numbers.
This violates epic #488's standing "no silent wrong numbers" invariant: a near-zero stand-in score with no per-edge warning.
Why it matters
Severity: medium. The MDL importer expands single apply-to-all Vensim equations into N identical per-element equations (#651), so this spelling is exactly what real Vensim imports produce -- the per-element variant is arguably MORE reachable from imported models than the A2A spelling #791 fixed.
Components affected
src/simlin-engine/src/db/ltm/link_scores.rs--try_cross_dimensional_link_scores(per-element owners never reach the cartesian/strict-slice arm) andemit_per_shape_link_scores(the Bare fallthrough that mints the near-zero stand-in)src/simlin-engine/src/ltm_agg.rs--unhoisted_reducer_source_read'sAst::Arrayed => NotDescribablearm is dead for this shape; the strict-slice decline logic needs a per-element-aware entry point
Suggested direction
Route the per-element-equation owner spelling to the same loud-skip contract #791's fix applies to the A2A spelling: detect the un-hoisted strict-slice multi-source reducer in Equation::Arrayed slots and decline via unscoreable_edges (warning + dependent loop drop per the #758/#780 contract), instead of letting the edge fall to the Bare per-shape stand-in. Longer term, per-slot pinned slices are statically describable (each slot pins its row), so a per-element hoist may be able to score this shape exactly.
Related
- ltm: I1-declined multi-source reducer with subset-dim arrayed owner falls through to cartesian derivation (silent +1.0 link scores on unread rows) #791 -- the A2A/scalar-owner spelling of the same shape (fixed by
c1a16df4); this is its per-element sibling - ltm: declined element-mapped sliced reducer emits a non-compiling scalar link score on the conservative path (loop scores stub to 0) #758 (closed) / ltm: PartialEquationError link-score skips don't drop dependent loop scores via unscoreable_edges #780 -- the loud-skip + loop-drop contract these edges should take
- mdl: one apply-to-all equation imports as N per-element equations #651 -- the MDL importer per-element expansion that makes this spelling the import-reachable one
- epic: Loops that Matter (LTM) -- open work #488 -- LTM tracking epic (cluster A)
Discovery context
Empirically confirmed during the adversarial review of commit c1a16df4 (the GH #791 strict-slice cartesian decline) on branch ltm-phase1-residuals; pre-existing, not introduced by that commit.
Activity