Skip to content

Commit e6a46bd

Browse files
committed
test(discovery): flip .claude-worktrees skip-dir reproduction to a green guard
QUALITY_ANALYSIS gap #1 (.claude-worktrees absent from ALWAYS_SKIP_DIRS) is fixed — src/discover/discover.c now lists ".claude-worktrees" next to ".claude", so cbm_discover() correctly skips it. The reproduction's RED expectation (expected the canary to be indexed) was stale and the lifecycle assertion fired. Reclassify it as a GREEN guard (expect skipped) so it now protects against regressing the skip, per the test's own RED-becomes-GREEN workflow. Signed-off-by: Martin Vogel <[email protected]>
1 parent 77bd8ec commit e6a46bd

1 file changed

Lines changed: 6 additions & 13 deletions

File tree

‎tests/repro/repro_invariant_discovery_fqn.c‎

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -202,21 +202,14 @@ TEST(invariant_discovery_always_skip_dirs) {
202202
{ "vendored", 1 }, /* GREEN */
203203
{ ".qdrant_code_embeddings", 1 }, /* GREEN */
204204

205-
/* ── RED: NOT yet in ALWAYS_SKIP_DIRS ─────────────────────────── */
206205
/*
207-
* .claude-worktrees is the gap documented in QUALITY_ANALYSIS gap #1.
208-
* The ALWAYS_SKIP_DIRS array only contains ".claude" and ".worktrees"
209-
* (two separate entries). The compound name ".claude-worktrees" is
210-
* absent, so cbm_discover() descends into it.
211-
*
212-
* expected_green == 0 → we EXPECT the canary to be found (bug present).
213-
* The ASSERT_EQ at the end treats found-when-expected-found as a RED
214-
* reproduction, not a test failure.
215-
*
216-
* WHY RED: src/discover/discover.c ALWAYS_SKIP_DIRS does not contain
217-
* ".claude-worktrees". Fix: add ".claude-worktrees" next to ".claude".
206+
* .claude-worktrees was QUALITY_ANALYSIS gap #1 (a RED reproduction): the
207+
* compound name was absent from ALWAYS_SKIP_DIRS, so cbm_discover()
208+
* descended into it. It is now listed in src/discover/discover.c
209+
* ALWAYS_SKIP_DIRS (next to ".claude"), so the canary is correctly skipped
210+
* — the bug is fixed and this is now a GREEN guard against regressing it.
218211
*/
219-
{ ".claude-worktrees", 0 }, /* RED — gap #1 */
212+
{ ".claude-worktrees", 1 }, /* GREEN — gap #1 fixed */
220213
};
221214

222215
int n = (int)(sizeof(cases) / sizeof(cases[0]));

0 commit comments

Comments
 (0)