Skip to content

engine: MDL export emits per-element graphical-function warnings one-per-element (should aggregate per variable) #861

Description

@bpowers

Problem

The arrayed-element graphical-function warnings in src/simlin-engine/src/mdl/writer.rs (the Discrete / un-representable-Extrapolate ExportWarnings emitted in the arrayed-element loop, around the write_arrayed_element_entries path) are emitted one per element. A large arrayed variable whose per-element GFs are all Discrete or Extrapolate would emit one ExportWarning per element -- potentially thousands of near-identical stderr lines from simlin-cli.

The exact-duplicate collapse added at the end of write_project (dedups identical messages) does not help here: each per-element warning names a distinct element, so the messages are not exact duplicates and are not collapsed.

Why it matters

Developer experience / stderr verbosity only. Not a correctness or corruption issue. Rare in practice -- the current corpus has zero live per-element extrapolate/discrete GFs -- but a single large arrayed variable of this shape would flood the CLI output.

Component

src/simlin-engine/src/mdl/writer.rs (arrayed-element GF warning emission in the write_arrayed_element_entries path).

Possible approach

Aggregate the per-element GF warnings into one warning per variable, e.g. "graphical function for N of variable X's elements uses discrete interpolation; exported clamped", instead of one warning per element. This complements (does not replace) the existing exact-duplicate collapse in write_project.

Relationship to other issues

Discovery context

Identified during review of the MDL writer warning-dedup work (GH #856, branch mdl-writer-hardening).

Activity

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

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions