core
core copied to clipboard
corpus-federation: source-aware read model, resolution, routing, and enforcement
Sub-issue of #267 (corpus-federation, ADR-093). The governing ADR gate #269 and prerequisites #256/#260 are complete.
Corpus: parent-corpus-inheritance and federated-resolution-provenance, governed by ADR-133 through ADR-143.
Scope:
- Parse
.decided/corpus.mdwith exact lowercase## inheritsand## overridesheadings. - Verify one in-repository submodule or vendored parent, path containment, explicit source agreement, and the versioned full SHA-256 digest before overlay; perform no network operation.
- Introduce source-aware artifact/path identities and one central local-plus-parent layer set before validation, resolution, graph, search, scope, MCP, cache, freshness, routing, or enforcement derivation.
- Reject multiple/transitive parents, canonical-ID collisions, ambiguity, stale pins, and invalid overrides with deterministic sourced findings.
- Support
alias::canonical-idand Decision-backed same-type overrides while retaining qualified parent history. - Keep mutation commands confined to the local layer. Parent errors block once; warnings and advisories remain parent-owned.
- Apply inherited live Decisions to child-code scope, grounding,
gate,sentry, andgate --code. - Share one deterministic BM25/relationship index with no source boost and retain the v0.28 lexical graph floor.
- Extend the existing DecisionGrounding evaluation with a federated large-parent/hard-negative track; do not create a separate scorer or close the broader #261 programme.
- Keep the six-tool MCP surface and hard response budgets while adding fixed source/layer/pin provenance.
- Version generation and persistent-store state; observe child config/corpus, manifest, parent config/corpus, pin, and overrides for freshness. Old segments become cache misses.
- Preserve contemporaneous no-manifest behavior byte-for-byte.
Export composition is completed with the same central read model under #272; public manifest activation must not leave exports observing a different corpus from enforcement or MCP.