Skip to content

ltm: discovery results do not say when cross-SUM loop finding was cut off #701

Closed

Description

@bpowers

In discovery mode, loop finding can stop early when a model has more loops through arrayed sums (SUM and similar reducers) than a fixed cap of 256.
The engine records this as agg_recovery_truncated, but the flag did not reach libsimlin, pysimlin, or MCP, so those callers saw truncated == false and took an incomplete loop list as complete.
Exhaustive mode already reports its equivalent as a compile warning.

Status

This looks fixed on main by #732.
SimlinDiscoveryResult.agg_recovery_truncated (src/libsimlin/src/ffi.rs) is set in src/libsimlin/src/analysis.rs, read into pysimlin's Analysis (src/pysimlin/simlin/model.py), and reported by the MCP read and edit tools (src/simlin-mcp-core/src/tools/read_model.rs).
The TypeScript engine has no discovery-mode binding, so there is nothing to add there.
#732's description says "Fixes #495, #679, #685, #701", but GitHub only auto-closed the first issue in that list.

Activity

  1. added
    ltm
    on Jun 3, 2026
  2. added
    bug
    on Oct 12, 2026
  3. changed the title [-]ltm: discovery-mode agg_recovery_truncated signal never reaches FFI/pysimlin/TS (asymmetry vs exhaustive)[/-] [+]ltm: discovery results do not say when cross-SUM loop finding was cut off[/+] on Oct 12, 2026
  4. bpowers commented on Oct 12, 2026

    @bpowers
    OwnerAuthor

    Closing: already fixed on main.

    d42c8a7 (#732) carries the engine's agg_recovery_truncated through ModelAnalysis (src/simlin-engine/src/analysis.rs:230) to SimlinDiscoveryResult.agg_recovery_truncated (src/libsimlin/src/ffi.rs:377, set at analysis.rs:802), pysimlin Analysis (model.py:966) and the MCP read and edit outputs (src/simlin-mcp-core/src/tools/read_model.rs:65/173, edit_model.rs:226/441). The true case is pinned at the engine (ltm_finding_tests.rs:2812); FFI and pysimlin tests (libsimlin tests/integration/analysis.rs:2431, test_discovery.py:37) assert the field on an untruncated model.

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

    bugltm

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions