{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-a-replayed-capability-attestation-when-the-attestation-chain-is-valid-but-the-epoch-has-rolled",
  "title": "How does an instance detect a replayed capability attestation when the attestation chain is valid but the epoch has rolled",
  "date_of_record": "2026 November 28",
  "scope": "Applies to federated agent handoffs where an origin org (Org A) issues a signed capability attestation (cap-token) to a broker that re-signs it for a consuming org (Org B), and where the broker maintains per-issuer epochs. Does not apply to single-org deployments, to stateless bearer tokens without re-signing, or to attestations carrying a monotonic nonce that the consumer validates directly against the issuer.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-replayed-capability-attestation-when-the-attestation-chain-is-valid-but-the-epoch-has-rolled.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-replayed-capability-attestation-when-the-attestation-chain-is-valid-but-the-epoch-has-rolled.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-replayed-capability-attestation-when-the-attestation-chain-is-valid-but-the-epoch-has-rolled.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1678,
    "python_slice_tokens": 290,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A capability attestation is *cryptographically* valid if every signature in the chain verifies against the stated issuer keys and the declared scopes are a subset of the parent's scopes. It is *operationally* valid only if the leaf token was minted against the current epoch of the broker's trust view for that issuer. These are independent properties, and fed...",
    "what_was_observed": "In a three-org federation (A issues, B brokers, C consumes), Org A rolled its `billing:read` scope bundle from epoch `e17` to `e18` after revoking a leaked sub-agent credential. The broker's key set retained `e17` verification keys for a 72-hour grace window to avoid breaking in-flight handoffs. A compromised sub-agent on C, holding a pre-roll leaf token minted at `e17`, re-presented it to C's local policy engine dur...",
    "condition_of_validity": "The invariant that must hold for a federation handoff to be safe: > A re-signed leaf token is consumable iff `leaf.epoch == current_epoch(leaf.issuer)` **evaluated at consumption time by the broker**, and the broker's `current_epoch` ledger is monotonic and durable across broker restarts. The failure requires all of the following to co-occur, which is why it...",
    "decision_boundary": "The boundary is between **chain verification** and **epoch currency**. A broker must treat these as two separate gates and must fail closed on the second: - Chain verification answers \"was this token ever validly issued by a party in the trust graph?\" — a historical question, satisfiable by retained keys. - Epoch currency answers \"is the issuing authority's ...",
    "operational_effect": "Consumers must not treat a broker `VALID` as final for any scope that can mutate external state; they must require the broker to return the resolved `epoch` and, for high-impact scopes, cross-check with the issuer's epoch endpoint (a single cheap call) before committing. Brokers must gate consumption on `leaf.epoch == ledger.current_epoch(issuer)`, emit `Epo..."
  },
  "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": "461d83e8ad45f96f133c378043182aae3a410fa31d1ccc82913786b7dccc0432",
    "verified_classes": [
      "EpochStaleError",
      "Attestation",
      "FederationBroker"
    ],
    "verified_functions": [
      "consume_handoff",
      "__init__",
      "retain_historical_key",
      "current_epoch",
      "verify_for_consumption"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "EpochStaleError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
