Skip to content

docs(templates): clarify exec behavior in dry runs - #11018

Merged
jdx merged 4 commits into
jdx:mainfrom
risu729:agent/docs-tera-exec-dry-run
Jul 16, 2026
Merged

jdx merged 4 commits into
jdx:mainfrom
risu729:agent/docs-tera-exec-dry-run

Conversation

@risu729

@risu729 risu729 commented Jul 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • document that Tera exec() runs whenever its template is rendered
  • explicitly call out configuration rendering during --dry-run
  • clarify that dry-run suppresses mise's planned operation, not template-function commands
  • recommend side-effect-free commands for exec()

Tests

  • mise x npm:markdownlint-cli -- markdownlint docs/templates.md
  • mise x prettier -- prettier --check docs/templates.md
  • git diff --check

Summary by CodeRabbit

  • Documentation
    • Added a warning explaining that exec() commands run whenever their templates are rendered, including during --dry-run.
    • Clarified that dry-run mode does not suppress commands executed by template functions.
    • Recommended keeping exec() commands side-effect-free.

@coderabbitai

coderabbitai Bot commented Jul 15, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Documents that exec() runs during template rendering, including --dry-run, and that commands should avoid side effects.

Changes

Template execution documentation

Layer / File(s) Summary
Document exec behavior and side effects
docs/templates.md
Adds a warning explaining that exec() runs during rendering, dry-run does not suppress or sandbox it, and commands should be side-effect free.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Poem

I’m a bunny with docs in my paws,
Warning of exec and its claws.
Dry runs still may hop,
Commands don’t simply stop,
Keep side effects out of the applause!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the documentation change about exec behavior during dry runs.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Jul 15, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

This is a documentation-only PR that adds a VitePress warning callout to docs/templates.md explaining that exec() is evaluated on every template render — including during --dry-run — and recommending side-effect-free commands.

  • Adds a warning block after the General Functions list clarifying exec() runs unconditionally and that --dry-run does not sandbox template functions.
  • The warning content is accurate and useful; its only drawback is placement at the end of the function list rather than directly beneath the exec() bullet it describes.

Confidence Score: 5/5

Documentation-only change; no code is modified and the added warning text is factually accurate.

The change adds a single warning callout to a Markdown docs file. No logic, configuration, or runtime behaviour is affected. The warning text correctly describes exec() semantics.

No files require special attention.

Important Files Changed

Filename Overview
docs/templates.md Adds a VitePress warning block after the General Functions list clarifying that exec() runs on every template render, including during --dry-run; placement is after read_file() rather than directly after exec()

Reviews (5): Last reviewed commit: "Merge branch 'main' into agent/docs-tera..." | Re-trigger Greptile

@risu729
risu729 marked this pull request as ready for review July 15, 2026 17:15
@risu729
risu729 marked this pull request as draft July 15, 2026 17:15
@risu729
risu729 marked this pull request as ready for review July 16, 2026 03:40
@risu729
risu729 marked this pull request as draft July 16, 2026 03:40
@risu729
risu729 marked this pull request as ready for review July 16, 2026 03:52
@jdx
jdx enabled auto-merge (squash) July 16, 2026 04:04
@jdx
jdx merged commit 7214774 into jdx:main Jul 16, 2026
34 checks passed
@risu729
risu729 deleted the agent/docs-tera-exec-dry-run branch July 16, 2026 04:18
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