diff options
| author | Craig Jennings <c@cjennings.net> | 2026-07-16 13:42:53 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-07-16 13:42:53 -0500 |
| commit | c98fda556e9211573dab3e32eaa5c42c2dedbfcb (patch) | |
| tree | 3e9e9cb7c6060d2edaa813ebaf852637a2244c7a /languages/go/claude | |
| parent | 125c1e9777d66645cf23b30b3d2de1c91fb492aa (diff) | |
| download | rulesets-c98fda556e9211573dab3e32eaa5c42c2dedbfcb.tar.gz rulesets-c98fda556e9211573dab3e32eaa5c42c2dedbfcb.zip | |
fix(install-lang): refuse a colliding second bundle instead of clobbering
Installing a second language bundle into a project silently replaced the first one's config. settings.json and githooks are copied with cp -rT (always overwrite), so installing bash over elisp rewired the validate hook to validate-bash.sh and dropped check-parens from pre-commit, leaving validate-el.sh orphaned on disk. The output said [ok] for both. A project could lose its paren check or secret scan and read the install as success.
The guard detects which bundles a project already has, by the same rule fingerprint sync-language-bundle uses, and refuses when the incoming bundle would overwrite a file another one ships. It names each file at risk. FORCE=1 still overrides, and the message says that also re-seeds CLAUDE.md, which is destructive on a customized project.
Only three of the five shared filenames actually collide. gitignore-add.txt is appended and deduped, and CLAUDE.md is seed-only, so both compose across bundles already.
This doesn't decide whether polyglot projects are supported, and the guard shouldn't be read as "no". A non-overlapping pair still installs: bash ships settings.json and githooks with no coverage fragment, python ships only a coverage fragment, so the two compose today. The real line is overlap, not polyglot, and nothing chose it. The open question, along with the identical coverage target names both fragments define, is filed.
home reported this after scaffolding clock-panel with python and typescript, which hit the coverage fragment. The settings.json and githooks cases are worse and hadn't been noticed. No project was damaged: the three bundles that collide aren't doubled up anywhere.
Diffstat (limited to 'languages/go/claude')
0 files changed, 0 insertions, 0 deletions
