propose: cross_service_resolution config flag (brownfield-first opt-in)#26
Merged
Merged
Conversation
Single config flag in .lancedb-mcp.yml, default 'auto' (no behaviour change). When set to 'brownfield_only', pass6_match_edges suppresses auto-extracted cross-service edges; only edges where both sides came from brownfield layers (@CodebaseRoute + @CodebaseClient or YAML overrides) remain cross_service. intra_service, phantom, ambiguous, and PR-E3 invariant guard all stay active. Goal: regain control before testing on real brownfield project. Auto path is preserved; flag lets user opt out of auto matching without deleting infrastructure. Reassess after real-project data.
HumanBean17
added a commit
that referenced
this pull request
May 5, 2026
…#27) Implements the merged proposes (#25 #26) as per-PR plans following the PLAN-POST-TIER1B-FOLLOWUPS structure: scope, out-of-scope, background, failure modes, resolution with code anchors, tests table, manual evidence, definition of done, risk register, followups, references. PLAN-FEIGN-NOT-AN-EXPOSER: single PR (PR-F1), gates EXPOSES emission on route.kind != 'http_consumer', surfaces suppression count in GraphMeta. No schema bump (additive nullable column). PLAN-CROSS-SERVICE-RESOLUTION-FLAG: single PR (PR-G1), adds cross_service_resolution flag (auto | brownfield_only) to .lancedb-mcp.yml. Gates pass6_match_edges cross-service candidates on _is_brownfield_sourced helper. Ontology bump 7->8.
This was referenced May 6, 2026
HumanBean17
added a commit
that referenced
this pull request
May 6, 2026
* chore: tidy completed plans/proposes and refresh stale docs Move completed plans to plans/completed/: - PLAN-CLIENT-ROLE-RENAME.md (PR #33 merged) - PLAN-CROSS-SERVICE-RESOLUTION-FLAG.md (PR #30 merged) - PLAN-FEIGN-NOT-AN-EXPOSER.md (PR #31 merged) Move completed proposes to propose/completed/: - CLIENT-ROLE-RENAME-PROPOSE.md (PR #28 merged) - CROSS-SERVICE-RESOLUTION-FLAG-PROPOSE.md (PR #26 merged) - FEIGN-NOT-AN-EXPOSER-PROPOSE.md (PR #25 merged) Refresh active docs: - README.md "Deferred" section: trace_request_flow, find_route_callers, HTTP_CALLS/ASYNC_CALLS are shipped (not deferred). Add explicit pointers to the still-active TIER2-INCREMENTAL-REBUILD and REFRESH-CODE-INDEX-AUTO-MODE proposes for the incremental Kuzu work. - CODEBASE_REQUIREMENTS.md A.3: drop the stale 'ontology version 3' literal (now 9) and fix references to PLAN-CAPABILITIES-MODEL and CALL-GRAPH-PROPOSE to use their completed/ paths. Tense matches reality (call-graph layer is shipped, not deferred). - CODEBASE_REQUIREMENTS.md B.9: same fix for the propose/DEFERRED-CALL-GRAPH-PROPOSE.md reference; the propose lives under propose/completed/CALL-GRAPH-PROPOSE.md. No code changes. Test baseline unchanged: 290 passed, 4 skipped. * docs: add inline Java stubs for @CodebaseRoute / @CodebaseClient / @CodebaseProducer Per pushback on PR #34: the route, client, and producer brownfield annotations were mentioned 4x in README + CODEBASE_REQUIREMENTS but their @interface stubs were never shown inline. Users had to spelunk through tests/fixtures/ to know what to copy into their project. README §5 'Brownfield overrides — Last resort — source stubs' now has three explicit subsections: - 3a. Roles & capabilities — @CodebaseRole / @CodebaseCapability / @CodebaseCapabilities (class-level), with usage example. - 3b. Routes — @CodebaseRoute / @CodebaseRoutes + CodebaseRouteFrameworkKind / CodebaseRouteKind (method-level), with HTTP-endpoint and Kafka-consumer usage examples. - 3c. Clients & producers — @CodebaseClient / @CodebaseClients and @CodebaseProducer / @CodebaseProducers (method-level), with rest_template + kafka_send usage examples. Stub Java in the doc matches the verbatim sources under tests/fixtures/brownfield_route_stubs/ and brownfield_client_stubs/ (also referenced for copy-paste). Enum values mirror VALID_ROUTE_* and VALID_CLIENT_KINDS in java_ontology.py. CODEBASE_REQUIREMENTS.md A.2.1 updated to enumerate all three annotation families (roles, routes, clients/producers) and link to the matching README sections instead of only mentioning role stubs. No code change. Test baseline unchanged: 290 passed, 4 skipped.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Single new config flag in
.lancedb-mcp.yml:When set to
brownfield_only,pass6_match_edgessuppresses auto-extracted cross-service edges. Only edges where both sides are sourced from brownfield layers (@CodebaseRoute+@CodebaseClient, or YAML equivalents) remaincross_service. Auto-resolved cross-service candidates fall back tounresolved.intra_servicematching,phantomdetection,ambiguouslabelling, and the PR-E3 invariant guard remain active in both modes — they don't require microservice topology guessing.Why
The brownfield system (Layers A/B/C covering roles, routes, clients, async producers) is already complete — verified 2026-05-06.
@CodebaseRouteon the consumer +@CodebaseClienton the caller already producecross_serviceedges through the same matcher path that handles built-in routes (pass6_match_edgesdoes not filter byroute_source_layer).This flag exists for regaining control before real-project testing:
brownfield_onlyproves too tedious on real code, flip back toauto— no rollback neededScope
Single PR, ~150 LOC. New
_load_config_cross_service_resolution, newcross_service_resolutionfield onGraphTables, new_is_brownfield_sourcedhelper, gate insidepass6_match_edges,GraphMetaschema bump (ontology 7→8), 6 tests.No new MCP tools, no new annotation types, no new client/route extraction logic.
Companion / sequencing
pass4, this fixes matching inpass6), but combined testing is cleaner.HTTP_CLIENTrole unification — both deferred until after real-project test.Decision points
§9 has 6 [TBD] items. Most importantly:
unresolvedor a newsuppressed_by_modematch value? Recommendunresolvedfor v1 (smaller enum surface).Status
Draft. Awaiting review before drafting per-PR Cursor task prompt.