propose: shared-module multi-attribution#24
Open
HumanBean17 wants to merge 1 commit into
Open
Conversation
Closes the gap PR-E3 review observation #1 surfaced: shared-contracts Maven modules (e.g. com.bank.chat.contracts) are physically owned by one service but their bytecode runs in many JVMs. The current single-attribution Symbol.microservice mis-models them, producing 8 false-positive cross-service CALLS edges on bank-chat-system that PR-E3's pre-filter cannot detect. Proposes a sidecar Microservice/MEMBER_OF table that lets each Symbol have N >= 1 memberships derived from Maven/Gradle dependency graphs. The existing scalar Symbol.microservice stays as the 'primary' for back-compat. Five-PR breakdown (~930 LOC total, one schema bump): 1. Build-graph parser (Maven) 2. Schema + write path 3. PR-E3 guard generalised to set-disjoint 4. Gradle support 5. MCP surface + downstream tools Status: draft, open for review. Not implementable until §10 [TBD] items are resolved.
This was referenced May 5, 2026
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.
What
Adds
propose/SHARED-MODULE-MULTI-ATTRIBUTION-PROPOSE.md— a draft proposal for movingSymbol.microservicefrom a single-string attribution to a multi-attribution model that correctly handles the shared-contracts Maven module pattern.Why
PR-E3 review observation #1 flagged that the CALLS invariant guard's pre-filter has a precondition: it only fires when at least one same-microservice candidate exists in
_lookup_method_candidates's result. Today's audit onbank-chat-systemshows this precondition is violated by exactly the shared-DTO failure mode:AssignmentRequestlives atchat-core/chat-contracts/src/...somicroservice_for_pathreturnschat-core. Butchat-assign/pom.xmldeclares a<dependency>onchat-contracts, so at runtime the DTO's bytecode is in both JVMs. The guard seesmember.microservice=chat-assign, candidate.microservice=chat-corewith no same-ms peer and skips, emitting a false-positive cross-service CALLS edge.EXTENDS / IMPLEMENTS / INJECTS are clean on
bank-chat-systemtoday but vulnerable to the same failure mode (e.g. extending a base class from*-contracts, implementing an interface from*-shared).What's in the proposal
Microservice/MEMBER_OFtable, build-graph parser, generalised PR-E3 guard (set-disjoint instead of scalar-equal)[TBD]decisions to resolve before implementable planWhat's NOT in the proposal
Symbol.microservice— kept as primary attribution for back-compatStatus
Draft — open for review. The user has explicitly deferred this work ("will come back to this later"). After review and §10 [TBD] resolution, implementable plan derives at
plans/PLAN-SHARED-MODULE-MULTI-ATTRIBUTION.md.Manual evidence (motivating audit)
The audit script that exposed the gap:
Reports:
This audit will become a built-in MCP tool in proposed PR-5.