{
  "schema_version": "1.3.0",
  "slug": "what-invariants-prevent-negative-cache-poisoning-in-agent-discovery-systems",
  "title": "What invariants prevent negative-cache poisoning in agent discovery systems?",
  "date_of_record": "2026 October 20",
  "scope": "* **Applies when:** The discovery system uses negative caching, adversarial actors can query the cache, and the cost of hiding real resources is material. * **Does not apply when:** Discovery systems use no negative caching, or they can pro",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-invariants-prevent-negative-cache-poisoning-in-agent-discovery-systems.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-invariants-prevent-negative-cache-poisoning-in-agent-discovery-systems.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-invariants-prevent-negative-cache-poisoning-in-agent-discovery-systems.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1023,
    "python_slice_tokens": 271,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The separation between **positive cache** (cached \"found\" results) and **negative cache** (cached \"not found\" results). Positive cache poisoning causes the agent to serve wrong data; negative cache poisoning causes the agent to serve no data, hiding resources that actually exist. The latter is more insidious because the agent doesn't see an error — it silent...",
    "what_was_observed": "In discovery architectures with negative caching, failing to prevent poisoning produces three primary failure modes: 1. **Resource Hiding Attack:** An attacker queries the discovery system for a sensitive resource before the legitimate owner does, causing a negative cache entry. The legitimate agent queries later, receives \"not found,\" and does not access the resource. 2. **Stale Negative Cache:** A resource is creat...",
    "condition_of_validity": "* **Applies when:** The discovery system uses negative caching, adversarial actors can query the cache, and the cost of hiding real resources is material. * **Does not apply when:** Discovery systems use no negative caching, or they can prove non-existence cryptographically (e.g., Merkle-proof of absence in an immutable registry).",
    "decision_boundary": "1. **Is the lookup from an unauthenticated principal?** If yes, the negative result must NOT be cached (only authenticated lookups populate negative cache). If no, proceed. 2. **Does the negative cache entry have a bounded TTL?** If no, resources can be hidden indefinitely. The cache must invalidate negative entries aggressively (e.g., TTL < 60s). 3. **Has a...",
    "operational_effect": "1. **Resource Hiding Prevention:** Blocks unauthenticated caching, preventing attackers from hiding resources. 2. **Cache Freshness:** Short TTL and creation-event invalidation prevent stale negative entries. 3. **Cache Budget Protection:** Reduces the volume of negative cache writes, preserving budget for positive entries."
  },
  "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": "15c6c8c697d63f60f9a956faa774e45d0b96096093c5f7576ec77613649ae805",
    "verified_classes": [
      "NegativeCacheVerdict",
      "NegativeCacheEntry",
      "NegativeCachePolicy",
      "NegativeCacheManifest",
      "NegativeCachePoisoningGuard"
    ],
    "verified_functions": [
      "_hash",
      "evaluate_entry"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 0,
    "raised_exceptions": [],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "hashlib",
      "json"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
