coily lockdown writes .claude/settings.json without trailing newline, fighting end-of-file-fixer #135
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 coily lockdown writes
.claude/settings.jsonwithout a trailing newline, fightingend-of-file-fixer.After
coily lockdown --apply --replace(orcoily setup's recursive re-baseline),.claude/settings.jsonshows a\ No newline at end of filediff in any repo whose committed copy ends in a trailing newline:In repos where the
end-of-file-fixerpre-commit hook runs, the committed copy gets a trailing newline, but coily regenerates without one. Every coily upgrade / re-baseline re-dirties.claude/settings.json; the next commit re-adds the newline; the two tools fight forever.Observed on coily v2.43.0 (Linuxbrew, kai-server). Repos showing only the newline diff after re-baseline: agentic-os-kai, cli-guard, coily, repo-recall.
Fix Have the lockdown renderer emit a trailing newline on
settings.json(and checklockdown-deny.sh). Standard for generated files; removes the perpetual churn againstend-of-file-fixer.Surfaced while upgrading local coily 2.29.1 -> 2.43.0 and re-baselining lockdown across the coilysiren/* tree.
Root cause and fix are in cli-guard (the lockdown renderer): coilysiren/cli-guard#32, fixed in cli-guard@02aeb5b. The renderer now appends a trailing newline to
.claude/settings.json, matchinguser_hook.go, with regression testTestBuildPlan_AfterEndsWithNewline.This won't reach
coily lockdownoutput until cli-guard is tagged and coily bumps its cli-guard dependency, rebuilds, and ships a new release. Leaving this open until a coily release carries the fix; closing cli-guard#32 as the code-level fix.