Chronicle: The Commit Stream, Durability, Time, and Branches (Bet B1)
14,498 words8 subsectionsA design document: it describes the 1.0 target, not what runs today.
On this page8
Chronicle is the ECS-native durability substrate — frankensqlite's Native mode, born as the only mode, for graph objects.
5.1 Objects
Every durable logical object has a full 256-bit ObjectId = BLAKE3_keyed(K_oid, "fgdb:logical:v1" ‖ DatabaseSecurityNamespaceId ‖ canonical_plaintext_header ‖ canonical_plaintext_payload). DatabaseSecurityNamespaceId is an immutable random 256-bit database-creation identity, distinct from the human/catalog DatabaseId; K_oid is an immutable random database identity key shared only with authorized database replicas/restore principals and wrapped through the root/bootstrap/key-escrow chain. Both are available before any ObjectId is verified. Honest-but-curious storage still observes equality and size/access patterns among opaque ObjectIds inside one namespace, but cannot perform an offline plaintext dictionary from the public slot alone; profiles that expose K_oid explicitly accept that leakage. Same-identity restore preserves namespace and key, while clone restore creates both anew and must re-address and re-encrypt the complete logical closure. A 128-bit prefix is only a lookup accelerator; collision buckets always verify the full digest, object kind, length, and canonical plaintext before deduplication or substitution. Logical identity therefore survives recompression, re-encryption, and RaptorQ re-encoding within one keyed security namespace. Deduplication does not cross security namespaces unless an explicit deployment policy accepts equality leakage and uses a separately specified shared namespace/key domain.
Physical protection follows one noncircular pipeline. Canonical plaintext is deterministically compressed under CodecProfile; a random per-ciphertext DEK performs one object-level AEAD operation with AAD ("fgdb:object-aead:v1", ObjectId, CipherDescriptorWithoutDigest). The cipher descriptor excludes FEC and placement. CiphertextId hashes that descriptor, ciphertext, and profile-sized object tag. A canonical EncodingDescriptorWithoutId { ciphertext_id, fec_profile, transfer_length, oti_common, oti_scheme, symbol_size, source_block_count, symbol_auth_profile } contains every parameter that changes RaptorQ decoding or symbol authentication, and EncodingId = BLAKE3("fgdb:encoding:v1" ‖ canonical(EncodingDescriptorWithoutId)). The same authenticated ciphertext may be recoded under another complete encoding descriptor without re-encryption. Physical locations and symbol inventories use PlacementDescriptorWithoutId { encoding_id, placement_epoch, failure_domain_policy, location_form }, where location_form is either one fully described contiguous span with an authenticated symbol-inventory digest or an explicit canonical symbol/locator inventory. PlacementId = BLAKE3("fgdb:placement:v1" ‖ canonical(PlacementDescriptorWithoutId)); neither the ID nor a digest of the record is an input to itself. Adding or moving symbols creates a new descriptor/record, never a new encoding identity. RaptorQ encodes the complete ciphertext-plus-object-tag. A domain-separated K_symbol = KDF(DEK, "fgdb:symbol-auth:v1" ‖ EncodingId) authenticates the exact canonical SymbolRecord transcript: domain/version plus every serialized header field except the MAC bytes themselves, followed by the payload. This includes framing lengths, identities, object kind, source block, ESI, transfer length, OTI, flags, auth profile, and payload length; there is no shorter competing transcript. Symbols do not reuse an object AEAD nonce as per-symbol nonces, and symbols from different EncodingIds are never mixed. DEK/ciphertext identity is separate from wrap_key_epoch, so KEK/KMS recipient rewrap changes only immutable KeyWrap records, not CiphertextId or EncodingId. Appendix A fixes algorithms/profile IDs, tag lengths, AAD/MAC transcripts, bounds, and partial-tail rules. RaptorQ protects erasures only within the declared source-block and placement model; replication/backup protects failure-domain loss.
Durable schemas belong to five disjoint identity classes. Appendix A's checked-in schema annotations generate five registries; no prose list is a second allowlist, and no schema may inhabit more than one class:
logical_object_kinds.toml— content-addressed logical objects. Each row assigns one stable, nonreusableobject_kind:u16to one top-level canonical plaintext schema whose independent identity is the keyedObjectIdabove. It declares identity/storage class, schema major/minor and lifecycle status, canonical encoder/decoder, construction-order class, every reference field and GC strength, posture/role/feature compatibility, resource bounds, and golden/fuzz corpora. AllStrongRef<T>,Conditional*Ref<T>, and weak-digest target types must resolve to rows in this registry. Chronicle roots, commands/specs/records, certificates, indexes, runs, checkpoints/cuts, cross-authority evidence and grants, W12 Meta/shard state, posture-transition artifacts, backup/restore artifacts, executable modules, and proof/conformance bundles are represented here only when they are independently addressable logical objects.physical_record_kinds.toml— physical realizations and coordinates. Each row declares its non-ObjectIdidentity law and transcript:CiphertextId,EncodingId,PlacementId, authenticated metadata-tree locator entries, and coordinate-keyedSymbolRecords. It records descriptor version, owning logical/cipher/encoding identity, authentication transcript, collision verification, placement/repair semantics, and bounds. These records can realize or locate logical objects but are never accepted as logicalStrongReftargets and never acquire anObjectKindmerely because they are durable bytes.bootstrap_frames.toml— fixed-location mutable frames.RootSlotand any future registered bootstrap frame have location/generation/checksum identity rather than content-addressed identity. Each row fixes byte size, offsets, alternation/update protocol, tear-validation rule, opener fields, compatibility gate, and recovery test vectors. No ordinary object/reference encoder may embed one as a graph node.prebootstrap_artifact_kinds.toml— restore artifacts that necessarily predate targetK_oid.PreBootstrapArtifactId = BLAKE3("fgdb:restore-prebootstrap:v1" ‖ target_claim_or_reservation_domain ‖ artifact_kind ‖ schema_version ‖ canonical_wrapper_bytes)andPreBootstrapArtifactRef<T> {artifact_id,authenticated_staging_locator,length,canonical_digest,dispatch_root_generation}are legal only in the registered restore staging inode/root/capsule. The artifact's actual schema is the distinct wrapper{import_target_schema_id_for_T,inner_canonical_bytes,inner_digest,artifact_metadata};Tis a compile-time import-target phantom and does not make the inner target schema inhabit the prebootstrap identity class. Rows declare wrapper kind/schema, target claim domain, inner codec, authentication, bounds, lifecycle, exact allowed prebootstrap containers, canonical-import target kind, and cleanup floor. These IDs are neverObjectId, never accepted byStrongRef, never enter the current-database mark set, and never authorize ordinary reads. Contents are portable plans, status/receipt/refusal bytes, availability certificates, lease-owner generations, wrapped-key artifacts, and proof material only—never plaintext keys. Once targetK_oidexists, generated canonical-import records decode/copy the inner bytes into the sole target-keyed logical identity and prove a total artifact-to-logical-object/disposition bijection; no canonical logical object retains a staging locator after the import floor closes.wire_types.toml— embedded canonical types and closed tags. Every inline record, enum/union variant, discriminant, spec-body tag, reference wrapper, and framing type used inside the preceding classes has one stable, nonreusablewire_type_id:u16plus an exact containing-unionwire_tag:u16, encoding context, version/status, limits, and allowed containing schemas. An inline type is not independently reachable and cannot be named byStrongRefunless it is separately promoted to a top-level logical schema with a distinct logical-object row. The generatedSequenceNeutralSpec, role-command, checkpoint-vector, restore-state, and projection-slot inventories come from this registry; there is no prose catch-all variant.
Each registry has its own 16-bit code space with 0x0000 and 0xffff permanently invalid, 0x0001..=0x7fff permanent core assignments, 0x8000..=0xbfff negotiated extension assignments, and 0xc000..=0xfffe test/experimental assignments that production readers reject. A released code or tag changes status to Retired but is never reassigned; removed experimental bytes remain reserved in the golden corpus. registry_epoch changes only when rows are added or retired, not when prose moves.
The annotations also generate the normative cross-index durable_fields.toml, one row per canonical field or union arm: {containing_schema_id,field_tag:u16,stable_name,exact_wire_type,cardinality,identity_class,reference_semantics,target_schema_id?,construction_order,role/posture/feature_predicate,retention_and_cut_rule,version_status,resource_bounds}. Field tags use the same permanent/reserved rule. Appendix pseudo-schemas are checked renderings of this table, not permission to infer a type from an English name: every apparent root, ref, OID, digest, Raft pointer, floor inventory, backup closure, or union element must have an explicit row. A field absent from the table is unencodable. This table is the sole input to generated reachability/GC, checkpoint-vector, backup-closure, construction-DAG, compatibility, size-limit, and fuzz walkers.
Ordered transitions have one further normative registry, command_contracts.toml; hand-written lists in this document are generated readability projections and are never a second source of truth. One row exists for every role-valid command arm and has the exact schema {command_contract_id,role:Local|Meta|Shard,outer_command_union,outer_wire_tag,input_schema_id,input_wire_tag,inner_wire_tag?,body_schema_id,result_schema_id,applied_record_schema_id,handler_symbol,transition_class:Semantic|Maintenance|Scaffolding,sequence_effects,expected_state_schema_id,authority_arm,authority_evidence_target_schema_id?,terminal_audit_freeze_arm,terminal_audit_gate_arm,payload_availability_rule,publication_mode:SinglePlane|AtomicProtocolDetach{cross_plane_conservation_recipe_id},construction_dag_recipe_id,consumed_state_slots[DurableStateSlotRef],written_state_slots[DurableStateSlotRef],checkpoint_floor_classes[],backup_restore_gc_classes[],posture_feature_predicate,format_epoch_range,status} where DurableStateSlotRef={plane:SemanticPayload|Protocol|PreparedOwnership|Consensus|Bootstrap,role,slot_tag}. Rows are per concrete inner tag: an outer DpTransition, RemoteRetention, configuration, delivery, GC, backup, restore, format, bulk, derived-build, or audit-lifecycle family never hides an open subcommand. The paired command_type_classification.toml assigns every independently addressable normative input-looking type—including every type whose stable name ends in Spec—exactly one class: RegisteredCommandInput{command_contract_id}, PreOrderArtifact, CertificateInput, ResultOnly, ProjectionInput, or RuntimeOnly. A suffix conveys no semantics. In particular an ordinary schema/index definition is a SchemaOp carried by a transaction; it cannot silently acquire a catalog/schema/index control command merely because prose calls it a specification.
Generation and CI enforce a two-way total bijection. Every inhabitable Local, Meta, or Shard command-union arm resolves to exactly one live command-contract row; every live row resolves to exactly one union arm, one registered canonical input, one exact body/result/applied-record triple, and one exhaustive Rust apply handler. Every independently addressable input-like type has one classification row, and every RegisteredCommandInput row is reachable from exactly one role/tag contract unless an explicit shared-role row names its finite role set. Duplicate tags, aliases that encode a second command, wildcard bodies, unresolved associated types, prose-only phases, unhandled rows, handlers without rows, or a command input classified as its own future result are G0 failures. Generated exhaustive-match tests compare registry rows, Rust enums, encoders/decoders, state-machine transition tables, Appendix renderings, negative fixtures, and every command family named by a feature contract. Thus adding a phase requires one atomic registry/schema/handler/test change; omission cannot degrade into an unreachable recovery state.
durable_state_slots.toml is the total cross-plane registry. Its rows point to exactly one backing field registry and use {plane,role,slot_tag,backing_registry,stable_name,exact_wire_type,reference_semantics,target_schema_id,activation_predicate,initial_value_recipe,transition_writer_contract_ids[],checkpoint_or_snapshot_class,floor_class,backup_class,restore_reconciliation_class,gc_class,role_transition_class,status}. state_payload_fields.toml backs only canonical semantic payloads; protocol_state_fields.toml backs the manifest/Raft-maintenance-owned protocol plane; prepared_state_fields.toml and consensus_state_fields.toml back prepared ownership and Raft hard/snapshot/configuration state. Bootstrap slots remain fixed-location fields validated through bootstrap_frames.toml but still receive cross-index rows. Every consumed/written command slot must resolve through this table, every active slot names every legal writer, and every required checkpoint/snapshot/floor/backup/restore/GC/transition walker is generated from it. A feature with no slot, a slot with no writer, an unclassified protocol mutation, or a semantic-payload checker pretending to cover another plane is a G0 failure.
External irreversible application/authority actions have one additional total registry, irreversible_dispatch_contracts.toml; ad-hoc “call after commit” code is forbidden. An action belongs here when transport may escape the process and the target can durably register, charge, reserve, publish, revoke, destroy, release, or advance a CAS-linear application authority—even when the operation is logically reversible later. The two publication substrates are not recursively modeled as application actions: ordinary state uses the fixed RootSlot protocol, and the sole pre-first-root exception uses the exact prebootstrap_journal_publication_contracts.toml protocol below. G0 permits no third substrate.
DispatchSourceGateKind is the closed union PublishedSemanticAuthorization{authorization_record_kind,publication_evidence_kind,current_authorization_and_resource_checker}|PublishedExternalCasAuthorization{operation_record_kind,operation_publication_evidence_kind,authority_head_kind,current_operation_authorization_resource_and_direct_predecessor_checker}|PreBootstrapReservationAuthorization{prebootstrap_root_kind,reservation_body_and_head_kind,current_reserved_observation_plan_and_staging_inode_checker}|PreBootstrapClaimedAuthority{prebootstrap_root_kind,claimed_authority_kind,current_claim_plan_and_staging_inode_checker}|PublishedCancellationFence{fence_kind,publication_evidence_kind,current_fence_and_zero_start_checker}|SemanticQuarantine{quarantine_kind,publication_evidence_kind,current_root_and_no_new_reference_checker}|ActivatedReleaseHold{hold_kind,publication_evidence_kind,current_hold_and_participant_checker}|ReservationDisposition{reservation_kind,publication_evidence_kind,current_claim_or_pending_disposition_checker}. DP/privacy, audit, continuity, catalog, and time-authority CAS operations use PublishedExternalCasAuthorization; a bare current external head without the exact published local operation and its publication evidence can never authorize them. DispatchTerminalImportKind is the closed union SemanticImport{command_input_kind}|ProtocolFinalize{maintenance_input_kind}|ExternalCompletionImport{command_or_maintenance_input_kind}|PreBootstrapJournalImport{journal_transition_kind,canonical_bridge_import_kind}.
DispatchOriginPlane is the closed tag CanonicalProtocol|RestorePreBootstrap. The unique registry key is dispatch_contract_id, not action_kind: one provider action kind may have a finite generated contract family when it is legally invoked from more than one origin plane or source-gate/profile class. Exact uniqueness is (action_kind,origin_plane,role_and_group_predicate,source_gate_arm), and each member has a disjoint operation-ID namespace, attempt state slot, authorize/arm/import contracts, terminal schema IDs, and retention floor. RestoreArchiveLeaseRenew, RestoreArchiveLeaseRelease, reservation claim/consume/burn where applicable, transient cleanup, and any other dual-plane provider action therefore have distinct prebootstrap and canonical contract IDs even when their provider action-body schema is shared. No terminal evidence/import from one contract member can satisfy another.
ExternalActionRequestBinding is the portable, reference-free prefix every actual request, status result, refusal, and terminal receipt byte-matches: {database_id,database_security_namespace_id,cluster_incarnation,role_and_group,service_visibility_epoch,dispatch_contract_id,origin_plane:DispatchOriginPlane,action_kind,authority_domain,target_identity,operation_id,idempotency_token_digest,canonical_action_body_digest,source_gate_kind,source_gate_publication_commitment,authority_binding_public_commitment,request_schema_major,request_schema_minor}. The binding is constructed only after the registered source gate is durable. Pre-order action bodies and Semantic authorization records therefore contain an operation/idempotency identity plus a canonical action-body recipe, never a future publication commitment or full request. An external authority must key status and idempotency by at least (authority_domain,target_identity,operation_id) and permanently reject the same operation ID with different contract, plane, binding, or body bytes.
AuthenticatedExternalStatusStep<Contract> is the generated reference-free {external_request_binding:ExternalActionRequestBinding{dispatch_contract_id=Contract},canonical_full_request_digest,status_query_nonce,status_observed_at:AuthorityInstant,status_time_authority_profile_oid,status_class:NotRegistered{authoritative_absence_counter,provider_operation-index-proof_digest}|RegisteredPending{registered_operation_digest,provider_progress_token_digest,provider_counter}|Applied{typed_receipt_digest,result_head_or_target_state_commitment,provider_counter_or_cas_version}|AlreadyApplied{typed_receipt_digest,result_head_or_target_state_commitment,provider_counter_or_cas_version}|PermanentlyRefused{typed_refusal_tombstone_digest,zero_effect_commitment,provider_counter_or_cas_version}|ConflictNoEffect{typed_conflict_evidence_digest,zero_effect_commitment,provider_counter_or_cas_version},prior_status_step_digest?,provider_status_key_id,provider_status_key_epoch,signature}. Each contract row fixes the action kind, origin plane, admissible status classes, exact proof carried by NotRegistered, permitted monotonic step relation, and whether the provider uses a counter, CAS version, or both. A timeout, transport error, unsigned absence, locally elapsed deadline, or response for a different contract/request is not a status step.
PortableExternalActionTerminalEvidence<Contract> denotes a generated finite family, never an erased runtime generic. Every dispatch-contract row emits one distinct registered schema with {external_request_binding:ExternalActionRequestBinding{dispatch_contract_id=Contract},canonical_full_request_digest,dispatch_attempt_generation,source_gate_publication_commitment,status_lineage:[AuthenticatedExternalStatusStep<Contract>],terminal_disposition:Applied{typed_receipt_digest,result_head_or_target_state_commitment}|AlreadyApplied{typed_receipt_digest,result_head_or_target_state_commitment}|PermanentlyRefused{typed_refusal_tombstone_digest,zero_effect_commitment}|ConflictNoEffect{typed_conflict_evidence_digest,zero_effect_commitment},provider_counter_or_cas_version,signer_set_epoch,signatures}. It contains no local or Protocol object identity. PortableTimeAuthorityIssuanceCloseTerminalEvidence, PortableTimeAuthorityIssuanceFenceTerminalEvidence, PortableTimeAuthorityRegistryTransitionTerminalEvidence, and every other named terminal type are exact generated members keyed by contract ID with action-specific typed payloads; they are not aliases that permit cross-action or cross-plane decoding. Elsewhere, notation of the form PortableExternalActionTerminalEvidence<Action> is permitted only when the action has exactly one live contract; a dual-plane action must name its exact Contract.
At least one live contract row exists for every external action, and every legal origin-plane/source-gate specialization has exactly one row. The action inventory includes: DP charge and privacy-continuity freeze/retire/profile transitions; audit ticket issue, resolution-batch CAS, and completeness change; backup publication, transparency append, archive-grant issue/renewal, source-release-hold prepare/activate/completion; atomic restore archive acquisition whose typed terminal payload includes generation-one source-lease activation; separate source-K_oid/DEK recovery, target-K_oid creation, recovery-incarnation-lease acquire/refresh, later source-lease renew/release, reservation claim/consume/burn, pre-bootstrap continuity abandonment, prior-incarnation lease fencing, catalog reserve/activate/tombstone and ExternalCas continuity pending/finalize/abandon; time-authority issuance close/fence/registry transition/service shutdown; distinct GC member reclaim and cancel-before-start operations plus every deletion/crypto-erasure; and KMS/HSM/storage key destruction. There is no separate source-lease-acquire action: the prebootstrap RestoreArchiveAcquire contract alone performs Absent -> Registered -> Active and returns both archive acquisition and lease-acquire typed payloads under one request binding; key recovery/creation occurs only under its later refinement-authorized rows. The nonrecursive prebootstrap journal-head CAS publishes dispatch state but is not itself an application action row. Catalog/continuity/time/privacy/audit registries are not exceptions merely because they are CAS-linear. The only v1 application/provider transport permitted before a canonical RootManifest is the registered restore pre-bootstrap machine below, and it may send only after its complete SentUnknown generation is journal-head durable. Reservation-claim contracts use PreBootstrapReservationAuthorization; post-claim acquisition/use/consume/burn contracts use their exact PreBootstrapClaimedAuthority, ReservationDisposition, or registered successor gate. Every request, status, receipt, and terminal-evidence byte records its contract ID, origin plane, selected source-gate kind, and commitment; no unconditional “claimed target authority” field is inferred.
Each row declares {dispatch_contract_id,action_kind,origin_plane:DispatchOriginPlane,operation_id_namespace,role_and_group_predicate,source_gate:DispatchSourceGateKind,operation_plan_kind,canonical_action_body_kind,target_identity_kind,idempotency_key_recipe,canonical_request_transcript_recipe,attempt_slot,authorize_contract_id,arm_contract_id,mark_sent_unknown_contract_id,abandon_before_send_contract_id,status_query_contract,authoritative_not_registered_evidence_kind,post_eligibility_not_registered_contract:Forbidden|RefusalOnly{provider_expiry_checker,permanent_refusal_tombstone_kind}|ExactCleanupRetry{eligibility_kind}|SeparateCleanupAction{action_kind},permanent_refusal_evidence_kind,terminal_receipt_kind,portable_terminal_evidence_kind,allowed_terminal_outcomes,current_root_or_prebootstrap_inventory_checker,configuration_and_writer_fence_checker,continuity_and_time_checker,dispatch_hold_class,terminal_import:DispatchTerminalImportKind,nonterminal_retention_floor,terminal_compaction_rule,status}. A live row is required before an action encoder, provider adapter, or handler can issue or status-query the action. DP charge and audit ticket/completeness choose RefusalOnly when their admission window can expire; reservation consume and source-lease release choose only their exact registered cleanup eligibility. The generated matrix rejects duplicate contract keys, an action/plane/source-gate hole, missing authenticated idempotency/status semantics, timeout-as-success, changed operation/request bytes, a receipt/refusal not bound to the exact contract lineage, a future-receipt cycle, a Protocol object identity in portable evidence, and any send whose exact published source gate is absent or stale.
The generated canonical Protocol-plane machine is IrreversibleDispatchAttempt<Contract> {dispatch_contract_id:Contract,action_kind,operation_id,idempotency_token_digest,target_identity,canonical_action_body_digest,canonical_request_transcript_digest,source_gate_kind_and_commitment,source_publication_evidence_commitment,authority_binding_public_commitment,service_visibility_epoch,nonretaining_predecessor_digest,state} with the closed state Armed{arm_generation,authorized_operation_plan_commitment,expected_predecessor_protocol_state_commitment,expected_source_gate_and_configuration_commitment}|SentUnknown{attempt_generation,arm_generation,arm_publication_evidence_ref:StrongRef<DispatchArmPublicationEvidence<Contract>>,mark_publication_basis_commitment}|AbandonedBeforeSend{attempt_generation,arm_generation,arm_publication_evidence_ref:StrongRef<DispatchArmPublicationEvidence<Contract>>,abandonment_proof_ref:StrongRef<DispatchNeverSentProof<Contract>>,terminal_reason}|TerminalImported{attempt_generation,terminal_outcome:Applied|AlreadyApplied|PermanentlyRefused|ConflictNoEffect,portable_terminal_evidence_identity,external_receipt_or_refusal_import_commitment,status_lineage_commitment}. Contract must have origin_plane=CanonicalProtocol; prebootstrap uses its distinct journal-backed generated attempt type keyed by the prebootstrap contract ID. Armed and AbandonedBeforeSend contain only values known before their own publication; neither names its future Protocol state, RootManifest, slot, or publication generation. If a later consumer requires evidence that abandonment itself was published, it reconstructs DispatchAbandonmentPublicationEvidence<Contract> after the fact from authenticated current/historical Protocol-root membership and RootPublicationEvidence; that evidence is never embedded in the abandoning successor.
After the Armed-containing root is durable, recovery or the publisher constructs DispatchArmPublicationEvidence<Contract> {dispatch_attempt_identity_and_commitment,containing_protocol_state_identity,containing_consensus_state_root_identity,containing_root_manifest_identity,winning_slot_index_generation_and_digest,root_publication_evidence:RootPublicationEvidence,source_gate_commitment,current_configuration_writer_fence_continuity_and_service_commitment,evidence_digest}. DispatchNeverSentProof<Contract> binds that evidence, a current authenticated scan of both slots and the exact attempt lineage, and proves that no SentUnknown successor for the arm generation was ever published. Each row names the sole legal Armed-abandonment proof, NotRegistered proof, refusal/conflict evidence, typed receipt import, and portable terminal-evidence schema; absence is a G0 failure. Armed -> SentUnknown is durably RootSlot-published before request bytes can enter a transport. Recovery therefore treats every SentUnknown attempt as possibly delivered, first performs the registered authenticated status query, and never infers absence from a timeout. A definitive signed NotRegistered result permits only the byte-identical request under a fresh guard while the row's action-specific eligibility still permits first send; if eligibility has expired, it permits no send unless that contract explicitly registers a terminal-cleanup exception. Applied/AlreadyApplied imports the exact receipt; PermanentRefusal imports a signed zero-effect refusal tombstone; ConflictNoEffect imports signed evidence that the requested transition did not occur and cannot later appear under that operation ID. Any ambiguous result permits status/reconciliation only. Armed -> AbandonedBeforeSend is the sole no-send terminal and requires the registered proof; disconnect, cancellation, process death, or provider absence is insufficient. Construction-DAG and crash tests cut before/after authorization publication, Armed publication, arm-evidence construction, SentUnknown publication, transport submission, every status class, typed terminal import, and abandonment publication for every registered contract row.
Immediately before the first send or an allowed exact retry, IrreversibleDispatchGuard<Contract> rereads the winning RootSlot and both slot generations, the complete current all-plane root inventory, the still-current registered source gate and its checker, current/prospective configuration, writer-fence and continuity heads, service epoch, authority binding, and profiled time evidence. It also acquires a linear IrreversibleActionHold<Contract> that conflicts with invalidation of that authorization/quarantine/hold/reservation/CAS/cancellation gate, target resurrection where applicable, configuration/fence/continuity replacement, and authority widening while allowing unrelated database progress. The nonserializable guard is bound to the exact contract's SentUnknown attempt and request bytes, is consumed at transport submission, expires on any checked-observation budget breach, and cannot survive restart. A destructive target independently durably records Started under its own current fence before deleting or destroying its first byte/key; a CAS-style external authority durably registers the exact operation/request lineage before applying a terminal direct successor.
The pre-bootstrap analogue is generated from the exact row whose origin_plane=RestorePreBootstrap, not from a singular dual-use row and not from a parallel informal protocol. PreBootstrapDispatchAttempt<Contract> has the same request/status laws and Authorized -> Armed -> SentUnknown -> TerminalImported|AbandonedBeforeSend semantics, but its publication evidence is PreBootstrapDispatchPublicationEvidence<Contract> over the authenticated restore dispatch root, journal_staging_inode_identity, both mirror slot generations, whole-inode fence, selected prebootstrap source-gate kind/commitment, external journal-head commitment, and sealed plan/action bijection. PreBootstrapExternalTerminalImportArtifact<Contract> is the prebootstrap wrapper {dispatch_contract_id:Contract,origin_plane:RestorePreBootstrap,action_kind,request_binding,dispatch_attempt_and_publication_commitment,terminal_artifact_bytes_and_digest,portable_terminal_evidence_bytes_and_digest,status_lineage,prebootstrap_time_and_source_gate_commitment,dispatch_root_generation,import_digest}; it deliberately has no FenceBoundIrreversibleReceiptHeader or Protocol identity. PreBootstrapIrreversibleDispatchGuard<Contract> rereads all of those values plus current external claim/grant/continuity/time evidence immediately before send. The first canonical bridge copies/verifies each terminal-import artifact through a contract-specific canonical import record and imports a sealed, terminal-or-still-recoverable journal with an exact contract-to-attempt bijection. If a nonterminal prebootstrap attempt must be adopted into canonical Protocol for recovery, the Protocol owner is AdoptedPreBootstrapDispatchAttempt<Contract> and permanently retains origin_plane=RestorePreBootstrap, the prebootstrap operation-ID namespace, source-gate lineage, and prebootstrap terminal-import type; it never mutates into the canonical contract for the same action. No other subsystem may create a private outbox, retry ledger, or direct provider path. These rules are generated compile-time capability boundaries plus lab/runtime oracles, not review conventions.
The only v1 cross-plane publication mode is a registry-declared AtomicProtocolDetach{cross_plane_conservation_recipe_id} command-contract row; it is not one special command. For each result-producing Local/Meta command that uses this mode, one same-group Raft entry and one RootManifest slot generation publish (a) the semantic outcome/frontier containing only an opaque owner key and detachment commitment and (b) a Protocol PendingVisibility or legal inline-Active owner plus typed resource escrow. The row supplies a generated cross-plane conservation proof over owner key, byte digest, charge, audit candidate, and authority binding; ObjectId/reference edges across the planes are forbidden. All later activation/resume/ACK/release/expiry/send-completion work is Protocol maintenance and cannot write semantic slots. This narrow composite mode is used by ordinary query results, the initial subscription cursor/baseline owner, durable artifact outputs, protected errors, and DP results. Subsequent subscription deltas, coalesced replacements, and reset-required transitions are Protocol-only publications under the already-detached cursor identity. Any other multi-plane writer, any subscription-delta semantic rewrite, or a protocol-to-semantic back-edge is a G0 failure.
state_payload_fields.toml therefore includes allocation reservations/dispositions, valid-time slices, constraint reservations, resource/escrow/security authority, transaction semantics and capability lookup, privacy/DP semantic request state, audit admission/freeze state, bulk/derived/schema/format authority, backup/restore/GC semantic decisions, topology, keys, and remote-retention/trust obligations. It does not contain the audit visibility pipeline, external-audit release-time outcomes, independent result/cursor/artifact delivery lifecycles, Raft hard state, prepared ownership, or RootSlot state. protocol_state_fields.toml includes AuditVisibilityPipeline, visible audit-outcome/release index, externally imported audit-continuity head, independent result-retention/delivery index, result activation/ACK/release/resume state, cursor/artifact-output transport lifecycles, and other replica/group protocol ownership whose transition must not advance logical semantics. A Local/Meta result-producing semantic command may atomically write both its semantic detachment commitment and a protocol-plane PendingVisibility owner in the same RootManifest publication; later audit visibility, activation, ACK, release, expiry, and resume are quorum-durable maintenance transitions over the protocol plane. Shard rows remain projections or shard-owned protocol state only; they never create a second Meta semantic authority.
Generated reference unions are exact rather than erased. For each containing schema and role, durable_fields.toml emits a finite tagged union such as LocalCommandInputRef, MetaAppliedResultRef, ShardProtocolEvidenceRef, or MandatoryInventoryRef; every arm names one top-level target schema and carries the target's canonical typed reference encoding. Bare StrongRef, StrongRef<A|B>, StrongRef[], result_refs[StrongRef], slash-separated pseudo-types, or a generic RegisteredStrongRef without a containing-schema-generated arm set are invalid in normative bytes. Compact renderings that use such shorthand are navigation-only and must expand through an exact field-table row. A generated construction-DAG test creates the concrete graph for every command tag and state slot and rejects self, mutual, or future-result edges.
Security binding is schema-enforced rather than name-enforced. AuthorityOwningRole is the closed set Local|Meta; Shards consume certified projections but never originate an authority record or permit. AuthorityBindingRecord<Role:AuthorityOwningRole> is the independently addressable {role,database_security_namespace_id,cluster_incarnation,service_visibility_epoch,tenant,principal,non_widenable_authority_ceiling_digest,purpose_class,security_state_binding:SecurityStateBinding,authority_digest,body_digest:BodyDigest<AuthorityBindingRecord<Role>>}; AuthorityBindingRef<Role> is the generated exact role arm that strongly selects it. AuthorityBoundHeader<Role:AuthorityOwningRole> is the embedded {authority_binding_ref:AuthorityBindingRef<Role>,authority_digest,security_policy_epoch,revocation_index} projection and every repeated value must byte-match the record.
MetaAuthorityBindingProjection is the independently addressable portable logical object with registered ObjectKind=0x0108, schema major 1, role predicate Meta, and canonical_max_size_bytes=65536: {source_authority_binding_public_commitment,database_security_namespace_id,cluster_incarnation,service_visibility_epoch,tenant_commitment,principal_commitment,non_widenable_authority_ceiling_commitment,purpose_class,exact_clipped_operation_read_write_disclosure_and_resource_scopes,security_policy_epoch,revocation_index,source_meta_prefix,source_configuration_and_retention_grant_evidence,projection_digest:BodyDigest<MetaAuthorityBindingProjection>,signatures}. Its body transcript is BLAKE3("fgdb:body:meta-authority-binding-projection:v1" || canonical(schema_major=1, every field through source_configuration_and_retention_grant_evidence)); the field row explicitly excludes projection_digest and signatures, and the signatures cover that digest plus the exact authority/configuration domain. Its logical-kind row, field rows, encoder/decoder, retention owner, export leaf, and golden/fuzz corpus are mandatory before status advances from reserved. ShardAuthorityBindingProjection is the shard-local exact {security_state_projection:ShardSecurityStateProjection,certified_source_authority_projection_ref:CertifiedRemoteStrongRef<MetaAuthorityBindingProjection>,source_authority_binding_public_commitment,tenant_commitment,principal_commitment,non_widenable_authority_ceiling_commitment,purpose_class,exact_clipped_operation_read_write_disclosure_and_resource_scopes,source_meta_prefix,source_configuration_and_grant_commitment,projection_digest}. The certified source projection and local security projection must agree on namespace/incarnation/service epoch/policy/revocation and cannot be recombined from different Meta prefixes or principals. AuthorityBindingFor<Role> is the generated closed role family Local{header:AuthorityBoundHeader<Local>}|Meta{header:AuthorityBoundHeader<Meta>}|Shard{projection:ShardAuthorityBindingProjection}; exactly one arm is inhabitable for a given containing role. Every durable field set marked authority_bearing=true must contain exactly one inline complete binding, one AuthorityBoundHeader, or—only for a shard consumer—the exact ShardAuthorityBindingProjection; scalar epochs/digests, a permit reference alone, the narrower ShardSecurityStateProjection, or an opaque “authority projection digest” alone fail G0. Public wire values cannot carry local refs, so their signed/MACed header contains security_state_binding_public_commitment; the durable issuance/replay record strongly retains the complete AuthorityBindingRecord and proves that commitment. The generated matrix covers permits, admissions/releases, audit-requirement decisions, prepared/final owners, intents/batches/effects, constraints/resources/escrow, derived identities/builds, plans/replay, result/cursor/output promises, DP, backup/export, descriptor views, cache keys, dispatch attempts, and every command authorization. Every Local/Meta outer command carries exactly one complete AuthorityBoundHeader that byte-matches its authorization object and frozen reservation; a Shard command instead carries the exact ShardAuthorityBindingProjection named by its imported authorization. Equal-scalar/different-root/service/tenant/principal/ceiling/role/purpose substitution is a mandatory negative fixture.
The sole authority-retention exception is a terminal, nonrevivable, nonpayload tombstone. TerminalAuthorityCommitment<Role> is the reference-free {role,database_security_namespace_id,cluster_incarnation,service_visibility_epoch,authority_binding_body_digest,authority_digest,security_state_binding_public_commitment,tenant_principal_ceiling_purpose_commitment,final_disclosure_and_answer_contract_commitment,body_digest}. It is derived byte-for-byte from the last live AuthorityBindingFor<Role> before that strong authority edge is released. A terminal commitment can prove identity, nonreuse, disclosure/answer compatibility, and tombstone equality only; it cannot authorize output, lookup of protected payload, resume, widening, mutation, resurrection, or a new capability. Any later status/lookup request must independently validate the caller against the exact current role binding/capability and compare its public commitments before returning a uniformly nonrevealing terminal projection. Any live/revivable/byte-owning state that substitutes this commitment for a full binding fails G0.
G0 enforces four separate bijections: each top-level logical schema has exactly one logical-object row and ObjectKind; each physical record has exactly one physical identity row; each fixed bootstrap frame has exactly one bootstrap row; and each embedded durable type/tag has exactly one wire-type row. It also enforces disjointness across classes, the per-field cross-index, code-range/nonreuse rules, every reference target and containing-schema relation, and that every emitted discriminant is registered. Every class requires the appropriate canonical encoder/decoder, construction-order annotation, version/feature/posture compatibility rule, size/resource limits, and fuzz/golden corpus. A missing, duplicated, cross-class, untyped-field, or orphan row is a build failure. Unknown required W12 or restore/activation tags fail closed; a 1.0 reader never partially interprets a sharded database. The canonical content graph is a DAG: every strong, conditional, and weak-digest value in newly encoded bytes must already be known. A future applied result may be described only by a sequence-neutral spec, body recipe, or assigned scalar order, never by its not-yet-computable ObjectId/digest. Self IDs, mutually strong cycles, and an input command that names its own applied result are invalid.
Stored digest fields are never defined by naming convention. Every durable_fields.toml digest row declares exactly one semantic class: TargetDigest of separately identified bytes, TranscriptDigest with a registered transcript recipe, WeakIdentityDigest, or BodyDigest. A BodyDigest<T> row fixes {domain_separator,schema_major,included_field_tags,excluded_field_tags}; its default recipe is BLAKE3(domain_separator || canonical(schema_major, T excluding exactly the one BodyDigest field)). Signatures, MACs, or other fields are excluded only when the row explicitly lists their stable tags. Unknown exclusions, two body-digest fields, an implicit zero placeholder, or computing over bytes that include the digest itself are G0 errors. Encoder, decoder, field-table, golden-vector, mutation, and cross-version tests all use the same generated recipe. In particular RaftSnapshot.body_digest, ShardHistoryInventory.body_digest, and GlobalKeyEnvelopeManifest.body_digest use registered body transcripts excluding only their own field; BackupManifest instead follows its acyclic Body -> SignatureSet -> Manifest construction and contains no self digest.
To avoid the state-root/command-head cycle, canonical state is layered. LogicalStatePayload contains the complete semantic state at { applied_logical_command_seq, applied_commit_seq } but no logical-command-head wrapper. LocalCommandOrigin is the closed union Prior{predecessor:ConditionalCommandRef}|RecoveryBridge{bridge_spec_ref:StrongRef<RecoveryBridgeSpec<Local>>,source_manifest_identity:WeakDigest,transform_and_projection_digest}. After deterministic apply has constructed every result object and the payload, it creates LogicalCommandRecord { logical_command_seq, origin:LocalCommandOrigin, command:StrongRef<CommitCommand|ControlCommand>, transaction_marker:StrongMarkerRef?, logical_command_hlc, resulting_state_payload_digest:WeakDigest }. Normal work requires Prior; only the first guarded restore command may use RecoveryBridge. It then creates LogicalStateRoot { payload_ref:StrongRef<LogicalStatePayload>, logical_command_head:StrongCommandRef? }; fresh genesis alone has no head. The payload digest cross-checks the sibling object; it is not a reachability edge. Thus the final root commits both the complete state and its transition record without either object naming a future ObjectId. Checkpoint cuts are the only normal predecessor-reclamation boundary. Each canonical CommitMarker is independently encoded and hashed before packing. MarkerRef { marker_oid, commit_seq } is the transaction-history identity used by branch heads, version origins/retirements, checkpoints, MMR leaves, and merges. A MarkerBatch merely packs length-delimited marker bytes; the object-location index maps each marker OID to its authenticated (batch_encoding, offset, length) subobject locator. Objects are assembled in uniquely named staging files, fsynced, sealed with an immutable trailer, renamed to final segment identity, and made directory-durable before publication. Staging files are unreachable state and are cleaned only by a recovery procedure that proves it.
MarkerBatch's packing trade generalizes. PackedObjectGroup is a registered physical_record_kinds.toml class that packs the length-delimited canonical plaintext bytes of many small logical objects into one physical record paying one compress/AEAD/FEC/placement pipeline: the pack, not the member, owns the CiphertextId/EncodingId/PlacementId chain. Every member keeps its keyed ObjectId, computed and verified over its own canonical plaintext exactly as above; the object-location index maps each member OID to its authenticated (pack_encoding, offset, length) subobject locator in the same registered metadata-tree locator class marker batches already use — entries remain nonretaining locators — and PreparedCommitRecord.exact_realizations already carries object_or_subobject_id, so prepared ownership names packed members without new schema surface. StrongRef semantics, the generated reachability/GC walkers, and content addressing are unchanged because references target logical ObjectIds, never placements; a pack never acquires an ObjectKind, and a packed member deduplicates against any other realization only through the full-digest/kind/length/plaintext verification every collision candidate already pays. One law is mandatory: a pack is homogeneous in key domain — every member belongs to exactly one write-key domain — the branch envelope/write-key epoch for branch-scoped payloads, or the database-scoped commit-stream key domain for commit-mechanism objects such as markers, capsules, and command records — one tenant/authority domain (one DatabaseSecurityNamespaceId and tenant), and one retention/floor class — so the pack DEK's wrap binds a single source epoch and creation boundary under §12.5's envelope rules and crypto-erasure granularity never coarsens across epochs, tenants, or floors; a mixed pack fails closed at build time. Reclamation coarsens to the pack — a pack is reclaimable only when every member is — and compaction owns the rewrite of partially dead packs, the same trade marker batches already accept. The packing boundary is the group-commit D1 boundary the protocol already pays: the coordinator packs one ordered group's control-plane commit objects — capsule, effect set, LogicalDeltaTemplate, authorization decision, resource transitions, outcome-preparation record — at the seal §5.2 step 5 already performs; each per-proposal order-attempt supplement and its availability certificate pack analogously at their own step-6 D1 boundary, and later command/command-record/marker objects ride their existing publication boundaries under the same rule (a MarkerBatch is exactly such a pack), so packing adds no new ordering step and no new ordered durability barrier. The saving is priced, never assumed: packs report through the §17 byte-economy metrics — metadata bytes per small durable object and Chronicle stream bytes per user commit, by operation class — and §6.6's write/space-amplification component breakdown.
manifest.root is a fixed two-slot bootstrap file; these are the only published durable bytes updated in place. Each 4 KiB RootSlot contains { magic, format, slot_generation, local_writer_fence_epoch, database_id, database_security_namespace_id, cluster_incarnation, incarnation_continuity_profile_id, cluster_incarnation_continuity_digest, continuity_cas_version, service_visibility_epoch, root_manifest_oid[32], RootBootstrap, tear_checksum }. IncarnationContinuityProfile is DirectoryBound (ordinary embedded/local writes rely on the exact inode lease, and same-identity restore to another directory is forbidden—clone only) or ExternalCas (the Appendix A continuity record and live member lease are mandatory); W12 requires ExternalCas. RootBootstrap supplies everything needed before the object-location index exists: the complete canonical CipherDescriptorWithoutDigest for this root; its complete EncodingDescriptorWithoutId (including transfer length, both OTI fields, symbol size/count, and symbol-auth profile); CiphertextId, EncodingId, and ciphertext digest; a complete specialized ContiguousSpan placement descriptor containing placement epoch, failure-domain policy and domain ID, segment/offset/length, and symbol-inventory digest; and a noncircular opener bundle for both the root DEK and K_oid (inline wrapped keys or authenticated KMS/HSM locators plus wrap digests). Recovery locates the span, scans and authenticates its exact symbol inventory, verifies the inventory digest and reconstructed PlacementId, reconstructs the exact object AAD and encoding transcript, decodes the root, verifies its keyed ObjectId, and only then consults its indexes. No descriptor or identity-key field comes from the object being opened. ObjectId is already the full logical digest; there is no redundant root_full_digest. Recovery rejects a root whose authenticated namespace/database/incarnation/continuity/profile/visibility tuple disagrees with the slot.
Every slot publication is serialized by one per-open-inode RootPublicationSequencer; the whole-inode writer lease excludes other processes, while this sequencer excludes stale same-process tasks. It is an asupersync actor/obligation, not a conventional mutex held across await, and it grants at most one linear nonserializable RootPublicationPermit. Permit acquisition rereads and structurally authenticates both slots and binds {inode_identity,filesystem_profile,publication_class,expected_winning_slot,expected_winning_generation,expected_winning_slot_digest,expected_manifest_identity,expected_writer_fence_epoch,expected_continuity_profile_digest_and_cas_version,expected_service_visibility_epoch,target_inactive_slot,next_generation,target_manifest_identity,target_bootstrap_digest,target_physical_generation_lease_descriptor_digest,target_lease_inode_identity_and_creation_nonce_digest,incarnation_lease_action_digest}. The target lease inode must already be created, authenticated, file-durable, and directory-durable before the permit is issued; the permit reopens and byte-matches it. next_generation=checked_add(expected_winning_generation,1); exhaustion fail-closes all further publication and requires a fenced clone/migration rather than wrap or saturation. Two structurally credible equal-highest generations are accepted for read recovery only when their complete authenticated slot bytes are identical; any difference is ambiguity and fail-closes. Write mode first normalizes an identical-equal pair through a specialized takeover/convergence permit or remains read-only.
Immediately before pwrite, the permit re-reads the expected winner and live inode/fence/continuity/lease tuple. Any slot, generation, digest, manifest, epoch, CAS, service, path, mount, or lease drift consumes the permit as AbortedStale without writing; the caller rebuilds/rebases from the new winner. A successful permit writes exactly one complete inactive slot, performs exactly the durability actions its operation class owes under the registered filesystem profile's per-operation-class sync obligations, and rereads/authenticates the new winner and its mandatory closure. The obligations are per operation class, never a blanket rule: under FGFS-LINUX-LOCAL-V1 a bootstrap-frame slot pwrite owes only the frame file's declared sync, because parent-directory syncs are owed exactly by the operations that create, rename, or unlink an inode; the exemption is bound to the bootstrap-frame contract — the frame is fixed-size, pre-created, and namespace-stable, and its dirent was made durable once at CreateNew — and the per-generation lease-inode create plus parent-directory sync is paid at physical-generation cadence, never per commit. The per-operation-class sync-obligation column (frame-pwrite|create|rename|unlink) is a registered filesystem_profiles.toml column probed by fgdb doctor --write-profile, and its counts feed the per-operation-class barrier chains tabulated in Appendix G.
Publication authority is crash-reconstructible rather than dependent on a post-write object. RootPublicationEvidence is the deterministic value {filesystem_profile_id,inode_identity_digest,publication_class,complete_authenticated_root_slot_bytes_digest,slot_index_and_generation,root_manifest_identity,root_bootstrap_digest,physical_generation_lease_descriptor_digest,verified_lease_inode_identity_and_creation_nonce_digest,writer_fence_epoch,continuity_profile_head_and_cas,service_visibility_epoch,mandatory_closure_digest} with identity H("fgdb:root-publication-evidence:v1", canonical(all fields)). Recovery recomputes it solely from the authenticated open inode, winning slot, manifest, registered filesystem profile, reopened lease inode, and mandatory closure; it contains no signature, future ref, or post-publication receipt. Every later member action binds this evidence identity and must also reread the same current source root under its action guard. The publisher may return a signed diagnostic RootPublicationReceipt {source_root_publication_evidence:RootPublicationEvidence,prior_slot_and_generation,reread_digest,durability_observation,signer_fields,signature}, but no correctness, liveness, retention, or later receipt depends on that diagnostic being constructed or rooted. A crash after slot durability but before returning reconstructs identical evidence.
Cancellation after write begins must drive the obligation to durable reread or poison write mode; it cannot free the sequencer early. Ordinary semantic apply, atomic semantic-plus-Protocol detachment, prepared-root/Raft-only publication, Protocol visibility maintenance, checkpoint/cut, compaction, restore, role transition, fence-only takeover, creation, retirement, and slot convergence each have a generated legal publication_class/guard/manifest-transition row and all use this boundary. No code path may call the slot writer directly.
Publication alternates slots through that permit and never precomputes a generation outside it. Recovery first discards slots whose fixed record fails structural/tear validation, then selects the highest remaining generation. Once a slot is structurally credible, authentication or mandatory-closure failure triggers symbol/replica repair and then fails closed; it never silently rolls back to an older authenticated state that may precede an acknowledged commit. Using an older generation requires the explicit restore/rollback protocol in §16, with fencing, incarnation advancement, and an audit/transparency record.
Replicated semantics and replica-local recovery metadata are distinct. Local, Meta, and Shard payload/root schemas are the exact Appendix A role-tagged contracts, including every security/retention/trust/derived/key/delivery/backup/GC field and the fresh bootstrap plus restore-only RecoveryReconciling rules. Semantic sequences/HLC advance on every owning-state mutation; commit sequence advances only on graph commit. Replicas at one role/prefix agree on the canonical semantic root.
RootManifest is the exact four-posture role-tagged union rendered authoritatively in Appendix A. Every active arm has one applied Semantic root, one role-valid Protocol root, one PreparedOwnership root, one Consensus/Raft root, and the exact position tuple that those roots jointly prove; Local/Meta visible endpoints are selected only inside AuditVisibilityProtocolState<Role>, while Shard visibility is selected by ShardProtocolState plus its imported Meta projection. No direct audit-pipeline or visible-root field is encoded in RootManifest. RetiredLocal retains only its compact nonsemantic certified transition/retirement proof closure and rejects every semantic, protocol, prepared, Raft, or service root. Mutation/recovery starts from the applied Semantic root, ordinary/public reads start from the Protocol-selected visible endpoint, and metadata-tree entries remain nonretaining locators resolved only after plane-aware liveness. Snapshots retain the manifest plus the complete Semantic/Protocol/Prepared/Consensus and physical recovery closure; replay pins ReplayLogicalStateEvidence::Local|Sharded, never a locator map, and RetiredLocal admits neither snapshots nor replay execution.
The current RootManifest is deliberately absent from every metadata-tree generation that it bootstraps: its slot's RootBootstrap is its sole opener, and a tree closure_digest covers only that already-constructed tree closure, excluding the slot, the current manifest, and the bootstrap bytes. A later generation may index an older manifest only as nonretaining history after that older identity is known. This exclusion prevents a future-root identity from entering the tree whose identity the root must already name.
Exactly one process per replica directory may hold the publication lease, and exactly one task within it may hold the root-publication permit. Durable write mode requires a versioned FilesystemDurabilityProfile, not a filesystem-name guess. The initial FGFS-LINUX-LOCAL-V1 profile admits only regular files on checked-in, kernel/mount-option-pinned local ext4 (data=ordered|journal, barriers enabled) or XFS (barriers and log-force flushes enabled), with staging and final paths on the same mounted filesystem. DAX, network/cluster filesystems, FUSE/overlay layers, disabled barriers, an unidentifiable mount/device, and every unregistered combination are read-only. filesystem_profiles.toml records the allowed kernel/filesystem/mount/device assumptions and probe-suite version; fgdb doctor --write-profile performs a scratch-directory conformance probe, while open repeats the mount, stable-inode, and option checks. A future platform profile must prove the same contract before it can enable writes: a nonblocking process-death-released exclusive whole-inode lease linearizable among FrankenGraphDB writers; one cancel-correct in-process publication sequencer; pwrite confined to the permit-selected inactive slot even if that slot tears arbitrarily; no collateral damage to the other slot; durable file-data/metadata after its declared sync; durable create/no-replace same-directory rename after parent-directory sync; and no acknowledged volatile-cache state after a successful flush. The profile is an explicit storage assumption—doctor cannot transmute lying hardware into a proof.
Writer acquisition for an existing database is the normative WriterTakeoverProtocol. It (1) opens the database directory and manifest.root without symlink traversal, records mount/device/inode identity, and acquires the nonblocking exclusive lease on that exact open inode; (2) creates the sole RootPublicationSequencer for that leased inode, re-resolves the path, and rejects replacement or identity drift; (3) under the lease, authenticates the highest structurally credible slot and mandatory closure, recovers Raft/audit-visibility-pipeline/restore state, and reconciles every prepared owner; (4) validates the slot's IncarnationContinuityProfile: DirectoryBound requires the original directory/inode continuity and forbids a restore bridge, while ExternalCas fetches the exact current continuity head, byte-matches namespace/incarnation/CAS/visibility state, and acquires a member-bound lease with OrdinaryWrite or narrowly RecoveryOnly scope; (5) computes new_epoch = 1 + max(epoch values in the selected slot and its authenticated reachable RootManifest/seals/prepared records) with checked overflow—unrooted staging cannot raise the fence; (6) mints a linear, nonexportable PendingFenceGuard { lease,publication_sequencer,stable_identity,old_epoch,new_epoch,exact_recovered_root,continuity_head_and_incarnation_guard } whose sole effects are building/sealing this fence-only successor and requesting the exact FenceTakeover publication permit; (7) uses that permit to persist a successor RootManifest that preserves the same canonical logical root and every receipted/ordered obligation, publishes/syncs the inactive slot at new_epoch, then rereads/authenticates that exact slot and revalidates continuity; and only then (8) consumes it into the ordinary nonconstructible combined writer/incarnation token in CommitCx (or recovery-only token) and enables only the effects allowed by that scope. The pending guard cannot create user data, issue a receipt, acknowledge/propose ordinary Raft, alter canonical state, or publish any other root. There is no timeout or administrative force path around either lease or sequencer. A stale/later/unavailable external continuity head makes the database read-only; a crashed old owner may leave immutable staging bytes, but its already receipted/ordered ownership remains live and is adopted by recovery, while it may not issue a new receipt or publish after either epoch changes.
Every database-member-issued irreversible receipt begins with FenceBoundIrreversibleReceiptHeader {receipt_schema_id,database_id,database_security_namespace_id,cluster_incarnation,role_and_group,issuing_member_id,configuration_ref,payload_predicate_digest,local_writer_fence_epoch,source_root_manifest_identity,source_root_slot_generation_and_digest,source_root_publication_evidence:RootPublicationEvidence,prepared_owner_or_operation_identity,continuity_profile_id,continuity_head_digest_and_cas_version,member_lease_generation_and_scope?,action_bound_continuity_observation_digest?,irreversible_action_digest,receipt_nonce,signer_key_id_and_epoch} and signs the header plus the receipt-specific body. PayloadReceipt, prepared durability, Raft acceptance/acknowledgement, and member physical-operation receipts cannot omit or redefine these fields. The deterministic source evidence closes the crash gap without a self or future receipt reference. A receipt issued from unreachable staging is not authoritative merely because its signature verifies.
An external KMS/HSM/archive/transparency/provider cannot attest a local member fence and therefore never fabricates that header. Its request carries the sole ExternalActionRequestBinding defined above; the provider signs or MACs that complete binding in every status result and terminal artifact. ExternalTerminalArtifactRef<Contract> is the generated closed union Receipt{typed_receipt_ref}|PermanentRefusal{typed_refusal_tombstone_ref}|ConflictNoEffect{typed_conflict_evidence_ref} for exactly that dispatch contract. A local ExternalTerminalImportRecord<Contract,Role> {role_and_group,header:FenceBoundIrreversibleReceiptHeader,dispatch_attempt_commitment,external_request_binding:ExternalActionRequestBinding{dispatch_contract_id=Contract},terminal_artifact:ExternalTerminalArtifactRef<Contract>,portable_terminal_evidence_ref:StrongRef<PortableExternalActionTerminalEvidence<Contract>>,provider_status_lineage_commitment,exact_artifact_evidence_request_role_and_current_authority_match_digest,import_body_digest} proves which current fenced member and exact role imported the external evidence. Role is generated from the contract row and cannot be erased or cross-decoded; Shard is inhabitable only for rows whose source gate and authority projection explicitly permit Shard. Final Semantic/Protocol transitions consume the contract-typed, role-typed portable artifact, portable terminal evidence, and this import commitment as required by that same registered dispatch contract. External artifacts, portable terminal evidence, and local import records are distinct schemas and are never substituted; two contracts sharing one action kind have disjoint encodings and cannot satisfy one another.
Takeover validates history explicitly. TakeoverAdoptableReceiptRef<Role> and TakeoverAdoptableObligationRef<Role> are generated closed unions over every receipt/owner class registered for that role. HistoricalReceiptValidation<Role> is {receipt_ref:TakeoverAdoptableReceiptRef<Role>,rooted_owner_ref:TakeoverAdoptableObligationRef<Role>,selected_prior_manifest_identity,selected_prior_slot_generation_and_digest,prepared_or_consensus_membership_proof,complete_closure_reopen_proof,configuration_and_signing_key_validity_proof,issuance_fence_validation:DirectPriorEpoch|PriorTakeoverAdoptionChain{predecessor_adoption_identity_and_checkpoint_proof},continuity_ancestry_proof?,validation_digest}.
The prebuilt TakeoverPreservedObligationInventory<Role> is {prior_manifest_identity:WeakDigest,prior_slot_generation_and_digest,exact_prior_semantic_protocol_prepared_consensus_root_commitments,sorted_historical_receipt_validations[HistoricalReceiptValidation<Role>],sorted_current_owner_refs[TakeoverAdoptableObligationRef<Role>],complete_receipted_and_ordered_obligation_bijection_proof,current_continuity_head_and_lease_commitment,body_digest} and explicitly excludes any takeover record, future RaftStateRoot, manifest, or slot. TakeoverAdoptionRecord<Role> is then {inventory_ref:StrongRef<TakeoverPreservedObligationInventory<Role>>,old_fence_epoch,new_fence_epoch,fence_takeover_operation_id,source_root_publication_evidence:RootPublicationEvidence,body_digest:BodyDigest<TakeoverAdoptionRecord<Role>>}. It contains only the weak prior manifest identity already authenticated by the inventory and does not retain an unbounded manifest chain or a future “resulting root” commitment.
Consensus state owns TakeoverAdoptionHead<Role> = None|Detailed{record_ref:StrongRef<TakeoverAdoptionRecord<Role>>}|Compacted{checkpoint_ref:StrongRef<TakeoverAdoptionCheckpoint<Role>>}. Every rooted receipted or ordered obligation appears exactly once in the selected inventory/checkpoint. A direct prior-epoch receipt proves membership in the selected Prepared/Consensus/certificate closure; an older receipt needs an unbroken adoption identity/checkpoint chain, and ExternalCas evidence must be an authenticated ancestor of the current continuity head. TakeoverAdoptionCheckpoint<Role> is {covered_adoption_record_digest:WeakDigest,covered_fence_epoch_range,latest_continuity_commitment,sorted_still_live_owner_refs[TakeoverAdoptableObligationRef<Role>],sorted_terminal_or_transferred_dispositions,complete_covered_obligation_bijection_proof,predecessor_checkpoint_digest:WeakDigest?,body_digest}. It may replace Detailed only after every covered receipt/owner is terminal or represented by an exact current owner/ref; an activated cut may then release the prior manifest/inventory/record closure. Invalid, missing, duplicated, or unrooted evidence makes takeover recovery-only/read-only; it is never silently abandoned. Step 7 above constructs inventory -> adoption record -> successor Consensus/Raft root with Detailed head -> RootManifest/RootSlot before the new writer token can exist.
Brand-new creation is the sole separate initialization transition. Under an accepted filesystem profile, CreateNew opens the directory without symlinks, creates a uniquely named staging root inode with O_CREAT|O_EXCL, acquires its whole-inode lease, and receives a PendingCreationGuard limited to constructing the complete Genesis closure and valid epoch-1 root slot. It fully writes and syncs that staging inode, verifies it in place, then atomically promotes it with same-directory renameat2(RENAME_NOREPLACE) (or the registered equivalent), syncs the parent directory, re-resolves and verifies that manifest.root is the same leased inode, rereads/authenticates the slot, and only then consumes the guard into the ordinary writer token. A racing loser never truncates or adopts the winner's file; its staging inode remains unreachable and is eligible only for generation/name-scoped recovery cleanup. A crash before promotion leaves no canonical manifest.root; a crash after the directory sync leaves a complete valid one. There is no empty/partial canonical tomb and no “empty file means ours” state.
Every ordinary segment/object/root seal, immutable-root build, prepared-root publication, PayloadReceipt, Raft proposal or follower acknowledgement, checkpoint/certificate publication, and RootSlot write compares the local FenceToken against the live inode lease and published epoch immediately before its irreversible step. Under ExternalCas it also revalidates the exact external continuity head/CAS version and a live member-bound ClusterIncarnationLease with the required scope; under DirectoryBound, the guard proves the unchanged creation directory/inode and cannot authorize cross-directory same-identity recovery. CommitCx contains the nonconstructible combined local/incarnation guard. The only pre-token writes are the type-restricted fence-only/Genesis/role-transition/restore operations of their named pending guards; their encoders reject every other object/root kind and consume the guard on promotion. Losing a lease, seeing a higher epoch/incarnation/CAS version, expired external authority, or observing path/inode/profile/visibility drift poisons the guard and fails closed. Local fence epoch is excluded from canonical capsule/marker/state-root bytes, while cluster incarnation and service visibility are canonical domain fields, so replicas agree. Read-only multi-process opens remain supported.
5.2 Commit protocol
Single-node and replicated commits use the same state machine; single-node mode is the quorum-one specialization. The durable unit is not the user's unresolved intent log. It is a post-rebase, post-constraint, post-SSI canonical effect capsule.
No caller can submit bare mutation intents. fgdb-authz-types defines a nonconstructible AuthorizedMutationPermit produced only by the trusted policy verifier. It binds database security namespace/incarnation, tenant/principal/issuer, authority digest and non-widenable operation ceiling, policy-semantics ObjectId, policy and revocation indices, root/snapshot and branch scope, exact read GraphReferenceBinding[] and write CoordinateSchemaBinding[], topology epoch, expiry, channel/session binding where applicable, and a unique nonce. The coordinator verifies the permit's provenance and scope, recomputes authorization over the final effects and any CoordinateSchemaTransition[], and orders the authorization decision against revocation/policy changes. Warden administers issuance later, but the verifier, permit type, and fail-closed revocation interface are W1/W2 dependencies—not optional server middleware.
Re-evaluable intents bind IntentSemanticsOid, the content digest of intent-schema version, language_contract_oid, semantic/scalar profiles, binder/normalizer version, and every procedure/UDF/module artifact that influenced intent construction. The merge ladder evaluates canonical typed intents under this object, never reparses source text under a new corrigendum or server default; if an artifact is unavailable, rebase fails closed.
-
Propose. A writer submits
TxnProposal { snapshot, expected_write_coordinates[], intent_semantics_oid, intents, predicate_witnesses, authorized_mutation_permit, ephemeral_reservation, requested_durable_charge_effects, txn_token }. It may precompute physical candidates, but no candidate capsule is publishable truth.txn_tokenand every server handle are scoped as §13/App. D require. -
Order and validate. The WriteCoordinator deterministically orders a group, verifies permit provenance/scope, live writer lease/fence, schema/topology/policy/revocation epochs, branch write/envelope-key epochs, resource reservation, and expected branch heads; then it performs FCW/SSI validation and the merge ladder when necessary. Each accepted transaction is evaluated against the committed basis plus earlier accepted effects in that group. A rebase produces new reads, writes, constraints, effects, and key-epoch bindings; it never blesses an old capsule.
-
Canonicalize final effects. Verify and preserve every previously ordered escaping allocation, then resolve only still-confined temporary IDs and generated keys; evaluate CAS/upsert/no-op behavior; expand cascades; compute explicit logical retractions and insertions with
BirthOrdinals only for genuinely new identities; preserve source origin and assign sequence-neutralBranchAdmissionOrdinal {merge_ordinal,element_id}for imports; recompute final authorization including hidden-state cascades; validate constraints and the authoritative durable-quota ledger; materialize canonicalResourceChargeEffect/release effects; and rerun SSI over the final footprint. Rebase may preserve an escaping binding or reject the attempt; it may never remap an identity already returned, referenced by a later statement, or otherwise durably exposed. The result is a sequence-neutralCommittedEffectSetplusLogicalDeltaTemplate(§9.1), independent of block/run layout. The later canonicalMarkerRefsuppliesCommitSeq, so apply derivesOriginBirthOrder,BranchAdmissionOrder {commit_seq,merge_ordinal,element_id}, effect order, and ordered delta time without changing the approved capsule digest. -
Finalize capsules. Persist one canonical
LogicalDeltaTemplate, then constructCommittedEffectCapsule { authority_bound_header:AuthorityBoundHeader<Local>, read_snapshot_basis, validated_apply_basis, intent_semantics_oid, read_graph_reference_bindings, validated_write_coordinate_bindings, validated_write_key_epoch_bindings, coordinate_schema_transitions, topology_epoch, policy_epoch, revocation_index, committed_effects:StrongRef<CommittedEffectSet<Local>>, final_read_witnesses, final_write_summary, constraint_evidence, authorization_decision_ref:StrongRef<AuthorizationDecisionRecord<Local>>, authorization_decision_digest, resource_transition_refs:StrongRef<ResourceLedgerTransition<Local>>[], resource_charge_effects, txn_outcome_preparation_ref:StrongRef<TxnOutcomePreparationRecord>, logical_delta_template_ref:StrongRef<LogicalDeltaTemplate>, logical_delta_template_digest, optional_physical_accelerators, txn_token, final_effect_digest }. The header, effect set, decision, resource transitions, outcome preparation, reservation, and command all byte-match one complete Local binding. A repeated digest is an integrity cross-check, never a replacement for the typed strong edge. The template digest must match the referenced bytes and the template must match the final effect set; neither field may appear without the other. Each write-key binding fixes the branch envelope/write epoch under which every referenced new ciphertext DEK is wrapped. Physical patches carry an apply-basis digest and may be ignored; unresolved or conditional commands are forbidden. Capsule builders return bytes and a digest to the coordinator, which verifies them against its approved final effects. -
Payload durability barrier D1 and stable prepared ownership. Seal and make directory-durable the final semantic capsule and its entire mandatory strong closure: coordinate effect payloads,
LogicalDeltaTemplate, schema/constraint/resource transitions, authorization decision, merge record, outcome-preparation record, active final-certification reservation when terminal, optional accelerator bytes actually referenced by the command, and every newly introduced semantics/module/profile object. HLC observation and expected order are intentionally excluded from this stable semantic base and live only in the repeatable order-attempt supplement below. Its immutable base inventory definesPreparedOwnershipId = H("fgdb:prepared-owner:v1", storage_member, replica_namespace_or_incarnation, prepare_id, configuration_state_oid, payload_predicate_digest, base_closure_inventory_digest); a scalar configuration epoch is insufficient because same-epoch candidates/joint states can differ. On every replica or availability donor issuing a receipt, create an immutable replica-localPreparedCommitRecord { prepared_ownership_id, prepare_id, record_generation, predecessor_ref, database/incarnation/configuration-ref/predicate/fence tuple, txn_token, capsule_ref, command_ref?, base_closure_inventory_digest, current_closure_inventory_digest, strong_logical_refs[], exact_realizations[{ object_or_subobject_id, encoding_id, placement_id, key_opener_ref }], status, receipt_nonce }; its typed references and predecessor are strong. Every successor repeats the stable ownership ID and identical base closure, while its current closure is identical or a strict authenticated superset—for example after adding the completed command.PreparedPayloadRootmaps stable ownership ID to the latest record; no record is mutated in place. Insert the record, publish authenticated nonretaining locator entries, persist the updatedRootManifest, and durably publish aRootSlotbefore D1 is complete or a payload receipt may be emitted. Pre-existing objects are revalidated and promoted into the prepared closure; a digest or locator without reachable authenticated bytes is insufficient. APayloadAvailabilityCertificatecovers this exact pre-command semantic base closure under the exact configuration ObjectId/predicate, including the quorum-one local predicate. Each receipt binds that config OID, predicate digest, stable ownership ID, and base-closure digest; an observed record OID/root generation is diagnostic freshness, never the sole ownership identity. Bytes not yet admitted to a prepared root remain staging data and are unreachable after a crash. -
Authorize, command, order, and publish barrier D2. For each proposal/reproposal, the coordinator builds and D1-certifies a fresh
LocalOrderAttemptInputover the stable semantic owner, Active final-certification reservation, expected next order, andLocalHlcProposalEvidence. Immediately before ordering, voters verify the supplement/certificate, reservation, prepared ownership/configuration and writer fence, selected terminal, and HLC observation age/source policy. They do not revalidate mutable heads, key/policy/revocation/conflict/resource bases outside the reservation: those were atomically validated and held before signing, and later changes cannot reinterpret them. The normative immutableCommitCommandis{command_version,authority_bound_header:AuthorityBoundHeader<Local>,database_security_namespace_id,cluster_incarnation,txn_token,final_certification_reservation_ref:StrongRef<LocalFinalCertificationReservation>,required_reservation_state:Active,order_attempt_input_ref:StrongRef<LocalOrderAttemptInput>,order_attempt_availability_certificate_ref:StrongRef<LocalOrderAttemptAvailabilityCertificate>,capsule_ref:StrongRef<CommittedEffectCapsule>,logical_delta_template_ref:StrongRef<LogicalDeltaTemplate>,authorization_decision_ref:StrongRef<AuthorizationDecisionRecord<Local>>,resource_transition_refs[StrongRef<ResourceLedgerTransition>],txn_outcome_preparation_ref:StrongRef<TxnOutcomePreparationRecord>,payload_availability_certificate_ref:StrongRef<PayloadAvailabilityCertificate>,expected_branch_heads,expected_branch_key_epochs,topology_epoch,policy_epoch,revocation_index,final_effect_digest}. The header, authorization decision, final-certification reservation, and repeated authority fields byte-match one complete binding. The expected basis fields are redundant integrity projections that must byte-match the reservation, never fresh CAS gates. The semantic availability certificate covers the stable base; the order-attempt certificate separately covers only the repeatable order/HLC supplement. The coordinator publishes a semantic prepared-record successor that adds and strongly owns the completed command and marks the supplement Ordered in the same accepted transition. Every durable database, including embedded and server single-node posture, orders through the same internal Raft log; single node is a one-member/quorum-one configuration. Only:memory:runs the same state machine without a durability claim. After log acceptance, the Raft closure and certificate donors retain the command/base/supplement closures through apply and compaction. A semantic prepared owner may abandon only an unreceipted, provably unordered attempt under a current writer/configuration fence, or a receipted attempt after consensus proves it cannot be ordered and every certificate/configuration retention floor has expired. Once any terminal audit lock exists, neither semantic prepared ownership nor final certification may be abandoned; only a provably unordered stale supplement may be retired/replaced. Timeout or process death alone is never abandonment proof.Normatively, the inline
HlcProposalEvidenceunion below is only a role-shape shorthand. Its two durable object kinds areLocalHlcProposalEvidence {database_security_namespace_id,cluster_incarnation,role:Local,configured_source_id,source_profile_oid,signed_observation,observation_uncertainty,normalization_policy_oid,observation_body_digest}andMetaHlcProposalEvidence {database_security_namespace_id,cluster_incarnation,role:Meta,configured_source_set_and_epoch,canonically_sorted_signed_observations,required_quorum,observation_uncertainties,normalization_policy_oid,observation_body_digest}; each registered transcript covers every field except the repeated body digest. The evidence is prebuilt, included in the separately D1-certifiedOrderAttemptInput, and reached by the ordered Local or Meta command only through that exact supplement. No command carries a parallel scalar or observation list, and apply derives its HLC solely from the previous persisted HLC plus the supplement's referenced object. Signature domain, source eligibility, and role are verified from ordered bytes; shards have no such object or semantic-HLC field.Local transaction apply also materializes the exact self-contained
LogicalDeltaBatch<LocalCommitted>before constructing the candidate payload, verifies it against the committed capsule/template/marker, inserts(next_commit_seq -> batch_ref)intoLocalDeltaBatchIndex, and advanceslocal_delta_frontierto that same commit sequence in the same state transition. The batch is therefore reachable from the candidate root at the first crash point at which the commit exists; there is no separate Local delta-publish command or unrooted interval. Under required audit, the candidate index/frontier remain applied-but-not-visible in their exact pipeline entry until a gap-free audit-visibility advance releases them, while recovery owns the batch throughRaftStateRootand the pipeline.LocalTerminalCompletionSpecaccepts its delta postcondition only when the visible payload's index contains that exact marker/batch and its frontier is at least the commit sequence. Rematerialization and retry must reproduce identical bytes; a missing, duplicate, gapped, wrong-marker, or wrong-frontier insertion fails apply.HlcProposalEvidenceis the closed role unionLocal{configured_source_id,source_profile_oid,signed_observation,observation_uncertainty,normalization_policy_oid}|Meta{configured_source_set_and_epoch,canonically_sorted_signed_observations,required_quorum,observation_uncertainties,normalization_policy_oid}. The registered policy fixes source eligibility, quorum, interval-to-candidate rule, maximum accepted age, andmaximum_forward_jumprelative to the previous logical HLC; missing, duplicated, untrusted, stale, future-skewed, or arithmetically invalid observations reject the proposal. Shards never propose semantic HLC. Deterministic semantic apply verifies the command, closure, and evidence, assigns the nextLogicalCommandSeq, computeschecked_increment(previous_logical_hlc), derives the one normalized candidate from the evidence, rejects a candidate beyond the checked forward-jump bound, and advanceslogical_hlc_state=max(checked_increment,normalized_candidate). Any sequence/HLC overflow rejects before mutation and permanently fail-closes further semantic mutation against the persisted maximum; arithmetic never wraps or saturates. Transaction apply additionally assignsCommitSeq, builds the marker/results/payload/record/root, and transfers ownership before prepared terminalization. Other semantic schema/policy/revocation/accounting/key/audit/configuration/GC decisions use typedControlCommandand advance LogicalCommandSeq/HLC but not CommitSeq. Protocol delivery disposition, audit visibility, prepared recovery, Raft hard-state, and physical-progress maintenance use the registered maintenance unions and advance none of those semantic counters.ControlCommand.typed_payload_refalways names a registered semantic sequence-neutral pre-order spec—Local transaction lifecycle uses begin/terminal/registration/statement/prepare/read-close/terminal-completion/outcome/cancel specs, and other semantic families include checkpoint install, ID/merge/DP, audit ticket/terminal/completeness, key/GC authorization, and configuration—not an applied result.AuditVisibilityAdvanceSpecand result activation/ACK/release/expiry/resume are maintenance inputs and can never inhabitControlCommand. Every comparison CAS is nonretaining; applied records cannot name their future command record. Every semantic apply appends its candidate toLocalAuditVisibilityPipeline; RootManifest owns the applied root, protocol root, and pipeline. A NotRequired/StructurallyInapplicable candidate may be made visible in the same composite publication only if no earlier gap exists; otherwise it remains applied-hidden. A Required candidate remains hidden until the external batch receipt and quorum-durable protocol maintenance advance release the gap-free prefix. The client receives semantic completion only after configured durability, durable outcome, protected-audit release, and final RootSlot publication; later revocation fences subsequent work without rewriting a committed result.
txn_token is the opaque durable idempotency identity inside §13's MACed TxnOutcomeCapability, scoped to database security namespace/incarnation/service-visibility epoch, tenant/principal, authority ceiling, and an issuance/expiry interval. Local 1.0 has the same durable BEGIN, explicit multi-statement, autocommit, result-replay, COMMIT/ROLLBACK, and status semantics later used by W12, but uses the closed Local object family in Appendix A rather than pretending the W12 Meta/shard family exists. A BEGIN first orders LocalBeginReservationSpec and exposes BEGIN_ACCEPTED only after Reserved plus TxnOutcomeRecord::BeginStaging are visible; registration atomically binds that reservation, operation-audit owner, workspace generation zero, and TxnOutcomeRecord::Registered. Autocommit uses LocalAttemptRegistrationSpec::Autocommit and the same lifecycle without emitting BEGIN frames. Single-statement autocommit writes whose bind-time CanonicalStatementClassification proves fused-arm eligibility instead use the registered fused arm LocalAutocommitWriteSpec: one sequenced semantic command carrying attempt registration, prepare admission, the ordered final-certification reservation, and commit semantics — identical canonical effects, one terminal audit gate, one D1 payload closure, one order-attempt supplement — while LocalTerminalCompletionSpec remains the second sequenced command, because terminal completion consumes durability/visibility evidence of the commit's own publication and FG-INV-07 forbids a pre-order input naming its future applied record. The floor is therefore exactly two sequenced semantic commands per audit-NotRequired autocommit write and three under a Required profile, where ticket admission must be audit-visible before any protected processing. For exactly this fused class the registration-before-observation rule is amended: coordinator-local permit verification and admission precede every statement/storage observation (FG-INV-20 is preserved) while durable registration lands atomically with the commit; a pre-order crash leaves no durable record, and an exact retry re-executes from scratch — safe because no identity or result escaped and the autocommit idempotency-key CAS at apply guarantees at-most-once durable effect. That one apply constructs the TxnOutcomeRecord lineage as the compressed Registered -> PrepareAdmitted -> CommittedPendingPostconditions history, so status() semantics are unchanged; ineligible, multi-statement, or explicit-transaction work uses the unfused arms below unchanged. The fused arm has its own command_contracts.toml registry row, construction-DAG recipe, and regenerated crash matrix. Every statement is durably Open before execution and terminally Published, Failed, or Abandoned; successful statements advance one predecessor-linked workspace generation, while result bytes remain spill-backed under a nonexpiring PendingVisibility retention hold. The gap-free audit-visibility transition changes that owner only to ReleasedAwaitingActivation; a distinct fresh ProtectedOutputActivationSpec later creates the first delivery time basis, lease, and capability. Read-write commit first orders LocalPrepareAdmissionSpec, then builds the ordinary final capsule and unchanged CommitCommand; read-only completion uses LocalReadCloseSpec. Cancellation/rollback uses strengthened TxnAbortSpec, never an out-of-band coordinator flag. With the fused arm and §13's SnapshotQuery class registered, SnapshotQuery is the only surface consuming zero sequenced semantic commands and zero Protocol-plane maintenance transitions (§13); every durable operation class carries a declared budget of sequenced semantic commands, total Raft log entries, and ordered durability barriers as a registered Appendix G cost-registry row, and an implementation that exceeds its class's row fails the registry check rather than silently spending more.
TxnOutcomeIndex is therefore the sole Local token/capability lookup and attempt-lifecycle authority, mapping each scoped token to Detailed{outcome_ref:StrongRef<TxnOutcomeRecord>}|Compacted{summary_root_ref:StrongRef<LocalTxnOutcomeSummaryRoot>,leaf_key_digest}|ExpiredTombstone{token_digest}. TxnOutcomeRecord is predecessor-linked and moves only through BeginStaging -> Registered/StatementOpen -> PrepareAdmitted -> CommittedPendingPostconditions -> Committed, or the typed Aborted, ReadClosed, and NeverRegistered terminals described in Appendix A. An identical retry joins and returns the original durable state; a mismatched request, authority, epoch, token, idempotency key, statement, or expected predecessor fails closed. Before any terminal result is returned, the exact semantic outcome and required durability/delta/result/audit/resource postconditions reach TerminalReady. Records, compact summaries, permanent token tombstones, and verifier keys remain through the advertised lookup/retry/retention floor. After expiry a valid-MAC matching-domain capability returns TokenExpired; it is never treated as a new transaction. Cancellation after terminal ordering may return Unknown(txn_token) only when the caller lacks enough evidence to distinguish the already durable state, and resolves solely through scoped status lookup—it never promises rollback of a possibly committed transaction.
The protocol has two durability barriers, not literally two syscalls: each barrier includes every file and parent-directory sync its operation class owes under the registered filesystem profile's per-class sync obligations (frame-pwrite|create|rename|unlink — §5.1); Appendix G tabulates the per-operation-class barrier chains. Group commit amortizes both. Recovery starts from the highest valid root slot, reconciles PreparedPayloadRoot with the one-member or multi-member Raft log, completes every committed-but-unapplied command, and only then considers fenced abandonment/collection of prepared records. The complete Local/Meta audit pipeline is recovered from RootManifest and the Raft closure; its gap-free candidate chain remains retained and invisible beyond the visible endpoint while recovery reconciles external terminal records/batches and may order the exact visibility-advance command. Recovery verifies both applied and visible endpoints, the authoritative checkpoint, and the contiguous logical-command suffix; for transaction records it additionally verifies the contiguous transaction-marker subsequence, authenticates and decodes every referenced final capsule, and applies canonical effects. RaptorQ may repair damaged compatible symbols within the configured erasure model; it does not replace root redundancy, payload replication, or fail-closed recovery beyond that model.
5.3 Snapshots
A read snapshot is the posture-closed runtime ReadSnapshot<Role> {database_id,database_security_namespace_id,cluster_incarnation,role_and_group,service_visibility_epoch,selected_slot:{slot_generation,slot_digest,root_manifest_identity},visible_semantic_cut:{state_root_ref,visible_logical_command_seq,visible_commit_high_seq,visible_raft_index,visible_pipeline_order?},protocol_cut:{protocol_state_ref,maintenance_generation,maintenance_applied_index,visible_endpoint_binding_commitment,external_continuity_head_commitment?,security_barrier_state},manifest_visible_endpoint_proof,graph_reference_bindings[],topology_epoch,authority_binding:AuthorityBindingFor<Role>,snapshot_retention_lease:SnapshotRetentionLease}. SnapshotRetentionLease is nonserializable and cannot be placed in canonical bytes. Local/Meta manifest_visible_endpoint_proof authenticates RootSlot -> RootManifest -> AuditVisibilityProtocolState -> AuditVisibilityPipeline.visible endpoint -> exact visible Semantic root/positions; acquisition rejects security_barrier_state=AppliedHidden and never follows the applied tail as a public read basis. The Shard arm instead authenticates its ShardProtocolState, exact imported Meta visibility/security projection, and certified visible global prefix. The snapshot authority arm must byte-match the secure-view permit/admission, purpose, tenant/principal/ceiling, and every graph reference; an equal policy root under another authority is not substitutable. visible_logical_command_seq fixes the exposed canonical state-machine prefix; transaction-only visible_commit_high_seq fixes graph system time. Bindings are unique by binding_role_id (not graph/branch), and every selected head is at or below its role's visible high sequence; repeated historical roles acquire distinct ancestry/schema/authorization evidence. A version is visible only when its commit sequence is within that cut, its creation marker belongs to that binding's selected branch ancestry, no visible retirement/supersession marker follows it, no permanent erasure tombstone covers it (§12.6), and no enabled expiry contract renders it expired at the binding's pinned evaluation instant (§4.8). Integer-only visibility is legal solely inside a branch-filtered physical projection carrying a verified (binding_role_id, graph, branch, head, lineage_digest) token; global sequence interleaving alone never proves ancestry.
Each active RootManifest carries the acyclic PhysicalGenerationLeaseDescriptor {lease_generation_id,relative_lock_inode_name,expected_inode_identity:{device,inode,filesystem_generation_or_profile_stable_handle},creation_nonce_digest,filesystem_profile_id,lease_subject_basis_digest}. The registered basis transcript commits to database/security namespace/incarnation, role/group, intended all-plane position tuple, lease generation, name, inode identity, nonce digest, and filesystem profile, and explicitly excludes the future RootManifest identity/body digest. Before manifest construction, publication creates the uniquely named lease inode with immutable authenticated nonce bytes (or the exact profile-registered authenticated xattr), fsyncs it and its parent directory, verifies the stable inode identity/nonce, and only then encodes the descriptor. A zero-data or name-only inode is invalid. The inode/name/nonce is never reused for another generation. SnapshotRetentionLease is the held shared whole-inode lock acquired through the registered filesystem profile's required_lock_primitive (the shared OFD lock under FGFS-LINUX-LOCAL-V1) plus verified descriptor/inode/process-open identity and the selected slot's eventual root-manifest commitment. A process-local attribution ledger may record owner/query/cost/cancellation metadata, but it is nonauthoritative and process death may erase it without releasing safety before the kernel releases the lock.
Snapshot acquisition is ReadSlotAndAllPlaneRoots -> ValidateVisibleEndpointAndSecurityBarrier -> OpenAndVerifyGenerationLeaseInode -> AcquireSharedProfileLock (the profile's registered shared whole-inode lease primitive; OFD under FGFS-LINUX-LOCAL-V1) -> RevalidateSlotAndAllPlaneRoots; any slot, manifest, pipeline endpoint, maintenance generation, barrier, security binding, imported projection, GC drift, descriptor/inode drift, or failed lock drops the tentative lease and retries. This closes both the read-root/reclaim gap and the applied-versus-visible race across processes. The lease pins the meaning and disk reachability of the selected RootManifest, full Protocol state/pipeline, visible Semantic checkpoint/marker/index/object closure, matching Prepared/Consensus/configuration/security evidence, and physical realization; it does not pin all potentially readable buffer frames. Only an active cursor/borrow pins a resident frame.
Physical retirement first removes the generation from every canonical/independent root, activates the matching retention cut, and converges both RootSlots away from it. It then opens/verifies the exact descriptor-selected inode identity and nonce and must acquire its exclusive profile-registered whole-inode lock (the exclusive OFD lock under FGFS-LINUX-LOCAL-V1) before deleting or crypto-erasing any covered realization; locking a replacement at the same pathname is a hard failure. The exclusive lock remains held through the destructive operation and durable directory updates. Orphan lease-inode cleanup requires a generated proof that no authenticated slot, RootManifest, prepared/consensus closure, backup, restore plan, snapshot, or retirement attempt can still name its descriptor; age or directory scanning alone never suffices. Process death releases shared/exclusive locks automatically, but never changes canonical reachability. Long-running analytics, backups, and replay manifests expose attributable lease cost and cancellation requests, and nothing silently slides a snapshot, security barrier, or view watermark forward. Crash/DPOR and real multiprocess tests cover death before/after shared acquisition, slot revalidation races, fork/exec descriptor handling, lease-inode substitution/unlink-recreate, orphan cleanup, cut/slot convergence, exclusive acquisition, deletion, cancellation, and readers surviving writer takeover.
Each committed marker carries the deterministic commit_hlc copied from §5.2's ordered logical_command_hlc; the current logical HLC state is part of LogicalStatePayload and every checkpoint. AS OF TIMESTAMP t resolves through a versioned (commit_hlc, commit_seq) index to the greatest visible marker in the selected branch ancestry whose HLC is at most t; intervening control-command HLCs have no graph marker and therefore cannot become graph system-time answers. Local clock regression cannot change replicated bytes or order. The result certificate returns the effective marker/sequence.
5.4 One Version Universe: retention tiers = temporal database
The authoritative recovery equation for complete canonical state makes checkpoint installation itself explicit:
state(L, C) = reconstruct_and_verify_install(RecoveryCheckpointProjection(B₀ at L₀,C₀), retained CheckpointInstall input+record at L₀+1) + apply contiguous LogicalCommandRecord suffix (L₀+1, L],
where L is LogicalCommandSeq and C is transaction-only CommitSeq. The interval (L₀+1,L] deliberately begins at L₀+2; the install record at L₀+1 is reconstructed/verified exactly once, never replayed twice. A checkpoint is built from an already identified basis; it never claims that basis already points back to the new checkpoint. It records a nonretaining weak basis-command identity, covered marker identity, chain hashes, basis payload digest, HLC and partition projections plus the generated role-tagged CheckpointStateVector. The weak command boundary plus chain/payload/projection commitments authenticates the cut without keeping the prior command—and therefore a prior checkpoint-install spec—alive. Every Local/Meta/Shard vector has exactly one recipe for every field in its matching versioned payload schema. The common legal tags are CopiedStrong, ProjectedSnapshot, ResetByCheckpointInstall, and SelfExcluded; operational replacement additionally requires exactly one InstallProvisionalCut for the retention map, and Local-activation Meta/Shard bases use ApplyActivationProjection only for fields covered by the certified projection recipe. The generated role/basis matrix rejects either special tag anywhere else. Coverage includes bootstrap/restore/migration phase; graph partitions; catalog/schema/topology/security; allocator/external continuities; constraints/resources/privacy/DP/outcomes; branches/merge; retained-stream floor/retention map; derived, delivery, replay and backup registries; keys/signing/verifiers; audit/transparency; GC; remote trust/retention; prepared/certificate/decision directories; and configuration-floor state. recovery_checkpoint_ref uses SelfExcluded{InstallThisCheckpoint}. For an Operational basis, config_payload_floor_ref uses SelfExcluded{InstallPairedConfigFloor}; copying the old floor would recreate an unbounded floor -> checkpoint -> prior floor retention chain. Genesis copies the absent floor as None; the later initial-floor bootstrap remains separate. A domain-separated basis_projection_digest commits the canonical reconstruction with exact literals and checkpoint-free cut recipe, never future ObjectIds; basis_payload_digest records the exact pre-install payload observed while pinned.
CheckpointInstallSpec { basis:WeakStateIdentity, basis_logical_command_seq:L₀, basis_commit_seq:C₀, basis_payload_digest:WeakDigest, basis_projection_digest, checkpoint_ref:StrongRef<RecoveryCheckpoint>, checkpoint_state_vector_digest, paired_config_payload_floor_ref:StrongRef<ConfigPayloadFloor>?, retention_cut_body_ref:StrongRef<RetentionCutBody>?, reset_field_tags[] } is the exact first retained command at L₀+1. Its acyclic construction order is basis/projection plus checkpoint-free command/marker/effect cut recipes → RetentionCutBody → generated CheckpointStateVector → RecoveryCheckpoint →, for Operational, paired floor whose checkpoint observation is weak → install spec. The cut body names no checkpoint identity or reference; the apply-built ProvisionalRetentionCutSet attaches the actual enclosing checkpoint and install record. Genesis requires both optional refs None and no InstallProvisionalCut vector entry. An operational basis requires both Some; body, vector, checkpoint, and floor must cover the same prefix/current-prospective configuration, and the vector's registered retention-map entry is InstallProvisionalCut{body_ref,checkpoint_binding=InstallThisCheckpoint}. Apply verifies the current basis and projection, replaces recovery_checkpoint_ref with checkpoint_ref, atomically replaces config_payload_floor_ref with the paired floor, constructs/installs the exact provisional cut when required, performs only the listed ResetByCheckpointInstall values, advances bootstrap phase when applicable, and changes no other field. A reset entry is legal only in this first command and only with its registered equivalence/semantic-transition proof; no earlier suffix command can observe omitted state. The install record's conditional predecessor identifies the same weak covered-basis boundary (or genesis when L₀=0); after authority transfer, the verified CommandCut may stop there without retaining the old command bytes. Later retained records are contiguous. Transaction records form a subsequence whose markers advance contiguously from C₀; control commands do not advance CommitSeq. A non-genesis authoritative checkpoint therefore always has its install command—there is no empty-suffix special case and no self-referential post-install digest. A predecessor-checkpoint digest is weak audit metadata unless a retention root explicitly promotes it. The checkpoint/floor/cut trio becomes authoritative only after projection/equivalence/floor verification, install-command and payload durability, root publication, and the configured replica-durability gate; physical reclamation needs the later cut-activation command. This is an explicit transfer of recovery and configuration-payload authority, not a derived cache silently becoming primary.
Retired versions then cool through three query-retention tiers:
- Tier 0 — live MVCC: current version chains and unsealed deltas.
- Tier 1 — warm logical history: columnar logical effects sorted by
(element_id, commit_seq), directly queryable for recentAS OF/BETWEENpredicates. - Tier 2 — historical checkpoints: full compressed partition snapshots plus a bounded logical-effect suffix. Optional inter-object delta compression names an explicit base ObjectId, forms an acyclic bounded-depth dependency graph, and is applied before each resulting payload is independently RaptorQ encoded. RaptorQ itself is never described as a delta codec.
Retention is configured per graph as KEEP ALL, KEEP <duration|seqs>, or KEEP NONE, but physical collection is governed by the conservative union of all roots. Every durable edge is explicitly strong, conditional, or a non-followed weak identity/digest. A capsule's sequence-neutral effect directory and its LogicalDeltaTemplate entries use ConditionalCoordinateRef{oid,graph,branch}; after commit, the enclosing marker supplies the coordinate's retention sequence. While a capsule is pending or otherwise has no committed marker context, traversal from PreparedPayloadRoot treats every such conditional edge as strong. Once committed, an authenticated installed-checkpoint/RetentionMap cut may stop only the matching coordinate at or below its verified boundary. Logical-command and marker predecessor links use ConditionalCommandRef and ConditionalMarkerRef; their corresponding checkpoint cuts may stop only the matching predecessor axis. Branch/fork/merge bases and all other strong roots still win. Missing bytes without a matching cut are corruption; a proved cut returns HistoryUnavailable, not a partial result. A baseline- or delta-resume promise roots its exact DeliveredBaselinePayload or DeliveredDeltaPayload/DeltaDeliveryEnvelope through the outstanding cursor lease; atomic delta provenance additionally owns its source LogicalDeltaBatch, while coalesced provenance needs source history only when its advertised proof scope requires it. Otherwise a missing promised range produces a visible GAP and new baseline. Weak source-template/marker identities do not pull old capsule history back into reachability. Effective floors also include stable prepared owners and consensus commands, transaction outcomes, branch manifests/key epochs/envelope roots/recipient or advancing grants/merge idempotency state, identity/privacy/audit external continuity, DP request+seed+result, audit ticket/event/resolution/receipt/gap state, replay registry/manifests/archives, resume cursors and baseline/delta/snapshot leases, backup/legal holds, current/prospective configuration floors, keys, and transparency policy. A floor's checkpoint/vector observations are explicitly weak and validated against the separately strong current payload checkpoint; operational checkpoint installation pairs the replacement floor and excludes the prior floor from its projection. Overrides, cuts, and retained bytes are observable.
Point-in-time restore, temporal queries, raw CDC, and audit all reuse Chronicle ordering, but they are not identical retention products. PITR is bounded by retained checkpoints/effects; compliance audit has its separate signed retention chain (§12.8); replay requires its evidence closure (§8.6); and derived subscriptions consume canonical LogicalDeltaBatch objects (§9), not unresolved intents.
5.5 Compaction
Compaction follows BUILD -> VERIFY_EQUIVALENCE -> D1_NEW_OBJECTS -> ROOT_PUBLISH -> SLOT_CONVERGE -> WAIT_SAFE_POINT -> RETIRE. It marks from both valid root slots and explicitly traverses logical-command/generated-complete installed-checkpoint cuts, stable prepared-payload and consensus-log ownership, every branch/base, branch key-epoch/envelope/grant root and branch-merge ledger, transaction/DP outcome, all external continuity links, resume-cursor/delivery/replay registries and archives, delivered-output payloads, audit ticket/event/resolution/CAS-receipt/gap/audit roots, snapshot and delivery leases, backup/legal hold, key/key-wrap, and current/prospective configuration/floors. It then resolves marked logical/subobject identities through nonretaining physical locators, builds new immutable encodings, proves old/new canonical logical digests equal, and publishes the new RootManifest through a serialized CompactionRootPublish permit.
After rereading and fully validating that highest slot/closure, a linear RootSlotConvergenceGuard may request a SlotConvergence permit whose acquisition rechecks that the current winner is still the exact target manifest, writer/continuity/service tuple, and bootstrap. Only while holding that permit may it publish the other slot at checked winner_generation+1 with byte-identical target fields. Any intervening ordinary, audit, checkpoint, restore, role-transition, retirement, or other convergence publication changes the winner and makes acquisition or the immediate pre-write recheck fail stale; convergence then restarts from the new winner and can never overwrite it with an older manifest at a higher generation. Success syncs and rereads both slots and produces reconstructible RootSlotConvergenceEvidence {manifest_identity,first_slot_generation,second_slot_generation,identical_bootstrap_digest,two_slot_reread_digest,durability_profile,first_and_second_root_publication_evidence}. This physical-only convergence advances no logical/Raft/commit/HLC sequence and cannot select a different manifest. Recovery at every crash simply chooses the highest credible slot; retry converges the remaining slot. Old encodings retire only after both valid slots converge away from the old closure, convergence evidence is reproducible, and no independent lease can expose them. Active marker batches are never rewritten in place. Staging namespace creation, sealing, rename, convergence, and retirement include the required directory durability operations; crash/DPOR tests cut before/after each convergence write, sync, reread, cancellation, and generation allocation while racing ordinary, prepared/Raft-only, audit candidate visibility, checkpoint, restore, role-transition, retirement, and another convergence publication. They also cover equal-generation ambiguity and checked generation exhaustion.
Replica positions and CRDT gossip are observations, not GC authority. The safe point is computed under a consensus-fenced membership epoch (§14); loss of quorum, uncertain membership, an unacknowledged root, or a missing key wrap stops reclamation. The actor is supervised and rate limited against foreground latency. Space amplification, checkpoint cadence, and controller settings are empirical/configuration gates with named workloads and model assumptions, not safety invariants.
5.6 Branches: git for graphs
A branch manifest is { graph, branch_id, fork_parent, fork_parent_head, fork_boundary_logical_command_seq, base_checkpoint?, key_envelope_root, current_envelope_epoch, current_write_key_epoch, policy }. The boundary sequence is the already assigned BranchEpochBoundaryReservation.boundary_logical_command_seq, not the later bundle-install sequence; client-visible install provenance lives only in the applied control record/registry projection. Branch creation adds only metadata and key wraps, so its data-copy complexity is O(1); metadata is proportional to the bounded envelope-root fanout created by the fork, not falsely claimed O(1) for arbitrary recipient lists. A durable creation still pays ordered root-publication latency and is never promised below an fsync-independent microsecond constant. Reads select the branch head and follow explicit branch-parent links atop structurally shared objects.
Forking is one canonical BranchForkSpec, not an out-of-band KMS effect. Before ordering, a stable prepared owner builds the complete BranchForkBundle bottom-up: pre-minted descriptors/keys; closed old-parent epoch successors through boundary L-1; frozen path-copied parent root; disjoint parent-successor/child epochs at boundary L; narrowly scoped grants; successor roots/manifests; exact ciphertext/encoding/placement/openers; then one availability certificate over that closed inventory. Here L is the already ordered boundary reservation's logical-command sequence, never the future install order. The command can be formed only after all identities exist. Deterministic apply creates no key/ciphertext/node/record/grant/manifest; it byte-validates the bundle, held head/epochs, boundary-reservation identity/sequence, nonce, and isolation laws, then atomically installs the already-known manifests/registries. Parent writes admitted after the boundary use only the successor; the child opens frozen history but no successor/sibling epoch. A prepared old-epoch parent write must be revalidated and rewrapped/re-encoded or abort before order. Epoch material is never reused after crash, restore, or merge.
Branch merge uses one explicit squash-merge visibility model. Against declared merge bases, the evaluator computes the canonical logical difference contributed by each source and emits ordinary target-branch retractions/insertions at one new target MarkerRef; source heads are provenance/idempotency inputs, not additional visibility parents. The target head therefore follows exactly one target predecessor, and reads never need to guess whether imported source marker ranges became ancestors. The evaluator's canonical logical difference is deliberately shared infrastructure: the same difference engine powers the first-class DIFF operator family (Appendix C), so merge, DIFF, and §9.5 subscription deltas share one canonical difference semantics rather than three approximations. A source-created element keeps its globally unique VId/EId and immutable OriginBirthOrder; the target version's created_by is the merge marker. Pre-order merge effects store only BranchAdmissionOrdinal {merge_ordinal,element_id}. Apply combines it with the assigned marker's CommitSeq to derive BranchAdmissionOrder {commit_seq,merge_ordinal,element_id}. If a query explicitly requests branch-arrival order it uses that distinct policy—InsertionOrder never silently rewrites an element's origin, and no pre-order/audit/D1 transcript names a future merge sequence.
MergeRecord { merge_token, merge_request_commitment, target, target_basis, source_heads[], merge_bases[], imported_range_tokens[], imported_range_keys[], resolution_policy_oid, resolution_digest, final_effect_digest } is hash-linked from both capsule and marker. Each range token binds source branch, inclusive weak marker identities, base, and source chain digest without pretending that the source range became target ancestry. Merge idempotency has two independent keys. Before ordering, the authorized coordinator uses production entropy to mint the unguessable token and construct a complete MergeOutcomeCapabilityReplayRecord; deterministic apply invents neither. The graph-effect-free MergePrepareSpec {client_request_nonce,request_commitment,candidate_merge_token,capability_replay_ref:StrongRef<MergeOutcomeCapabilityReplayRecord>,expected_merge_index_absence_or_matching_retry,terminal_audit_gate} durably maps the caller/target-scoped nonce to that preidentified stable token and exact canonical capability bytes. Replay header/body, target, token, request, idempotency-key digest, verifier key/profile/window, policy/revocation, and authority must byte-match the spec. Retrying preparation with the same scoped nonce and request returns the record's original bytes even if a retry proposed a different candidate; conflicting commitment reuse is rejected. Evaluation/charging cannot begin until that capability is acknowledged and resubmitted. BranchMergeLedgerRoot maps the token to the immutable original request and capability_replay_ref plus InFlight|Committed{target_marker:WeakMarkerIdentity,final_effect_digest}|Rejected{stable_reason_digest}|Compacted{summary_ref}|ExpiredTombstone{token_digest,capability_commitment,expiry_evidence_digest}. Detailed and compacted nonexpired states retain the replay record; only evidence-bound expiry drops it. Transaction apply validates the token/request/range keys and atomically installs Committed plus coverage with the merge marker; a deterministic pre-effect rejection uses a typed MergeRejectSpec control command to install Rejected. A retry with the capability returns the original outcome even if the target head has since advanced; an old-incarnation or old-service-epoch capability never resolves the new state.
Separately, every requested source interval derives ImportedRangeKey = H("fgdb:imported-range:v1", database_namespace, target_graph_branch, source_branch, source_range_and_chain_digest, merge_semantics_oid, resolution_policy_oid), deliberately excluding target_basis. The ledger maintains canonical imported coverage by source chain. A new request that exactly or partially overlaps committed coverage returns AlreadyImported or, only under a declared subtract-previously-imported policy, evaluates the canonical uncovered remainder; it never reapplies the overlap. target_basis remains an FCW/head-CAS validation input, not an idempotency key. Token outcomes and imported coverage are ordered with the merge command and retained in a compact authenticated non-forgetting map across checkpoint/history cuts, backup/restore, reconfiguration, and GC. Weak terminal identities prevent duplicate application without retaining old marker/capsule bytes forever. Only intent families with proved associative, commutative, idempotent joins may claim order independence. All other eligible operations use the resolution policy's pinned total order; unresolved conflicts produce a capability-redacted conflict graph. A vague cocycle check is not a substitute for algebraic laws or explicit ordering.
Shared encrypted objects keep their existing ciphertext and object DEKs. KeyEnvelopeRoot is a constructively verified immutable DAG, not an opaque “closure”: its nodes grant the current envelope key access to closed ancestor envelope roots and to exactly the branch write epochs whose object-DEK wraps it may open. Every inherited edge carries a maximum logical-command/marker cut, and every object-DEK wrap binds source graph/branch, write epoch, object/ciphertext identities, and creation prefix in canonical AAD. The fork-time double rotation above is the isolation boundary: a child receives the now-closed parent envelope key, never a key under which post-fork parent grants or ciphertexts may be created. A squash merge that reuses source ciphertext adds only per-object DEK wraps under the target's current write epoch; it never grants the target the source branch's envelope/write epoch wholesale unless an independently authorized handoff says so.
KeyEnvelopeGrantBytes is the portable recipient artifact; KeyEnvelopeGrantRecord<Role> is the role-local authority/retention owner that binds those exact bytes to current roots, ciphertexts, policy, and time evidence. A snapshot/revocation BranchGrantBundle prebuilds the same close/freeze/double-rotation, grants only the frozen root through L-1, carries both the portable bytes and their local record, and provides the successor manifest before ordering; apply only validates/installs the bundle and registry successor. An advancing bundle intentionally grants the exact current root/epoch, and every later epoch needs another ordered grant. Thus a snapshot/revoked recipient never retains a key under which later wraps are legal. Handoff wraps metadata/keys rather than graph data but reports metadata and recipient cost. GC, backup/restore, and key destruction follow every live local record/registry edge; portable grant bytes never become a local reachability edge by themselves. Revocation cannot erase plaintext/keys already received and claims only prevention of future access.
Branch retirement is a first-class two-phase control protocol, not an operator procedure. Phase one is an ordered BranchRetireSpec — an ordinary semantic control command with its own terminal audit gate and command_contracts.toml row — which validates an authorized retire request against the current branch head, envelope/write-key epochs, and registry generation, and atomically installs a permanent BranchRetireTombstone in the branch registry; an unknown branch, stale head, epoch mismatch, or already-installed tombstone fails closed, and exact retry of the same authorized request is idempotent against the installed tombstone. From that command's visibility the branch admits no new writes, forks, merges-as-target, grants, subscriptions, statements, or snapshot acquisitions at the retired head, while historical reads through other branches' ancestry are untouched: retirement removes a head, never history reachable elsewhere, so FG-INV-04's selected-branch-ancestry predicates are unaffected. Outstanding subscription cursors on the branch take the registered no-successor terminal arm of §9.5's reset contract — typed GAP supersession whose CursorResetRecord declares no successor baseline and closes the cursor into terminal SUBSCRIPTION_ENDED — never a silent drop. The same capsule carries the ResourceLedgerState branch-count release as its ordered ResourceChargeEffect — the branch delete/expiry charge event §13.6 names — and a registered escrow rights transition, the EscrowRightsTransitionSpec::RetireBranchOverlay arm, which burns the branch's CoordinateLocal EscrowBranchSeed overlay rights with an exact before/after conservation proof; FG-INV-02 admits no silently dropped rights, so overlay capacity is burned by a registered transition or not at all.
Phase two is gated on drain, and drain is proved, never waited out. Only after every covering retention floor, snapshot/delivery lease, backup pin/legal hold, remote-retention consumer grant, current/prospective configuration floor, and in-flight merge naming the branch has passed the retired head or been terminally disposed — established by the same generated checkpoint/floor/backup/restore/GC walkers that gate GC — may BranchRetireFinalizeSpec activate the branch's retention cut and enter the branch's envelope root and write-key epochs into §12.5's staged KeyDestroyProposal/KeyDestroyFinalizeSpec destruction pipeline. Destruction is safe by construction: the fork-time double rotation makes post-fork parent/child epochs disjoint, and shared pre-fork ciphertext keeps its object DEKs wrapped under the surviving branches' envelopes, so destroying the retired branch's envelope orphans nothing reachable elsewhere. A merge naming the retired branch as source remains legal only while the frozen history it imports is retained; past the finalize cut it takes the proved cut's HistoryUnavailable contract rather than a partial result. Physical reclamation then follows §5.3's ordinary exclusive-lease retirement discipline.
Dispositions are total. TemporalConstraintStateRoot and ConstraintStateRoot branch overlays are retired with the cut. The branch-merge ledger is compacted, never forgotten: token outcomes collapse to their Compacted{summary_ref}/expiry-tombstone summaries and ImportedRangeKey coverage keeps its compact authenticated digest map, so overlap detection and idempotent merge retries survive retirement. Per-branch StatsSegments and Ripple maintainer instances are dropped as derived state. The tombstone is permanent: it survives checkpoint/history cuts, backup/restore, reconfiguration, and GC, and it fences same-identity revival — a restore of an older root that still contains the retired head reconciles against the tombstone before service promotion, exactly as identity/audit continuity are reconciled. Both specs are registered with checkpoint/floor/backup/restore/GC/role-transition coverage and full crash matrices — crash before and after each phase, between cut activation and key destruction, and during physical reclaim — and retirement follows the restore lineage's terminal-pin idiom: every phase is a proved transition with an explicit terminal pin, and no timeout, client death, or operator impatience substitutes for a proof. The retire/finalize command contracts, tombstone and registry rows, and the escrow-transition arm land at G0.
Use cases remain what-if analysis, agent isolation, schema experiments, and reproducible feature snapshots, and every one of them terminates: an agent session that ends is a branch retire, so retirement is part of the use case, never an operator afterthought. The 10k-branch objective is an empirical gate parameterized by retained deltas, key wraps, subscriptions, lease cost, per-branch StatsSegment/Ripple-maintainer cost (§8.5), and sustained create+retire churn at steady state—an objective that is meaningful only with retirement in the loop—not an assumption embedded in correctness.
5.7 Scrubbing and self-healing
A background scrubber verifies record framing, authenticated headers, ciphertext digests, full logical digests after decode, and decode proofs; repairs missing symbols only within one EncodingId; and escalates insufficient local symbols to replica or backup recovery. Twenty-percent local repair overhead is an erasure budget inside the declared source-block/failure-domain placement model, not a promise against whole-device or correlated loss.
The repair budget itself is tiered by reconstructibility, and reconstructibility is a dynamic property of retention state, never a static object-kind column. An object is Chronicle-reconstructible exactly while it is re-derivable from the authoritative checkpoint plus the retained contiguous logical-command suffix (§5.4's recovery equation) and is not reachable from the authoritative checkpoint closure; rooted Tier D blocks and rebuildable derived objects are the intended members. Only a Chronicle-reconstructible object may carry a registered reduced-repair (low- or zero-repair-symbol) fec_profile; every sole-source authoritative object owes the full budget. The eligibility window closes at checkpoint install: a CopiedStrong recipe references live objects rather than materializing bytes, so the install that folds a reduced-repair object into the authoritative closure plus the retention cut that removes the prior suffix together make that object sole-source. Checkpoint install therefore must either recode every folded reduced-repair object under the full-budget profile — legal without re-encryption, since recoding changes only EncodingId, never ObjectId or CiphertextId (§5.1) — or materialize independent full-FEC checkpoint payloads, and the cut activation that permits physical reclamation of the prior suffix fails closed until the chosen path is durable. Scrub failure on a reduced-repair object escalates through a registered RebuildFromSuffix recovery transition — re-derive from the authoritative basis, re-verify the keyed ObjectId, re-encode — joining the replica/backup escalation ladder above instead of local symbol repair; replicated postures may additionally lean on replica repair through that same ladder. Object-level AEAD, keyed ObjectId verification, and per-symbol MACs remain mandatory for every profile: a plain-CRC or otherwise unauthenticated profile is rejected, and tiering never weakens FG-INV-09's identity recomputation or §5.1's symbol-authentication transcript. FG-CFG-01 MTTDL profiles model the reconstruction and fold paths per posture, and the §2.3-inherited full-budget doctrine is scoped accordingly: ScratchStore (§6.7) was already outside the coded domain, so the tier boundary names an existing scope rather than creating a new exemption.
Two complementary coverage mechanisms are mandatory:
- Deterministic exhaustive sweeps eventually cover every reachable encoding and provide the non-statistical detection guarantee.
- Keyed random sampling without replacement, stratified by device, segment age, object kind, source block, and encoding profile, provides earlier statistical evidence. Sampling keys are committed after each sample epoch so an adversarial placement cannot predict the next sample. Every e-process record names its population, sampling design, dependence assumptions, alpha, and effective sample size; it is a statistical claim (
FG-CAL-*), never proof that no corruption exists. Sampling strata and every corpus-integrity e-process are additionally scoped per FEC repair tier — the full-budget and reduced-repair populations are named and reported separately — so an integrity claim never quietly overstates coverage by averaging a reduced-repair tier into the full-budget corpus.
A CTMC-based MTTDL report remains useful as FG-CFG-01, with fitted failure rates, confidence/sensitivity ranges, repair bandwidth, placement assumptions, and model version. fgdb doctor may reject a deployment profile below its modeled target, but the result is labeled a configuration-model gate rather than an invariant. Optional donor possession challenges may trigger full audit or reseed; they prove responses to sampled challenges, not Byzantine correctness of the donor or semantic correctness of an object.
5.8 Verifiable to outsiders: the accumulator and transparency layer
Content addressing, the marker chain hash, and decode proofs make the database auditable by its operator. This layer cashes the same architecture into proofs a party who does not trust the server can check — the missing half of the trust story for agent memory (B6), cross-organization branches, and regulated pipelines:
- Global MMR scope. The MMR commits the globally ordered marker entries with explicit leaf indices and tree size. Inclusion proves that one marker belongs to that committed history; consistency proves append-only extension relative to a previously trusted root. Neither proof establishes the semantic correctness of the capsule nor completeness of a filtered query result.
- Three transparency claims without branch-name leakage.
LocalRollbackDetectionlets one client cache a signed checkpoint and reject rollback relative to its own last root; it says nothing cross-client.WitnessedEquivocationDetectionrequires authenticated gossip or cross-log receipts and promises detection/evidence after inconsistent heads meet, not prevention. OnlyWitnessedNonEquivocation { witness_policy_ref }may claim split-view prevention. Its content-addressedWitnessPolicyfixes one log/security-domain identity, the exact ordered witness keys,n, thresholdt, Byzantine boundf, signature/consistency protocol, state-persistence/anti-rollback rule, predecessor and joint rotation, activation log size, maximum checkpoint age, and optional cross-log authorities. It is valid only when2t > n + f, so any two signing quorums intersect in more thanfwitnesses, and every honest witness durably remembers one head per log/policy, verifies an append-only consistency proof from that head, and never signs two roots at one size or non-extending histories. A policy rotation checkpoint needs both old and new valid quorums before the new policy activates. Checkpoints strongly name the policy and exact keyed signatures/cross-log receipts. If intersection, durable witness state, consistency proofs, or freshness fails, the API downgrades to detection/local scope or fails closed—it never labels later gossip as preventive non-equivocation. Branch identities/heads remain visible only through capability-authorized proofs or explicit metadata declassification; witnesses sign opaque domain commitments without learning branch names. - Feed proof scopes. Raw CDC over the global log can prove continuity with contiguous leaf/range proofs. A
SUBSCRIBE MATCHframe can prove membership of its source commits, but not that the server evaluated the predicate completely. Filtered completeness is claimed only if each commit carries an authenticated, capability-domain-specific delta commitment—including an empty commitment—and the client receives a complete range of those commitments. Otherwise the API labels the proofmembership_only. - Proof-carrying transfer. Backup and replica transfer archives object inventories, full digests,
EncodingIds, key wraps, and decode proofs. Those prove byte closure and successful decode; restore additionally verifies the canonical logical checkpoint digest before promotion (§16). - Authenticated point reads. A sealed authorized namespace may expose Merkleized index roots, but a proof covers only the specified key/value and root. Absence, range completeness, capability projection, and freshness each require their corresponding proof and watermark.
- Externally verifiable formats.
TransparencyCheckpoint,WitnessPolicy, the inclusion/consistency-proof encodings, the filtered-changefeed delta-commitment format, and the MMR leaf/checkpoint transcript recipes carry anexternally_verifiablemarking in their G0 format-registry rows, with one registered compatibility law: a third-party verifier pinned to a witness-policy epoch must verify every checkpoint issued within that epoch, and any format transition on a marked surface rides the existing dual-quorum policy rotation — an operator can never force-upgrade external verifiers inside an epoch. A dependency-free verifier SDK — BLAKE3, threshold-signature verification, MMR inclusion/consistency proofs, and canonical decoders for exactly the marked formats; a several-KLOC budget — is a registered post-1.0 workstream row with golden-proof conformance vectors in theCanonicalResultChunkDescriptorgolden-vector style (§8.8). The SDK reproduces this section's proof-scope labels verbatim —membership_only, detection versus prevention — and never claims non-equivocation in local-only mode; an independently implemented verifier additionally serves as a differential oracle for the proof-producing code under §15.4's independence discipline.
FG-INV-08 requires authenticated global-history continuity. Non-equivocation is conditional on satisfying the declared witnessed-transparency policy and is not claimed in local-only mode.