GitNexus/gitnexus/src/core
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
..
augmentation fix(mcp): make impact/context reproducible — deterministic ordering on every capped query (#2787) (#2796) 2026-08-02 17:03:15 +00:00
embeddings fix(mcp): stop scaling the detect_changes query with the diff's hunk count (#2915) (#2930) 2026-08-12 14:51:17 +01:00
graph fix(check): stop reporting erased and deferred imports as initialization cycles (#2934) 2026-08-12 17:09:32 +00:00
group fix(group)!: honour --exact-only, drop inert --allow-stale, report every matching stage 2026-08-27 12:52:17 +00:00
incremental feat(spring): model AOP transactions, caching, and security (#2783) 2026-08-01 17:22:12 +01:00
ingestion fix(ingestion): index NestJS decorator routes so api_impact and route_map stop reporting live endpoints as non-existent (#3017) 2026-08-27 08:35:36 +01:00
lbug fix(storage): load VECTOR only when needed (#3045) 2026-08-26 12:57:56 +00:00
platform fix(analyze): load VECTOR before the incremental writeback touches embedding rows (#2623) (#2624) 2026-07-22 12:27:00 +01:00
search fix(fts): keep binary payloads out of the description column, confine an unbuildable index to its own table (#2919) 2026-08-10 21:16:11 +01:00
tree-sitter fix(tree-sitter): recover declarations after embedded NUL bytes (#2430) 2026-07-11 08:33:50 +01:00
wiki fix(mcp): stop scaling the detect_changes query with the diff's hunk count (#2915) (#2930) 2026-08-12 14:51:17 +01:00
analysis-features.ts feat(spring): build bean candidate inventory (#2494) 2026-07-20 09:28:23 +01:00
analyzer-identity.ts fix(analyze): replace the hand-incremented schema version with a derived DDL fingerprint (#2798) (#2808) 2026-08-03 15:04:30 +01:00
embedding-checkpoint.ts fix(embeddings): retry unparseable 200 responses and survive partial embedding failures (#2790) (#2795) 2026-08-02 20:43:59 +00:00
embedding-count.ts fix(embeddings): retry unparseable 200 responses and survive partial embedding failures (#2790) (#2795) 2026-08-02 20:43:59 +00:00
embedding-mode.ts feat: add optional limit arg to --embeddings flag (closes #382) (#1375) 2026-05-06 16:31:28 +01:00
git-staleness.ts fix(core): ensure path prefix and traversal guards support root directories (#2559) 2026-07-20 08:12:15 +01:00
index-freshness.ts fix: close the nine follow-up review findings from #2856 (routes, receiver typing, truncation honesty) (#2899) 2026-08-09 11:44:52 +01:00
logger.ts fix(mcp): tolerate adapter-materialized line:0 in impact callgraph mode (#2279) (#2283) 2026-06-23 20:35:49 +01:00
run-analyze.ts feat(spring): detect non-HTTP handler entry points (#2891) 2026-08-16 15:16:21 +01:00