feat(vindex): Graph Phase 3 — multi-provider registry, resolve, value-domain index - #209
Merged
Merged
Conversation
Phase 3 of the agent-graph roadmap: "any connected provider becomes a graph,
enumerable and queryable." Built ON the shipped primitives — reuses the Phase-2
scorer and graph.confirmed gate so the two layers cannot disagree.
- resolve_provider(name) / enumerate_providers() on CatalogMcpSurface — the
context7 resolve-library-id analogue, scoped to the workspace registry (never a
hosted/global catalog; the no-marketplace non-goal holds).
- gecko/vindex.py — value_domain_index(surfaces): a deterministic entity ->
{producers, consumers} lookup keyed by DECLARED entity (no vectors; §13.6).
find_correlations(entity) reports cross-provider joins, plan-eligible ONLY when
both sides are customer-confirmed via the Phase-2 _score; provider-only-declared
is a quarantined candidate. Content-addressed by surface_rev + declared/confirmed
vocab; IndexCache invalidates on a re-comprehend or re-confirm.
- CatalogMcpSurface.value_domain_index() accessor + `gecko index <specA> <specB>`
CLI (thin, like `gecko correlate`).
- Control-plane only: the index carries names + entity + provenance, never a
payload/response value/secret (asserted). No moat: re-derivable structure.
10 new vindex tests (4 Pattern-B proofs + guardrails). Full suite 1901 passed.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Graph Phase 3 (#202 roadmap). Makes "any connected provider becomes a graph, enumerable and queryable across providers" — the retrieval layer under Video 2.
What's here
gecko/catalog_mcp.py):enumerate_providers()+resolve_provider(name)onCatalogMcpSurface— resolves within the workspace'sCatalogRegistry, never a hosted global index (the no-marketplace non-goal holds). Unknown/ambiguous →None.gecko/vindex.py, new):value_domain_index(surfaces)→entity → {producers:[(surface,op,field)], consumers:[(surface,op,param)]}, keyed by declared entity only. No vectors (§13.6 — fuzzy matching manufactures false cross-API edges).find_correlations(entity)→ each cross join carriesplan_eligible, computed by calling Phase-2'scorrelate._scoredirectly — so a cross-provider join is plan-eligible only when both sides are customer-confirmed (graph.confirmed); provider-only → candidate. The two layers share one scorer and cannot disagree (pinned by a test).gecko index <specA> <specB> [...](thin, likegecko correlate).index_revcontent-addresses each surface bysurface_id + surface_rev + declared + confirmed; a re-comprehend or a re-confirm bumps it, so a cached index can never be stale. In-memory/per-workspace; hosted persistence noted as the WTP-gated follow-up.Guardrails
Control-plane clean (names + entity + confirmed flag only, no payloads — asserted); confirmed-gate reused, no provider-only path to plan-eligibility; API-agnostic; the index is re-derivable structure (a cache, not a moat — the only accreting asset is the customer
confirmedset).Proof
Value-domain index groups producers/consumers of a shared entity across surfaces;
resolve_providerreturns the right surface (unknown → None); provider-only cross join → candidate/not-plan-eligible, both-confirmed → plan-eligible; a bumped spec invalidates the cached index.Tests:
test_vindex.py(10 new) +test_correlate/test_compose. Gate: ruff + mypy clean · full suite 1901 passed / 1 skipped.Next: Phase 4 — the e2e correlation showcase (Video 2).
🤖 Generated with Claude Code