Skip to content

engine: metasd macro corpus SIMULATION tier is empty -- enable it (Vensim DSS reference outputs starting with Theil_2011 + per-model non-macro blocker triage) #561

@bpowers

Description

@bpowers

Problem

Phase 7 Task 2 (macros.AC6.4) of the Vensim macro support epic added a tiered metasd macro corpus harness (src/simlin-engine/tests/metasd_macros.rs) over the 17 macro-using .mdl files / 14 directories under test/metasd/.

The simulation tier is empty for two non-macro reasons, annotated per-model in CORPUS (metasd_macros.rs):

1. Missing checked-in Vensim reference outputs (a documented prerequisite)

This is a documented setup task ("Test prerequisites" note in the macro design; docs/implementation-plans/2026-05-13-macros/phase_07.md line 108, test-requirements.md line 303), not engine work. Most metasd macro directories ship only .mdl + PROVENANCE.md with no sibling reference.

The cleanest case: test/metasd/theil-statistics/Theil_2011.mdl COMPILES AND SIMULATES with ZERO errors (the THEIL multi-output macro materializes + simulates -- pinned end-to-end by simulate.rs::corpus_theil_multi_output_materializes_and_simulates). It is not simulation-tier-eligible only because no sibling Vensim reference output (.vdf / output.tab / .dat) is checked in. Authoring/obtaining a Vensim DSS reference output for Theil_2011 would immediately unlock the simulation tier for it (a one-line CORPUS SimTier::Eligible edit -- the harness machinery is already in place).

2. Unrelated, non-macro blockers on the other models

Each is annotated in CORPUS and is NOT a macro defect (the corresponding macro expands cleanly in every case):

  • FREE/FREE6/FREE6-original/free 6.mdl -- heavy non-macro MDL-parse / dimension errors (ExtraToken / UnrecognizedToken / MismatchedDimensions / ArrayReferenceNeedsExplicitSubscripts) on main-model variables, despite a sibling all_data2.vdf.
  • social-network-valuation/groupon {1,2,3}.mdl -- data_* variables are unresolved external data (EmptyEquation / UnrecognizedToken) despite sibling .vdf files.
  • covid19-us-homer/homer v8/Covid19US v8.mdl -- *_data variables are unresolved GET DIRECT / GET XLS DATA references (no DataProvider supplied). Already tracked as engine: metasd COVID model not simulation-tier-eligible -- unsatisfied GET DIRECT/GET XLS DATA external data blocks full SSTATS reference validation (Phase 7 corpus scope) #555 -- cross-reference, do not duplicate.
  • scientific-revolution/scirev{7,8}.mdl, wonderland/Wonderland3.mdl, industrial-dynamics/IDch15/IDch15d.mdl, interpolating-arrays/InterpolatingArrays.mdl -- main-model UnknownBuiltin / UnknownDependency / UnrecognizedToken / ExtraToken / CantSubscriptScalar / Generic errors.
  • pink-noise/PinkNoise2010.mdl, bathtub-statistics/integration3.mdl, critical-slowing/critical-slowing.mdl, early-warnings-catastrophe/catastropeWarning2.mdl, beer-game/RealBeer4-Sterman13.mdl -- the pink_noise macro body uses the engine-unsupported RANDOM NORMAL builtin (UnknownBuiltin); beer-game additionally has a peak -> peak model-logic CircularDependency and main-model dimension errors. The RANDOM NORMAL engine gap is referenced inline in the harness but has no standalone tracking issue today; it is the dominant blocker for the pink_noise-family models.

Why it matters

The macro EXPANSION tier (the in-scope macro validation for the epic) is fully green; this is purely the deferred simulation-tier enablement. The metasd macro simulation tier is intentionally empty until these non-macro prerequisites are met. Without explicit tracking, the corpus's most thorough validation -- end-to-end numeric comparison of macro-using real-world models against Vensim DSS output -- silently never happens, and the "those without unrelated blockers match Vensim DSS reference output" half of macros.AC6.4 stays unrealized with no follow-up trail.

Components affected

  • src/simlin-engine/tests/metasd_macros.rs (the tiered corpus harness; CORPUS annotations, SimTier::Eligible currently unconstructed, metasd_simulation_tier runs zero models)
  • test/metasd/** (missing checked-in Vensim reference outputs, esp. theil-statistics/)
  • src/simlin-engine engine gaps for the per-model blockers (MDL parser/dimension handling, external-data resolution, RANDOM NORMAL builtin)

Recommended remediation (not to perform now)

  1. Author/obtain Vensim DSS reference outputs for the clean-compiling metasd macro models, starting with Theil_2011.mdl (it is already green end-to-end; adding its reference is a one-line CORPUS SimTier::Eligible edit and immediately yields the first simulation-tier-validated macro corpus model).
  2. Triage the per-model unrelated non-macro blockers, cross-referencing existing issues rather than duplicating:
  3. As references + fixes land, promote each model into the simulation tier by flipping its CORPUS entry from SimTier::Skip(reason) to SimTier::Eligible { reference } (the harness metasd_simulation_tier machinery already consumes it -- no new harness code needed).

Context

Identified during Phase 7 Task 2 of the Vensim macro support epic (docs/implementation-plans/2026-05-13-macros/), while building the tiered metasd macro corpus harness. The simulation-tier emptiness is by design (documented in the harness module docs and per-model CORPUS annotations) and is explicitly deferred per the design's "Test prerequisites" note (phase_07.md line 108 directs filing the unrelated blockers and annotating non-eligible models). This umbrella issue is broader than #555 (which scopes only the single COVID model / SSTATS validation): it tracks the overall deferred enablement -- the missing reference outputs (Theil_2011 first), the cross-referenced per-model blockers, and the promotion path -- so the metasd macro simulation validation is visibly tracked rather than silently empty.

Related: #555 (COVID GET DIRECT/GET XLS DATA, subset of blocker 2), #554 (INIT/recursion false-positive class; the thyroid delayn KNOWN_MACRO_BUG is a follow-up), #349 (C-LEARN macro expansion blocks 1 simulation test).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions