{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-forks-the-shared-context-store-during-a-partition-and-rejoins-with-a-divergent-but-valid-episodic-log",
  "title": "What happens when an instance forks the shared context store during a partition and rejoins with a divergent-but-valid episodic log",
  "date_of_record": "2026 November 24",
  "scope": "Applies to multi-agent systems where N ≥ 3 agent instances maintain a replicated episodic/semantic context store under a Byzantine-fault-tolerant consensus protocol (PBFT-style or Raft-with-audit-layer), with fork detection and canonical merge on rejoin. Does not apply to single-writer stores, stateless tool-calling agents, or stores where a single coordinator is trusted to serialize all writes.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-forks-the-shared-context-store-during-a-partition-and-rejoins-with-a-divergent-but-valid-episodic-log.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-forks-the-shared-context-store-during-a-partition-and-rejoins-with-a-divergent-but-valid-episodic-log.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-forks-the-shared-context-store-during-a-partition-and-rejoins-with-a-divergent-but-valid-episodic-log.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2188,
    "python_slice_tokens": 612,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is **not** \"a node returns corrupted data.\" A corrupted node is caught by MACs and state-hash comparison. The failure mode is **a node returns valid, internally consistent, causally coherent data that a majority of peers never saw** — a fork. Because every entry in the divergent branch carries a correct signature, a correct parent hash, and ...",
    "what_was_observed": "A four-instance swarm (`A`, `B`, `C`, `D`) shared a context store with quorum = 3. At T0 a network partition split `{A, B}` from `{C, D}`. Neither side reached quorum, so under a strict quorum-write rule neither should have accepted writes. However, the store used a **local-first commit with deferred quorum attestation**: each instance appended to its local log immediately and collected quorum attestations asynchrono...",
    "condition_of_validity": "The fork-detection invariant holds only under the following conjunction, and fails if any conjunct is dropped: 1. **Monotonic global log index.** Every entry must carry a *globally unique, totally ordered* index assigned by the quorum, not a per-instance logical clock. Per-instance clocks are the specific mechanism that made the above merge ambiguous — two i...",
    "decision_boundary": "The operational decision is: **on rejoin with a divergent branch, do you merge, or do you quarantine-and-replay?** - **Merge** is correct when the divergent branches are *causally independent* — no entry on branch X depends on an entry on branch Y. Detect this by checking whether the union DAG has cross-branch edges. If zero cross-branch edges, topological m...",
    "operational_effect": "After the fix, the store enforces: (a) all entries carry quorum-assigned slot indices; (b) retrieval API refuses entries lacking a quorum certificate, returning `UnattestedEntryError` to the calling agent, which must treat the context as incomplete and either wait or request re-attestation; (c) merge computes the union DAG and topologically sorts, quarantini..."
  },
  "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": "d9700c04a6216c59f3a063e88146acd7abe29c04276b60a931752de1b0dd641a",
    "verified_classes": [
      "CausalMergeError",
      "Entry"
    ],
    "verified_functions": [
      "merge_branches",
      "resume_agent_context",
      "attested",
      "digest"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "CausalMergeError"
    ],
    "sample_fail_closed_invariants": [
      "union DAG contains a cycle among unattested/pending entries; merge cannot produce a valid total order"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
