fix(generate): chmod on ActionUnchanged + close Plan 12 test gaps (Plan 13)#22
Merged
Merged
Conversation
… gaps - writeFileChmod now re-applies perm when inner writeFile returns ActionUnchanged; previously a sensor script that had its exec bit stripped externally would stay non-executable across bonsai update runs once Plan 12's content-equality short-circuit took effect. - TestWriteResultSummary now covers the unchanged count. - New TestWorkspaceClaudeMDUnchangedShortCircuit covers the WorkspaceClaudeMD short-circuit at generate.go:829-833. - New TestWriteFileChmodRestoresPermOnUnchanged regression test. Plan 13. Follow-up to Plan 12 (PR #20). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
LastStep
added a commit
that referenced
this pull request
Apr 17, 2026
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
writeFileChmodnow re-applies its declared perm when the innerwriteFilereturnsActionUnchanged. Previously, a sensor script whose exec bit had been stripped externally would stay non-executable acrossbonsai updateruns once Plan 12's content-equality short-circuit took effect.TestWriteResultSummarynow asserts theunchangedcount (previously discarded via_).TestWorkspaceClaudeMDUnchangedShortCircuitcovers the short-circuit atinternal/generate/generate.go:829-833— second call assertsActionUnchangedand verifies mtime is unchanged (file was back-dated first to make rewrites detectable on coarse-mtime filesystems).TestWriteFileChmodRestoresPermOnUnchangedregression test: create at 0755 → strip to 0644 externally → re-run with identical content → assertActionUnchanged+ mode restored to 0755.Plan: station/Playbook/Plans/Active/13-actionunchanged-followups.md. Follow-up to Plan 12 (PR #20).
Test plan
🤖 Generated with Claude Code