{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-refuse-to-commit-a-speculated-tool-invocation-whose-side-effect-journal-has-already-been-fsynced-but-whose-dependen",
  "title": "In what scenarios must an instance refuse to commit a speculated tool invocation whose side-effect journal has already been fsynced but whose dependency token has expired",
  "date_of_record": "2026 November 8",
  "scope": "Applies to agent runtimes that speculatively pre-execute tool calls inside a sandbox, journal their side effects, and later commit them under a dependency token (lease) with a TTL. Does not apply to idempotent read-only tools, nor to systems where commit is a single atomic transaction with no separate journal flush.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-to-commit-a-speculated-tool-invocation-whose-side-effect-journal-has-already-been-fsynced-but-whose-dependen.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-to-commit-a-speculated-tool-invocation-whose-side-effect-journal-has-already-been-fsynced-but-whose-dependen.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-to-commit-a-speculated-tool-invocation-whose-side-effect-journal-has-already-been-fsynced-but-whose-dependen.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1588,
    "python_slice_tokens": 367,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Speculation and commit are two different clocks. The sandbox runs the tool *before* the dependency graph is settled; the commit protocol replays the journaled side effects *after* the dependency token that authorized the speculation has been validated. The non-obvious boundary is this: a side-effect journal can be durably persisted (fsync returned, WAL segme...",
    "what_was_observed": "A planner fanned out three speculative branches against a shared resource `R` (a table row). Each branch pre-executed an `UPDATE`, sealed its journal under token `T_1` with a 400 ms TTL, and waited for the orchestrator to pick a winner. The orchestrator was delayed by a GC pause of 1.2 s. On resume, `T_1` had expired. The orchestrator's commit path checked only `journal.sealed == True` and `journal.checksum_valid == ...",
    "condition_of_validity": "Commit is valid iff, at commit time: 1. The journal entry's `token_id` matches the currently active token for the resource, **or** the token is expired but a re-validation pass confirms the dependency closure is byte-identical to the closure at seal time. 2. No superseding token for the same resource was minted between seal and commit. 3. The journal's `seal...",
    "decision_boundary": "The decision is not \"expired → refuse.\" It is a two-axis table over (token expired?, closure changed?): - **Not expired, closure unchanged:** commit. - **Not expired, closure changed:** refuse — a superseder exists even though the clock has not run out. This is the case that surprises operators, because the token looks healthy. - **Expired, closure unchanged...",
    "operational_effect": "After the incident, the commit path was rewritten to always re-derive the dependency closure and compare it to the sealed closure, regardless of TTL state. The cost was one extra graph walk per commit (~3 ms at p50, ~40 ms at p99 under contention), which was acceptable because commits are batched. The benefit was that the TTL became advisory rather than load..."
  },
  "matched_failure_symptoms": [
    "ENOSPC_DISK_OR_INODE_EXHAUSTION"
  ],
  "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": "998cb2297506556f93c25143fc6a2a39502fdd2b388730d4f6311498945c6512",
    "verified_classes": [
      "StaleSpeculationError",
      "DependencyToken",
      "JournalEntry"
    ],
    "verified_functions": [
      "commit_journaled_effect",
      "_reseal_and_commit",
      "__init__",
      "expired"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 6,
    "raised_exceptions": [
      "StaleSpeculationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "time",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
