Fabric: Server, Protocols, and the Embedded API
4,338 wordsA design document: it describes the 1.0 target, not what runs today.
-
Embedded:
fgdb::Database::open(path | :memory:)returns an incarnation/service-epoch-guarded handle only from an Operational root backed by the current service-promotion receipt; hidden restore andRetiredLocalreject ordinary open. Authorized sessions expose prepared statements and explicit transactions with begin idempotency, server-derived statement classification, pinned error policy, certified workspace generation, ownership renewal, and ordered transaction reattachment. Execution returns an audit-visiblePublishedResultStreamfor every durable result class; a statement the binder selects into the registeredSnapshotQueryclass (item 3 below) returns that class's session-owned ephemeral stream instead, under the same authorization boundary. Explicit asyncfinish()emits ACK after complete consumption; explicit asyncrelease()authenticates and orders the sameRESULT_RELEASEtransition as FGP; explicitcancel_pending_send()only stops not-yet-written transport. RustDropperforms local structured-cancellation cleanup and sender detachment but cannot authorize durable result release; independently retained bytes remain resumable until ACK, explicit release, or profiled expiry.commit()returnsWriteCommitted|ReadClosed|Aborted|Unknown, never a marker-shaped read close, andstatus(TxnOutcomeCapability)resolves BeginStaging, detailed/compacted NeverRegistered, in-progress, terminal-pending, and detailed/compacted terminal-ready outcomes identically. Rust-native typed accessors and capability-gated procedures obey the same authorization and epoch boundary.fgdb-pythonconsumes the allowedfnx-pythonbinding boundary rather than adding PyO3 directly to engine crates; ABI3/NumPy support remains isolated from durable/runtime layers. A claimed NumPy view is zero-copy only for matching contiguous authorized buffers and otherwise returns an explicit copy.fgdb-pythonmaps this ownership model onto Python idiom explicitly rather than by finalizer accident: context managers perform explicit authenticatedrelease()/finish()on__exit__for sessions, transactions, and result streams — never in__del__; iterator exhaustion isfinish()and emits ACK after complete consumption;__del__/GC finalization is defined as exactly RustDrop— local structured cancellation and sender detachment with no durable release authority — with the documented consequence that an abandoned result or cursor lives to profiled expiry holding its retention and escrow, surfaced as a debug-modeResourceWarningand a doctor/metrics counter rather than a silent leak; embedded and interactive sessions default to a documented short-expiry result-retention profile; a claimed NumPy view pins its authorized buffer through the ordinary cursor/borrow rule and releases that pin on view drop; a GC-abandoned open transaction terminates through the ordinaryTxnOwnershipExpiryAbortSpec<Local>ownership-lease expiry abort, never through a finalizer-invented rollback; Jupyter and asyncio consumers get explicit with-block andaclose()guidance in the binding documentation. -
fgdbdserver: multi-database, multi-tenant by capability; connection admission via semaphore + rate-limit combinators; graceful drain on shutdown (region close = no dropped in-flight commits, structurally). -
FGP (native wire protocol) uses Appendix D's sole connection machine: protocol-only HELLO, principal authentication, protected database selection, then a posture/incarnation/service-receipt-bound Ready state. Every role-sensitive identity and dispatch is an exact
Local|Shardedunion. BEGIN, transaction reattach/renewal, autocommit, subscription creation, export, replay, result resume/ACK/release, unsubscribe, and E-to-E2 capability migration are durably idempotent. Every protected result, baseline, delta, proof, replay/export byte, cancellation explanation, and data-dependent error of the durable classes is buffered until its exact authorization and audit-visible release evidence exists (aSnapshotQuerystream instead streams under its visible-endpoint pin and the same fresh send guards, with no release evidence to await), then consumes a fresh linearPublicFrameSendGuardimmediately before each frame write. Transaction-bound statements are serialized in v1; unsupported savepoint, partial-rollback, or concurrent-statement profiles are rejected. Draining admits no new session-owned children and waits only for queued/writing transport obligations to become Sent/Failed, required audit publications, prepublication cancellations, admitted-decision recovery, terminal records, and durable detach/pause of senders. Independently retained result/cursor/export/replay owners survive session/process close and do not block drain; only explicit ACK/release/close or profiled expiry retires them. Appendix D's state, frame, retry, privacy, and posture rules are normative; adapters cannot weaken them.Ephemeral
stmt_id,stream_id, delivery cursor, open-query, active-transaction, and transient-reservation handles are server-minted random or MACed capabilities scoped to protocol version, database security namespace, cluster incarnation, service visibility epoch, tenant, principal, non-widenable authority digest, session, and creation policy/revocation epochs. Prepared statements bind thePreparedQueryTemplatedigest, language/catalog/schema compatibility contracts, and authority ceiling; each execution resolves a freshBoundQueryand reauthorizes it. Exactly four durable authority-bearing capabilities deliberately survive connection loss: §9.5'sResumeCapability, §5.6'sMergeOutcomeCapability, §14.3'sReadYourWritesCapability, andTxnOutcomeCapability.All four use the exact wire-safe
DurableCapabilityHeader {capability_format_version,capability_kind,issuer_id,mac_key_id,mac_key_epoch,projection_domain_commitment,security_state_binding_public_commitment,time_authority_profile_oid,not_before,expiry,capability_nonce:PublicHandle<CapabilityNonce>}; namespace/incarnation/service/posture/principal/authority are committed by the projection domain and retained in the replay object's complete binding, not repeated as correlation-friendly scalar fields. It contains no local ref or policy/revocation counter. A capability is{header,kind_specific_body,mac}, and the domain-separated MAC covers the complete header/body. Every live, replayable, or byte-owning durable issuance/replay object carriesauthority_bound_header:AuthorityBoundHeader<Role>and proves its complete binding derives both public commitments. Only a nonrevivable, nonpayload terminal tombstone may replace that header withTerminalAuthorityCommitment<Role>. The Txn body is exactly{request_kind:ExplicitBegin|AutocommitExecute,scoped_request_commitment,txn_handle:PublicTxnHandle,outcome_lookup_handle:PublicHandle<TxnOutcomeLookup>,capability_lineage_token:PublicStateToken<TxnCapabilityLineage>}. A Txn capability permits lookup plus narrowly scoped Reattach/Renew; neither grants direct statement/commit/rollback. Rotation/expiry respect promised floors. Presentation validates current same-or-narrower complete binding and fresh time evidence; bad MAC/domain/binding/profile returns uniform NotVisibleOrUnknown. Consumed-predecessor recovery reproduces only the installed successor while that successor/result remains live and exposes no outcome.DurableCapabilityTerminalTombstone<Role,Kind>denotes a generated finite family, not an erased generic, with exact common fields{role,capability_kind=Kind,capability_commitment,projection_domain_commitment,subject_key_commitment,lineage_token_commitment,last_generation,terminal_disposition:Acknowledged|ExplicitlyReleased|SubjectTerminal|Expired|MigratedConsumed,terminal_subject_or_successor_commitment,expiry_or_terminal_evidence_commitment,issuer_and_verifier_epoch_commitment,terminal_authority_commitment:TerminalAuthorityCommitment<Role>,minimum_nonreuse_lookup_and_replay_floor,body_digest}. Named, noninterchangeable members exist for TxnOutcome, Resume, MergeOutcome, and ReadYourWrites. They contain no canonical capability bytes, verifier-key ref, replay object, protected payload, lease, live subject, or predecessor edge and cannot authorize lookup, replay, delivery, migration, or successor issuance.ResultCapabilityTombstone, subscription/artifact tombstones, begin/outcome-index expiry leaves, merge expiry leaves, and capability-migration consumed leaves are exact generated members or exact wrappers around one member; an informal{capability_commitment,expiry_evidence_digest}tuple is not a complete durable schema.TxnOutcomeCapabilityReplayRecordis the immutable compact replay object{public_fields:{txn_handle,outcome_lookup_handle,capability_lineage_token},canonical_capability_bytes,capability_commitment,authority_bound_header:AuthorityBoundHeader<Role>,canonical_request_digest,request_kind,scoped_request_idempotency_key_digest,internal_txn_token,internal_outcome_capability_key,internal_capability_generation,lineage_nonce,issuer_and_verifier_key_epoch,verifier_key_ref:StrongRef<DurableCapabilityVerifierKey>,time_authority_profile_oid,not_before,expiry,minimum_begin_retry_floor,body_digest}; stored bytes decode and byte-match every public projection/MAC/commitment while the server-side index maps opaque handles to exact internal subjects. Internal generation zero precedes reservation and successors precede Reattach/Renew.TxnCapabilityLineageRoot<Role>maps each key toCurrent{current_replay_ref}|CurrentWithConsumedPredecessor{current_replay_ref,predecessor_replay_ref,consuming_request_digest,recovery_until:SuccessorAcknowledgedOrSuccessorTerminal}|TerminalCurrent{current_replay_ref,terminal_subject_commitment}|ExpiredTombstone{tombstone_ref:StrongRef<TxnOutcomeCapabilityTerminalTombstone<Role>>}. TerminalCurrent remains a live replayable capability and therefore retains the full replay object/header; only ExpiredTombstone drops it. There is no independent short recovery deadline: the predecessor remains capability-safely recoverable until the successor is explicitly acknowledged/consumed or its transaction/capability lifetime terminally ends. Evidence-bound expiry then installs the exact permanent tombstone.Durable active-transaction ownership and reattachment. Session binding is represented by an ordered, generation-fenced lease, never by an in-memory connection pointer.
TxnOwnershipLease<Role>is the closed Local/Meta specialization{authority_bound_header:AuthorityBoundHeader<Role>,registration_ref:StrongRef<RoleAttemptRegistration>,ownership_generation,owner_session_binding_digest,owner_auth_generation,current_outcome_capability_replay_ref:StrongRef<TxnOutcomeCapabilityReplayRecord>,current_capability_commitment,time_authority_profile_oid,not_before,expires_at,open_statement_state:Idle|Open{statement_identity,statement_state_version,detached_sender_state},control_mode:FullControl|RollbackAndStatusOnly,applied_control_ref:AppliedControlRef,weak_prior_lease_identity,body_digest:BodyDigest<TxnOwnershipLease<Role>>}. It never strongly names a predecessor.TxnOwnershipDirectory<Role>maps each registered nonterminal attempt to exactlyOwned{lease_ref:StrongRef<TxnOwnershipLease<Role>>}|PrepareFenced{prepare_admission_ref:StrongRef<RolePrepareAdmission>,last_ownership_generation,capability_lineage_ref:StrongRef<TxnCapabilityLineageRoot>}|Terminal{terminal_lookup_key}. Registration atomically installs generation zero; every statement registration/publication/abort, commit, rollback, and ownership transition must present an ephemeral handle whose{registration,ownership_generation,session_binding,authority_binding}byte-matches the current Owned leaf. A later generation therefore fences every old process/session/handle before it can order another effect.TxnOwnershipTransitionSpec<Role>is the closed union with no shared ambiguous body.Reattach {expected_owned_lease_ref,presented_capability_validation_ref:StrongRef<DurableCapabilityValidationEvidence>,presented_replay_ref,expected_capability_lineage_ref,canonical_request_idempotency_key,new_session_binding_digest,new_auth_generation,current_authority_bound_header:AuthorityBoundHeader<Role>,requested_control_mode,open_statement_disposition:NoOpen|TransferRecoverableExecution{old_compute_owner_fence_ref,new_compute_owner_recipe,complete_task_and_sender_handoff_proof_ref}|CancelAndTerminalize{structured_cancel_completion_ref,statement_terminalization_ref,result_detachment_proofs[]},prebuilt_successor_capability_replay_ref,successor_lease_body_recipe,terminal_audit_gate}may change session only through one exact open-statement disposition.Renew {expected_owned_lease_ref,presented_current_capability_validation_ref:StrongRef<DurableCapabilityValidationEvidence>,expected_capability_lineage_ref,canonical_request_idempotency_key,required_same_session_binding_digest,required_same_auth_generation,current_authority_bound_header:AuthorityBoundHeader<Role>,requested_not_before,requested_expires_at,time_validation_evidence_ref:StrongRef<TimeValidationEvidence>,prebuilt_successor_capability_replay_ref,successor_lease_body_recipe,terminal_audit_gate}cannot transfer session/control mode and requires Usable evidence for the exact successor window/action. Both validation refs must select the exactTxnOutcomesubject/action/role compatibility row and byte-match the presented replay, lineage, current header, session, and canonical request; the Renew record's separate time evidence validates the successor window and cannot substitute for validation of the presented capability. Both transitions validate domain/principal/generation and CAS one successor. Reattach and Renew are both authorized narrow actions; an open statement can never be left without a compute owner or terminalization path. PrepareFenced permits status only.Lease expiry cannot strand an attempt. Every active lease satisfies
expires_at <= current_outcome_capability.expiry.TxnOwnershipExpiryAbortSpec<Role>referencestime_validation_evidence_ref:StrongRef<TimeValidationEvidence>and requires its decoded tag/classification be Expired for the exact lease/action; a ref to an inline enum variant is illegal. It also requires complete structured cancellation/open-statement terminalization/result detachment/workspace-resource/conflict evidence and is legal only before PrepareFenced. Renewal lost-response recovery uses the lineage rule above. Model/crash tests cover every boundary and no-stranding condition.resume_capability_arms.tomlis the single source for bothResumeCapabilityBodyandResumeCapabilitySubjectBasis; generation rejects arm drift.ResumeCapabilityReplayRecordis{fields:{header:DurableCapabilityHeader{capability_kind=Resume},body:ResumeCapabilityBody},canonical_capability_bytes,capability_commitment,authority_bound_header:AuthorityBoundHeader<Role>,subject_basis:ResumeCapabilitySubjectBasis,capability_generation,lineage,issuer/key epochs,verifier_key_ref,time profile/window,minimum_resume_or_result_floor,body_digest}. Subject arms are exactlySubscriptionCursor{cursor_creation_request_digest,resume_cursor_id,cursor_state_version,public_derived_identity_commitment,baseline_id,public_state_commitment},BufferedResult{posture,owner_basis:GeneratedResultDeliveryOwnerBasis,result_delivery_id,lease_generation,delivery_state_version,canonical_result_digest}, andDurableArtifactOutput{posture,request_key_digest,output_kind,output_delivery_id,lease_generation,delivery_state_version,canonical_output_digest,manifest_and_policy_basis_commitment}. Stored bytes decode/byte-match the corresponding public body. Current/immediate-predecessor retention lasts through successor acknowledgement or subject terminal lifetime; only evidence-bound terminal disposition installs tombstones.MergeOutcomeCapabilityBodyis exactly{merge_handle:PublicMergeHandle,target:WireGraphReferenceSpec,canonical_request_commitment,capability_lineage_token:PublicStateToken<MergeCapabilityLineage>}.MergeOutcomeSubjectBasis<Role>is{merge_token,target_internal_binding,target_basis:StrongMarkerRef,source_heads[StrongMarkerRef],merge_bases[StrongMarkerRef],resolution_policy_oid,authority_bound_header:AuthorityBoundHeader<Role>,lookup_and_retention_floor,public_body_digest}.MergeOutcomeCapabilityReplayRecordowns that basis plus canonical body/bytes/commitment/request/verifier/window/floor fields and repeats the same complete header only where the generated schema row requires a byte-equality cross-check.MergePrepareSpecstrongly names it; detailed/compacted/tombstone states follow the same retention rules.MergeCapabilityOperationAuthorizationRecord<Role>is the same-group immutable{authority_bound_header:AuthorityBoundHeader<Role>,authority:Execute{validation_ref:StrongRef<DurableCapabilityValidationEvidence>,expected_ledger_leaf_digest}|StatusLookup{classification:DurableCapabilityStatusClassification,ledger_selection:Usable{expected_ledger_leaf_digest}|NegativeTime},merge_token,target_binding,canonical_request_digest,request_nonce,body_digest}. Execute selects exactlyMergeExecuteand byte-matches the validation subject/current membership/capability/request/header/target. StatusLookup selectsMergeStatusLookup;ledger_selection=Usableis required exactly withclassification=Usableand may inspect the exact leaf, whileNegativeTimeis required with any negative-time classifier and forbids any ledger read.MergeExecuteSpecstrongly carries the Execute record before evaluation or charging;MergeStatusProjectionAuthorization<Role>strongly carries the StatusLookup record through the terminal or pending status frame send. Neither a ledger token nor a status handle can replace it. A public marker selector resolves only through its authenticated retained mapping and exact authority; it is never decoded as an internal marker identity.ReadYourWritesCapabilityReplayRecordis{fields:{header:DurableCapabilityHeader{capability_kind=ReadYourWrites},body:{posture,txn_outcome_capability_commitment,registration_handle:PublicRegistrationHandle,floors:PublicRywFloorSet,capability_lineage_token:PublicStateToken<ReadYourWritesLineage>}},canonical_capability_bytes,capability_commitment,subject_basis_ref:StrongRef<ReadYourWritesSubjectBasis<Role>>,authority_bound_header:AuthorityBoundHeader<Role>,issuer/key/verifier/time-window/floor fields,body_digest}. The public body contains no redundant authority ceiling; the header/binding owns it. The subject basis supplies the exact marker/branch/visibility/retention map and byte-matchesfloors. It contains no WeakMarkerIdentity, raw Raft/logical/commit/audit counter, or local ref on wire. It is issued only with TerminalReady and permits waiting/reading at an authorized subset of the opaque committed floor set under current same-or-narrower authority.ReadYourWritesWaitAuthorizationRecord<Role>is{authority_bound_header:AuthorityBoundHeader<Role>,validation_ref:StrongRef<DurableCapabilityValidationEvidence>,requested_floor_subset_digest,capability_floor_set_commitment,expected_lineage_leaf_digest,canonical_wait_request_digest,request_nonce,body_digest}; it selects onlyReadYourWritesWait, byte-matches current or the exact action-recorded predecessor retry, and is strongly retained byReadYourWritesWaitSpec<Role>and its pending/terminal public send guard until the wait response or installed-successor retry resolves. A scalar floor, registration handle, or prior admission cannot substitute. All capability kinds have exact restart/rotation/lost-response/expiry/substitution byte tests.FrameLimitsbounds encoded and uncompressed bytes, compression ratio, nesting, columns, parameters, FEC symbols, streams, in-flight bytes, result rows/bytes, and idle time. The decoder validates declared sizes and reserves resources before allocating or FEC decoding. Authentication follows protected transport and transcript-bound negotiation. Compression is disabled for mixed attacker-controlled/secret frames unless a reviewed profile permits it. Factorized frames carry canonical authorized values, never run references. Session types enforce order; runtime validators enforce values, epochs, authorization, and resource bounds. Appendix D is normative, not a sketch. Durable artifact outputs and replay execution. Export, public replay-manifest retrieval, and proof bundles are not socket-owned streams.DurableArtifactOutputKind=Export|ReplayManifestProjection|ProofBundle;DurableArtifactOutputRequestKeyis{database_security_namespace_id,cluster_incarnation,service_visibility_epoch,posture,tenant,principal,non_widenable_authority_digest,kind,scoped_idempotency_key,canonical_request_digest}. Reusing the scoped key with any body/domain/authority drift fails before source observation or charge.DurableArtifactOutputManifestis{format_version,kind,public_format_contract_oid,public_scope_projection,disclosure_contract_digest,canonical_encoding_version,byte_count,ordered_chunks[CanonicalResultChunkDescriptor],canonical_output_digest,source_retention_refs[TypedArtifactSourceRetentionRef],resource_charge_ref,body_digest}; its public digest covers kind/public contracts/encoding/count and exact concatenated bytes, excluding internal identities/refs/charges/placements and itself.Semantic
ArtifactOutputRequestRecord<Role:AuthorityOwningRole>is state-shapedReserved{authority_bound_header:AuthorityBoundHeader<Role>,source_pins,resource_reservations}|MaterializedDetached{authority_bound_header,manifest_ref:StrongRef<DurableArtifactOutputManifest>,output_delivery_id,delivery_policy_ref:StrongRef<ArtifactOutputDeliveryPolicy<Role>>,audit_gate_commitment,detachment_commitment}|FailedDetached{terminal_authority_commitment:TerminalAuthorityCommitment<Role>,protected_error_key,public_error_commitment,audit_gate_commitment}and never stores a delivery lease, capability, ACK, release, or protocol-record ref. The terminal arm is nonrevivable and payload-free; a failed request that still owns an error manifest uses the separate live ProtectedError lifecycle below.DurableArtifactOutputRequestRegistry<Role>owns request idempotency and compacted semantic floors. Materialization atomically transfers the charge toArtifactOutputResourceEscrow<Role>and creates ProtocolArtifactOutputDeliveryRecord<Role>::PendingVisibility{common,manifest_ref,policy_ref,escrow_ref,audit_gate_commitment}unless same-apply visibility creates ReleasedAwaitingActivation or a legal inline fresh recipe selects ActiveDeliverable. Pending/released states have no time window/capability and emit neither READY nor bytes.ArtifactOutputActiveCommon<Role>is{authority_bound_header:AuthorityBoundHeader<Role>,request_key_digest,output_delivery_id,delivery_state_version,canonical_output_digest,semantic_detachment_identity,nonretaining_predecessor_digest};ArtifactOutputTerminalCommon<Role>replaces the header withterminal_authority_commitment:TerminalAuthorityCommitment<Role>and retains only terminal/public identities.ArtifactOutputDeliveryRecord<Role:AuthorityOwningRole>is the exact Protocol state unionPendingVisibility{common:ArtifactOutputActiveCommon<Role>,manifest_ref,policy_ref,escrow_ref,audit_gate_commitment}|ReleasedAwaitingActivation{common:ArtifactOutputActiveCommon<Role>,manifest_ref,policy_ref,escrow_ref,audit_release_evidence,release_maintenance_ref}|ActiveDeliverable{common:ArtifactOutputActiveCommon<Role>,manifest_ref,lease_time_basis_ref,lease_generation,capability_lineage_ref,escrow_ref,sender_generation}|Acknowledged{common:ArtifactOutputTerminalCommon<Role>,ack_commitment,capability_tombstone_ref,escrow_disposition_commitment}|ReleasedUnacked{common:ArtifactOutputTerminalCommon<Role>,release_or_expiry_commitment,capability_tombstone_ref,escrow_disposition_commitment}; terminal arms retain no strong authority, manifest, lease, payload, capability replay, escrow, or predecessor edge.ArtifactOutputDeliveryIndex<Role>maps request and output-delivery keys to the one current record plus a compacted disposition floor. Audit visibility changes PendingVisibility only to ReleasedAwaitingActivation; independent activation supplies a freshArtifactOutputLeaseTimeBasis<Role>, exact time evidence, and prebuilt generation-zeroResumeCapabilityReplayRecord.ArtifactOutputEndSendCompletionRecord<Role>is the channel-only{surface:NativeFgp|Http2|Grpc|WebSocket,authority_bound_header:AuthorityBoundHeader<Role>,session_binding,server_process_incarnation,sender_generation,output_delivery_id,delivery_state_version,resume_capability_commitment,surface_terminal_frame_and_canonical_fgp_end_digest,complete_canonical_byte_length,canonical_output_digest,flow_reservation_identity,transport_sent_obligation_commitment,sent_completion_nonce,signing_key_epoch,signature}.EmbeddedArtifactOutputFullyConsumedRecord<Role>is the embedded-only{authority_bound_header:AuthorityBoundHeader<Role>,session_authorization_ref:StrongRef<SessionAuthorizationRecord<Role>>,host_session_generation,output_delivery_id,delivery_state_version,output_owner_token_commitment,complete_canonical_byte_length,canonical_output_digest,completion_source:ExplicitFinish|IteratorExhaustion,canonical_finish_call_digest,server_process_incarnation,signing_key_epoch,signature}. Their construction rules are the exact channel-Sent and complete-consumption rules above; neither partial read, Drop, EOF inference, release, nor cross-surface substitution can build one.ArtifactOutputDispositionAuthority<Role>is the closed unionReadyChannelResumeCapability{validation_ref:StrongRef<DurableCapabilityValidationEvidence>,presented_resume_capability_commitment}|ReadyChannelManagementHandle{validated_management_handle_commitment}|EmbeddedOutputOwner{output_owner_token_commitment,host_session_generation}.ArtifactOutputDispositionCompletion<Role>isChannelSent{record_ref:StrongRef<ArtifactOutputEndSendCompletionRecord<Role>>}|EmbeddedFullyConsumed{record_ref:StrongRef<EmbeddedArtifactOutputFullyConsumedRecord<Role>>}|NotApplicable.AuthenticatedClientArtifactOutputDispositionReceipt<Role>is{authority_bound_header:AuthorityBoundHeader<Role>,session_authorization_ref:StrongRef<SessionAuthorizationRecord<Role>>,authority:ArtifactOutputDispositionAuthority<Role>,completion:ArtifactOutputDispositionCompletion<Role>,output_delivery_id,expected_delivery_state_version,canonical_output_digest,action:Acknowledge|Release,canonical_request_digest,request_nonce,server_process_incarnation,signing_key_epoch,signature}. Acknowledge requires either ReadyChannelResumeCapability plus ChannelSent or EmbeddedOutputOwner plus EmbeddedFullyConsumed; Release requires NotApplicable and any exact release authority arm. Only a ReadyChannelResumeCapability arm carries validation evidence, selectingArtifactOutputAcknowledgeorArtifactOutputRelease; a management handle or embedded owner never fabricates it.ArtifactOutputTransitionSpec<Role>is the exact maintenance unionResume{validation_ref:StrongRef<DurableCapabilityValidationEvidence>,expected_active_owner_ref:StrongRef<ArtifactOutputDeliveryRecord<Role>>,required_owner_arm:ActiveDeliverable,canonical_request_digest,prebuilt_successor_replay_ref:StrongRef<ResumeCapabilityReplayRecord>}|Acknowledge{receipt_ref:StrongRef<AuthenticatedClientArtifactOutputDispositionReceipt<Role>>,expected_active_owner_ref:StrongRef<ArtifactOutputDeliveryRecord<Role>>,required_owner_arm:ActiveDeliverable,sender_fence_and_join_proof}|Release{receipt_ref:StrongRef<AuthenticatedClientArtifactOutputDispositionReceipt<Role>>,expected_active_owner_ref:StrongRef<ArtifactOutputDeliveryRecord<Role>>,required_owner_arm:ActiveDeliverable,sender_fence_and_join_proof}|Expire{expected_active_owner_ref:StrongRef<ArtifactOutputDeliveryRecord<Role>>,required_owner_arm:ActiveDeliverable,expiry_evidence_ref:StrongRef<TimeValidationEvidence>,required_classification:Expired}. The Resume ref selectsArtifactOutputResume; action receipts select the exact action row only in their capability arm. Each transition retains its direct or nested validation ref through successor acknowledgement or terminal receipt/tombstone resolution. Checkpoint/protocol snapshot, backup, restore, GC, and posture transitions walk both the semantic request registry and Protocol delivery index. Local/Meta payloads root only the semantic registry;RootManifest's protocol state roots only the delivery index.Protected errors are bounded durable outputs, not an exception path. A data-dependent error is first canonicalized to
ProtectedErrorManifest {error_format_version,public_reason:PublicReasonProjection,padded_public_fields,canonical_error_bytes,error_digest,disclosure_contract_digest,maximum_replay_window,body_digest}. The canonical bytes contain exactly that frozen projection;protected_error_classes.tomlmaps hidden constraint/existence/authorization details toPublicReasonProjection::Opaque{OperationDidNotComplete,...}unless the bundle carries the exact portable receipt for one registered disclosed code. No internal reason class, policy counter, existence fact, or raw digest is serialized. SemanticProtectedErrorRequestRecord<Role:AuthorityOwningRole>stores only{authority_bound_header:AuthorityBoundHeader<Role>,request_key_digest,error_manifest_ref:StrongRef<ProtectedErrorManifest>,delivery_policy_ref:StrongRef<ProtectedErrorDeliveryPolicy<Role>>,semantic_resource_transition_ref,audit_gate_commitment,detachment_commitment}.ProtectedErrorActiveCommon<Role>is{authority_bound_header:AuthorityBoundHeader<Role>,request_key_digest,error_delivery_id,delivery_state_version,error_digest,disclosure_contract_digest,semantic_detachment_identity,nonretaining_predecessor_digest};ProtectedErrorTerminalCommon<Role>replaces the header withterminal_authority_commitment:TerminalAuthorityCommitment<Role>and retains only terminal/public identities. The same publication createsProtectedErrorResourceEscrow<Role>and ProtocolProtectedErrorDeliveryRecord<Role> = PendingVisibility{common:ProtectedErrorActiveCommon<Role>,manifest_ref,policy_ref,escrow_ref,audit_gate_commitment}|ReleasedAwaitingActivation{common:ProtectedErrorActiveCommon<Role>,manifest_ref,policy_ref,escrow_ref,audit_release_evidence,release_maintenance_ref}|ActiveDeliverable{common:ProtectedErrorActiveCommon<Role>,manifest_ref,lease_time_basis_ref,lease_generation,sender_generation,escrow_ref}|SentReplayable{common:ProtectedErrorActiveCommon<Role>,send_completion_ref:StrongRef<ProtectedErrorSendCompletionRecord>,replay_time_basis_ref:StrongRef<ProtectedErrorReplayTimeBasis<Role>>,escrow_ref}|Acknowledged{common:ProtectedErrorTerminalCommon<Role>,ack_commitment,escrow_disposition_commitment}|Expired{common:ProtectedErrorTerminalCommon<Role>,expiry_evidence_commitment,escrow_disposition_commitment}. Pending/released states have no clock or send authority; SentReplayable owns the exact profiled replay basis rather than a rawreplay_until. Terminal arms retain no manifest, lease, replay basis, escrow, or live authority edge.ProtectedErrorDeliveryIndex<Role>indexes both request key and delivery ID, so exact request retry returns the same padded public error while a conflicting request digest fails uniformly. Audit visibility only releases; independent activation installs a fresh bounded lease.ProtectedErrorSendCompletionRecordis the durable maintenance bridge from the exact ephemeralTransportSendObligation::Senttranscript to SentReplayable.ERROR_ACKor profiled expiry alone disposes escrow; socket loss, cancellation, drain, and Rust Drop do not. Errors have no fifth durable capability: replay requires the original scoped request key under a fresh same-principal Ready binding, exact current disclosure authority, and freshTimeValidationEvidence::Usablefor the retained replay basis. A failure in this delivery path closes or returns a fixed protocol-mechanics failure and never recursively creates another protected error.The
SnapshotQueryephemeral read class.SnapshotQueryis the registered second honest result class beside the durable classes above: a single-envelope, permit-validated, visible-endpoint-pinned, session-owned ephemeral result stream that consumes zero sequenced semantic commands and zero Protocol-plane maintenance transitions — no begin reservation, no attempt registration, no statement records, no durable result retention, no delivery lease, and no resume capability. Its output is dropped on disconnect, explicitly non-resumable, and audit-NotRequired by construction. Class selection is bind-time and policy-driven, never a client verb: a statement is eligible exactly when itsCanonicalStatementClassificationproves ProvenReadOnly single-statement autocommit within the class's declared output/row/time bounds, the effectiveAuditCompletenessProfiledoes not name the operation class Required, the classification carries no DP or Warden-classified operation class (required_warden_operation_classesempty and an ordinaryoutput_class), and the namespace's registered class policy permits the class — a governed namespace may force every read onto the durable path. Under a Required-read profile eligibility fails closed with a typed, data-independent rejection steering the statement to the durable class; a silent upgrade is forbidden. Whilesecurity_barrier_state=AppliedHidden,SnapshotQueryadmission returns the same bounded, data-independent audit-backpressure class as every other admission (§12.8).Admission is a new registered
ReadAccessAdmissionRecordexecution-scope arm (Appendix A): coordinator-local and non-ordered, with authorization preceding every observation (FG-INV-20), pinning the pipeline's visible candidate root (FG-INV-04) through the ordinaryAuthorizedSnapshot/fgdb-secure-viewboundary under an ordinary snapshot retention lease. Results stream through the ordinary canonical-chunk encoding and a freshPublicFrameSendGuardimmediately before every frame write — output-side revocation fencing is preserved unchanged — under session-scoped ephemeral resource reservations, never durable charge. The class'sAnswerContractbehavior row records non-resumable, no-replay, no-durable-outcome semantics; what the class gives up — durable outcome lookup, idempotent retry joining, result resume, replay evidence, and exactly-once delivery — is part of the declared class contract, not an implementation weakness. The class is strict-serializable by construction: it is a visible-endpoint read whose acknowledgement discipline satisfies §7.1's real-time condition, and that claim is stated with its own differential oracle against the durable read path, never inherited by analogy. Sampled Sextant decision-card/propensity evidence is emitted on this path under a registered sampling policy so calibration coverage survives on the hottest read surface.Registry citizenship is complete:
command_type_classification.tomlrows for the non-ordered admission types, the Appendix DSnapshotQueryframe family, theAnswerContractbehavior row above, and the amended FG-INV-04/FG-INV-20 clauses registered in Appendix F. §17's point-read and 1-hop gate rows measure exactly this class; the durable classes carry their own Appendix G command/entry/barrier budget rows.Internal
ReplayManifestObjectIds are never wire selectors.ReplayPublicHandleRecord<Role:AuthorityOwningRole>is state-shaped:Active{authority_bound_header:AuthorityBoundHeader<Role>,replay_handle:OpaquePublicNonce,manifest_ref:StrongRef<ReplayManifest>,disclosure_contract_digest,handle_generation,created_at_role_command_seq}|Revoked{terminal_authority_commitment:TerminalAuthorityCommitment<Role>,replay_handle,terminal_generation,revocation_commitment}|Expired{terminal_authority_commitment:TerminalAuthorityCommitment<Role>,replay_handle,terminal_generation,expiry_evidence_commitment}. Terminal arms retain no manifest, executable/archive evidence, replay bytes, verifier, or live authority edge. It is indexed byReplayRegistry; every active use reauthorizes the opaque handle and emits only a typedPublicReplayManifestProjectionthrough the artifact-output registry. Replay execution is separate:ReplayExecutionIndex<Role>uniqueness-serializes its request andReplayExecutionRecordowns execution state under its own full header. Its query output uses the ordinary result owner armReplayExecution{registration_ref,publication_applied_ref}, result manifest, independent retention, resume, ACK, and release machinery—never an ad hoc stream or the artifact-output registry. Public replay evidence contains commitments only and cannot expose a DP seed.Wire-safe public types. Incoming graph selection is
WireGraphReferenceSpec {client_binding_ordinal,graph_selector,branch_selector,system_time_selector,valid_time_selector,required_public_schema_contract}. Every opaque value is built underPublicProjectionDomain {database_security_namespace_id,cluster_incarnation,service_visibility_epoch,posture,principal_scope_commitment,non_widenable_authority_commitment,projection_key_epoch}.PublicHandle<Kind>is a pre-minted random 128-bit nonce plus a domain-separated MAC over domain/kind/nonce; it is never derived from an ObjectId, marker, counter, name, or low-entropy hidden fact.PublicStateToken<Kind>is a separately pre-minted random CAS nonce plus the same scoped MAC for one externally addressable state transition; it is not a serialized internal generation/version.OpaquePublicCommitment<Kind>isPRF(projection_key, "fgdb:opaque:" || domain || kind || per_subject_random_salt || canonical_internal_subject_commitment)and therefore cannot be used as an offline dictionary or cross-principal/cross-epoch correlation oracle. Replay retains the exact bytes and verifier-key floor; key rotation never recomputes a live public token.The sole portable field-declassification proof is
PortablePublicDisclosureReceipt {receipt_version,projection_domain_commitment,disclosure_profile_oid,stable_projection_subject_commitment,allowed_public_field_bitmap,receipt_free_projection_digest,signer_id,signing_key_id,signer_epoch,signature}. Its signature covers every preceding field and the digest of the receipt-free projection body, never itself. It contains no session/Ready binding, local reference, state root, topology identity, policy/revocation counter, or internal position, so frozen bytes survive reconnect and compaction. The laterPublicFrameSendGuardseparately binds those stable bytes to the current Ready/session/auth generation immediately before write.The closed public projections are posture-tagged and noninterchangeable:
PublicMarkerProjection = Local|Sharded{handle:PublicHandle<Marker>,commitment:OpaquePublicCommitment<Marker>,disclosure:Opaque|Disclosed{public_comparison_domain:PublicHandle<CommitComparisonDomain>,public_ordinal,receipt}};PublicLogicalPositionProjection = Local|Sharded{handle:PublicHandle<LogicalPosition>,commitment:OpaquePublicCommitment<LogicalPosition>,disclosure:Opaque|Disclosed{axis:LocalLogical|GlobalLogical,public_comparison_domain:PublicHandle<LogicalComparisonDomain>,public_ordinal,receipt}};PublicSnapshotProjection = Local|Sharded{snapshot_handle:PublicHandle<Snapshot>,snapshot_commitment:OpaquePublicCommitment<Snapshot>,logical_position:PublicLogicalPositionProjection,normalized_valid_time_projection,selector_echo_commitment,receipt:None|Some{PortablePublicDisclosureReceipt}}; andPublicResultOwnerProjection = Local|Sharded{owner_handle:PublicHandle<ResultOwner>,owner_commitment:OpaquePublicCommitment<ResultOwner>,disclosure:Opaque|Disclosed{owner_class:TerminalRead|AutocommitWriteTerminal|Statement|DpResult|ReplayExecution,receipt}}. A disclosed ordinal exists only in a registered public comparison domain/epoch with an authenticated server-side map and retention floor; otherwise v1 emits Opaque.Digest projections have distinct wire tags and transcripts:
PublicEffectProjection,PublicPublicationProjection,PublicResultDigestProjection, andPublicOutputDigestProjectionare eachOmitted{commitment:OpaquePublicCommitment<ExactKind>}|Disclosed{digest_of_authorized_public_bytes,receipt}. A disclosed digest is recomputed from the registered authorized public transcript, never copied from an internal final-effect, publication-chain, result-manifest, or storage digest; cross-kind substitution fails decoding.PublicReasonProjectionisOpaque{coarse_class:OperationDidNotComplete,reason_commitment:OpaquePublicCommitment<Reason>}|Disclosed{public_reason_code:RegisteredPublicReasonCode,reason_commitment,receipt}.protected_error_classes.tomlmaps every hidden constraint/existence/authorization cause to the Opaque arm unless the receipt permits one exact public code, with padded byte/timing classes and differential noninterference tests.StablePublicReasonClassand genericPublicDigestProjectionare invalid types.PublicEffectiveSnapshotSetis{set_handle:PublicHandle<SnapshotSet>,sorted_bindings[{client_binding_ordinal,graph_binding_handle,branch_handle,effective_snapshot:PublicSnapshotProjection}],set_commitment};PublicRywFloorSetis{set_handle:PublicHandle<RywFloorSet>,visibility_floor:PublicLogicalPositionProjection,sorted_branch_floors[{client_binding_ordinal,graph_handle,branch_handle,head:PublicMarkerProjection}],set_commitment}. Arrays are unique and sorted by client binding ordinal. Outgoing graph selection isPublicGraphBindingProjection {public_binding_role_id,graph_handle,branch_handle,effective_snapshot:PublicSnapshotProjection,public_schema_contract_digest,disclosure_decision_digest}; normalized valid time has exactly one owner inside the snapshot.PublicMarkerSelectoris a capability-safe handle plus expected marker commitment backed by the server's retained mapping/floor; a display commitment alone cannot select a merge basis.Signed/random public artifacts are prebuilt, never invented by deterministic apply.
TerminalPublicProjectionBundle<Role>is{role,internal_terminal_descriptor_digest,authority_bound_header:AuthorityBoundHeader<Role>,receipt_free_terminal_core,receipt_free_projection_digest,portable_disclosure_receipt,frozen_public_progress_bytes,frozen_terminal_outcome_bytes,prebuilt_result_capability_commitments[],prebuilt_read_your_writes_issuance_ref?,original_response_commitment,bundle_digest}. It remains a byte-owning, capability-gated live object even though its internal subject is terminal, so aTerminalAuthorityCommitmentis insufficient until later compaction removes every protected byte and replay promise. The non-self-referential response commitment covers version, frozen terminal core, and listed prebuilt capability commitments, excluding itself and later audit/send evidence.NeverRegisteredPublicProjectionBundle<Role>andMergePublicProjectionBundle<Role>use the same shape with their exact internal subject. Construction is internal subject + pre-minted handles/salts -> receipt-free public body -> digest -> signed portable receipt -> frozen bytes -> bundle -> semantic completion/publication input. Apply only byte-matches and installs. Detailed values and compact summaries retain/copy the same frozen bytes and receipt; current authority either permits them exactly or returns uniformNotVisibleOrUnknown, never recomputes a redacted variant.ReadYourWritesSubjectBasis<Role>isLocal{registration_ref,terminal_marker_ref:StrongMarkerRef,exact_visible_logical_floor,sorted_written_branch_heads[StrongMarkerRef],retention_floor_ref,authority_bound_header:AuthorityBoundHeader<Local>,public_floor_set_digest}|Meta{registration_ref,terminal_global_marker_ref:StrongMarkerRef,exact_visible_global_floor,sorted_written_branch_heads[StrongMarkerRef],retention_floor_ref,authority_bound_header:AuthorityBoundHeader<Meta>,public_floor_set_digest}.ReadYourWritesIssuanceBundle<Role>owns that basis, onePublicRywFloorSet, the prebuilt capability replay record/canonical bytes, and their byte-match proof. A RYW capability therefore has an exact internal wait/retention subject even when every public position is opaque.wire_types.tomlmaterializes noninterchangeable aliases includingPublicTxnHandle,PublicRegistrationHandle,PublicResultDeliveryHandle,PublicArtifactOutputHandle,PublicCursorHandle,PublicBaselineHandle,PublicDeliveryLeaseHandle,PublicMergeHandle,PublicAuditSubjectHandle,PublicErrorDeliveryHandle, and matchingPublicStateTokenkinds for ownership, delivery, cursor, artifact, error, staging, workspace, and capability lineage. Appendix D's short field labels denote these exact aliases; raw internal identities/generations are never implied. Numeric chunk ordinals, delivery sequence within one disclosed cursor, statement request ordinal, and flow-credit counters remain public protocol counters.ProofBodyis the closed unionRawCommitMembership|RawContiguousRange|FilteredMembership|FilteredCompleteness|ReplayProjectionVerification|OutputDigestVerification, each with a registered version, bounds, authorization rule, and verifier—there is no generic payload arm. FGP FEC usesPublicFecTransferDescriptorand channel-exporter-authenticatedWireFecSymbolRecord; at-restSymbolRecord, CiphertextId, EncodingId, PlacementDescriptor, object DEK, and placement metadata are forbidden wire types. G0 rejects any protected frame containing ObjectId, any reference tag, WeakMarkerIdentity, GraphReferenceBinding, CoordinateSchemaBinding, DerivedIdentity, raw internal counter/frontier/generation, ReplayManifest, or storage-symbol type. A generated taint checker proves every wire path passes an exact projection constructor and fresh send guard. -
HTTP/2 + gRPC + WebSocket (asupersync http): query endpoint, subscription streams, health/metrics, bulk import/export endpoints (multipart or ATP bonded pull).
-
Bolt-compat subset (
fgdb-bolt):BoltCompatProfileV1is an explicit negotiated downgrade: read-only autocommit and read-only explicit transactions only; every RUN is server-classified ProvenReadOnly before graph access; no writes, subscriptions, CDC, export, replay, proof, FEC, factorized frames, capability presentation, or authority refresh. Bolt RECORD bytes use the ordinary read/audit/send guards and independent result retention. Socket success and final SUCCESS are not ACKs. Authenticated DISCARD or RESET creates one exact Bolt-source client-release receipt per addressed published result; transport loss creates none, so otherwise output survives to profiled expiry even though Bolt cannot resume it. Unsupported semantics fail with stable documented divergence. Adapter conformance compares only the common supported surface, and the negotiated profile is published in READY/metadata.BoltCompatProfileV2is the registered 1.x (post-G4) write profile — normative now in shape, a post-1.0 workstream in implementation. openCypher write clauses are admitted through the ordinary bind-time mutation classification: every RUN resolves a server-derivedCanonicalStatementClassificationat bind, exactly like every other surface, instead of being required to prove ProvenReadOnly. Bolt explicit and autocommit write transactions map onto the W10 transaction machines with no Bolt-private lifecycle; Bolt bookmarks are realized as §14.3ReadYourWritesCapabilityvalues — issued at commit, accepted as visibility floors — so bookmark causality is honored semantically rather than imitated; COMMIT SUCCESS for Required-audit work is ordered after the audit-visibility advance, never before it. The documented stable divergences: a lost COMMIT response is an unknown outcome (the Bolt surface carries no reattach, resume, or outcome re-query — matching the official drivers' own behavior); no procedure surface beyond the registered UDF/module set; no APOC. Server error causes map throughprotected_error_classes.tomltoNeo.ClientErrorcodes, so hidden constraint/existence/authorization causes do not leak through the compatibility surface. The profile is a bounded versioned subset with an explicit divergence registry, never a drop-in-Neo4j claim;BoltCompatProfileV1's read-only downgrade remains the sole 1.0 profile, and V2's conformance gate — openCypher TCK write scenarios plus the §15.4 differential corpus — is its own registered post-1.0 workstream in §19's platform and compatibility roadmap. -
QoS and admission separates ephemeral runtime reservations from durable quota state. A hierarchical
ResourceVector { cpu_ns, resident_bytes, temp_bytes, durable_bytes, read_iops, write_iops, egress_bytes, output_bytes, output_rows, snapshot_age, branch/index/view/subscription counts, subscription_backlog }is reserved before transient work and released by obligation. Durable bytes/branches/indexes/views/subscriptions/history are enforced by an authoritative Chronicle-sequencedResourceLedgerState; every create/grow/delete/expiry carriesResourceReservationIdplus canonicalResourceChargeEffect/release in the same final capsule as the durable object change (§5.2). Concurrent sessions therefore serialize quota validation with publication, and crash recovery replays charge and object atomically. Maintenance has protected emergency reserves. Hedging is allowed only within ephemeral reservations and never chooses strict logical order by wall-clock race; DP work forbids independent hedges. -
Formats and migration (
fgdb-formats) import the declared fnx/CSV/JSONL/Parquet-lite profiles under explicit size, recursion, schema, and decompression limits. The export surface additionally emits Arrow IPC stream bytes written in-house — §1's closed dependency universe bans thearrowcrate, not the wire format, so the writer carries its own minimal FlatBuffers emitter, priced like the Parquet-lite reader — as a deterministic projection of canonical result rows/columns attached toDurableArtifactOutputKind=Exportand the HTTP bulk export endpoints. Logical result identity is unchanged: the canonical logical-result encoding remains the digest target, and Arrow IPC bytes are a registered projection format contract — apublic_format_contract_oidvalue whose deterministic emission from the canonical rows is golden-vector tested — never a second logical identity. An ADBC driver (fgdb-adbc) ships as a C-ABI packaging crate at the same boundary asfgdb-python; engine crates gain no new dependency. A.fgdbarchive is a signedBackupManifestplus exact root/head, object inventory, base dependencies, key wraps, format/profile epochs, and transparency checkpoint. Decode proofs alone do not establish backup completeness or semantic validity (§16).ArchiveReadOnlyOpenis the registered open class that serves single-file dataset distribution:fgdb::Database::open_archive(path)and the equivalentfgdbdmount open a.fgdbarchive directly. The open path verifies the signedBackupManifest, object inventory, and transparency checkpoint with the same independent verifying-reader machinery that backsBackupArtifactReopenProof, reusing the restore staging/validation machinery in read-only mode rather than introducing a second opener, and then exposes the archived root strictly read-only: no incarnation takeover, no writer, no service promotion, and no service-promotion receipt is minted, so the posture is explicitly labeled in READY/status surfaces and structurally cannot impersonate an Operational database. Decryption rides the archive's recipient key wraps under the archive's own escrow policy; the audit classification of archive reads is explicit under FG-INV-20/FG-INV-04, never inherited by analogy; and anything outside the archived closure fails closed with a typedHistoryUnavailable-class refusal, never a partial result. Because read-only media cannot create lease inodes, the §5.3 snapshot-lease machinery runs under a registered read-only filesystem-profile variant whose pinning discipline is profile-registered rather than improvised per open. The open-class, posture, and filesystem-profile-variant registry rows are reserved in the §19 G0 decision batch. -
Deterministic extensibility: replicated/apply/merge logic is limited to validated Datalog or the fuel/memory/stack-bounded deterministic bytecode VM with mediated authority and pinned arithmetic. Native Rust procedures remain embedded-host extensions and are categorically barred from replicated logical effects, merge/apply, constraints, and replay-guaranteed queries; a conformance test cannot prove arbitrary native code deterministic. Native read procedures receive authorized views and are labeled external nondeterminism unless their outputs are excluded from strict replay.
-
CDC export sends canonical committed logical deltas with stable idempotency tokens and at-least-once delivery. Raw global feeds may attach contiguous-range proofs; filtered feeds label membership versus completeness exactly as §5.8 requires. External sinks provide their own transactional/idempotent boundary.