Fix portable KAG MCP canonical reads#312
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b9c4ccc182
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| repo = str(provider.get("repo") or "") | ||
| packet = provider.get("repo_local_index") | ||
| if ( | ||
| not repo | ||
| or not isinstance(packet, dict) | ||
| or packet.get("family_storage") != "v3-portable-shards" |
There was a problem hiding this comment.
Validate portable metadata through the provider-map fallback
When a valid provider map keeps repo_local_index only in its supported top-level provider_repo_local_indexes fallback (which AoAKagMCPState.repo_local_index() explicitly resolves), this loop sees None and skips the provider. If every v3 provider uses that representation, the newly added service validator exits with “found no readable portable KAG provider” even though canonical reads work; retrieve the packet through state.repo_local_index(repo) here.
Useful? React with 👍 / 👎.
Outcome
Restore the
aoa-kag-mcpcanonical fallback after the repository-family v3 rollout. The MCP now resolves a tracked portable-family manifest when the logical v2source_surface_index.jsoncoordinate is intentionally absent, while preserving the existing five-tool / nine-resource ABI.Root cause
query_repo_local_kag.load_family()already understood v3 manifests and shards, but the MCP adapter refused to call it unless the physical v2 source-index monolith existed. Structural ABI validation therefore passed while a real canonical search failed at runtime.Changes
portable_family.manifest_refValidation
aoa-kag-mcp: 7 passedcanonical-repo-localover v3 shards: passedaoa-kag4ffb2d1168d791e23ebc6a62ca5f1a91f54475a5f3c6b1e949249e09cae1624aDecision:
aoa-kag:docs/decisions/AOA-KAG-D-0017-portable-content-addressed-repository-family.md