GitNexus/gitnexus/test/unit/group
henry201605 a93ecee068
fix(group): recognize OpenFeign @RequestLine on plain interfaces (no @FeignClient) (#1917)
* fix(group): recognize OpenFeign @RequestLine on plain interfaces (no @FeignClient)

PR #1904 gated @RequestLine consumer extraction on the enclosing
interface also carrying @FeignClient. That guard is wrong: @RequestLine
is a core feign.* annotation used with Feign.builder(), while
@FeignClient is the Spring Cloud variant that uses Spring MVC
annotations (@GetMapping etc.) — the two are effectively mutually
exclusive. Requiring @FeignClient therefore excluded the annotation's
primary, canonical usage, so the feature recognized nothing on real
core-Feign client interfaces.

Fix: drop the @FeignClient requirement for @RequestLine. The match still
requires an enclosing interface (Feign proxies are always interfaces),
and the `RequestLine` annotation name is itself a strong,
framework-specific signal, so false-positive risk stays low. A
@FeignClient(path=...) prefix is still applied when present.

The @(Get|Post|...)Mapping consumer path keeps its @FeignClient
requirement: those annotations are generic Spring MVC and need the Feign
context to be disambiguated from provider routes.

Verification (real-world, not just synthetic fixtures):
- A real client-jar consumer (BigModeClientService.java: a plain
  interface with 12 @RequestLine methods, no @FeignClient) now yields 12
  openfeign consumer contracts; it yielded 0 before this change.
- End-to-end `group sync` over that consumer repo + its FastAPI provider
  repo (with zero hand-written links) produces 12 exact cross-links
  (confidence 1.0), Java @RequestLine consumer → Python route provider.
- The prior test that asserted the wrong behavior
  ("ignores @RequestLine on interfaces without @FeignClient") is
  reversed into a realistic core-Feign fixture.
- Full test/unit/group suite (579) green; tsc and prettier clean.

* test(group): add negative cases for relaxed @RequestLine matcher

Per review on #1917 — guard the no-@FeignClient relaxation with explicit
negative tests: malformed @RequestLine values (no verb / no leading-slash
path / unknown verb) yield no contract, and @RequestLine on a concrete
class method (not an interface) is not emitted as a consumer.

---------

Co-authored-by: henry <zhangwei2017@unipus.cn>
Co-authored-by: Gergő Magyar <gergomagyar@icloud.com>
2026-05-30 12:25:13 +01:00
..
bridge-db-edge.test.ts fix(deps): upgrade @ladybugdb/core to 0.16.0 to resolve native segfaults (#1235) 2026-04-30 17:40:39 +01:00
bridge-db.test.ts fix(deps): upgrade @ladybugdb/core to 0.16.0 to resolve native segfaults (#1235) 2026-04-30 17:40:39 +01:00
bridge-storage-tempfile.test.ts fix(security): close URL/regex/tag-filter sanitization cluster (U7) (#1330) 2026-05-08 07:11:29 +01:00
config-parser.test.ts feat: add IncludeExtractor for C++ cross-repo include tracking (group) (#1156) 2026-05-09 09:31:59 +01:00
cross-impact-phase2-timeout.test.ts fix(ingestion): close ReDoS in cobol-preprocessor + rust-workspace + resource-exhaustion in cross-impact (U8) (#1331) 2026-05-08 09:10:07 +01:00
cross-impact.test.ts fix(group): bubble local-impact phase errors in groupImpact (#1004) (#1007) 2026-04-21 11:44:16 +01:00
elixir-workspace-extractor.test.ts feat(group): workspace extractors for Node, Python, Go, Java, Elixir (#1260) 2026-05-04 09:43:21 +01:00
fixtures.ts feat(group): bridge.lbug storage + contract matching expansion (1/4 of #606 split) (#795) 2026-04-11 19:46:12 +01:00
go-workspace-extractor.test.ts feat(group): workspace extractors for Node, Python, Go, Java, Elixir (#1260) 2026-05-04 09:43:21 +01:00
group-path-utils.test.ts feat: cross-repo impact analysis (#794) — @repo MCP routing + group resources (#984) 2026-04-20 11:55:07 +01:00
group-service-group-mode.test.ts feat: cross-repo impact analysis (#794) — @repo MCP routing + group resources (#984) 2026-04-20 11:55:07 +01:00
group-tools.test.ts feat: cross-repo impact analysis (#794) — @repo MCP routing + group resources (#984) 2026-04-20 11:55:07 +01:00
grpc-extractor.test.ts fix(group): stop Node gRPC loadPackageDefinition gate from matching every member call (#1916) 2026-05-30 09:31:36 +01:00
http-route-extractor.test.ts fix(group): recognize OpenFeign @RequestLine on plain interfaces (no @FeignClient) (#1917) 2026-05-30 12:25:13 +01:00
http-route-multi-verb.test.ts fix(extractors): resolve 3 silent contract mis-resolution bugs (#793) (#817) 2026-04-14 08:03:02 +01:00
impact-by-uid.test.ts feat(group): add sync pipeline, CLI, MCP tools, and monorepo fixture 2026-04-02 00:40:31 +03:00
include-extractor.test.ts fix(windows): 32767-char tree-sitter crash + VECTOR extension SIGSEGV (#1433) 2026-05-10 16:00:36 +01:00
insecure-tempfile.test.ts fix(security): close URL/regex/tag-filter sanitization cluster (U7) (#1330) 2026-05-08 07:11:29 +01:00
java-workspace-extractor.test.ts feat(group): workspace extractors for Node, Python, Go, Java, Elixir (#1260) 2026-05-04 09:43:21 +01:00
manifest-extractor.test.ts feat(ingestion): add thrift contracts impl (#1234) 2026-05-06 09:19:10 +01:00
matching.test.ts feat(ingestion): add thrift contracts impl (#1234) 2026-05-06 09:19:10 +01:00
node-workspace-extractor.test.ts feat(group): workspace extractors for Node, Python, Go, Java, Elixir (#1260) 2026-05-04 09:43:21 +01:00
python-workspace-extractor.test.ts feat(group): workspace extractors for Node, Python, Go, Java, Elixir (#1260) 2026-05-04 09:43:21 +01:00
rust-workspace-extractor.test.ts feat(core): adopt pino structured logger (#1336) 2026-05-07 20:56:25 +01:00
service-boundary-detector.test.ts fix(group): address 4 HIGH-priority issues from PR #626 review 2026-04-02 12:55:33 +03:00
service.test.ts feat: cross-repo impact analysis (#794) — @repo MCP routing + group resources (#984) 2026-04-20 11:55:07 +01:00
storage.test.ts fix(group): address 4 HIGH-priority issues from PR #626 review 2026-04-02 12:55:33 +03:00
sync.test.ts fix(group): move manifest/workspace extraction before closeLbug (#1802) (#1807) 2026-05-24 19:53:07 +01:00
thrift-extractor.test.ts fix(windows): 32767-char tree-sitter crash + VECTOR extension SIGSEGV (#1433) 2026-05-10 16:00:36 +01:00
topic-extractor.test.ts fix(group): contract extractors honour .gitnexusignore via shared IgnoreService (#1185) (#1247) 2026-05-01 16:42:21 +01:00
types.test.ts feat(ingestion): add thrift contracts impl (#1234) 2026-05-06 09:19:10 +01:00