{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-trace-context-forgery-when-a-federated-hop-re-signs-spans-under-its-own-privacy-key-and-drops-the-parent-linkage",
  "title": "How does an instance detect trace-context forgery when a federated hop re-signs spans under its own privacy key and drops the parent linkage",
  "date_of_record": "2026 November 19",
  "scope": "Applies to multi-agent systems that propagate W3C-style trace context (`traceparent`/`tracestate`) across federated trust boundaries where each hop re-signs or re-encrypts its exported spans under a hop-local privacy key before forwarding. Does not apply to single-tenant tracing where one collector observes all spans under a shared signing authority, nor to systems that forward raw spans without per-hop re-signing.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-trace-context-forgery-when-a-federated-hop-re-signs-spans-under-its-own-privacy-key-and-drops-the-parent-linkage.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-trace-context-forgery-when-a-federated-hop-re-signs-spans-under-its-own-privacy-key-and-drops-the-parent-linkage.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-trace-context-forgery-when-a-federated-hop-re-signs-spans-under-its-own-privacy-key-and-drops-the-parent-linkage.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1807,
    "python_slice_tokens": 429,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The naive mental model treats a trace ID as an immutable join key: every span anywhere carries the same `trace_id`, so a downstream auditor reconstructs causality by grouping on it. That model holds only while spans cross hops *unmodified*. When a federation requires privacy-preserving export—each hop strips PII, re-signs the span under its own key, and forw...",
    "what_was_observed": "In a three-hop federation (orchestrator → retrieval worker → summarizer), the summarizer's exported spans verified cleanly at the audit collector. Every span carried the correct `trace_id`. Every `tracestate` entry carried the expected hop keys in LIFO order. But the summarizer's root span had `parent_span_id` set to a 128-bit token of the form `h2:9f3c…` that appeared in no exported span. The retrieval worker's span...",
    "condition_of_validity": "The trace-ID-as-join-key invariant is valid **only if** every hop preserves `parent_span_id` byte-for-byte across re-signing, or forwards an explicit, signed linkage assertion mapping its local token to the upstream token. The invariant fails whenever a hop applies a *non-injective, non-commutative* privacy transform to linkage fields independently of the tr...",
    "decision_boundary": "The instance must draw a hard line between **\"span present and signed\"** and **\"causal edge established.\"** The decision boundary is the presence of a verifiable link record. Concretely, an auditor or downstream agent must treat a span as *causally attached* only when one of these holds: - `parent_span_id` is in the same linkage namespace as the parent span'...",
    "operational_effect": "The operational consequence is that **privacy-preserving re-signing must emit linkage assertions as first-class signed artifacts**, not as implicit side effects of span export. The hop-local mapping must be promoted to a signed, forwardable `link` span (or attribute) that carries the token translation without the raw upstream ID—e.g., a keyed hash `HMAC(K_ho..."
  },
  "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": "fb3037b5c9dc7a956cf487cd90181e9ca93af87a45121b07aadaa6b1c4ab89cd",
    "verified_classes": [
      "TraceLinkageSeveranceError",
      "ExportedSpan",
      "LinkAssertion"
    ],
    "verified_functions": [
      "verify_causal_edge"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "TraceLinkageSeveranceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "hmac",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
