config-audit/tests/scanners
Kjell Tore Guttormsen f4bf3ae2cb fix(acr): feature-gap scopes presence checks to authored config + reads settings cascade (M-BUG-13)
The GAP scanner's 25 presence checks ran over the full includeGlobal discovery, so
this plugin's own examples/optimal-setup (vendored across plugin-cache versions)
satisfied every tier-3 check — masking real feature gaps to GAP=0 on ANY target.
And the real ~/.claude/settings.json is invisible to the settings-key checks
(includeGlobal gotcha + maxFiles cap), which would flip statusLine/autoMode to
false positives once the maskers were removed.

- isAuthoredConfig: exclude plugin-bundled (~/.claude/plugins/) + nested examples/
  and tests/fixtures/ (relPath-relative, so a fixture scanned AS the target keeps
  its own files) from ctx.files + parsedSettings.
- readSettingsCascade: read the user->project->local settings cascade directly and
  merge into parsedSettings — immune to the discovery cap/gotcha.

Empty target: ~0 (masked) -> 18 humanized opportunities; no statusLine/autoMode
false positives. Frozen v5.0.0 snapshots + SC-5/6/7 byte-stable (marketplace-medium
has no nested demo trees; hermetic-HOME cascade adds nothing). Suite 1350->1355/0.
Found by dogfooding feature-gap against the machine.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01683eAqVecv9VZfQzL8CQ9h
2026-06-30 10:09:10 +02:00
..
accurate-tokens.test.mjs test: isolate HOME in all CLI-spawning tests (close leak class) 2026-06-18 18:17:09 +02:00
agent-listing-scanner.test.mjs feat(scanner): add AGT per-agent description bloat advisory (v5.9 B1-rest) 2026-06-23 16:27:24 +02:00
cache-prefix.test.mjs fix(acr): CPS ignores fenced/inline code + CC-stable path vars (M-BUG-7) 2026-06-26 12:45:14 +02:00
campaign-cli.test.mjs feat(campaign): machine-wide always-loaded token roll-up — pure layer (v5.9 B2a) 2026-06-23 16:57:31 +02:00
campaign-export-cli.test.mjs feat(campaign): plan export + execution-by-reuse (v5.7 Fase 2 Block 4c) 2026-06-23 10:08:04 +02:00
campaign-write-cli.test.mjs feat(campaign): refresh-tokens live cross-repo token sweep (v5.9 B2b-2) [skip-docs] 2026-06-23 17:23:15 +02:00
claude-md-linter.test.mjs feat(skl,cml): --context-window calibration, advisory when unknown (v5.11 B8) [skip-docs] 2026-06-23 21:44:52 +02:00
cli-humanizer.test.mjs feat(tok,acr): v5.6 B2 — load-pattern column in token-hotspots 2026-06-20 20:21:01 +02:00
collision.test.mjs feat(config-audit): cross-plugin collision scanner COL (v5 N6) [skip-docs] 2026-05-01 07:46:15 +02:00
conflict-detector.test.mjs fix(acr): conflict-detector segregates plugin-bundled configs (M-BUG-2) 2026-06-26 17:24:08 +02:00
disabled-in-schema.test.mjs feat(dis): flag forbidden-param permission rules CC silently ignores 2026-06-19 14:04:25 +02:00
drift-cli.test.mjs test: isolate HOME in all CLI-spawning tests (close leak class) 2026-06-18 18:17:09 +02:00
feature-gap-scanner.test.mjs fix(acr): feature-gap scopes presence checks to authored config + reads settings cascade (M-BUG-13) 2026-06-30 10:09:10 +02:00
fix-cli.test.mjs test(fix-cli): close missed HOME-leak — isolate spawns + lock SKL/COL out 2026-06-18 18:50:20 +02:00
fix-engine.test.mjs feat(ultraplan-local): v1.6.0 — /ultraresearch-local deep research command 2026-04-08 08:58:35 +02:00
hook-additional-context.test.mjs feat(hooks): additionalContext injection advisory + filter-before lever (v5.10 B5) [skip-docs] 2026-06-23 20:28:33 +02:00
hook-validator.test.mjs feat(hooks): additionalContext injection advisory + filter-before lever (v5.10 B5) [skip-docs] 2026-06-23 20:28:33 +02:00
import-resolver.test.mjs feat(ultraplan-local): v1.6.0 — /ultraresearch-local deep research command 2026-04-08 08:58:35 +02:00
knowledge-refresh-cli.test.mjs feat(knowledge): knowledge-refresh — living register, deterministic stale core + web poll (v5.7 Chunk 3) 2026-06-21 19:22:57 +02:00
lint-default-output.test.mjs test(snapshots): make byte/snapshot tests hermetic + re-seed baseline 2026-06-18 12:26:00 +02:00
manifest.test.mjs fix(manifest): classify ~/.claude.json:projects MCP as per-repo delta, not shared [skip-docs] 2026-06-23 17:14:28 +02:00
mcp-config-validator.test.mjs feat(tokens): MCP tool-schema deferral check + CLI-over-MCP lever (v5.10 B4) 2026-06-23 19:59:14 +02:00
mcp-deferral.test.mjs feat(tokens): MCP tool-schema deferral check + CLI-over-MCP lever (v5.10 B4) 2026-06-23 19:59:14 +02:00
optimization-lens-scanner.test.mjs feat(opt): optimization lens CA-OPT-001 (procedure→skill) — v5.7 Fase 1 Chunk 2a 2026-06-20 23:10:03 +02:00
optimize-lens-cli.test.mjs fix(acr): optimize lens scopes out plugin-bundled CLAUDE.md + unique candidate paths (M-BUG-11) 2026-06-30 06:44:36 +02:00
output-style-scanner.test.mjs feat(ost): v5.6 C — output-style scanner (CA-OST, count 13→14) 2026-06-20 21:02:44 +02:00
plugin-health-scanner.test.mjs feat(plh): flag plugin-agent frontmatter Claude Code ignores (v5.5.0 / E) 2026-06-20 11:11:12 +02:00
posture-grade-stability.test.mjs feat(skill-listing): add CA-SKL-002 aggregate listing-budget check 2026-06-18 18:06:17 +02:00
posture-humanizer.test.mjs fix(acr): posture --output-file humanizes findings in default mode (M-BUG-12) 2026-06-30 09:10:07 +02:00
posture.test.mjs test: isolate HOME in all CLI-spawning tests (close leak class) 2026-06-18 18:17:09 +02:00
rollback-engine.test.mjs feat(ultraplan-local): v1.6.0 — /ultraresearch-local deep research command 2026-04-08 08:58:35 +02:00
rules-validator.test.mjs fix(acr): RUL resolves rule glob against the rule's own project root, not the scan root (M-BUG-9) 2026-06-26 10:56:39 +02:00
scan-orchestrator-humanizer.test.mjs feat(scanner): add AGT agent-listing always-loaded budget finding (v5.9 B1) 2026-06-23 15:02:59 +02:00
scan-orchestrator.test.mjs feat(ultraplan-local): v1.6.0 — /ultraresearch-local deep research command 2026-04-08 08:58:35 +02:00
self-audit.test.mjs feat(config-audit): self-audit --check-readme flag (v5 F6) [skip-docs] 2026-05-01 07:09:26 +02:00
settings-validator.test.mjs fix(acr): SET typo-gates unknown-key false positives (M-BUG-10) 2026-06-26 15:15:14 +02:00
skill-listing-scanner.test.mjs feat(skl,cml): --context-window calibration, advisory when unknown (v5.11 B8) [skip-docs] 2026-06-23 21:44:52 +02:00
token-hotspots-cli.test.mjs test: isolate HOME in all CLI-spawning tests (close leak class) 2026-06-18 18:17:09 +02:00
token-hotspots-deferral.test.mjs feat(tokens): MCP tool-schema deferral check + CLI-over-MCP lever (v5.10 B4) 2026-06-23 19:59:14 +02:00
token-hotspots.test.mjs fix(acr): token estimator discounts block-level HTML comments (M-BUG-6) 2026-06-26 14:29:24 +02:00