lockdown renders .claude/settings.json without trailing newline #32
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
lockdown.BuildPlan/writeSettingsJSONrender.claude/settings.jsonwith no trailing newline.json.MarshalIndentoutput was written verbatim, so generatedsettings.jsonended without a final newline. In any repo where theend-of-file-fixerpre-commit hook runs, the committed copy gains a trailing newline, but coily regenerates without one. Everycoily lockdown --apply --replace/coily setupre-baseline re-dirties the file; the next commit re-adds the newline; the two tools fight forever.lockdown/user_hook.goalready appended'\n'to the user-settings render, so this was an inconsistency between the three marshal sites, not a deliberate choice.Fix Append
'\n'afterjson.MarshalIndentin bothclaudeCodeBuildSettings(per-repo render) andwriteSettingsJSON(recursion-root merge), matchinguser_hook.go. AddedTestBuildPlan_AfterEndsWithNewlineto lock it.User-facing symptom tracked at coilysiren/coily#135.