Repository navigation
Description
Summary
T3 of the LTM shape-expressiveness phase (design: docs/design-plans/2026-06-11-ltm-shape-expressiveness.md, Architecture section 6; commit 0a1f27fe on branch ltm-shape-phase1) generalized the #752 gate to variable_backed_reduce_agg, admitting scalar-result variable-backed slices (total = SUM(pop[nyc,*])) -- but scoped that admission to SCALAR owners (to_dims.is_empty()). The ARRAYED-owner sibling is DECLINED into the #758-style loud skip and remains a design-mandated residual:
share[Region] = SUM(pop[nyc,*])
i.e. a whole-RHS variable-backed reducer whose slice has NO Iterated axis (Pinned or subset-Reduced only) and whose OWNING variable is arrayed over dims unrelated to the slice. The same applies to the subset twin:
share[Region] = SUM(arr[*:Sub])
Current behavior (post-T3, the loud skip)
Both the gate and try_cross_dimensional_link_scores' partial-reduce branch decline the shape; the edge routes to the #758 loud skip: one Warning via emit_unscoreable_broadcast_reduce_edge_warning (src/simlin-engine/src/db/ltm/link_scores.rs), no link-score variables, and every loop through the edge is dropped from LTM analysis.
This replaced the PRE-T3 state, which was silently wrong (recorded during T3's RED run): the unread rows (pop[boston,*] -> share[boston]) scored constant +1.0 although share[boston] = SUM(pop[nyc,*]) never reads them, while the TRUE dependency (pop[nyc,*] -> share[boston]) had NO score at all. Pinned by arrayed_owner_broadcast_pinned_slice_reduce_skips_loudly in src/simlin-engine/tests/integration/ltm_array_agg.rs (loud skip, no garbage, no phantom names).
Proper fix
The design's section 3 PerElement broadcast rule -- per-(row, full-target-element) emission -- applied to variable-backed owners: every target slot reads the same Pinned/subset slice, so emit the read rows fanned out across the target's full element set, with matching per-(row, slot) link scores. This is T6-style machinery that the design deliberately kept out of T3 ("specifiable later, but it is T6 machinery and does not belong in T3"). The fix should cover BOTH the Pinned shape (SUM(pop[nyc,*])) and the subset twin (SUM(arr[*:Sub])).
Why it matters
Severity: low. Legal but uncommon shape; the degradation is loud and conservative (no wrong numbers -- strictly better than the silent pre-T3 garbage), but each occurrence drops every loop through the edge.
Components affected
src/simlin-engine/src/ltm_agg.rs--variable_backed_reduce_agggate'sto_dims.is_empty()scopingsrc/simlin-engine/src/db/ltm/link_scores.rs--try_cross_dimensional_link_scorespartial-reduce branch decline;emit_unscoreable_broadcast_reduce_edge_warning
Related
- ltm: variable-backed partial reducers with broadcast or permuted axes keep the conservative cross-product (loop scores stub to 0) #764 -- the ITERATED-armed variable-backed broadcast/permuted sibling (this issue is the NO-Iterated-axis sibling; distinct shape class)
- ltm: cross-dimensional partial-reduce link scores ignore Pinned axes in the co-reduced slice (inflated divisor + garbage unread-row scores) #765 -- Pinned axes in the co-reduced slice (value-level sibling; the pre-T3 full-cartesian garbage for this shape was an unfiled ltm: cross-dimensional partial-reduce link scores ignore Pinned axes in the co-reduced slice (inflated divisor + garbage unread-row scores) #765 sibling)
- ltm: FixedIndex reference into a disjoint-dim ApplyToAll target is loud-skipped though recoverable via the #510 per-element construction #769 -- FixedIndex into disjoint-dim ApplyToAll target (plain reference, no reducer; same loud-skip gate, same recoverable-in-principle character)
- ltm: declined element-mapped sliced reducer emits a non-compiling scalar link score on the conservative path (loop scores stub to 0) #758 (closed) -- the loud-skip gate this shape now routes through
- epic: Loops that Matter (LTM) -- open work #488 -- LTM tracking epic (cluster A)
Discovery context
Design-mandated residual recorded during T3 of the LTM shape-expressiveness phase on branch ltm-shape-phase1 (commit 0a1f27fe); the design doc explicitly defers it and requires filing if it survives the phase.
Activity