Data Model
4,317 words8 subsectionsA design document: it describes the 1.0 target, not what runs today.
On this page8
4.1 The FrankenGraph model
A bitemporal, schema-gradient, multi-label property multigraph:
- Vertices carry a label set (not a single label), properties, and identity.
- Edges are typed (exactly one edge type), directed (undirected exposed as a view/semantics flag per type), may be parallel, and carry properties.
EIdis the unconditional parallel-edge discriminator; an optional user edge key participates only in a declared key/uniqueness constraint. - Stored property values use
CanonicalPropertyValue:Null, Bool, Int64, UInt64, Float64, Decimal128, String, Bytes, Date, LocalTime, ZonedTime, LocalDateTime, ZonedDateTime, Duration, Point(2D/3D geo), Uuid, List<T>, Map<String,T>, Struct, Embedding{dim, dtype: f32|f16|i8}under the pinned scalar profile. The bound-query type lattice is separate: it adds graph element/reference, path, binding/table, absence/NOTHING, and every required or optional GQL constructor/coercion named by the exactLanguageContract. Property storage therefore does not pretend to be a “strict superset” of query-only GQL types. The fnx bridge is lossless only for the registered intersection withCgseValue; unsupported values require an explicit projection/coercion law. - System time (bitemporal axis 1) is universal and automatic, but branch-aware. Every vertex/edge/property version carries
created_by: MarkerRefplus zero or more retirement/supersessionMarkerRefs. At a selected branch head, the effective interval is the creation followed by the earliest retirement visible in that ancestry; a sibling-branch deletion cannot retire the version elsewhere. Linear trunk generations may cache[created_seq, effective_retired_seq)only as a projection whose lineage/head is explicit (§5.3–5.4). - Valid time (bitemporal axis 2) is opt-in per element type: schema can declare
VALID_TIMEcolumns and the planner gets temporal-join operators, declared interval non-overlap constraints, and temporal path semantics (DURING-constrained patterns; a time-monotone path mode where each hop's validity must overlap-and-advance) over them. - Provenance is first-class: any element can carry a
provenancesystem property (source id, extraction confidence, agent/session id), and theDERIVED_FROMsystem edge type is reserved — the GraphRAG lineage story is modeled, not improvised.
4.2 Schema as a gradient, not a gate
Three enforcement postures, per label/edge type, changeable online:
- Open (NetworkX/Neo4j-style): any property, any value; types inferred and recorded as statistics.
- Shaped: declared properties are typed and validated; extra properties allowed into an overflow map column.
- Strict: declared properties only; constraints active (existence, uniqueness/key, range/regex/check, edge endpoint label constraints, cardinality constraints like
AT MOST 1 :MOTHER edge out).
Schema objects (labels, edge types, property defs, constraints, indexes) are versioned in the commit stream like data (a schema root/epoch for every bound coordinate, as frankensqlite's design does for one database), so schema changes are transactional, time-travelable, and branchable. Migration between postures — and any typed-column promotion of a hot overflow property — is an online shadow-build job reusing the seal/publish protocol (§6.3): build against a pinned snapshot, catch up deltas, validate, atomically publish the new schema epoch; old snapshots keep their epoch's interpretation. The per-coordinate schema binding is part of snapshot identity (§5.3) and of every plan-cache key, so prepared plans invalidate precisely rather than consulting one ambient epoch.
4.3 Graphs, branches, and the catalog
A database has a stable DatabaseId and contains named graphs with stable GraphIds. Each graph has a trunk branch plus arbitrary user branches (§5.6). A branch coordinate is (GraphId, BranchId, head: MarkerRef); names are versioned catalog aliases, not identity. Queries address graph@branch or graph@branch AS OF <time|seq>; the default is trunk@now.
A single-node transaction may touch several graph/branch coordinates and commits them atomically through one global marker carrying head_updates[]. This atomicity is a property of Chronicle's global commit protocol, not something inferred merely from sharing a sequence counter. The post-1.0 sharded posture must supply the distributed atomic-commit protocol in §14.6 before cross-shard atomicity is claimed.
The role-free state coordinate is CoordinateSchemaBinding { graph, branch, selected_head: MarkerRef, schema_root_oid, schema_epoch }; there is no transaction-wide “current schema epoch.” Query binding wraps it as GraphReferenceBinding { binding_role_id, coordinate: CoordinateSchemaBinding }, where the binder deterministically derives BindingRoleId from the canonical graph-reference occurrence. Bindings are unique by role, so one statement may compare the same branch at two AS OF heads without conflating visibility, schema, retention leases, authorization, or witnesses. A schema mutation instead records CoordinateSchemaTransition { graph, branch, apply_basis: MarkerRef, before_root_oid, before_epoch, after_root_oid, after_epoch }. The newly created marker becomes the selected_head of the resulting coordinate binding, avoiding a capsule that recursively names its own future marker. Catalog, binder, cache, permit, certificate, and replay contracts use role-bearing bindings for query inputs and role-free bindings for state ownership; only genuinely database-global topology and policy epochs remain scalar.
4.4 Reserved system surface
_id, _labels, _type, _key, _created_seq, _retired_seq, _commit_time, _valid_from, _valid_to, _expires_at (expiry instant under an enabled ExpiryContract; §4.8), _provenance, _embedding (conventional default vector slot), _score (query-time). _retired_seq is the effective retirement in the selected snapshot ancestry, not a branch-global stored scalar. System edge types: DERIVED_FROM, SAME_AS (entity-resolution assertions with confidence—the agent-memory dedup primitive that current merge/upsert APIs only approximate). These fields are ordinary protected data from Warden's perspective: a capability may mask provenance, embeddings, commit metadata, or selected properties even when it can see the element (§12).
4.5 Stable identity, dense projections, and mutable labels
- VId is label-independent and never recycled. Within a graph,
VIdis a 128-bit{ allocation_epoch: u64, local_id: { partition_id: 20 bits, monotone_slot: 44 bits } }.AllocationEpochis allocated under the profile-bound allocation-continuity fence described below — underAllocationContinuityProfile::ExternalCasthe externally anti-rollbackIdentityContinuityRecord, underAllocationContinuityProfile::DirectoryBoundthe fenced local allocation-continuity journal — before first use; deleted or abandoned leased slots remain spent forever. External identity is(DatabaseSecurityNamespaceId, GraphId, VId), so history, backups, branches, clones, and client references remain unambiguous. Local exhaustion advances to a newly reserved epoch or returns a structured limit; it never wraps, reuses, or silently aliases a GraphId. - Dense ordinals are snapshot-local projections, not identity. Each sealed generation may map stable VIds to compact
u32oru64ordinals for CSR, bitmaps, and SIMD. A projection is named byOrdinalMapIdand cannot escape its segment/index generation. Compaction may renumber projections without changing VId. - EId and creation order are stable. Every edge receives the same 128-bit epoch+partition+slot identity shape in an edge-kind domain; it is never a run position or reused. A sequence-neutral first-creation effect stores
BirthOrdinal { intent_ordinal, merge_ordinal, element_id }; its creatingMarkerRefsuppliescommit_seq, yielding durableOriginBirthOrder { commit_seq, intent_ordinal, merge_ordinal, element_id }in applied versions/checkpoints/runs without rebuilding the pre-order capsule. Importing the already-existing identity into another branch preserves that origin and separately records branch admission (§5.6).(src, edge_type, dst, user_key?)is an indexed logical tuple, while run positions/property locators are replaceable physical addresses. Parallel edges remain distinct across compaction, merge, and time travel, andInsertionOrdernever depends on layout. - The 128-bit identity width is final; the rationale is recorded and the 64-bit alternative is rejected. The width is a recorded decision, not symmetry: the
u64allocation_epochsurvives unbounded same-identity restores — every write-enabled same-identity restore takes a fresh epoch strictly above the external continuity floor — and partition exhaustion advances epochs under the never-recycle law rather than wrapping or aliasing; the 20-bitpartition_idaligns identity with W12 ownership mobility so identities never change when partition ownership moves; and the rejected 64-bit alternative is recorded with its reason:partition_id(20) plusmonotone_slot(44) already fill 64 bits, so any 64-bit split must shrink epoch, partition, or slot, and every such split either makes externally fenced epoch advances routine on the ingest path (a hot partition at the §17 bulk-load gate exhausts a shrunken slot space in seconds, exactly the external-authority coupling the embedded posture must avoid) or leaves terminal-exhaustion headroom incompatible with restore drills under the epoch-per-restore rule, while dropping the partition field would redesignIdRangeLeaseand the allocator/escape object model. The on-disk cost of the width is governed by the identity-column encoding law of §6.2/§6.3, not by the logical width; physical formats do not pay raw 128-bit identities where the registered shared-prefix codecs apply. - Allocation is canonical state plus a profile-bound continuity fence, not a process counter.
IdAllocatorStateinLogicalStatePayloadstores the currentAllocationEpoch, per-GraphId/kind/partition high-water marks, spent-range commitments, topology epoch, and exhaustion state. The epoch fence is governed by the registeredAllocationContinuityProfile, a closed unionExternalCas|DirectoryBoundbound 1:1 to the slot'sIncarnationContinuityProfile(§5.1). UnderExternalCas, before an epoch may issue an ID, a threshold-signed/witnessedIdentityContinuityRecord { database_security_namespace_id, allocation_epoch, predecessor_digest, status }is durably CAS-published outside the rollbackable database closure (operator HSM/KMS registry or configured witnesses) and copied into Chronicle. UnderDirectoryBound, the epoch fence is a local allocation-continuity journal record ordered under the same whole-inode fence and fixed-local-continuity-digest pattern the cluster-incarnation record already registers for that profile, and every epoch advance is an ordered, fenced local publication — an embeddedDirectoryBounddatabase therefore mints its first and every subsequent epoch with no external service. W12, Meta, and Sharded postures requireExternalCas. The threat-model scoping is exact and registered: theDirectoryBoundarm fences copy-based restore — a copied directory fails inode-identity takeover — and is never an anti-rollback authority; block-level or volume-snapshot rollback preserves device and inode identity and is outsideDirectoryBound's declared threat model for the entire database closure, allocation included. FG-INV-11's external-monotonicity clause is accordingly scoped per profile, with a registered residual-risk row in the Appendix F invariant registry (the same conditional structure FG-INV-10 uses for filesystem profiles). The carve-out is cheap by construction: the external fence itself detects only cross-epoch rollback and enforces restore floors — the record binds epoch and predecessor digest, never high-water marks — soDirectoryBoundforfeits protection only on a same-identity-restore path that posture already forbids outright. A registered variant of theDirectoryBoundarm may bind epoch advances to a local hardware monotonic counter (TPM-NV-class) as the allocation-epoch fence, restoring cross-epoch rollback detection for embedded deployments that want it without a network authority. The per-posture external-authority footprint table (§16) prices each arm's synchronous and episodic authority interactions. A proposal may use a temporary reference only while that reference is confined to one statement evaluator. Before an element identity or generated key can occur in buffered/public result bytes, a procedure response, an audit/provenance record, or a later statement's workspace, the owning Local or Meta stream orders anEscapingAllocationReservationSpecand permanently spends its exact slot under a liveIdRangeLease; its immutable binding is thereafter the only identity that may represent that logical create. Finalization preserves every such binding byte-for-byte, even after rebase, or rejects the attempt; a create that becomes a no-op or an aborted transaction leaves an authenticated spent tombstone and never returns the slot. Only identities proved not to have escaped may be assigned during finalization from commit-order allocation. Lease ranges are disjoint, authority-scoped, crash-recoverable, and never recycled even when partly unused. Lease expiry ends issuance authority but never removes the range from the permanent spent set. Branches share the graph allocator rather than forking its namespace. Merge/import verifies source identity namespace and remaps only through an explicit recorded graph-clone transform. W12 range grants and every cross-shard escape reservation are Meta-Raft fenced before use. A same-identity restore must acquire an epoch strictly above the external continuity floor before writes; if that authority/floor cannot be proved, the database opens read-only or requiresCloneNewIdentity. - Labels are versioned membership, never placement identity. A vertex stores one versioned label-set reference. Label membership indexes map
(label, partition) -> VId/ordinal bitmapfor a specific snapshot generation. An edge is stored exactly once in the canonical forward source-partition family. A reverse family is a declared synchronously maintained materialization when enabled for that edge type; when disabled, reverse expansion uses a registered spillable fallback and cannot claim O(1) reverse adjacency.(src_label, type, dst_label)access paths are derived indexes that may duplicate locators but never own the edge.AddLabelandRemoveLabelupdate membership and affected derived projections without changing VId or rewriting incidence. - External keys belong to a declared constraint domain, not necessarily one label. A persistent canonical
ConstraintStateRootis scoped by(GraphId, BranchId/head, schema_epoch)and resolves(constraint_id, canonical_key) -> VId/EIdwith structural sharing across forks. A sibling branch may resolve the same key differently without leaking or conflicting until merge; merge rebuilds/revalidates affected entries into the target root. Bulk import publishes the same state through §7.5's fenced protocol. - Distribution reservation, not a promise of free activation. Partition IDs,
topology_epoch, and allocator epochs are durable from format v1 so identities need not change when ownership moves. They do not solve distributed atomic commit, SSI, or time; §14.6 supplies those protocols before sharding ships.
4.6 Valid-time semantics (the second temporal axis)
Valid time is a typed interval algebra, never two nullable ordinary properties. ValidTimeDomain is exactly DateDay|InstantUtcNanos; floating local dates/times are query inputs only and must be normalized under a pinned timezone/coercion profile before they enter either domain. ValidTimeBound<T> is NegInfinity|Finite(T)|PosInfinity. A stored ValidTimeInterval<T> is one nonempty half-open interval [start,end) where start is not PosInfinity, end is not NegInfinity, and finite start is strictly less than finite end. CanonicalValidTimeSet<T> is a sorted, disjoint, nonadjacent sequence of those intervals; adjacent intervals coalesce. Comparison, precision loss, overflow, and canonical encoding come only from the bound CanonicalScalarProfile. Witness-only approximations may conservatively coarsen after a declared bound; result and constraint state spill or fail and never coarsen.
ValidTimeContract is the immutable schema object {contract_id,element_kind_and_type,domain,endpoint_precision,storage:ElementVersionSliceSet,default_assignment:RequireExplicit|AllTime,permitted_selectors,mutation_policy,temporal_constraint_ids[],path_policy_ids[],canonical_scalar_profile_oid,schema_epoch,body_digest}. A system-time element version encodes exactly NotApplicable{single_payload}|Sliced{contract_ref:StrongRef<ValidTimeContract>,slice_set_ref:StrongRef<ValidTimeSliceSet>}. ValidTimeSliceSet is {element_identity,contract_id,generation,sorted_slices[ValidTimeSlice],complete_domain_coverage_commitment?,root_digest}; its intervals are disjoint but need not be adjacent or cover all time. ValidTimeSlice is {slice_id:ValidTimeSliceId,interval,payload:Vertex{label_set,properties,provenance}|Edge{fixed_src_type_dst,properties,provenance},lineage:Created{operation_key}|Carried{prior_slice_id}|Split{prior_slice_id,fragment_ordinal}|Coalesced{sorted_prior_slice_ids},payload_digest}. Slice IDs are stable for unchanged carried fragments and newly derived by a domain-separated hash of element identity, source operation key or sorted parent IDs, resulting interval, payload digest, and fragment ordinal. Two current slices may never overlap; coalescing is mandatory only for adjacent slices with byte-identical payload, provenance, authorization class, and lineage-safe ordering metadata. Thus one stable VId/EId can simultaneously represent [2020,2021)=A and [2021,2022)=B without duplicating identity.
Properties and label membership are slice payloads for an enabled type; edge source/type/destination remain element identity attributes while edge properties/provenance vary by slice. _valid_from and _valid_to are protected projections of the currently enumerated slice, not separately mutable properties. A query row that denotes a sliced element carries {stable_element_ref,slice_id,period} internally; ordinary id() returns the stable VId/EId, while temporal operators retain the slice discriminator until a defined coalesce/projection boundary. A subinterval mutation performs canonical interval subtraction, creates exact carried/split/replacement fragments, and leaves the untouched remainder visible. Its effect records full before/after slice sets plus a total lineage map; overwriting one header interval is forbidden. Delete under FOR VALID_TIME retracts only the selected slice intersections unless syntax explicitly requests the stable element across all valid time; full element retirement records every current slice before-image. Enabling, changing, or disabling a contract is an ordinary transactional schema effect with pinned-snapshot shadow build, delta catch-up, exact validation, and atomic schema-epoch publication. Old snapshots keep their former contract. A disabled type rejects valid-time syntax rather than silently treating it as all-time.
System and valid time are orthogonal. The engine first resolves branch ancestry, system snapshot, coordinate schema, and the one system-visible slice-set generation, and then applies the explicit valid-time selector across every slice in that set. Valid time never changes CommitSeq, ancestry, or retention and an old valid endpoint never authorizes GC. ValidTimeSelector is exactly All|At{instant}|Overlaps{query_set}|ContainedIn{query_set}|Contains{query_set}. Omitted valid-time syntax means All, never wall-clock “now.” Native FQL exposes FOR VALID_TIME ALL|AS OF <t>|OVERLAPS <canonical interval>|CONTAINED IN <canonical interval>|CONTAINS <canonical interval>; the unqualified graph@branch AS OF spelling is system-time-only. If a later language contract adds CURRENT VALID_TIME, binding must capture a profiled authority-time observation in the query/certificate/replay closure. PreparedQueryTemplate and BoundQuery therefore carry separate system_selector and normalized {valid_selector,contract_id,domain,precision} per graph-reference role, and those values enter authorization, plan-cache, certificate, and replay keys.
TemporalSlice(row,Q) emits the intersection of the row period and Q and drops an empty result. TemporalJoin emits the intersection across every participating period and preserves ordinary multiplicity. Adjacent output periods coalesce only when every nonperiod value, multiplicity, provenance, authorization projection, and deterministic ordering key is byte-identical. Temporal path mode is the closed union Concurrent{one_common_instant_required}|Monotone{order:Nondecreasing|Strict}. A Monotone witness carries canonical hop times t0..tn; each edge and endpoint is valid at its hop, times obey the selected order, and an intermediate vertex remains valid over any waiting interval [t_i,t_{i+1}]. DURING Q first intersects every candidate period with Q. PathStateKey.feasible_valid_time and PathCut.feasible_time_domain are exact CanonicalValidTimeSets; dominance, spill encoding, and coalescing are separately proved for each mode, and the deterministic tie break appends the canonical time-witness schedule after ordinary path keys.
Temporal nonoverlap is synchronous authoritative state, not an index promise. TemporalNonOverlapConstraint is {constraint_id,coordinate_and_element_type,valid_time_contract_ref:StrongRef<ValidTimeContract>,canonical_key_expression_oid,maximum_overlap_multiplicity,null_key_policy,same_element_policy,disclosure_contract,schema_epoch}. TemporalConstraintStateRoot is {coordinate,schema_epoch,generation,entries[(constraint_id,canonical_key)->CanonicalTemporalEntrySet],root_digest}, where CanonicalTemporalEntry={interval,element_id,slice_id,system_version_basis,contribution_key} and each entry set is canonically sorted. Finalization atomically removes every before-slice contribution and adds every after-slice contribution; the interval-tree/range implementation is derived. ValidTimeRangeWitness binds {binding_role,contract_id,key_or_predicate_domain,query_interval_set,positive_entries[{element_id,slice_id,interval}],gaps,slice_set_and_index_generations,base_and_tail_frontiers}. In W12, deterministic Meta constraint ownership/reservations cover cross-shard keys and shards export certified contributions. Fork structurally shares the parent's basis and creates a branch overlay; sibling overlays diverge; merge replays, splits/coalesces, and revalidates the target. Hidden overlap failures obey the constraint's disclosure contract.
Canonical rows, effects, and Ripple deltas carry contract, stable element identity, slice ID, and period. A slice-set change emits one retraction for every removed/before fragment and one insertion for every added/after fragment, including split/coalesce lineage, so every registered TemporalSlice/TemporalJoin derivative must equal batch evaluation. Tier D and sealed runs key temporal payloads by (stable_element_id,valid_start,slice_id), store canonical endpoint tags/columns, and preserve one canonical incidence identity per edge; Beacon temporal indexes are rebuildable, watermarked generations and exact queries tail them or use the base fallback. Authorization temporal scopes are intersected before scan, index, expansion, path, constraint observation, error formation, or mutation; a mutation checks every before and after slice. ValidTimeContract, ValidTimeSliceSet/nodes, TemporalConstraintStateRoot/nodes, selectors, path modes, intents/effects, and witnesses have exact registry rows and generated Local/Meta/Shard payload, checkpoint, floor, backup, restore, GC, and role-transition coverage. Unit/fuzz tests exhaust infinities, empty/reversed intervals, boundary equality, precision/overflow, canonical set coalescing, split lineage, and encodings. Reference/model tests exhaust system-time x valid-time x branch x schema visibility, simultaneous disjoint slices, subinterval correction/deletion with untouched remainder, temporal phantoms/nonoverlap, workspace updates, sibling merge, every path mode and spill, derivative-vs-batch, compaction/seal/index-tail/backup/restore/activation equivalence, and temporal-scope noninterference.
4.7 Escrow and conserved-rights algebra
Escrow is a separate semantic ledger, never an alias for the operational ResourceLedger. Its purpose claim is exact: escrow preserves registered numeric invariants without per-operation cross-branch/replica coordination by pre-distributing rights; within the single commit order the delivered property is abort/rebase-rate reduction and merge-order independence for counter-shaped invariants, with coordination amortized into the explicit rights-transfer transitions defined below rather than eliminated — every escrow commit still rides ordered final certification, and depletion escalates to the ordered path (§7.4). EscrowNumericProfile permits only checked integer or fixed-scale decimal quantities, never floating point. EscrowDomainDefinition is {domain_id,scope:CoordinateLocal{graph,constraint_id,subject_key_profile}|AuthorityGlobal{database_or_tenant,constraint_id,subject_key_profile},value_source:ExplicitProperty|DerivedCardinality|EpochQuota,quantity_profile,lower:Finite(q)|Unbounded,upper:Finite(q)|Unbounded,branch_policy:IndependentOverlay|SharedAuthority,epoch,overflow:Reject,schema_epoch} and requires L <= value <= U under checked arithmetic.
For each finite lower bound, sum(AllCustody(Decrement)) = value-L; for each finite upper bound, sum(AllCustody(Increment)) = U-value. Local AllCustody is the disjoint exhaustive union Available(owner)|Reserved(reservation_id)|InTransit(transfer_id). Meta adds Delegated(grant_id,target_consensus_domain,generation), whose amount must byte-equal the active shard projection's available plus held totals; staged projections are shadows and are never counted, and no grant generation has two Active projections. A positive delta consumes Increment rights and creates equal Decrement rights; a negative delta does the inverse. An unbounded side needs no consumed rights but still creates capacity on the finite opposite side. Reserve, abort, and transfer preserve totals; commit changes value and custody atomically. Domain creation, bound change, ordered quota-epoch transition, or branch-overlay retirement (§5.6's RetireBranchOverlay) is the only mint/burn path and requires an exact quiescence/before-after proof. Depletion means NeedsRights/transfer/retry or failure; stream ordering cannot legalize an out-of-bound update.
The canonical objects are EscrowLedgerRoot {generation,domains[(domain_id,epoch)->StrongRef<EscrowDomainState>],active_reservation_index,transfer_index,operation_tombstone_root,body_digest}, EscrowDomainState {definition_ref:StrongRef<EscrowDomainDefinition>,value,state_generation,owner_accounts_root,reservation_root,transfer_root,contribution_root,operation_index_root,conservation_digest}, EscrowOwner {consensus_domain,topology_epoch,partition,branch?,holder_generation}, and EscrowAccount {owner,available_increment,available_decrement,generation}. Immutable predecessor-linked EscrowReservationRecord is {reservation_id,generation,domain_id,epoch,owner,attempt_statement_intent_identity,right_kind,amount,basis_generation,state:Held|Consumed{terminal_identity}|Released{typed_proof}}. EscrowTransferRecord is {transfer_id,generation,domain_id,epoch,source,target,right_kind,amount,basis_generations,idempotency_key,state:PreparedDebit|TargetStaged|Activated|CancelledBeforeStage}. EscrowOperationSummary {operation_key,domain_id,epoch,canonical_delta,terminal_effect_digest} is permanent idempotency evidence. Duplicate keys with different bytes fail closed.
An Active Local/Meta final-certification reservation has a distinct escrow_rights_hold_root_ref, in addition to resource/constraint holds. Reservation atomically moves exact rights from Available or Delegated projection custody into Held records and freezes domain/value/operation/constraint generations. Commit consumes every Held record and creates the opposite rights in the same state transition as the graph effects and marker; admitted abort releases them. Cancellation before signing requires the existing no-plan/lock/share/order proof plus exact release successors. Timeout, client death, or crash never releases Held or InTransit custody. Multi-statement workspaces carry EscrowWorkspaceState; produced rights are reusable only in that same workspace until terminal apply, and every published statement satisfies bounds. Normalization proves every intermediate prefix, not merely a zero net effect.
EscrowRightsTransitionSpec is the closed Local union TransferAtomic|ReconfigureDomain|AdvanceQuotaEpoch|RetireBranchOverlay|CompactTerminalEvidence. Atomic transfer CASes exact source/target generations and exact retry returns the same record. Reconfiguration requires no unaccounted Held/InTransit custody or a complete migration mapping; tightening a bound fails unless burnable Available rights suffice. Epoch quota reset is an ordered transition with subject-bound rollback-resistant TimeValidationEvidence; ambient time never mints rights, and old-epoch holds finish or block rollover. RetireBranchOverlay burns a retiring branch's CoordinateLocal EscrowBranchSeed overlay rights with an exact before/after conservation proof and is orderable only from §5.6's BranchRetireSpec capsule. CompactTerminalEvidence replaces fully terminal Consumed/Released reservation, transfer, and operation records with their permanent EscrowOperationSummary evidence under the ordinary compaction floors; it neither mints nor burns rights and never touches Held or InTransit custody. CoordinateLocal domains fork as lazy EscrowBranchSeed {child,parent,fork_head,parent_state_digest} overlays and intentionally receive independent branch-local capacity. Squash merge never imports source rights: it replays unique operation-key deltas against target rights. AuthorityGlobal domains never fork; their global effect is consumed once at the source transaction and merge recognizes the permanent summary rather than charging it again. The effect envelope tag makes those scopes unambiguous.
W12 keeps canonical custody in Meta and only certified projections at shards. GlobalEscrowTransferPrepareSpec moves source custody to InTransit. ShardEscrowGrantInstallSpec installs unusable Staged bytes and emits a certified ack. GlobalEscrowTransferActivateSpec consumes the complete ack set, moves InTransit to Delegated, and emits an activation certificate; ShardEscrowGrantActivateSpec alone makes the matching generation Active. Shard prepare reserves only Active rights and returns a certified reservation/contribution. Meta final certification requires a bijection over every participant reservation and holds the canonical bases; global apply consumes/produces rights once and shard decision apply mirrors the exact successor. Reallocation first freezes the grant, obtains certified shard quiescence and complete reservation disposition, then moves Delegated to InTransit; an Active final-certification hold blocks the freeze. Topology movement retains old grants and reservations until every prepared decision terminates. Shards cannot mint, transfer, relabel, or double-project rights.
The exact roots are escrow_ledger_root in Local, global_escrow_ledger_root plus transfer/grant registries in Meta, and shard_escrow_grant_root/shard_escrow_reservation_root in Shard. Active Meta projection rows, command registries, checkpoint/floor/prepared/backup/restore/role-transition/reconfiguration/GC/attempt-compaction inventories enumerate every Held, InTransit, Staged, Active/Delegated record and permanent operation/transfer summary. Lean proves the conservation equations and bounds across reserve/abort/commit/transfer; TLA+/lab covers concurrent reserve, duplicate transfer, every phase crash, lost ack, leader/config/topology change, participant loss, and abort after prepare. Exhaustive reference tests cover lower/upper/both/unbounded domains, boundaries, signed values, overflow, multi-statement prefixes, degree cascades, lazy fork, repeated/partial merge, shared-global scope, same-identity restore/clone, quota rollback/outage, hidden depletion/error noninterference, and exact ledger equality after every operation.
4.8 Element expiry contracts (TTL and decay)
Expiry is a visibility predicate, never a mutation. ExpiryContract is the immutable schema object {contract_id,element_kind_and_type,expiry_slot,domain:InstantUtcNanos,default_assignment:NoExpiry|RequireExplicit,visibility_semantics,permitted_selectors,canonical_scalar_profile_oid,schema_epoch,body_digest}, mirroring ValidTimeContract's shape; it declares the reserved _expires_at slot (§4.4) for one element kind and type, domain is exactly InstantUtcNanos, comparison, precision, overflow, and canonical encoding come only from the bound CanonicalScalarProfile, default_assignment fixes whether an absent instant means no expiry or a rejected write, and visibility_semantics/permitted_selectors fix the at-or-before invisibility rule and the closed selector set that may name the expiry axis. A version whose _expires_at instant is at or before the query's pinned evaluation instant is invisible to current-time reads as an additional §5.3 visibility conjunct, exactly as retirement/supersession markers make versions invisible; no stored byte changes and no retirement transaction exists. The evaluation instant is the closure-captured profiled authority-time observation of the binding — the same pattern §4.6 fixes for CURRENT VALID_TIME — never an ambient wall-clock read; it enters the authorization, plan-cache, certificate, and replay keys, so byte-determinism and FG-INV-19 replay hold: the same pinned closure yields the same bytes. Expired-but-within-retention versions remain visible to AS OF selectors pinned at pre-expiry instants, an expired instant never authorizes GC by itself, and expiry composes with branch selection per head: _expires_at writes are ordinary versioned property mutations, so sibling branches may carry different expiry updates and every binding evaluates expiry against its own selected ancestry and pinned instant.
Physical reclamation is lazy and the sequencer never carries per-element expiry work: no per-element retirement transaction is ever emitted, and the sequenced command stream observes expiry only as one registered ExpiryEpochAdvanceSpec control command per configured epoch tick — the sole sequencer-visible expiry artifact. The epoch advance is an ordered transition carrying subject-bound rollback-resistant TimeValidationEvidence, mirroring §4.7's quota-epoch discipline; ambient time never advances an expiry epoch. Compaction drops fully expired versions under the ordinary §5.3/§5.4 retention floors and snapshot leases; a version still covered by a floor, lease, or backup pin is retained invisible bytes, and its later physical drop changes no visible answer. The Ripple law is closed: a registered derivation over expiry-bearing inputs must declare exactly one of ExpiryInsensitive, an explicit AS OF evaluation basis, or ConsumesExpiryEpochTick; the consumed tick emits one canonical retraction delta for every version newly expired at the epoch boundary, so every registered derivative equals batch evaluation at that boundary, silent time-varying view drift is inexpressible, and an undeclared derivation over an expiry-enabled input fails closed at registration.
Salience-weighted retention priority (decay) is a named post-1.0 GC/compaction policy candidate and is claim-typed FG-CFG for its policy model and FG-EVID for its statistical evidence, never an invariant: it may prioritize which already-reclaimable bytes compaction visits first and may never shorten a retention floor, override a GC root, or claim any semantic effect. Enabling, changing, or disabling an ExpiryContract is an ordinary transactional schema effect under §4.6's pinned-snapshot shadow-build, delta catch-up, exact validation, and atomic schema-epoch publication pattern; old snapshots keep their former contract, and a type without an enabled contract rejects expiry syntax and _expires_at assignment rather than silently storing an inert instant. The ExpiryContract registry rows, the _expires_at reserved-slot row, the expiry selectors, and the ExpiryEpochAdvanceSpec command-contract and classification rows are decided at §19's Gate G0; the mechanism may trail, the format arms may not.