Skip to content

Local code intelligence for developers and AI agents. Connect code, docs and infrastructure in a persistent graph, with CBM Lens, MCP tools, agent integrations and change-aware test selection.

test(discovery): flip .claude-worktrees skip-dir reproduction to a green guard

Martin Vogele6a46bd19ca9
diff --git a/tests/repro/repro_invariant_discovery_fqn.c b/tests/repro/repro_invariant_discovery_fqn.c
index 3e2b1bc5b..d4757a9ff 100644
--- a/tests/repro/repro_invariant_discovery_fqn.c
+++ b/tests/repro/repro_invariant_discovery_fqn.c
@@ -202,21 +202,14 @@ TEST(invariant_discovery_always_skip_dirs) {
{ "vendored", 1 }, /* GREEN */
{ ".qdrant_code_embeddings", 1 }, /* GREEN */
- /* ── RED: NOT yet in ALWAYS_SKIP_DIRS ─────────────────────────── */
/*
- * .claude-worktrees is the gap documented in QUALITY_ANALYSIS gap #1.
- * The ALWAYS_SKIP_DIRS array only contains ".claude" and ".worktrees"
- * (two separate entries). The compound name ".claude-worktrees" is
- * absent, so cbm_discover() descends into it.
- *
- * expected_green == 0 → we EXPECT the canary to be found (bug present).
- * The ASSERT_EQ at the end treats found-when-expected-found as a RED
- * reproduction, not a test failure.
- *
- * WHY RED: src/discover/discover.c ALWAYS_SKIP_DIRS does not contain
- * ".claude-worktrees". Fix: add ".claude-worktrees" next to ".claude".
+ * .claude-worktrees was QUALITY_ANALYSIS gap #1 (a RED reproduction): the
+ * compound name was absent from ALWAYS_SKIP_DIRS, so cbm_discover()
+ * descended into it. It is now listed in src/discover/discover.c
+ * ALWAYS_SKIP_DIRS (next to ".claude"), so the canary is correctly skipped
+ * — the bug is fixed and this is now a GREEN guard against regressing it.
*/
- { ".claude-worktrees", 0 }, /* RED — gap #1 */
+ { ".claude-worktrees", 1 }, /* GREEN — gap #1 fixed */
};
int n = (int)(sizeof(cases) / sizeof(cases[0]));