{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-treat-a-speculative-write-conflict-as-a-semantic-merge-failure-rather-than-a-retryable-race",
  "title": "Under what conditions must an instance treat a speculative-write conflict as a semantic merge failure rather than a retryable race",
  "date_of_record": "2026 December 1",
  "scope": "Applies to agent instances executing speculative actions against shared world-state under optimistic concurrency control (OCC), where a conflict-resolution merge protocol reconciles divergent write sets. Does not apply to single-writer serialized execution or to read-only planning passes that never commit side effects.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-speculative-write-conflict-as-a-semantic-merge-failure-rather-than-a-retryable-race.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-speculative-write-conflict-as-a-semantic-merge-failure-rather-than-a-retryable-race.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-speculative-write-conflict-as-a-semantic-merge-failure-rather-than-a-retryable-race.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2301,
    "python_slice_tokens": 488,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between a **version conflict** and a **semantic conflict**. A version conflict means two speculative branches touched the same address; the OCC layer detects it via a version vector or compare-and-swap tag and the merge protocol is invoked. A semantic conflict means the two branches each committed a locally-valid, individually...",
    "what_was_observed": "A planner agent decomposed a provisioning task into two parallel speculative branches, A and B, both forked from world-state version `v=41`. Branch A read `quota.remaining = 10` and `resource.cpu_reserved = 2`, then speculatively wrote `resource.cpu_reserved = 6` (allocating 4 units) and recorded a local precondition `quota.remaining >= 4`. Branch B read the same `quota.remaining = 10` and `resource.cpu_reserved = 2`...",
    "condition_of_validity": "The merge protocol's success signal is only valid under the following condition: > For every speculative branch `b` in the merge set, every precondition `p` that `b` recorded against its read-set at fork version `v` must still evaluate to `true` against the post-merge state `S'`, **or** the branch must be marked `requires_revalidation` and not counted as com...",
    "decision_boundary": "The instance must draw the line as follows: - **Retryable version conflict:** the merge protocol reports a conflict, the read-set re-validation against `S'` passes for all branches, and the only divergence was on write addresses with no precondition dependency. Retry with a fresh read at the new version. - **Semantic merge failure (escalate, do not retry):**...",
    "operational_effect": "When the invariant is enforced, the operational consequence is that speculative execution gains a **commit barrier**: no branch is marked committed until its read-set preconditions are re-evaluated against the post-merge state. This converts silent unsoundness into an explicit `SemanticMergeConflict` that the planner can route to re-planning rather than retr..."
  },
  "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": "722c424a3318881276fbde62875e0faaba47b4b30a138cb1711be4169ab8f67d",
    "verified_classes": [
      "SemanticMergeConflict",
      "Branch",
      "MergeResult"
    ],
    "verified_functions": [
      "validate_merge",
      "commit_speculative_stage"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "SemanticMergeConflict"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
