Skip to content

DD-061 PR1: Align template contract and docs#132

Merged
joshcramer merged 2 commits into
mainfrom
fix/template-contract-cleanup
Jun 20, 2026
Merged

DD-061 PR1: Align template contract and docs#132
joshcramer merged 2 commits into
mainfrom
fix/template-contract-cleanup

Conversation

@larimonious

Copy link
Copy Markdown
Contributor

Summary

  • Route template expression/filter/condition failures through the existing TypeMode template boundary
  • Keep undefined template variables falsy/empty for optional slots, but fail closed in strict mode for real errors
  • Update generated and human docs to describe NTNT template syntax, explicit #if/#for blocks, partial resolution, and literal delimiter escapes

Verification

  • cargo fmt
  • cargo build --profile dev-release
  • cargo test --test language_features_tests honor_type_mode -- --nocapture
  • ./target/dev-release/ntnt docs --generate
  • cargo test
  • git diff --check

Notes

PR1 for DD-061: no caching or broad template redesign; this is the contract/docs cleanup slice.

@greptile-apps

greptile-apps Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR aligns NTNT template handling with the documented template contract. It changes:

  • Routes template expression, filter, and condition failures through the TypeMode template boundary.
  • Keeps undefined template variables falsy or empty for optional slots.
  • Updates template docs for explicit #if and #for blocks, partial resolution, and literal delimiter escapes.
  • Bumps the package and generated docs version to 0.4.12.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Reviews (2): Last reviewed commit: "Bump version to 0.4.12" | Re-trigger Greptile

@joshcramer joshcramer merged commit 1ac450e into main Jun 20, 2026
9 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