Repository navigation
Description
Summary
The SCALAR feeder of a whole-RHS variable-backed reduce gets link-score variables from try_scalar_to_arrayed_link_scores whose fragments FAIL to compile, so every loop through the feeder degrades to a warned constant-0 stub -- instead of either being scored (the machinery exists for the subexpression spelling) or dropped via unscoreable_edges (the #758/#780 contract for unscoreable edges).
Fixture (reproduced at commit ef91194d with a TestProject fixture)
D1 = {a, b}, D2 = {c, d}
pop[D1] -- stock
matrix[D1, D2]
scale = SUM(pop[*]) * 0.005 -- scalar
growth[D1] = SUM(matrix[D1, *] * scale) -- whole-RHS variable-backed reduce
... feedback closed through pop -> scale -> growth -> pop
The user equation compiles and simulates correctly. LTM emits $:ltm:link_score:scale->growth[a] / [b] via try_scalar_to_arrayed_link_scores, whose fragments fail to compile (Assembly warnings, constant-0 slots), and the scale-closure loop scores u1/u2 degrade to warned 0-stubs.
Why this is a gap, not just a degradation
- The subexpression spelling of the SAME dataflow scores fine:
growth[D1] = 0.1 + SUM(matrix[D1,*] * scale)routes the scalar feeder throughgenerate_scalar_feeder_to_agg_equationand yields a real score (~0.52). So the scoring machinery exists; the whole-RHS variable-backed-reduce target just never reaches it --try_scalar_to_arrayed_link_scoresdoes not handle that target shape. - When a shape genuinely cannot be scored, the standing contract (ltm: declined element-mapped sliced reducer emits a non-compiling scalar link score on the conservative path (loop scores stub to 0) #758, and ltm: PartialEquationError link-score skips don't drop dependent loop scores via unscoreable_edges #780 for the remaining gap in it) is ONE loud warning + NO link-score variable + dependent loop scores DROPPED via
unscoreable_edges. Emitting variables that are known not to compile produces the warned-0-stub middle state both of those issues exist to eliminate: constant-0 series that look like computed values, plus cascading per-loop warning noise.
So this is loud (warned), not silent -- but it is the wrong degradation mode AND an expressiveness gap with a working sibling path.
Components affected
src/simlin-engine/src/db/ltm/link_scores.rs--try_scalar_to_arrayed_link_scoresdoes not handle the variable-backed-reduce target; the emitted fragments reference the reduce shape in a way that fails assembly. Fix should either route the scalar feeder of a variable-backed reduce through the agg-feeder path (generate_scalar_feeder_to_agg_equation, matching the subexpression spelling), or decline the shape intounscoreable_edgesper the ltm: declined element-mapped sliced reducer emits a non-compiling scalar link score on the conservative path (loop scores stub to 0) #758 contract.
Related
- ltm: declined element-mapped sliced reducer emits a non-compiling scalar link score on the conservative path (loop scores stub to 0) #758 (closed) -- established the loud-skip + loop-drop contract this shape should follow if declined
- ltm: PartialEquationError link-score skips don't drop dependent loop scores via unscoreable_edges #780 -- the PartialEquationError leg of the same contract gap (skips that don't populate
unscoreable_edges); this issue is the emit-then-fail-compile leg - ltm: arrayed-owner Pinned/subset broadcast reduce slice loud-skipped; needs the PerElement broadcast rule on variable-backed owners #777 -- the arrayed-owner NO-Iterated-axis variable-backed sibling (declined loudly; distinct shape -- this fixture's slice HAS an Iterated D1 axis)
- ltm: loop scores through a variable-backed partial-reduce reducer reference never-emitted link-score names, stubbing to 0 #752 / ltm: synthetic agg node for SUM(arrayed[*] * scalar) with a scalar target fails to compile and is stubbed to constant 0 #738 (closed) -- earlier variable-backed-reduce and scalar-coefficient agg compile siblings
- Part of LTM tracking epic epic: Loops that Matter (LTM) -- open work #488 (cluster A)
Discovery context
Empirically confirmed during the adversarial review of commit ef91194d ("engine: decline bare-spelled feeder of un-hoisted reducer loudly", the GH #779 fix, branch ltm-phase1-residuals), reproduced at that commit with TestProject fixtures. Pre-existing, not a regression from that commit; out of scope for #779's fix.
Activity