Skip to content

Report shared-hub peers for types and contracts - #91

Draft
pranayVyas wants to merge 2 commits into
mainfrom
feature/aeron-pubsub-link-spec-42f0
Draft

pranayVyas wants to merge 2 commits into
mainfrom
feature/aeron-pubsub-link-spec-42f0

Conversation

@pranayVyas

@pranayVyas pranayVyas commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

Summary

Implements the two query gaps from the HAS_TYPE peer-link spec. The hop is the graph shape "two sites point at one hub", for any declared type and any contract kind the adapter already stored. It is not a detector for one framework, and it does not add a contract kind.

An entry states only what the edges record.

  • A shared declared type is not a call or a send. The entry names the type and carries verification, which says to read the code at both sites.
  • A contract whose roles are exactly one EXPOSES and one CONSUMES states those roles and the weaker evidence tier. It has no verification field.
  • Any other contract role pair states the roles that were stored and carries verification.
  • A type referenced from more than 16 sites, or a type with no declaration file, names no peer. The envelope records peer_fan_in or peer_undeclared_type.
  • Same-service peers are included with service_relation: same_service. They are not placed in cross_service. A missing service id is unknown.

impact_of adds a peers list after the dependent walk. explain reports the inward hub path when no direct edge exists. find_paths reports a shared_hub result only when the forward walk found nothing, so a type share cannot outrank a call chain. search stays a name lookup.

Decisions are recorded in docs/aeron-has-type-links-spec.md.

Test plan

  • tests/test_peers.py covers a declared type (enum, struct, and class), fan-in, an undeclared type, complementary contract roles for topic and http_route, same-service, same-role, a missing service id, explain, and find_paths.
  • tests/test_query.py still passes, including the existing cross-service contract assertion.
  • Confirm a verification field is absent on a recorded exposes/consumes pair and present only when the direction is not recorded.
Open in Web Open in Cursor 

cursoragent and others added 2 commits October 4, 2026 18:46
Record the Rust Aeron observation and the two proposed query gaps.
No indexer or MCP behavior change.

Co-authored-by: Pranay Vyas <[email protected]>
Two sites that point at one declared type or one contract hub are peers.
The result states only the stored roles. verification is attached only
when those edges do not record a direction, and it tells the reader to
check the code. Search stays a name lookup.

Co-authored-by: Pranay Vyas <[email protected]>
@cursor cursor Bot changed the title Spec for review: HAS_TYPE peer links (no behavior change) Report shared-hub peers for types and contracts Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants