You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/CROSS-SERVICE-PROTOCOL-LINKING.md
+106-1Lines changed: 106 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -309,10 +309,115 @@ The rebase onto upstream required fixing several build issues (all resolved):
309
309
310
310
4.**Test files** — All 14 `test_servicelink_*.c` files included the deleted `httplink.h`. Fixed by removing the include (functions already available via `servicelink.h`).
311
311
312
+
## Cross-Repo Protocol Linking
313
+
314
+
**Status**: Complete. Implemented 2026-04-08.
315
+
316
+
Each linker only matches producers and consumers within a single repo. Cross-repo linking solves this by persisting all discovered endpoints and matching across project boundaries.
317
+
318
+
### How It Works
319
+
320
+
**Phase 1: Endpoint Persistence** — During indexing, each of the 14 linkers registers every discovered producer and consumer via `sl_register_endpoint()`. After the graph dump, `cbm_persist_endpoints()` writes these to a `protocol_endpoints` table in the project's `.db`:
321
+
322
+
```sql
323
+
CREATETABLEprotocol_endpoints (
324
+
id INTEGERPRIMARY KEY AUTOINCREMENT,
325
+
project TEXTNOT NULL,
326
+
protocol TEXTNOT NULL, -- "graphql", "kafka", "pubsub", etc.
327
+
role TEXTNOT NULL, -- "producer" or "consumer"
328
+
identifier TEXTNOT NULL, -- topic name, operation name, etc.
**Phase 2: Cross-Project Matching** — After persistence, `cbm_cross_project_link()` scans all `.db` files in the cache directory, collects endpoints, and matches producers in project A with consumers in project B:
0 commit comments