Skip to content

ltm: no test checks that LTM equations compile across real models #782

Open

Description

@bpowers

Nothing checks that LTM's generated link-score and loop-score equations all compile across a broad set of models.
Each fixture asserts it for its own model, and C-LEARN's gate only checks that the generated equations parse.

Why it matters

A generated equation that fails to compile used to be silently replaced by 0, giving wrong loop scores; this shipped several times (#738, #741, #758, #759, #751), each found by reading code rather than by a test.
Today such a failure is reported as a warning (model_ltm_fragment_diagnostics), so it is no longer silent, but nothing fails CI when a new model shape produces one.

Fix

Recommended: one test that runs LTM over the real models already in test/ (test-models, the metasd and xmutil models) and asserts no fragment-compile warnings beyond a short list of known, documented declines.
Real models are the shapes people build, and the corpus already exists.
Heavy models (C-LEARN, World3) go behind #[ignore] under scripts/gates.sh like the existing C-LEARN gates.

Alternative: generate models with the existing element_graph_proptest strategy, extended toward reducers, module boundaries and mapped dimensions, and run the same assertion.
It reaches shapes no real model has, but every generated case is a full LTM compile, too slow for the debug test budget, so it needs a release-mode or scheduled CI lane.

Pointers

  • src/simlin-engine/src/db/ltm/compile.rs: model_ltm_fragment_diagnostics
  • src/simlin-engine/tests/integration/simulate.rs: clearn_ltm_partials_all_parse, the closest existing gate
  • src/simlin-engine/src/db/element_graph_proptest.rs: generator for the alternative

Activity

  1. added
    ltm
    ci
    on Jun 11, 2026
  2. changed the title [-]ltm: every-emitted-fragment-compiles harness over a generated corpus (prevention)[/-] [+]ltm: no test checks that LTM equations compile across real models[/+] on Oct 12, 2026
  3. added
    hygiene
    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

    cihygieneltm

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions