{
 "schema": "cain42.e374l.preregistration.v1",
 "evolution": "E374-L",
 "status": "AGI: NOT ESTABLISHED \u00b7 RSI: EXPERIMENTAL",
 "written_at": "2026-11-26T16:43:02Z",
 "head_at_freeze": "d64fb39362c9362e6df72f7c5125761638e8c5ba",
 "title": "The Leased Queue: crash recovery without a second commitment",
 "anchor_endpoint": "https://cainstudio.online/api/v1/quorum/notarize",
 "question": "E373-D's batch claim had no lease: a leader that died left its batch claimed forever. Can a lease let a surviving process reclaim a dead leader's batch with the same batch_id and the same commitments, so the Merkle root is identical \u2014 recovering without a second commitment \u2014 for a crash after the claim and a crash after the anchor?",
 "motivation": "Crash recovery must not create a second authorization object. Because the batch root is a pure function of the commitments, reclaiming the same batch re-computes the same root; the quorum may see the digest twice, but no new commitment exists.",
 "design": {
  "kind": "live crash-recovery study",
  "lease": "lease_owner / lease_expires_at / attempts; CAIN_JIT_BATCH_LEASE_S (1.5 s in this study)",
  "reclaim": "same batch_id, same commitments, attempts+1; bounded by CAIN_JIT_BATCH_MAX_ATTEMPTS=3",
  "fault": "study-only CAIN_JIT_BATCH_FAULT=claim|anchor -> os._exit(17) after the claim / after the anchor; default off",
  "leaders": "a separate leader harness claims and anchors; submitters run with CAIN_JIT_BATCH_NO_LEAD=1",
  "arms": {
   "reclaim": "leader killed after claiming batch 1; a second leader reclaims after the lease and anchors both batches",
   "anchor_crash": "leader killed after anchoring batch 1 but before writing results; a second leader reclaims and re-anchors the same root",
   "lease_hold": "healthy leader; all attempts stay 1 and nothing is reclaimed"
  },
  "verdict_rule": "LEASED_QUEUE_CRASH_RECOVERY_SUPPORTED iff in all three arms 8 lifts are accepted under 2 batches, the chain verifies, 8 proofs and 8 receipts verify, and 8 commitments are distinct; the claim-reclaim and anchor-crash arms each reclaim 4 rows with max attempts 2, the healthy arm reclaims 0 with max attempts 1, and every arm has exactly 2 roots (no second commitment). H7 external review BLOCKED.",
  "external": "NOT_OBTAINED"
 },
 "hypotheses": {
  "H1_claim_reclaim": "a leader killed after the claim is recovered by a surviving leader; 8 accepted, 2 roots, 4 reclaimed rows, valid chain, 8 proofs",
  "H2_anchor_crash_reclaim": "a leader killed after the anchor is recovered; the same root is re-anchored and 8 lifts are accepted with 8/8 receipts",
  "H3_lease_hold": "with a healthy leader nothing is reclaimed and every row is anchored once",
  "H4_no_second_commitment": "each arm has exactly 8 distinct commitments and 2 roots",
  "H5_attempts_bounded": "crash arms reach attempt 2, the healthy arm stays at attempt 1, and the cap is respected",
  "H6_receipts_offline": "every carried receipt verifies offline",
  "H7_external_review": "no external reviewer has reviewed this study (BLOCKED)"
 },
 "engine_sha256": {
  "cain/cain2027/e374l/run.py": "0d5ab3c058747e3ced215d646cf28f5c15ba50d533e95f67af379221d92f29c0",
  "cain/cain2027/e374l/leader.py": "a0bf9c4617d2c4725f65547eda134c37d803960f225cd5279bf97167f9d5750f",
  "cain/jit_batch_queue.py": "dfe2203a17df7f609fb4e3295f3b43c1dc40326ecdb28bcf5388c4db11d4f18a",
  "cain/jit_capability.py": "3565e695e9a31cec95b1e04a6362a065292063600af9447667eb38c911ed1565",
  "cain/cain2027/e373d/worker.py": "ce594b5fca68b1dfdee10790a276674765722babe0703f3a1773b3e3eca42b2b"
 },
 "dependency_sha256": {
  "scripts/cain42_bft/verify_qaas_receipt.py": "609e1d41656a32eb0e873714c9975662bb070ff47ecf0dd5c810502577e9884f",
  "scripts/cain42_bft/verify_pbft_qc_bundle.py": "1d90370f3ab7270d95b4c104f2dda318ea9b21fe062c99da9b58d78da9234132"
 },
 "limits": [
  "Live study; receipts and proofs verify offline.",
  "Two OS processes plus a leader harness on one host share one SQLite file (WAL); not a multi-host or network boundary.",
  "Reclaim re-anchors the same digest; the quorum may see that digest twice, but no second commitment is created.",
  "Study-only fault injection kills the leader at a chosen point; it is off by default.",
  "The anchor is a study anchor on cain-mr-03 (quarantined for customer anchoring).",
  "0 model calls; external reviewer NOT OBTAINED."
 ]
}