Skip to content

ltm: None-partition loops share one default rel_loop_score normalization bucket, cross-normalizing unrelated module-internal-stock loops #750

Closed

Description

@bpowers

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 -- the None resolution for module-internal stocks)
  • src/simlin-engine/src/ltm_post.rs (compute_rel_loop_scores / compute_rel_loop_scores_per_element -- the shared None cohort)

Possible approaches

  • Resolve partitions for module-internal stocks: extend the partition map to module-internal stock nodes, mirroring how the enumerator enriches Loop.stocks via enrich_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 in ltm_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

Discovery context

Identified during adversarial review of the GH #673 fix on branch ltm-core-batch (commit a98d7106).

Part of epic #488.

Activity

  1. added
    ltm
    on Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ltm

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions