You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
engine: Run.links doc does not say it is empty when LTM is off #626
In the TypeScript engine, Sim.getRun() fetches links only when LTM is enabled, so a default (LTM-off) run has Run.links = [].
That is intended, and sim.ts says so in a comment, but the public doc on Run.links reads "Get causal links, potentially with LTM scores", which suggests an LTM-off run still lists the model's causal links without scores.
The doc should state the actual contract.
Why it matters
No current consumer reads Run.links from an LTM-off run, so nothing is broken.
A future caller that wants the causal structure from a cheap run could get [] and conclude the model has no links.
The structural link list is already available from Model.getLinks(), regardless of LTM.
Fix
Change the doc on Run.links (and Sim.getRun()) to say links are populated only for LTM-enabled runs, and point to Model.getLinks() for the causal structure.
Alternative: always fill Run.links from the causal graph and add scores only under LTM; this costs an extra call on every run for data nobody reads today.
Pointers
src/engine/src/run.ts (links getter)
src/engine/src/sim.ts (getRun, the wantLinks check)
changed the title [-]engine: LTM-off Sim.getRun() now returns Run.links=[] instead of populated-scoreless (AC1.3 deviation)[/-][+]engine: Run.links doc does not say it is empty when LTM is off[/+]on Oct 12, 2026
Activity
[-]engine: LTM-off Sim.getRun() now returns Run.links=[] instead of populated-scoreless (AC1.3 deviation)[/-][+]engine: Run.links doc does not say it is empty when LTM is off[/+]