core icon indicating copy to clipboard operation
core copied to clipboard

corpus-federation: source-aware read model, resolution, routing, and enforcement

Open tcballard opened this issue 4 months ago • 0 comments

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.md with exact lowercase ## inherits and ## overrides headings.
  • 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-id and 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, and gate --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.

tcballard avatar Jul 02 '26 21:07 tcballard