test(gitignore): close getSettablePaths coverage gaps and fix 3 drifted entries#1964
Open
saitota wants to merge 3 commits into
Open
test(gitignore): close getSettablePaths coverage gaps and fix 3 drifted entries#1964saitota wants to merge 3 commits into
saitota wants to merge 3 commits into
Conversation
The getSettablePaths coverage test guarded commands/skills/subagents and mcp/hooks/permissions, but not the ignore feature, so the implicit coupling between each tool's ignore getSettablePaths() (the real output path, e.g. .augmentignore) and the hand-written GITIGNORE_ENTRY_REGISTRY went unverified. Add toolIgnoreFactories to the fileFeatures list. ToolIgnoreFactory has no meta, so guard the supportsProject lookup with an 'in' check to keep the union type-safe.
Extend the getSettablePaths coverage guard to catch the drifts it previously missed, and fix the drifts it surfaced. Coverage gaps closed: - rules feature is now checked (root/alternativeRoots as files, nonRoot as dir); it was previously unguarded. - Reverse check added: every non-general registry entry must map to a real emitted output, catching ghost entries left behind after a rename. - Directory matching is now exact instead of prefix-based, so renaming e.g. .augment/commands/ to .augment/cmds/ fails instead of matching a parent. Deliberate subtree-coverage roots (.cursor, .agents, .goose, .rovodev/.rulesync) are listed explicitly and asserted to exist. Drifts fixed (were shipping un-gitignored / stale): - junie root rule moved to .junie/AGENTS.md (added; .junie/guidelines.md kept as legacy import fallback). - junie non-root rules under .junie/memories/ (added). - kilo MCP output moved to root kilo.json; removed the stale **/.kilo/mcp.json ghost entry. Regenerated .gitignore accordingly.
Address claude-review doc-accuracy notes (no behavior change): - deepagents hooks is excepted because its factory is supportsProject:false (the project-scope collector skips it), not because its path is home-dir-specific; move it out of the home-dir group with the correct reason. - Note in the rules loop that rules are universally project-scoped, so it intentionally omits the supportsProject guard the other loops use.
77ca25b to
cd1812a
Compare
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.
Background
The
getSettablePaths coveragetest from #1929 couples each tool’sgetSettablePaths(the real output location) to the hand-maintainedGITIGNORE_ENTRY_REGISTRY. Drift there produces no type error and no test failure — it surfaces only as generated files committed to a user’s repo.The guard had gaps: it skipped
rulesandignore, matched directories by prefix (a renamed dir could pass by matching a parent), and never checked for ghost entries no tool emits. Closing them surfaced 3 already-shipping drifts.Changes
Coverage gaps closed:
ignoreandrulesto the checks (rulesgets its own loop for itsroot/alternativeRoots/nonRootshape)..augment/commands/→.augment/cmds/fails instead of matching a parent. Deliberate subtree roots (.cursor,.agents,.goose,.rovodev/.rulesync) are listed explicitly and asserted to exist.generalentry must map to a real emitted output, catching ghosts.Drifts fixed (were shipping un-gitignored / stale):
**/.junie/AGENTS.md(guidelines.mdkept as legacy fallback)**/.junie/memories/**/.kilo/mcp.jsonghost (MCP output moved to rootkilo.json).gitignoreregenerated accordingly.Related
Test plan
pnpm cicheck:code— clean;gitignore-entries.test.ts218 pass (fails when a drift is reintroduced). One pre-existing unrelated failure (warp-permissions, also onmain).pnpm cicheck:content— cleanpnpm dev gitignore— regenerated, idempotent