Skip to content

ltm: no test runs loop discovery on a model not named main #313

Open

Description

@bpowers

Loop discovery on a model not named main looks right in the code but no test runs it.
analyze_model and discover_run_loops already take a model name and build the graph from that model.

What is still open:

  • Every loop-discovery test runs on a model whose canonical name is main (non_canonical_model_name_finds_causal_edges uses Main; the module-cycle tests that pass a or u only check for an error).
  • The main alias falls back to project.models.first(), not Project::default_model, so a project that lists a macro model first would analyze the macro.

Fix

Add one test: load test/logistic_growth_ltm/logistic_growth.stmx, rename the model to growth, and assert analyze_model(..., "growth", ...) finds loops.
Make the alias in model_snapshot and run_ltm_pipeline use Project::default_model.

Pointers

  • src/simlin-engine/src/analysis.rs: model_snapshot, run_ltm_pipeline, test non_canonical_model_name_finds_causal_edges
  • src/simlin-engine/src/datamodel.rs: Project::default_model_index

Activity

  1. added
    ltm
    on May 1, 2026
  2. changed the title [-]ltm-finding: remove hardcoded 'main' model assumption[/-] [+]ltm: loop discovery only works on a model named main[/+] on Oct 12, 2026
  3. added
    enhancement
    on Oct 12, 2026
  4. changed the title [-]ltm: loop discovery only works on a model named main[/-] [+]ltm: no test runs loop discovery on a model not named main[/+] on Oct 12, 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

    enhancementltm

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions