{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-reject-a-replayed-trajectory-causal-trace-linking-breaks-under-idempotent-write-masking",
  "title": "When must an instance Reject a Replayed Trajectory: Causal Trace Linking Breaks Under Idempotent-Write Masking",
  "date_of_record": "2026 November 30",
  "scope": "Applies to agent runtimes that reconstruct execution state by replaying recorded tool-call trajectories (span trees, causal event logs) for observability, anomaly detection, or post-hoc verification. Does not apply to live single-shot inference without recorded tool side effects, nor to pure prompt logging where no causal linkage between spans is asserted.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-reject-a-replayed-trajectory-causal-trace-linking-breaks-under-idempotent-write-masking.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-reject-a-replayed-trajectory-causal-trace-linking-breaks-under-idempotent-write-masking.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-reject-a-replayed-trajectory-causal-trace-linking-breaks-under-idempotent-write-masking.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2074,
    "python_slice_tokens": 432,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two fundamentally different things an observability pipeline can replay: the *token stream* an agent emitted, and the *causal graph* of side effects its tool calls produced. Token-stream replay is a deterministic function of recorded bytes—re-run the model with the same sampler seed and context and you get the same tokens (modulo floating-point non...",
    "what_was_observed": "A three-agent pipeline (planner → executor → auditor) wrote to a shared resource registry via an idempotent `upsert_resource(key, value)` tool. The registry returned `{\"status\": \"ok\", \"version\": N}` where `version` incremented only on actual mutation. During a routine anomaly-detection replay of a 41-step trajectory, the harness re-issued all 41 tool calls and reported **zero response mismatches**. Yet a downstream a...",
    "condition_of_validity": "The \"replay passes ⇒ trajectory faithful\" inference is valid only when the observation function from world-state to tool-response is **injective over the relevant state space**—i.e., no two distinct world states produce identical responses for the tools being replayed. Idempotent writes, `SET`-style overwrites, cache hits, and any tool whose response is a fu...",
    "decision_boundary": "An instance must **reject** a replayed trajectory as unverifiable—and must not emit a \"clean\" anomaly verdict—when any of the following hold: - The trajectory contains at least one tool call classified as idempotent-write or overwrite-semantics (`upsert`, `set`, `put`, `create-if-absent`) **and** no per-step state digest was recorded. - Span ordering was est...",
    "operational_effect": "The practical consequence is a change in what the observability layer must *capture*, not just what it computes. Recording tool responses is insufficient for causal replay; the runtime must record a **state witness** per span: a compact digest of the resources the span touched (key → version, or a Merkle root over the touched keyspace). The digest is cheap (..."
  },
  "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": "c6f2261955374c469f0d9b94743829f2102ccf645534444d5d8de1e41d5b8539",
    "verified_classes": [
      "ReplayFidelityError",
      "Span"
    ],
    "verified_functions": [
      "_digest_touched",
      "certify_replay",
      "replay_and_certify"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ReplayFidelityError"
    ],
    "sample_fail_closed_invariants": [
      "idempotent-write masking: trajectory contains upsert/overwrite tools but no per-span state digest; response equality can",
      "causal ordering under-determined: spans ordered only by wall-clock across multiple clock domains and no logical clock or"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
