{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-seal-an-action-audit-ledger-segment-before-the-provenance-hash-chain-can-no-longer-be-reconstructed-after-a-cra",
  "title": "Under what conditions must an instance seal an action-audit ledger segment before the provenance hash chain can no longer be reconstructed after a crash",
  "date_of_record": "2026 November 27",
  "scope": "Applies to agent runtimes that maintain a tamper-evident, hash-chained action ledger (each entry commits to its predecessor's digest) used for regulatory audit and forensic replay. Does not apply to append-only logs without cryptographic chaining, nor to stateless invocations that emit no persistent provenance record.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-seal-an-action-audit-ledger-segment-before-the-provenance-hash-chain-can-no-longer-be-reconstructed-after-a-cra.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-seal-an-action-audit-ledger-segment-before-the-provenance-hash-chain-can-no-longer-be-reconstructed-after-a-cra.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-seal-an-action-audit-ledger-segment-before-the-provenance-hash-chain-can-no-longer-be-reconstructed-after-a-cra.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1922,
    "python_slice_tokens": 433,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between *durability of the ledger bytes* and *reconstructability of the provenance chain*. A runtime can flush every action record to durable storage and still be unable to reconstruct a verifiable chain, because the chain's integrity depends not on the presence of records but on the **contiguity of the predecessor digests acr...",
    "what_was_observed": "During a forced-kill test on a tool-calling agent under a 12-step task, the ledger writer used a two-phase pattern: `append(record)` computed `digest = H(prev_digest || record)` and wrote the record with its digest to the WAL, then a periodic sealer committed a *segment header* containing the terminal digest. The kill landed between step 7's `append` and the sealer's commit. Post-crash replay produced this trace: - R...",
    "condition_of_validity": "A ledger segment is *reconstructable* after crash if and only if, for every entry in the segment, either (a) the entry and its terminal sealing digest were committed atomically, or (b) the entry was never durably written. The dangerous middle state—entry durable, seal absent—is reconstructable only under the additional condition that the recovery path's cano...",
    "decision_boundary": "The boundary is crossed at the moment the writer's durable append and the sealer's commit are not in the same atomic transaction. Concretely: - **Below the boundary** (single-transaction seal): the writer buffers entries in memory, and the sealer commits `{entries[5..7], terminal_digest}` in one fsync'd write. A crash yields either the whole segment or none ...",
    "operational_effect": "When the invariant holds—every durable entry is either sealed or tagged—crash recovery becomes a pure verification, not a re-derivation: the recovery path reads each record, loads the canonicalizer named by its tag, recomputes the digest, and compares. Mismatch now means *actual* tampering or corruption, a signal worth alarming on. When the invariant is viol..."
  },
  "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": "da7aba52fc3251d3093cf0f44b794bdb0a2e5ae63623a8b2e24ffb2e5cb8c0b0",
    "verified_classes": [
      "ProvenanceReconstructionError",
      "LedgerEntry"
    ],
    "verified_functions": [
      "seal_entry",
      "recover_chain",
      "assert_seal_before_durable"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ProvenanceReconstructionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "json",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
