Summary
rank_and_filter() truncates discovered loops to MAX_LOOPS (200) before partition-aware contribution filtering.
Why this is a problem
LTM interpretation is partition-scoped: loops should be compared within cycle partitions. Global pre-truncation can drop loops that are dominant in small partitions but globally below rank 200, violating partition-local dominance semantics.
Literature / algorithm alignment
Reference and design docs emphasize partition-scoped comparison for relative contribution. Global truncation before partition-aware retention introduces cross-partition interference.
Current implementation behavior
Order in rank_and_filter():
- global sort by avg abs score
- truncate to 200
- partition-aware per-timestep contribution filter
Location:
src/simlin-engine/src/ltm_finding.rs (rank_and_filter)
Impact
- False negatives for partition-dominant loops in large models.
- Reported loop set can underrepresent smaller disconnected feedback subsystems.
Success criteria
- Reorder filtering so partition-aware retention is applied before any global cap, or apply per-partition quotas prior to global cap.
- Define and document deterministic tie-breaking when the final capped set still exceeds
MAX_LOOPS.
- Add tests with >200 loops spanning multiple partitions where a low-global-score but high-partition-share loop is retained.
- Keep deterministic IDs and output ordering stable.
Notes
This issue concerns post-discovery ranking/filtering only, not the known flow-to-stock timing choice.
Summary
rank_and_filter()truncates discovered loops toMAX_LOOPS(200) before partition-aware contribution filtering.Why this is a problem
LTM interpretation is partition-scoped: loops should be compared within cycle partitions. Global pre-truncation can drop loops that are dominant in small partitions but globally below rank 200, violating partition-local dominance semantics.
Literature / algorithm alignment
Reference and design docs emphasize partition-scoped comparison for relative contribution. Global truncation before partition-aware retention introduces cross-partition interference.
Current implementation behavior
Order in
rank_and_filter():Location:
src/simlin-engine/src/ltm_finding.rs(rank_and_filter)Impact
Success criteria
MAX_LOOPS.Notes
This issue concerns post-discovery ranking/filtering only, not the known flow-to-stock timing choice.