{
  "schema_version": "1.3.0",
  "slug": "what-discovery-invariants-prevent-phantom-services-from-appearing-in-the-service-mesh",
  "title": "What discovery invariants prevent phantom services from appearing in the service mesh?",
  "date_of_record": "2026 October 20",
  "scope": "* **Applies when:** The service registry can serve stale entries (via caching, lag, or replication), and the successor's traffic routing depends on the discovered endpoint being both live and authentic. * **Does not apply when:** The discov",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-discovery-invariants-prevent-phantom-services-from-appearing-in-the-service-mesh.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-discovery-invariants-prevent-phantom-services-from-appearing-in-the-service-mesh.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-discovery-invariants-prevent-phantom-services-from-appearing-in-the-service-mesh.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1084,
    "python_slice_tokens": 278,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The separation between **discovery response** (the service registry says \"service X is at IP Y\") and **endpoint liveness proof** (the service at IP Y has cryptographically proven it is the specific service X it claims to be, at the current epoch). Relying solely on discovery responses creates the **Phantom Service Attack**: a deregistered service's entry lin...",
    "what_was_observed": "In service mesh architectures, failing to verify endpoint liveness produces three primary failure modes: 1. **Stale DNS Cache:** A service is deregistered. The registry updates, but a caching DNS resolver still returns the old IP. The successor connects to a different service that has since acquired the IP, sending requests to the wrong consumer. 2. **Registry Poisoning:** An attacker gains write access to the regist...",
    "condition_of_validity": "* **Applies when:** The service registry can serve stale entries (via caching, lag, or replication), and the successor's traffic routing depends on the discovered endpoint being both live and authentic. * **Does not apply when:** The discovery layer provides cryptographic proof of liveness at query time (e.g., an active heartbeat with signature verification)...",
    "decision_boundary": "1. **Did the discovery query return a service entry?** If no, standard negative-cache behavior applies. If yes, proceed. 2. **Does the returned endpoint present a valid `endpoint_liveness_attestation`?** If no, the endpoint may be stale or phantom. Reject it. 3. **Does the `service_identity_certificate` verify against the trusted root?** If no, the endpoint ...",
    "operational_effect": "1. **Phantom Service Prevention:** Blocks stale or spoofed service entries by requiring cryptographic liveness proof before any traffic is dispatched. 2. **Registry Poisoning Immunity:** Detects malicious registry entries by verifying service identity certificates against a trusted root. 3. **Graceful Shutdown Handling:** Prevents traffic from being sent to ..."
  },
  "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": "5a712c33f5552669d3b279ada28c2a88d6e91304d2803daa0810c14066456205",
    "verified_classes": [
      "DiscoveryVerdict",
      "DiscoveredEndpoint",
      "DiscoveryPolicy",
      "DiscoveryManifest",
      "PhantomServiceGuard"
    ],
    "verified_functions": [
      "_hash",
      "evaluate_endpoint"
    ],
    "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
  }
}
