Skip to content

Fix --no-template: gate TEMPLATE emission, not just preflight#11

Merged
mfwolffe merged 6 commits into
trunkfrom
fix/m13-1-no-template-emission
May 3, 2026
Merged

Fix --no-template: gate TEMPLATE emission, not just preflight#11
mfwolffe merged 6 commits into
trunkfrom
fix/m13-1-no-template-emission

Conversation

@espadonne
Copy link
Copy Markdown
Contributor

Summary

Audit 13 M13.1: `dlm export --no-template` advertised "Skip writing
TEMPLATE into the Modelfile" but only suppressed the preflight check —
the Modelfile's `TEMPLATE """..."""` block was still emitted
unconditionally.

`plan.include_template` had only one consumer (`runner.py:223`); the
emitters in `modelfile.py` and `vl_modelfile.py` ignored it. This
change gates the template block on the flag in both renderers and adds
a regression test.

Test plan

  • 46 modelfile + vl_modelfile unit tests pass (1 new)
  • `PARAMETER` lines, `FROM`, `ADAPTER`, headers, license still
    render correctly when `include_template=False`
  • Strict mypy clean

@mfwolffe mfwolffe merged commit 673de44 into trunk May 3, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants