Skip to content

test(gitignore): close getSettablePaths coverage gaps and fix 3 drifted entries#1964

Open
saitota wants to merge 3 commits into
dyoshikawa:mainfrom
saitota:test/gitignore-ignore-coverage
Open

test(gitignore): close getSettablePaths coverage gaps and fix 3 drifted entries#1964
saitota wants to merge 3 commits into
dyoshikawa:mainfrom
saitota:test/gitignore-ignore-coverage

Conversation

@saitota

@saitota saitota commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Background

The getSettablePaths coverage test from #1929 couples each tool’s getSettablePaths (the real output location) to the hand-maintained GITIGNORE_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 rules and ignore, 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:

  • Added ignore and rules to the checks (rules gets its own loop for its root/alternativeRoots/nonRoot shape).
  • Directory matching is now exact, not prefix, so .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.
  • Reverse check: every non-general entry must map to a real emitted output, catching ghosts.

Drifts fixed (were shipping un-gitignored / stale):

  • junie root rule → **/.junie/AGENTS.md (guidelines.md kept as legacy fallback)
  • junie non-root rules → **/.junie/memories/
  • removed stale **/.kilo/mcp.json ghost (MCP output moved to root kilo.json)

.gitignore regenerated accordingly.

Related

Test plan

  • pnpm cicheck:code — clean; gitignore-entries.test.ts 218 pass (fails when a drift is reintroduced). One pre-existing unrelated failure (warp-permissions, also on main).
  • pnpm cicheck:content — clean
  • pnpm dev gitignore — regenerated, idempotent

saitota added 2 commits June 20, 2026 00:40
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.
@saitota saitota changed the title test(gitignore): extend getSettablePaths coverage to the ignore feature test(gitignore): close getSettablePaths coverage gaps and fix 3 drifted entries Jun 19, 2026
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.
@saitota saitota force-pushed the test/gitignore-ignore-coverage branch from 77ca25b to cd1812a Compare June 19, 2026 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant