Repository navigation
Description
Problem
Loops whose cycle partition resolves to None all share ONE default relative-score normalization bucket, so unrelated module-internal-stock loops cross-normalize against each other.
CyclePartitions::partition_for_loop (src/simlin-engine/src/ltm/partitions.rs, rustdoc ~lines 110-123) resolves None for a loop whose only stocks are module-internal: module-internal stock names (namespaced with interpunct, e.g. smooth·smoothed) are deliberately not keyed in the parent-level partition map, so they are never the resolving stock -- documented behavior. In ltm_post.rs, None-partition loops then share a single default group for relative-loop-score normalization: slot_partition returns None and the rustdoc on compute_rel_loop_scores says the catch-all None cohort "still groups together for loops genuinely below the parent graph"; the unit test unpartitioned_loops_share_default_group (ltm_post.rs:1618) pins this.
The consequence: two UNRELATED feedback loops whose only state lives inside different module instances get their rel_loop_scores normalized against EACH OTHER -- the exact cross-pollution GH #487 (closed) fixed for A2A slots, but for the None bucket.
Why this is newly reachable
This was latent until the #673 fix (branch ltm-core-batch, commit a98d7106: pins through modules now validate). With module-internal-stock loops pinnable and scorable, None-partition loops occur in practice. The new integration test pinned_loop_through_module_internal_stock_scored (src/simlin-engine/tests/integration/simulate_ltm_pinned.rs:1463) pins partition [None] as current behavior.
Why it matters
Wrong relative-score denominators for module-state-only loops once users pin them: a loop's share-of-activity is diluted by unrelated loops that happen to also live in the None bucket. Absolute loop scores are unaffected. Severity: low-medium.
Components affected
src/simlin-engine/src/ltm/partitions.rs(CyclePartitions::partition_for_loop-- theNoneresolution for module-internal stocks)src/simlin-engine/src/ltm_post.rs(compute_rel_loop_scores/compute_rel_loop_scores_per_element-- the sharedNonecohort)
Possible approaches
- Resolve partitions for module-internal stocks: extend the partition map to module-internal stock nodes, mirroring how the enumerator enriches
Loop.stocksviaenrich_with_module_stocks. Two loops through different module instances would then land in distinct partitions (or in the parent partition their module instance participates in). - Or, cheaper: give each
None-partition loop its own singleton normalization group inltm_post.rs(a singleton group normalizes to +/-1.0, which has its own legibility cost -- see ltm: expose cycle-partition id/size on discovered loops so singleton-partition loops can be grouped or filtered #671 -- but at least never cross-pollutes).
Relationship to existing issues
- ltm: rel_loop_score normalisation cross-pollutes independent A2A loops #487 (closed): the same cross-pollution failure mode for A2A slots; this is the
None-bucket residual. - ltm: pin whose only stock is module-internal is wrongly rejected as 'contains no stock' #673: the fix that makes these loops reachable (pins through module-internal stocks now validate).
- ltm: exhaustive and pinned loop results lack cycle partition info #685: adjacent but distinct -- partition-metadata surfacing parity, not the
None-bucket normalization semantics. - ltm: model_ltm_variables' stock-free early return is module-blind -- a root whose only state is module-internal silently emits no LTM variables #748: the stock-free early return that today suppresses LTM output for module-only roots; fixing it widens this issue's reach further.
Discovery context
Identified during adversarial review of the GH #673 fix on branch ltm-core-batch (commit a98d7106).
Part of epic #488.
Activity