Skip to content

fix(apply): re-render templates when source hash unchanged#24

Merged
subbeh merged 2 commits into
mainfrom
fix/apply-template-rerender
Jul 22, 2026
Merged

fix(apply): re-render templates when source hash unchanged#24
subbeh merged 2 commits into
mainfrom
fix/apply-template-rerender

Conversation

@subbeh

@subbeh subbeh commented Jul 22, 2026

Copy link
Copy Markdown
Owner

The apply path marked files as unchanged when the raw source hash
matched the DB record, even if variables had changed. Now it
re-renders template/encrypted files and compares against the target,
marking as modified when the rendered output differs.

Steven Terwindt added 2 commits July 23, 2026 06:56
The apply path marked files as unchanged when the raw source hash
matched the DB record, even if variables had changed. Now it
re-renders template/encrypted files and compares against the target,
marking as modified when the rendered output differs.
Remove Applier.checkChange and have Apply call the shared
computeChange from diff.go directly. This eliminates ~150 lines of
duplicated change-detection logic that was prone to diverging (the
template re-rendering fix had to be applied in both places).

The only semantic difference was StatusStateOnly vs StatusUnchanged
for the "no state entry, content matches" case. computeChange now
returns StatusStateOnly there, and ComputeChanges filters it out
alongside StatusUnchanged so status/diff behavior is unchanged.
@subbeh
subbeh merged commit ddcd769 into main Jul 22, 2026
3 checks passed
@subbeh
subbeh deleted the fix/apply-template-rerender branch July 22, 2026 21:01
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.

1 participant