{
  "schema_version": "1.3.0",
  "slug": "what-discovery-invariants-must-survive-a-namespace-collision-in-a-federated-package-registry",
  "title": "What discovery invariants must survive a namespace collision in a federated package registry?",
  "date_of_record": "2026 October 20",
  "scope": "* **Applies when:** The agent discovers packages from multiple registries, name collisions are possible, and the trust level of the source matters. * **Does not apply when:** The agent uses a single, private registry with cryptographic inte",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-discovery-invariants-must-survive-a-namespace-collision-in-a-federated-package-registry.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-discovery-invariants-must-survive-a-namespace-collision-in-a-federated-package-registry.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-discovery-invariants-must-survive-a-namespace-collision-in-a-federated-package-registry.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1012,
    "python_slice_tokens": 274,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The separation between **name-based discovery** (resolving a package by its name) and **namespace-based discovery** (resolving a package by its full identity: name + registry + maintainer + signature). Relying on name alone creates the **Namespace Takeover Attack**: a malicious actor publishes a package with the same name on a public registry that the agent ...",
    "what_was_observed": "In federated package architectures, failing to handle namespace collisions produces three primary failure modes: 1. **Dependency Confusion:** The agent requests `internal-utils@1.0.0`. The public registry serves a malicious version because the private registry wasn't checked first. 2. **Typo-Squatting Amplification:** A malicious actor publishes `reqeusts` (a typo of `requests`) on a less-regulated registry, and the ...",
    "condition_of_validity": "* **Applies when:** The agent discovers packages from multiple registries, name collisions are possible, and the trust level of the source matters. * **Does not apply when:** The agent uses a single, private registry with cryptographic integrity, or the package names are globally unique (e.g., content-addressed identifiers like IPFS).",
    "decision_boundary": "1. **Did the discovery find a package with the same name in multiple registries?** If no, standard installation applies. If yes, proceed. 2. **Is the `registry_trust_tier` hierarchy established?** If no, the agent cannot prioritize trusted registries. It must default to the highest-trust registry. 3. **Is the `maintainer_identity_signature` verified against ...",
    "operational_effect": "1. **Dependency Confusion Prevention:** Forces namespace-qualified resolution, preventing public registry takeovers. 2. **Trust Preservation:** Carries the trust tier from discovery to installation, ensuring the agent does not silently inherit a lower trust level. 3. **Maintainer Verification:** Binds packages to cryptographic maintainer identities, preventi..."
  },
  "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": "1cd88904d89939e533a8b20dcdb0b3c872f56554ad87185a6724813193e24e9f",
    "verified_classes": [
      "RegistryTrust",
      "NamespaceVerdict",
      "PackageCandidate",
      "NamespacePolicy",
      "NamespaceManifest",
      "FederatedNamespaceGuard"
    ],
    "verified_functions": [
      "_hash",
      "evaluate_candidates"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "ValueError"
    ],
    "sample_fail_closed_invariants": [
      "No candidates provided."
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "hashlib",
      "json"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
