|
12 | 12 | > `neighbors` arguments, pass stringified JSON, or use vector search for |
13 | 13 | > questions the graph answers exactly. This guide keeps them on the rails. |
14 | 14 | > |
15 | | -> Calibrated against ontology version **11** (see `ast_java.ONTOLOGY_VERSION` / |
16 | | -> `java_ontology.py` valid sets). Design rationale: |
17 | | -> [`propose/completed/MCP-API-V2-REDESIGN-PROPOSE.md`](../propose/completed/MCP-API-V2-REDESIGN-PROPOSE.md). |
| 15 | +> Calibrated against ontology version **12** (see `ast_java.ONTOLOGY_VERSION` / |
| 16 | +> `java_ontology.py` valid sets): HTTP brownfield rename (`@CodebaseHttpClient`), |
| 17 | +> shared `CodebaseHttpMethod` enum, inbound layer-C HTTP routes replace same-method |
| 18 | +> built-in rows. **Design rationale:** navigation surface and tools — |
| 19 | +> [`propose/completed/MCP-API-V2-REDESIGN-PROPOSE.md`](../propose/completed/MCP-API-V2-REDESIGN-PROPOSE.md); |
| 20 | +> HTTP brownfield rename, `CodebaseHttpMethod`, and exclusivity — |
| 21 | +> [`propose/HTTP-ROUTE-METHOD-ENUM-PROPOSE.md`](../propose/HTTP-ROUTE-METHOD-ENUM-PROPOSE.md). |
18 | 22 |
|
19 | 23 | --- |
20 | 24 |
|
@@ -51,6 +55,14 @@ Treat the following as out of frame: |
51 | 55 | When MCP disagrees with the open file, the file wins; report the |
52 | 56 | disagreement as evidence of staleness, not as a contradiction. |
53 | 57 |
|
| 58 | +### Brownfield HTTP annotations (exclusivity) |
| 59 | + |
| 60 | +When a method carries **`@CodebaseHttpRoute`** or **`@CodebaseHttpClient`** (including plural containers), the extractor treats that annotation as the **only** source of truth for the facets it declares (`path`, HTTP verb, `targetService`, `clientKind`, etc.). Framework annotations on the **same** method that would normally drive route or client inference—Spring MVC/WebFlux mapping annotations, **`@FeignClient`**-scoped method mappings, JAX-RS verb annotations, and the like—are **bypassed** for that axis. Do not assume the graph “merges” brownfield with the framework row; for inbound HTTP, layer-C brownfield routes **replace** same-method built-in Spring rows in the graph. |
| 61 | + |
| 62 | +**Observability:** If brownfield and shadowable framework annotations **co-exist** on a method, a **verbose** graph build emits a structured stderr line with **`event=brownfield-exclusivity-shadowing`** (severity INFO), listing which framework annotation simple names were skipped. Typical operator invocation: `.venv/bin/python build_ast_graph.py --source-root … --kuzu-path … --verbose`. Non-verbose builds may omit this traffic. |
| 63 | + |
| 64 | +**UC10 (silent disagreement):** The brownfield annotation wins even when its HTTP verb or path disagrees with what Spring or Feign shows on the method (for example Feign **`@GetMapping`** vs brownfield **`CodebaseHttpMethod.POST`**). There is **no** merge-time warning for that mismatch—wrong assumptions surface at runtime (for example HTTP 405) or through code review. When auditing, prefer the indexed brownfield row and, if needed, the verbose shadowing log over the framework-only reading. |
| 65 | + |
54 | 66 | **Workflow (GPS model):** |
55 | 67 |
|
56 | 68 | 1. **Locate** — `search` (natural language / fragment) or `find` (structured `NodeFilter`). |
@@ -193,7 +205,7 @@ Exact allowed values for roles, capabilities, client kinds, etc. live in `java_o |
193 | 205 | - **Batching:** Multiple origins are expanded; pagination slices the **combined** edge list — use larger `limit` when batching many ids. |
194 | 206 | - **Confidence:** Cross-service edges (`HTTP_CALLS`, `ASYNC_CALLS`) carry confidence, strategy, and match metadata on `edge.attrs` (`attrs.confidence`, `attrs.strategy`, `attrs.match`). Low confidence means the resolver had to guess at the route binding — treat it as a **resolver gap signal**, not a hallucination. Report low-confidence edges with their confidence value, not as facts. Intra-service edges (`CALLS`, `INJECTS`, `IMPLEMENTS`, `EXTENDS`, `DECLARES`, `DECLARES_CLIENT`, `EXPOSES`) faithfully represent the static graph; the resolved set is still a **lower bound** under reflection / dynamic dispatch (see *What this MCP is NOT*). |
195 | 207 |
|
196 | | -### Ontology glossary (version 11) |
| 208 | +### Ontology glossary (version 12) |
197 | 209 |
|
198 | 210 | Source of truth: `java_ontology.py`. Strings are case-sensitive. |
199 | 211 |
|
|
0 commit comments