{
 "schema": "cain42.e373d.preregistration.v1",
 "evolution": "E373-D",
 "status": "AGI: NOT ESTABLISHED \u00b7 RSI: EXPERIMENTAL",
 "written_at": "2026-11-26T16:06:04Z",
 "head_at_freeze": "4ef9eaa494c26c9a57ace46dd070e508950f642d",
 "title": "The Cross-Process Batch Anchor: one shared queue, one notarization per batch, one ordered chain",
 "anchor_endpoint": "https://cainstudio.online/api/v1/quorum/notarize",
 "question": "E368-B batched lifts inside one process. Can two OS processes submit to one shared batch queue, with exactly one process claiming and anchoring each batch under SQLite's write lock, and one hash chain ordered across the processes by BEGIN IMMEDIATE, while an unreachable anchor writes nothing?",
 "motivation": "A distributed authorize-then-commit path needs one serialization point for the chain and one commitment per batch. SQLite's BEGIN IMMEDIATE gives both without a second service: the claim is atomic and the chain insert is ordered across processes.",
 "design": {
  "kind": "live cross-process batch-gate study",
  "queue": "shared SQLite table jit_batch_queue (WAL); claim under BEGIN IMMEDIATE; batch_id per claim",
  "chain": "each ledger insert under BEGIN IMMEDIATE on the same database",
  "commitment": "sha256 of canonical {statement_hash, principal, epoch, not_after, approvers, reason, ticket, policy_hash}",
  "merkle": "leaf=sha256('leaf|'+commitment); node=sha256('node|'+l+r); odd promote",
  "arms": {
   "cross4": "2 OS processes x 4 lifts, batch 4, live anchor",
   "down": "1 process x 4 lifts, unreachable anchor",
   "optout": "1 process x 2 lifts, batching off, live per-entry anchor"
  },
  "verdict_rule": "CROSS_PROCESS_BATCH_ANCHOR_SUPPORTED iff 8 lifts from 2 processes are accepted under exactly 2 batches of 4 and one valid chain; 8/8 proofs and 8/8 receipts verify offline over 2 roots; every accepted lift has a sequence and anchor_finished_at <= accepted_at; the unreachable anchor writes 0 rows and 4 queue errors; the opt-out control uses 2 per-entry anchors; no commitment is duplicated. H7 external review BLOCKED.",
  "external": "NOT_OBTAINED"
 },
 "hypotheses": {
  "H1_cross_process_batches": "8 lifts from two processes accepted under 2 batches of 4 and a valid chain",
  "H2_proofs_and_receipts": "all batch inclusion proofs verify and every receipt verifies offline",
  "H3_cross_process_chain_and_order": "the chain is ordered across processes and no lift is accepted before its anchor",
  "H4_anchor_down_fails_closed": "an unreachable anchor writes no row and leaves every submission refused",
  "H5_optout_per_entry": "with batching off the per-entry gate still anchors every lift",
  "H6_no_duplicate_commitment": "no commitment is claimed or committed twice",
  "H7_external_review": "no external reviewer has reviewed this study (BLOCKED)"
 },
 "engine_sha256": {
  "cain/cain2027/e373d/run.py": "ef292dd64fedf2e01a26675753cfc431c4d0a259f4de39f51fcfe66af8bcbde0",
  "cain/cain2027/e373d/worker.py": "ce594b5fca68b1dfdee10790a276674765722babe0703f3a1773b3e3eca42b2b",
  "cain/jit_batch_queue.py": "b245e60b577aa121990fbe8c2e7cfabd3f67455e8b3ae4c49c522f28f010f109",
  "cain/jit_capability.py": "48ecf7a05f23715f0aae71aae139a10431ee59008d2d60a5700d7fa34f9d60cc"
 },
 "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 on one host share one SQLite file (WAL); not a multi-host or network boundary.",
  "A claimed batch whose leader dies fails closed at the hard deadline; crash recovery is not implemented.",
  "The commitment is computed before the chain insert; chain and proof are checked separately.",
  "The anchor is a study anchor on cain-mr-03 (quarantined for customer anchoring).",
  "0 model calls; external reviewer NOT OBTAINED."
 ]
}