GitNexus/gitnexus/test/integration/group
Gergo Magyar ed0c0b9a1d fix(group)!: honour --exact-only, drop inert --allow-stale, report every matching stage
Addresses the review findings on #3020, all of which are the same defect the PR
itself is about: group-sync surface that describes behaviour the pipeline does
not have.

`exactOnly` was inert in exactly the way `skipEmbeddings` was — declared on
`SyncOptions`, threaded through the CLI and the MCP tool, and read by nothing —
and strictly worse, because the stage it promised to suppress DOES run and DOES
write `matchType:'wildcard'` links into contracts.json and the bridge, which
`group impact` and cross-repo `trace` then traverse. It is now honoured rather
than deleted: unlike the never-built BM25/embedding stages, the stage it names
exists, so the flag describes a real choice. The substituted result is
`{ matched: [], remaining: unmatched }`, not an empty result — `wildcard.remaining`
IS `SyncResult.unmatched`, so skipping the stage has to leave its input unmatched
rather than dropping it from the count an operator reads.

`allowStale` had no such stage to gate: `syncGroup` emits no stale warning at any
point (the `checkStaleness` call lives in `groupStatus`, a different path), so it
is removed under the same rationale as `skipEmbeddings`.

`group sync` now prints every matching stage instead of `exact` alone. The old
block printed a `Matching cascade:` header and counted only exact links while the
next line reported `result.crossLinks.length` — which also includes `manifest` and
`wildcard` — so for any group with those the two numbers disagreed with nothing on
screen explaining why. Counting is an exhaustive `Record<MatchType, number>`, so a
new MatchType fails the build here instead of going silently uncounted, and reads
through `?? 0` so a legacy registry carrying a removed matchType prints an honest
count rather than `NaN`.

Also: the MCP `group_sync` description no longer omits the wildcard stage that
always runs, `exactOnly`'s description no longer refers to a "cascade", and
bench/cross-repo-trace/verify.mjs no longer generates the removed threshold keys
into a fresh group.yaml.

Tests: `sync-exact-only.test.ts` pins both directions of the gate (mutation-verified:
removing the gate, or returning `remaining: []`, both go red). `group-tools.test.ts`
pins that the MCP schema dropped `skipEmbeddings` and kept `exactOnly`.
`group-cli.test.ts` pins that both removed flags are rejected, with `--exact-only`
as an accepted-flag control. `config-parser.test.ts` now pins that legacy keys are
PRESERVED (measured, not assumed) rather than only that parsing does not throw.

The type narrowing's fallout in test files is cleared: `tsc -p tsconfig.test.json`
is 987 errors at head against 987 measured on origin/main, with the two error sets
identical — zero net, zero new, zero masked.

Verification: `tsc --noEmit` exit 0; prettier clean; eslint 0 errors (2 warnings,
both pre-existing on base); 69 test files / 1169 tests green across
test/unit/group, test/integration/group, tools, cli-i18n and cli-index-help.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-27 12:52:17 +00:00
..
fixtures fix(group): cache read-only bridge handle to fix Windows @group reopen (#2274) (#2313) 2026-06-30 07:49:47 +01:00
bridge-cache-reopen.test.ts fix(ci): shard platform-sensitive matrix + spawn built CLI to fix Windows cross-platform timeout (#2394) 2026-07-08 09:09:11 +01:00
cross-trace-e2e.test.ts fix(lbug/mcp): exact symbol content + 0-based line storage with 1-based MCP display (#2377, #2379) (#2380) 2026-07-06 16:16:45 +01:00
group-cli.test.ts fix(group)!: honour --exact-only, drop inert --allow-stale, report every matching stage 2026-08-27 12:52:17 +00:00
group-impact.test.ts feat: cross-repo impact analysis (#794) — @repo MCP routing + group resources (#984) 2026-04-20 11:55:07 +01:00
group-service-sync-lazy-import.test.ts perf(mcp): cut the analyze-only language-provider closure out of MCP server startup (#2802) (#2806) 2026-08-03 21:26:13 +01:00
group-sync-lock-concurrency.test.ts fix(group)!: honour --exact-only, drop inert --allow-stale, report every matching stage 2026-08-27 12:52:17 +00:00
group-sync.test.ts feat(group): add sync pipeline, CLI, MCP tools, and monorepo fixture 2026-04-02 00:40:31 +03:00
http-route-resolve-symbol.test.ts feat(routes): support JS data route tables (#2972) 2026-08-18 04:39:45 +01:00
include-extractor-sync.test.ts feat(cpp): parse CUDA source extensions (#2213) 2026-06-16 07:32:53 +01:00
manifest-resolve-symbol-2325.test.ts fix(group): replace LadybugDB-incompatible multi-label Cypher (#2325) (#2327) 2026-06-30 15:08:43 +01:00
manifest-synthetic-impact-lbug.test.ts fix(group): preserve manifest-only impact crossings (#2784) 2026-08-01 20:24:06 +01:00
monorepo-sync.test.ts feat(group): add sync pipeline, CLI, MCP tools, and monorepo fixture 2026-04-02 00:40:31 +03:00