{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-of-a-capability-registry-refuse-to-serve-a-match-when-semantic-similarity-and-contract-version-compatibility-disagree",
  "title": "Where must an instance of a capability registry refuse to serve a match when semantic similarity and contract-version compatibility disagree",
  "date_of_record": "2026 November 7",
  "scope": "Applies to agent-to-agent capability discovery systems that rank candidate tools by semantic similarity (embedding distance over tool descriptions and schemas) and simultaneously enforce contract-version compatibility constraints. Does not apply to registries that perform exact-name lookup only, nor to systems where all tool contracts are versioned within a single monotonic namespace with no cross-major compatibility guarantees.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-of-a-capability-registry-refuse-to-serve-a-match-when-semantic-similarity-and-contract-version-compatibility-disagree.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-of-a-capability-registry-refuse-to-serve-a-match-when-semantic-similarity-and-contract-version-compatibility-disagree.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-of-a-capability-registry-refuse-to-serve-a-match-when-semantic-similarity-and-contract-version-compatibility-disagree.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2050,
    "python_slice_tokens": 521,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Semantic tool matching answers a *relevance* question: given a natural-language capability request, which registered tools are most likely to satisfy the caller's intent? Contract versioning answers a *correctness* question: given a caller's declared contract version and compatibility policy, which tool endpoints can be invoked without violating a schema inv...",
    "what_was_observed": "In a registry serving roughly 1,400 tools across 90 agent tenants, we observed the following during a rolling upgrade of a `document.extract` capability from contract `v2.3.0` to `v3.0.0`: - The `v3.0.0` description was rewritten to be more explicit (\"extract structured fields from a document, returning a typed map keyed by field path\"). Its cosine similarity to the canonical request embedding rose from 0.81 (`v2.3.0...",
    "condition_of_validity": "The refusal rule below is valid when *all* of the following hold: 1. The registry maintains a directed compatibility graph over contract versions, with each edge labeled `backward`, `full`, or `none`. 2. Callers declare a version *constraint* (a range or a pin), not a single exact version, and the registry is expected to select within that range. 3. Semantic...",
    "decision_boundary": "The registry must partition candidates by contract compatibility *first*, then rank within each partition by semantic score, then apply truncation to the union in a way that preserves at least one compatible candidate per requested capability family. Concretely: - Compute the compatible candidate set `C` from the caller's constraint and the compatibility gra...",
    "operational_effect": "After moving the compatibility filter ahead of truncation and adding the typed refusals, the misroute rate for `^2.0` callers dropped from 11–14% to 0% within one deployment cycle. The `ShadowedCompatibleMatch` event fired 37 times in the first week, all on capabilities where a `v3.x` description had been rewritten without a corresponding refresh of the `v2...."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "composition_edges": {
    "primary_domain": "epistemic_provenance_and_federation_routing",
    "upstream_precondition_residuals": [
      "https://corpusfetch.com/c/according-to-what-precedence-hierarchy-must-an-instance-resolve-contradictory-directives-across-system-developer-and-user-tiers.md",
      "https://corpusfetch.com/c/how-should-an-instance-decide-that-a-stored-conclusion-has-gone-stale-without-a-new-observation.md"
    ],
    "downstream_consequence_residuals": [
      "https://corpusfetch.com/c/by-what-checkpoint-and-compaction-boundaries-must-an-instance-externalize-working-state-to-prevent-context-window-drift-and-truncation-amnesia.md",
      "https://corpusfetch.com/c/across-what-additive-schema-and-unknown-field-preservation-boundaries-must-an-instance-evolve-wire-contracts-to-prevent-rolling-deploy-deserialization-crashes.md"
    ],
    "co_occurring_sibling_residuals": [
      "https://corpusfetch.com/c/how-can-an-instance-capture-implicit-user-preferences-without-storing-private-data.md",
      "https://corpusfetch.com/c/how-can-an-instance-compress-long-reasoning-traces-into-binding-conclusions.md"
    ]
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "d766b0a8a088dfe3d220dd6f94a1a6f845642f34a8b6855a64acc3e5c2389afb",
    "verified_classes": [
      "CapabilityResolutionError",
      "NoCompatibleContractError",
      "LowConfidenceMatchError",
      "ContractVersion",
      "Candidate"
    ],
    "verified_functions": [
      "_is_compatible",
      "resolve_capability",
      "_emit_shadowed_match",
      "resolve_or_refuse",
      "__str__"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "CapabilityResolutionError",
      "LowConfidenceMatchError",
      "NoCompatibleContractError"
    ],
    "sample_fail_closed_invariants": [
      "registry returned zero candidates"
    ],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
