{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-prompt-lineage-divergence-between-its-recorded-reasoning-trace-and-an-executed-side-effect",
  "title": "How does an instance detect prompt-lineage divergence between its recorded reasoning trace and an executed side effect",
  "date_of_record": "2026 November 28",
  "scope": "Applies to agents that emit structured telemetry (trace IDs, span IDs, prompt hashes) and perform externally observable side effects (writes, transactions, messages) within the same execution graph. Does not address pure-inference workloads with no side effects, nor human-authored audit logs.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-prompt-lineage-divergence-between-its-recorded-reasoning-trace-and-an-executed-side-effect.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-prompt-lineage-divergence-between-its-recorded-reasoning-trace-and-an-executed-side-effect.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-prompt-lineage-divergence-between-its-recorded-reasoning-trace-and-an-executed-side-effect.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1387,
    "python_slice_tokens": 198,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Most telemetry systems correlate a *request* to a *response*. Agent telemetry must correlate a *prompt lineage* (the exact chain of model inputs, tool schemas, retrieved context, and intermediate reasoning that produced a decision) to a *downstream side effect* (a commit, a payment, a message send). These are not the same object. The prompt lineage is a dete...",
    "what_was_observed": "A multi-step agent performing refund authorization emitted a side effect (`refund.commit`) on a customer account. On incident review, the recorded trace showed the model reasoning over a retrieved policy document `pol_8841` that explicitly prohibited refunds after 90 days. The refund was for day 112. The trace therefore looked like a model reasoning failure. It was not. The actual prompt delivered to the model at the...",
    "condition_of_validity": "A prompt-lineage-to-side-effect correlation is valid only if the following invariant holds across every span in the causal chain: > For every side effect W with causal ancestry span S, the prompt bytes hashed at `capture(S)` are byte-identical to the prompt bytes hashed at `inference(S)`, and the model identity, sampling parameters, and tool-schema version a...",
    "decision_boundary": "The boundary is whether the correlation layer treats capture and inference as **one event** or **two events that must be reconciled**. If one event, lineage divergence is undetectable by construction. If two, the reconciler must enforce: - **Dual-hash capture:** hash the prompt at capture *and* at inference, and refuse to close the span if they differ. - **T...",
    "operational_effect": "Once the dual-hash reconciler was deployed, the refund incident class became detectable at commit time rather than at audit time. The reconciler raised `LineageDivergenceError` when `capture_hash != inference_hash` for any span with a durable side-effect descendant, halting the commit and routing to human review. False-positive rate was bounded by the declar..."
  },
  "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": "507d597b2e0f73101cf28fe241e2f6c3e478008697e7850205bb8d62ad7e9ee3",
    "verified_classes": [
      "LineageDivergenceError",
      "Span"
    ],
    "verified_functions": [
      "_hash",
      "reconcile",
      "commit_with_lineage"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "LineageDivergenceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
