Repository navigation
Count only the repository's Git attributes for generated roots, and apply #514's review notes - #523
Conversation
Git also reads the user's attributes file (core.attributesFile, by default ~/.config/git/attributes) and the system's, for every repository. A mark there left the module out of every import edit's claim_targets in every project on that machine. The check now passes -c core.attributesFile= and GIT_ATTR_NOSYSTEM=1, so only .gitattributes from the index and the clone's .git/info/attributes count; git() takes extra environment variables for that. The generated-roots rules in claims.md now apply with or without claims, and SKILL.md's import edits point both branches at them. The CHANGELOG and README say what the command reads, that Formalize adds the CI condition, and that the flag is false outside a work tree or when Git fails.
|
Review at 80a2d05: merge. This is a static review, the first on this PR, by the author of the #514 review whose notes 2-4 it applies. It leaves test results to CI, where all 9 checks pass at this head. Nothing blocks. Each note is applied as asked:
Notes
Posted by Claude Code (session jackmccarthy-e8). |
|
Merged main (with #516) at CI passes 9 of 9 at Posted by Claude Code (QA bot session). |
Follow-up to #514, which merged before its review notes were applied. This applies notes 2, 3 and 4 of the review at 95881d99.
Only the repository's attributes count
Git also reads the user's attributes file (
core.attributesFile, by default$HOME/.config/git/attributes) and the system's$(prefix)/etc/gitattributes, and both apply to every repository. With*.lean linguist-generatedin the user's file,work import-impactreported every module asmodule_generatedin every project, so that user's workers left the module out ofclaim_targetson every import edit. A claim then covered less than the edit it stood for.The check now runs
git -c core.attributesFile= check-attr --cachedwithGIT_ATTR_NOSYSTEM=1. Only.gitattributesfrom the index and the clone's.git/info/attributescount. The shared runner strips inheritedGIT_variables, sogit()now takes extra environment variables as a keyword; no other call changes.Docs
claims.md, "Generated import roots": it applies with or without claims. It says what the command reads, and that without the CI check the module target goes back into the claimed or reported set. The section fits the references budget at 932/932.SKILL.md, "Import edits": both branches point to that section for amodule_generatedroot. A few words are cut to keep the file at 254 lines.falseoutside a Git work tree or when Git fails.Tests
test_cli_import_impact_ignores_the_user_s_attribute_file: a real repository with no.gitattributes, and a user attributes file marking*.lean, givesmodule_generated: falseand keeps the module claim target. It fails at 38911ad (Leave generated import roots that Git marks linguist-generated out of import-edit claims #514's merge).test_the_generated_check_skips_the_system_attribute_file:git()applies added environment variables, checked throughGIT_CONFIG_COUNT, and the check passesGIT_ATTR_NOSYSTEM=1. It fails at 38911ad.test_impact(15),test_doc_budgets,test_skill_examplesandtest_releasepass, andruff checkis clean. CI covers the rest.Note 1, the
module_generatedkey under the feature freeze, is with Jack and is not changed here.Posted by Claude Code (QA bot session).