FrankenGraphDB

Warden: Security & Governance

6,312 words8 subsectionsA design document: it describes the 1.0 target, not what runs today.

On this page8
12.1 Threat and authority model12.2 Token lifecycle and restricted policy IR12.3 Enforcement is a mandatory access type12.4 Derived state, caches, and errors12.5 Encryption and key lifecycle12.6 Leakage and redaction12.7 Differential privacy12.8 Audit

12.1 Threat and authority model

The trust matrix distinguishes untrusted clients, mutually hostile tenants, honest-but-curious storage, crash-fault replicas, malicious/stale donors, independent transparency witnesses, trusted embedded host code, and a compromised operator/server. The baseline trusts the executing database process and active key boundary to enforce plaintext confidentiality and policy; a compromised server process can exfiltrate data it can decrypt, and this plan claims no TEE/Byzantine-confidentiality magic. Witnessed transparency/audit may detect only their scoped history/administrative attacks, not undo disclosure. Ordinary Raft tolerates crash faults, not Byzantine replicas. Every deployment profile declares actors, protected assets, assumptions, and out-of-scope failures before selecting a claim.

Stable identities include TenantId, PrincipalId, IssuerId, TokenId, DatabaseId, SecurityPolicyEpoch, RevocationIndex, DecisionPolicyEpoch, and KeyEpoch. The security and adaptive epoch types have distinct wire tags and Rust newtypes and are never comparable or substitutable. EffectiveAuthority binds tenant/subject/issuer/audience, database security namespace and cluster incarnation, token/security-policy epochs, current revocation index, operation classes, graph/branch/label/edge/property/system-field/temporal scopes, procedure/UDF/module ObjectIds and invocation mode, external-I/O classes, Replay evidence/resolver closure, redaction profile, and resource ceiling. Operation classes are Read, Mutate, Ddl, Subscribe, Analytics, Replay, ExecuteProcedure, InstallModule, ExternalIo, Export, Backup, Restore, Observe, Admin, KeyManage, Replicate.

12.2 Token lifecycle and restricted policy IR

Macaroons follow Issued -> Active -> Attenuated -> Revoked|Expired. Root issuance creates exact portable MacaroonTokenBytes {format_version,root_header:{issuer_id,mac_key_id,mac_key_epoch,root_issuance_sequence,root_issuance_receipt_digest,root_token_id,time_authority_profile_oid,root_not_before,root_expires_at,audience,database_security_namespace_id,cluster_incarnation,service_visibility_epoch,tenant,subject,security_state_binding_public_commitment,root_non_widenable_authority_ceiling_commitment,root_caveats,attenuation_semantics_oid,presentation_binding:ServerInternal|SessionBound{session_binding,auth_generation}|ChannelBound{transport_exporter_digest}},attenuation_chain[{prior_authenticator_digest,narrowed_not_before?,narrowed_expires_at?,authority_scope_intersection?,resource_scope_intersection?,additional_caveats,presentation_binding_restriction?,authenticator}],effective_projection,final_mac}. root_token_id = H("fgdb:macaroon-root-token:v1",issuer_id,mac_key_id,mac_key_epoch,root_issuance_sequence,root_issuance_receipt_digest) is immutable and is the RevocationSubject::Token identity; attenuation never creates a new token ID. Every link MACs the prior authenticator, retains the complete root tuple/profile/cohort, may only raise the effective not-before, lower the effective expiry, intersect authority/resource scopes, append accepted caveats, and preserve or further restrict presentation binding. It cannot extend time, change authority domain, widen disclosure, move cohorts, or change Session/Channel binding to a less restrictive class. The derived effective projection is verified from the immutable root plus complete chain and is never trusted as an independent authority input. Each online issuance/replay record retains its exact AuthorityBindingRef; offline root issuance is allowed only from a non-exportable counter-backed issuer-key epoch and is covered by the fenced cohort/retirement machinery in §16.6. A post-fence attenuation of an already issued root remains legal and is accounted for by that cohort; minting a new root after the issuer-epoch fence is not. An AuthorizationLease is a short-lived, authority-leader-signed capability binding token ID, AuthorityBoundHeader, non-widenable ceiling, consensus/leader epoch, profiled window, permitted snapshot/read scope, disclosure ceiling, and the same exact presentation-binding union. Signatures/MACs cover the complete binding commitment and window. Long queries/streams reauthorize before lease expiry or a security-boundary observation; unsent output is discarded on failure. Maximum TTL is the explicit revocation-enforcement bound.

Every root mint, online or offline, returns MacaroonRootIssuanceReceipt {issuer_id,mac_key_id,mac_key_epoch,root_issuance_sequence,root_header_without_receipt_digest_commitment,issuer_counter_before,issuer_counter_after,issuer_epoch_state:ActiveForRootIssuance,time_authority_profile_oid,issued_at:AuthorityInstant,signer_set_epoch,signatures}. The receipt is constructed before final token bytes; its canonical digest enters the root header, and the token MAC covers that digest. The counter must advance by exactly one with checked arithmetic. Exact retry for the same request returns the same receipt/token; a reused sequence with different root bytes, a fenced issuer epoch, or an absent receipt is invalid.

Graph caveats compile to a versioned, deterministic, total, resource-bounded PolicyIr, not arbitrary GQL. It may express bounded label/type/property/system-field masks, scalar predicates, branch/time bounds, operation/resource limits, and finite allow-lists of procedure/UDF/module ObjectIds and invocation modes. Policy evaluation never invokes those modules; it excludes arbitrary recursion, procedure calls, nondeterministic functions, and unbounded path evaluation. A policy-version ObjectId identifies semantics permanently. Old evaluators remain available for retained tokens or issuance is explicitly migrated/revoked—CI cannot enumerate hypothetical offline macaroons and pretend to prove semantic compatibility.

SecurityStateBindingRecord is independently addressable and role-closed: common {database_security_namespace_id,cluster_incarnation,service_visibility_epoch,security_policy_epoch:SecurityPolicyEpoch,revocation_index:RevocationIndex,body_digest} plus exactly one arm. Local{policy_root_ref:StrongRef<SecurityPolicyRoot<Local>>,revocation_root_ref:StrongRef<RevocationRoot<Local>>} and Meta{policy_root_ref:StrongRef<SecurityPolicyRoot<Meta>>,revocation_root_ref:StrongRef<RevocationRoot<Meta>>} contain only same-group roots. ShardProjection{shard_id,active_meta_projection_ref:StrongRef<ActiveMetaProjectionRoot>,policy_projection_root_ref:StrongRef<ShardPolicyProjectionRoot>,revocation_projection_root_ref:StrongRef<ShardRevocationProjectionRoot>,meta_projection_certificate_ref:CertifiedRemoteStrongRef<MetaSecurityProjectionCertificate>,projection_slot_identity,projection_digest} contains only shard-owned projection roots plus the certified adoption evidence; it cannot encode a raw SecurityPolicyRoot, RevocationRoot, or other Meta object. ShardSecurityStateProjection is the exact reusable value {binding_ref:StrongRef<SecurityStateBindingRecord<ShardProjection>>,binding_digest,security_policy_epoch,revocation_index,projection_slot_identity,projection_digest}; SecurityStateBinding is the closed Local{binding_ref:StrongRef<SecurityStateBindingRecord<Local>>,binding_digest,security_policy_epoch,revocation_index}|Meta{binding_ref:StrongRef<SecurityStateBindingRecord<Meta>>,binding_digest,security_policy_epoch,revocation_index}|Shard{projection:ShardSecurityStateProjection}. Repeated scalars are navigation projections and must byte-match the authenticated role arm; they never replace either root or projection. Permits, admissions/releases, authorization leases, prepared/final-certification work, derived identities, plan/replay certificates, result promises, DP requests, descriptor projections, and cache keys bind the complete role-valid value. Any older compact rendering that spells only policy_epoch,revocation_index, any shard object that imports a raw Meta policy/revocation ref, or any role-erased binding is non-normative and G0-invalid. Mutation tests substitute equal scalars with different roots, equal roots with different scalars, foreign shard projections, wrong projection slots/certificates, and stale service epochs.

PolicySemantics is {policy_id,version,policy_ir_ref:StrongRef<PolicyIr>,policy_ir_semantics_oid,evaluator_artifact_ref:StrongRef<PolicyEvaluatorArtifact>,scalar_profile_oid,unicode_and_collation_profile_oids,allowed_operation_classes,resource_ceiling_semantics,disclosure_contract_set,body_digest}. The evaluator artifact is deterministic, total, fuel/memory bounded, and byte-matched to the semantics OID. SecurityPolicyRoot is {format_version,database_security_namespace_id,cluster_incarnation,role:Local|Meta,generation,security_policy_epoch,scope_assignment_root,accepted_semantics_root,active_issuance_map_root,retention_floor_ref:StrongRef<SecurityPolicyRetentionFloor>,applied_transition_index_root,body_digest}. Entries are Candidate|ActiveForIssuance|RetainedForVerification|RetiredTombstone; every scope has exactly one Active issuer or explicit DenyAll.

SecurityPolicyMutationBody is exactly Publish{scope,semantics_ref,expected_absence}|Activate{scope,new_semantics_ref,expected_prior_active_semantics,move_prior_to_retained:true}|RetireVerifier{scope,semantics_oid,policy_retirement_proof_ref}. PolicyTransitionSpec is {transition_id,expected_before_root:WeakStateIdentity,expected_before_root_digest,expected_security_policy_epoch,mutation_body_ref:StrongRef<SecurityPolicyMutationBody>,candidate_after_root_ref:StrongRef<SecurityPolicyRoot>,admin_authorization_ref:StrongRef<AuthorizationDecisionRecord>,terminal_audit_gate}. Admin authorization is evaluated solely under the before binding; the candidate cannot authorize itself. The candidate root must equal exact deterministic application with checked epoch increment. SecurityPolicyRetentionFloor retains every semantics/evaluator used by a live token, lease, capability, prepared/finalized operation, derived object, result promise, replay manifest, audit proof, or historical authorization. PolicyRetirementProof requires generated zero-live-reference evidence plus revocation of every issuing key/epoch or profiled time beyond the maximum legal offline-token window; local scanning alone cannot prove offline tokens absent.

RevocationSubject is Token{issuer_id,token_id}|DurableCapability{capability_kind,capability_commitment}|IssuerKeyEpoch{issuer_id,key_id,through_epoch}|PrincipalCredentialEpoch{tenant,principal,through_epoch}|PolicySemantics{semantics_oid}. Revocation is monotone; restored access requires a fresh subject/epoch. RevocationRoot is {format_version,database_security_namespace_id,cluster_incarnation,role:Local|Meta,generation,revocation_index,subject_set_root,issuer_minimum_epoch_root,principal_minimum_epoch_root,applied_transition_index_root,body_digest}. RevocationMutationBody is AppendSubjects{nonempty_sorted_unique_subjects,reason_class}|AdvanceIssuerMinimumEpoch{issuer_id,key_id,expected_before,after}|AdvancePrincipalMinimumEpoch{tenant,principal,expected_before,after}. RevocationTransitionSpec has the same before-root, candidate-after-root, before-root admin authorization, idempotency, and audit fields as the policy transition; it advances RevocationIndex once per nonempty command and can never remove/weaken an entry.

Local LogicalStatePayload contains policy_root_ref:StrongRef<SecurityPolicyRoot> and revocation_root_ref:StrongRef<RevocationRoot> adjacent to scalar cross-checks; Meta's roots have the same exact types. Shards own ShardSecurityProjection {source_global_prefix,security_policy_epoch,revocation_index,policy_projection_root_ref:StrongRef<ShardPolicyProjectionRoot>,revocation_projection_root_ref:StrongRef<ShardRevocationProjectionRoot>,complete_scope_coverage_bitmap,certificate_commitment} installed only through the exhaustive typed Meta projection protocol, never a raw Meta ref. Checkpoint vectors, floors, mandatory inventories, backup/restore, activation, GC, verifier retirement, and replay cover both roots and retained semantics. Historical graph reads still validate current security state. Same-identity restore reconciles it before service; a clone receives a new security namespace. Tests reject root/scalar mismatch, role/prefix substitution, self-authorization, concurrent stale roots, every revocation subject, premature evaluator retirement, stream-chunk races, final-certification versus later output denial, rollback/restore/activation, raw Meta substitution, and DecisionPolicyEpoch/SecurityPolicyEpoch type confusion.

12.3 Enforcement is a mandatory access type

Only fgdb-secure-view can construct AuthorizedSnapshot, AuthorizedCursor, AuthorizedGraphView, AuthorizedMutation, AuthorizedMutationPermit, and AuthorizedDerivedState; W1's verifier is the sole permit constructor behind that facade. Fabric, Loom, Ripple, Beacon, Prism, UDFs, backup/export, observability, and constraint reporting cannot obtain raw Strata cursors or unscoped commit submission. Planner pushdown is an optimization atop this boundary, not the authorization root. The coordinator independently verifies the permit and final-effect authorization as §5.2 requires, so a forged internal call cannot bypass policy merely by reaching a lower crate.

Authorization occurs before retrieval/statistics/ANN traversal/expansion and both before and after mutation. Hidden-state constraints require an explicit ConstraintDisclosureContract: CompleteDomainAuthority (the mutator may observe the entire constrained domain), AuthorityPartitioned (integrity is defined independently inside a tenant/authority partition), or ExplicitConflictDeclassification (a narrowly scoped capability deliberately releases one padded conflict bit, with audit ticket, rate limit, and no conflicting identity/value). A blind writer without one of these contracts is rejected before probing; error redaction cannot make global uniqueness and zero-disclosure coexist. The remaining contract covers hidden-edge cascades, property/provenance/embedding masks, invoker-versus-definer view rights, subscription reauthorization, capability-safe conflicts and certificates, branch merge, system graph, backup/restore, and descriptor masking so hidden edges cannot affect visible degree. Every API and operator declares permitted declassifications and has a noninterference row plus cross-capability differential tests.

Descriptor masking is an enforced object, not a cursor convention. Only fgdb-secure-view may construct DescriptorVisibilityProjection {authority_bound_header:AuthorityBoundHeader<Role>,graph_reference_binding,snapshot_identity,canonical_visible_descriptor_keys,per_descriptor_predicate_digests,degree_mode:ExactAuthorityPartition{visible_count_index_ref:StrongRef<AuthorizedVisibleCountIndex>}|FilteredScanRequired,projection_digest}. The permit, access admission, AuthorizedSnapshot, witness/routing basis, plan certificate, cache key, and release decision bind that digest and exact authority record. An ExactAuthorityPartition count is usable only when authority partition/predicates match; otherwise degree uses authorized filtered scan. Hidden descriptors/rows affect no visible enumeration, cardinality, routing, plan/error/timing/statistics/cache fact. Differential tests compare hidden-vs-physically-removed databases.

12.4 Derived state, caches, and errors

One canonical type keys every persisted or reusable derived object:

DerivedIdentity { authority_bound_header:AuthorityBoundHeader<Role>, kind, definition_oid, source_coverage:sorted Vec<DerivedSourceCoverage{input_role_id,source_relation_id,base_binding:CoordinateSchemaBinding,tracking_mode:Fixed|Advancing,lineage_digest}>, global_batch_frontier?, topology_epoch,language_contract_oid?,semantic_profile_oid,scalar_profile_oid,collation_profile_oid?,redaction_profile_oid,build_profile_oid }. Equal epoch/digest scalars under another policy/revocation root cannot share an identity or cache/build generation.

Fields irrelevant to a kind are explicit canonical None, never ambient defaults. View, index, statistics, subscription, plan/result cache, DerivedGenerationRegistry, certificate, and replay schemas embed this exact identity or its digest plus a strong reference to the identity object. A lookup must match all fields before applying an explicitly registered tail/rebuild rule; no singular graph/head/schema key may stand in for a coordinate set. Derived objects carry an AuthorityReuseLaw, not a bare subset slogan. Row-complete raw caches may derive a narrower domain only through an authorization-preserving projection that also masks metadata. Aggregates, cardinalities, sketches, BM25 statistics, DP results, and constraint outcomes require exact-domain state or a proved sufficient decomposition; HNSW/graph-routing topology requires exact authorized topology or a separately proved filter-aware construction. Definer views pin definer authority plus result-exposure policy; invoker state is authority-partitioned. Revocation or incarnation advance removes reachability even if bytes remain cached. Hardened errors use bounded capability-safe classes; plans, abort reports, witnesses, timing padding, and telemetry are redacted before crossing the boundary.

12.5 Encryption and key lifecycle

Logical, ciphertext, FEC-encoding, and placement identities are defined separately in §5.1. One random object DEK encrypts one CiphertextId; that ciphertext may have several EncodingId FEC realizations. Sharing adds recipient/database/branch/replica/backup wraps rather than re-encrypting the object. Branch sharing and handoff use only §5.6/Appendix A's typed envelope DAG: fork atomically closes and rotates both parent envelope/write epochs, every object-DEK wrap binds its source epoch and creation boundary, and a recipient grant opens one exact rooted/cut closure. A bare KEK, ambiguous branch DEK, or inherited still-active parent epoch is invalid. CryptoCx obtains production entropy independently of deterministic replay seeds, and secret entropy is never exported in incident bundles. Local data-key states are Generated -> Active -> Retiring -> RetainedDecryptOnly -> DestroyPending{quarantine_generation,target_set_digest} -> DestroyedPendingCertificate -> Destroyed; token/signing revocation is separate. RetainedDecryptOnly forbids new encryption/wrap grants but opens every reachable object. KeyDestroyProposal proves an exact typed root/configuration/backup/legal-hold scan and its applied command atomically installs DestroyPending as a no-new-reference quarantine plus one durable idempotent requested operation for every and only planned KMS/HSM/storage target before any physical call. Every encoder, prepared owner, backup, grant, configuration proposal, and root publisher rejects a new retaining use of the quarantined key. Recovery queries/retries each same operation ID; process death never invents another request or treats timeout as success. KeyDestroyFinalizeSpec recomputes the complete generated inventory against the exact current payload/root slots/configuration and consumes an authenticated one-to-one target/receipt set; it creates a compact result and DestroyedPendingCertificate. After that result and its audit visibility advance exist, a quorum may sign a certificate, and a distinct ordered certificate-publication command alone selects final Destroyed. Heavy scan/proposal/finalize closure retires only after certificate publication, both required audit visibility advances, and an activated cut, while the compact result/receipt commitment/certificate remains. No pre-order object names its future result or certificate. The crypto contract also pins algorithm agility, nonce/SIV mode, AAD digest, passphrase KDF parameters, KMS/HSM mode, rotation, zeroization, replica provisioning, backup escrow, signing-key rotation, and crypto-erasure limits.

Cryptographic primitives require published vectors, constant-time/side-channel testing, misuse tests, independent expert review, and a release-blocking external audit. Where an audited foundation primitive exists, it is preferred. “Built in-house” never means unaudited cryptography is accepted merely because functional vectors pass.

12.6 Leakage and redaction

Timing/cardinality/error leakage is acknowledged. Padding, quantization, pools, and bounded errors are mitigations. Any mutual-information or channel-capacity result is a deployment-specific StatisticalClaim naming secret distribution, attacker observations, concurrency assumptions, padding schedule, sampling design, confidence bound, and identity-level cumulative budget; adversarial CI fixtures do not prove universal noninterference or a global bits/query ceiling.

Targeted erasure. The governance surface answers "erase this subject from history" with two composable mechanisms, both ordered, both audited, neither silent. Semantic erasure is the ordered ErasureCutSpec control command — one registered command_contracts.toml row and command_type_classification.toml classification, carrying its own terminal audit gate — whose apply installs a permanent ErasureTombstone scoped to one explicit erasure domain in the closed union SubjectKey{subject_key_domain_contract_oid,subject_key_commitment}|ElementSet{sorted_element_identities}|PropertySlotSet{sorted_schema_coordinate_slots}; the SubjectKey arm is inhabitable only under a declared SubjectKeyDomainContract. The tombstone is an additional visibility conjunct: §5.3's version-visibility predicate and FG-INV-04's visibility clause gain an erasure clause, honored across every tier, every branch head, and every time-travel/valid-time selector within retention — an AS OF read below the cut observes the tombstone exactly as a current read does, and distinct branch heads never disagree about an installed cut in their shared ancestry. A query that would observe erased data returns the typed Erased outcome — internally Erased{tombstone_ref}, projected on the wire without any local reference (at most an opaque tombstone commitment) per §13's wire-type law — exactly as a proved retention cut returns HistoryUnavailable — never a silent partial result — and the tombstone joins §5.4's effective floors as a permanent root, so no compaction, restore, fork, merge, or backup round-trip resurrects visibility.

Physical erasure follows under the installed tombstone. Live-tier bytes are rewritten by ordinary compaction: any rewrite of an object intersecting an active erasure domain drops the erased payloads from the successor object, and predecessor objects are reclaimed once ordinary floors and retention cuts release them; no new destruction primitive exists on this path. Where a contracted erasure latency shorter than the compaction/retention horizon is required, per-subject DEK-wrap domains exist only as schema-declared subject-keyed property slots: field-level encryption applied before canonical encoding under a declared SubjectKeyDomainContract that names the subject-key profile, covered property slots, per-subject wrap-chain derivation within §5.6/Appendix A's envelope DAG, and index/constraint posture — covered slots are opaque to indexes and constraints unless explicitly declassified through the existing disclosure contracts. Erasing a contracted subject is then exactly the staged destruction of its wrap chain through §12.5's staged destruction pipeline — proposal scan, DestroyPending quarantine, one-to-one target/receipt set, certificate publication — including the backup/legal-hold external-ack arms, so backup and archive erasure ride the existing key-release-ack machinery rather than a second destruction protocol. A blanket per-subject DEK at object granularity is rejected: sealed runs pack many subjects columnar, and the contract is a declared schema surface, never a default.

The consequences are stated, not implied. The audit chain is erasure-compatible by construction — §12.8 events bind commitments, never plaintext — so audit integrity and completeness claims survive payload erasure verbatim, and no erasure transition rewrites, truncates, or re-signs any audit object. Replay claims are scoped: a replay whose evidence closure intersects an erasure domain downgrades through the existing Redacted evidence-slot arm, and FG-INV-19 grades the manifest honestly rather than claiming byte identity over erased subjects. The registered erasure-obligation registry erasure_obligations.toml enumerates every derived surface an installed cut must reach — Beacon derived-index generations, Ripple view generations and §8.5's StatsSegments, §10's vector/FTS ingestion outputs, and independently retained delivered results, which otherwise legitimately survive to their profiled expiry — each row naming its generated walker and per-surface completion proof; a result-producing or derived-state surface without a row fails closed at registry generation. Per-subject envelope cardinality is priced by §17's byte-economy metrics, and the domain-granularity policy — which subjects, slots, and tenants receive contracted sub-retention erasure — is a registered FG-CFG-class configuration decision, never an implied guarantee. The format arms — the visibility conjunct, the envelope-DAG wrap-scope arm, the SubjectKeyDomainContract schema contract, the registry rows, the tombstone floors, and the crash/restore matrices — are G0 decisions.

12.7 Differential privacy

DP is an explicit Warden authority class, not a label on an arbitrary aggregate. DpMechanismContract binds the neighboring relation, allowed fixed-shape query family, contribution/clipping bounds, sensitivity proof artifact, canonical output shape, seeded-noise algorithm, Rényi-debit derivation, observable timing/error/size contract, distributed-combination rule, implementation version, and proof/test manifest. RenyiAccountingProfile fixes an ordered finite grid of canonical rational orders greater than one, checked fixed-point amount encoding, exact addition/comparison/overflow rejection, epsilon/delta conversion, and per-principal/domain ceilings; floating composition, negative debit, saturation, or grid reinterpretation is invalid. Smooth-sensitivity mechanisms charge their declared parameters before access and compute data-dependent scale only inside charged execution—no sensitive prepass may choose the debit, mechanism, plan, or error.

Each population has a stable PrivacyAccountingDomainId spanning aliases/tokens, incarnations, same-identity restores, branches, and backups. DpClientNonceKey is the privacy-safe tuple {privacy_accounting_domain_id,privacy_principal_or_alias_domain_commitment,database_security_namespace_id,client_nonce}. Independently addressable DpRequestKey<Role:AuthorityOwningRole> binds {authority_bound_header:AuthorityBoundHeader<Role>,privacy_accounting_domain_id,privacy_principal_id,identity_alias_root_digest,logical_snapshot_identity,exact_wire_safe_graph_binding_set,normalized_bound_query_and_parameters,neighboring_relation,contribution_and_clipping_bounds,mechanism_contract_ref:StrongRef<DpMechanismContract>,renyi_accounting_profile_ref:StrongRef<RenyiAccountingProfile>,canonical_output_encoding}; the full header, privacy principal/alias domain, snapshot bindings, disclosure/answer ceiling, and mechanism scope must agree. Incarnation is provenance, not a budget reset. The nonce is deliberately outside this content key.

DpRequestNonceIndex<Role> permanently maps DpClientNonceKey -> Bound{request_key_digest,canonical_request_digest,prepare_applied_identity}|Spent{request_key_digest,charge_operation_id,debit_and_output_or_no_output_commitments}. DpTransitionSpec::Prepare atomically inserts or byte-matches that leaf before creating seed material; same nonce and identical request joins, while any changed query, parameters, snapshot, bindings, mechanism, accounting profile, authority, or output encoding returns a stable conflict before a charge request exists. The external registry maintains the same unique nonce map and atomically checks/inserts it with its charge tombstone, so rollback/restore or a compromised local retry cannot debit a second request under one nonce. Backup/restore, profile rotation, compaction, and GC retain permanent Spent commitments. Same bound key means one debit, one protected seed, and one canonical output.

DpSeedMaterial is the exact secret logical plaintext target {format_version=1,privacy_accounting_domain_id,request_key_digest,mechanism_contract_identity_and_digest,renyi_accounting_profile_identity_and_digest,noise_derivation_profile_oid,seed_bytes:[u8;32],body_digest}. seed_commitment = BLAKE3("fgdb.dp-seed-commitment.v1" || canonical(all fields except body_digest)); every derived draw uses BLAKE3_keyed(seed_bytes,"fgdb.dp-draw.v1" || request_key_digest || mechanism_contract_digest || draw_domain_tag || checked_draw_ordinal) and never consumes the runtime/lab replay seed. The object has one secret-classified logical_object_kinds.toml row, a maximum encoded size of 512 bytes, a registered BodyDigest/AAD transcript, deterministic public synthetic test vectors, mutation/cross-profile tests, and a fuzz decoder whose corpus contains no production entropy. Production seed_bytes may exist only in the nonspillable secret arena or authenticated ciphertext; it is redacted from debug formatting, metrics, audit payloads, errors, crashpacks, core-dump profiles, and decision cards, and is synchronously overwritten on every success/error/cancel/panic ownership path. Any platform-specific locked-memory or compiler-barrier implementation lives in the named unsafe-boundary ledger with a scalar safe fallback; inability to obtain the configured secret-memory profile fails before preparation rather than silently weakening it.

Before preparation, CryptoCx creates exactly one DpSeedEnvelope<Role:AuthorityOwningRole> {authority_bound_header:AuthorityBoundHeader<Role>,request_key_ref:StrongRef<DpRequestKey<Role>>,seed_profile_oid,entropy_source_profile_oid,seed_commitment,seed_ciphertext_ref:StrongCiphertextRef<DpSeedMaterial>,sorted_key_wrap_refs[StrongRef<DpSeedKeyWrap>],noise_derivation_profile_oid,mechanism_contract_ref,body_digest}. The header byte-matches the request and every opener/wrap scope. The plaintext is production entropy independent of lab/replay seeds; every draw is domain-separated. Public certificates contain only the seed commitment and authority public commitments.

External accounting is the sole irreversible debit authority. DpDebitDerivationCertificate<Role:AuthorityOwningRole> is {authority_bound_header:AuthorityBoundHeader<Role>,request_key_ref:StrongRef<DpRequestKey<Role>>,mechanism_contract_ref:StrongRef<DpMechanismContract>,renyi_accounting_profile_ref:StrongRef<RenyiAccountingProfile>,profile_grid_and_fixed_point_digest,principal_ceiling_basis_ref:StrongRef<PrivacyCeilingBasis>,neighboring/contribution/sensitivity commitments,derived_debit:RenyiDebitVector,derivation_checker_version,proof_artifact_ref,body_digest}. Every referenced basis byte-matches the one header and request. PrivacyChargeAuthorization is the portable signed {privacy_accounting_domain_id,privacy_principal_or_alias_domain_commitment,request_key_digest,canonical_request_digest,mechanism_contract_identity_and_digest,renyi_accounting_profile_identity_and_digest,maximum_authorized_debit,ceiling_basis_digest,authority_binding_public_commitment,security_state_binding_public_commitment,tenant_principal_ceiling_purpose_commitment,allowed_snapshot_graph_disclosure_and_answer_commitment,authorization_audit_commitment,time_authority_profile_oid,not_before:AuthorityInstant,expires_at:AuthorityInstant,signer_epoch,signature}. It contains no local StrongRef, policy root, revocation root, audit ticket, or SecurityStateBinding; the local charge operation record owns the exact request/certificate/decision and proves each public commitment. PrivacyRequestTombstoneLeaf is the minimal {nonce_key_digest,request_key_digest,canonical_request_digest,charge_operation_id,debit_digest,seed_commitment}; it stores no plaintext query/parameters/snapshot. Forensic detail is a separately encrypted, access-controlled, expiring record and is never retained merely by the permanent tombstone.

PortablePrivacyChargeRequest is the reference-free pre-effect {privacy_accounting_domain_id,client_nonce_key:DpClientNonceKey,canonical_request_digest,charge_operation_id,request_key_identity_and_digest,privacy_principal_and_alias_commitment,mechanism_contract_identity_and_digest,renyi_accounting_profile_identity_and_digest,profile_grid_and_ceiling_basis_digest,renyi_debit:RenyiDebitVector,debit_derivation_certificate_identity_and_digest,seed_commitment,request_tombstone_leaf_bytes_and_digest,authorization_bytes_and_digest,request_body_digest}; charge_operation_id depends on the stable nonce/key/contract/profile/debit/seed commitment, not a CAS attempt. Local PrivacyChargeOperationRecord<Role:AuthorityOwningRole> is {authority_bound_header:AuthorityBoundHeader<Role>,request_key_ref:StrongRef<DpRequestKey<Role>>,mechanism_contract_ref:StrongRef<DpMechanismContract>,renyi_accounting_profile_ref:StrongRef<RenyiAccountingProfile>,debit_derivation_certificate_ref:StrongRef<DpDebitDerivationCertificate<Role>>,request_tombstone_leaf_ref:StrongRef<PrivacyRequestTombstoneLeaf>,authorization_ref:StrongRef<PrivacyChargeAuthorization>,portable_request_ref:StrongRef<PortablePrivacyChargeRequest>,portable_request_digest,charge_operation_id,external_dispatch_operation_recipe,body_digest}. Every identity/digest in the portable request must byte-match its local owner. DpTransitionSpec::ArmCharge selects ChargeRequested and owns this exact operation record before a linear ExternalPrivacyChargeSendGuard {armed_request_record_ref,operation_record_ref,current_external_head_observation_ref,portable_request_ref,nonce_binding_commitment,continuity/time/action guards,unconsumed} can contact the registry. Only unarmed Prepared may abandon. Timeout/crash after arming leaves ChargeRequested; recovery queries/retries the same operation ID and bytes.

The external registry permanently indexes nonce bindings, operation decisions, and request tombstones. A new valid request atomically checks/inserts the nonce binding, adds exactly one debit and tombstone, and constructs the direct successor reference-free PrivacyContinuityRecord {privacy_accounting_domain_id,privacy_epoch,accounting_profile_identity_and_digest,cumulative_renyi_state_commitment,client_nonce_binding_root,request_tombstone_root,predecessor_digest,external_registry_id,cas_version,status:Active|Frozen|Retired,last_transition:Genesis|Charge{charge_operation_id,nonce_key_digest,request_key_digest,charge_request_digest,debit_digest,seed_commitment,tombstone_leaf_digest}|Administrative{transition_bytes_and_digest},issued_at,signer_set_epoch,threshold_signatures} and then reference-free ExternalPrivacyChargeReceipt binding both head bytes/digests/versions/profile identities, nonce/key/op/debit/seed, inclusion proofs, request binding, and signatures. Retry returns identical bytes without another debit; nonce/key/operation drift fails permanently. Portable PrivacyContinuityAdministrativeTransition is exactly Freeze{reason,authorization_bytes_and_digest,effective_epoch}|Retire{replacement_or_terminal_basis,complete_live_charge_and_lease_disposition,authorization_bytes_and_digest}|AccountingProfileChange{predecessor_profile_identity_and_digest,successor_profile_identity_and_digest,grid_conversion:Forbidden|ExactRegisteredEmbedding,ceiling_carry_proof,authorization_bytes_and_digest}. It contains no StrongRef or local locator. No refund transition exists.

The sole Chronicle import is bounded PrivacyContinuityImportSpec<Role> for Local or Meta with exact expected current portable head, local ledger/request-index, current profile refs, and a nonempty direct-successor chain. PrivacyContinuityImportStep<Role> is the closed union Charge{prior_ref:StrongRef<PrivacyContinuityRecord>,returned_ref:StrongRef<PrivacyContinuityRecord>,receipt_ref:StrongRef<ExternalPrivacyChargeReceipt>,operation_record_ref:StrongRef<PrivacyChargeOperationRecord<Role>>,disposition:BindChargeRequested{expected_request_record_ref,expected_seed_envelope_ref}|RestoreBindRetainedSeed{expected_predecessor_record_ref,seed_envelope_ref,reconciliation_evidence_ref}|ImportSameNamespaceMaterialPending{request_absence_or_backup_cut_proof_ref,reconciliation_evidence_ref}|AccountingOnlyForeignNamespace{foreign_namespace_id}}|AdministrativeFreeze{prior_ref,returned_ref,transition_ref:StrongRef<PrivacyContinuityAdministrativeTransition>,freeze_authorization_ref}|AdministrativeRetire{prior_ref,returned_ref,transition_ref,complete_local_nonterminal_disposition_proof_ref}|AccountingProfileChange{prior_ref,returned_ref,transition_ref,successor_profile_ref:StrongRef<RenyiAccountingProfile>,exact_grid/ceiling_carry_proof_ref}. Steps form one direct-successor chain. Apply recomputes every nonce/Rényi/tombstone/admin transition, validates every portable identity against its local typed owner, creates DpChargeBinding {role,request_key_ref,nonce_key_digest,charge_operation_record_ref,receipt_ref,prior_and_returned_continuity_refs,accounting_profile_ref,debit_digest,seed_commitment,tombstone_inclusion_proof_ref,source_import_spec_ref:StrongRef<PrivacyContinuityImportSpec<Role>>,assigned_role_order,body_digest}, advances the exact PrivacyLedgerState, and selects the role-valid request/admin states. The preexisting spec and assigned scalar order replace any forbidden reference to the future applied record. A frozen/retired head forbids new Prepare/ArmCharge and profile drift cannot reinterpret an old vector. There is no RecordCharge command.

The exact request machine is Prepared -> AbandonedBeforeCharge|ChargeRequested; ChargeRequested -> ChargeRefused|ChargedIdle|ChargedMaterialPending; ChargedMaterialPending -> ChargedIdle|UnavailableAfterCharge; ChargedIdle -> Computing(generation); and Computing -> ChargedIdle|Computing(generation+1)|ResultCommitted. DpRequestRecord<Role> remains predecessor-weak and state-shaped. ResultCommitted stores {charge_binding_ref,seed_envelope_ref,committed_output_ref:StrongRef<DpCommittedOutput<Role>>,delivery_id,result_detachment_commitment}—never a strong protocol-retention ref back from semantic state. DpTransitionSpec<Role> has exactly Prepare, Abandon, ArmCharge, Start, Yield, Reclaim, CommitResult, and Compact; its u8 arm tags follow that source order. ChargeRefused, attach-to-ChargedIdle, ChargedMaterialPending, and UnavailableAfterCharge are selected only by PrivacyContinuityImportSpec<Role> charge bindings and exact restore/import dispositions, never by a DpTransitionSpec arm; exact restore/import dispositions are the only way to select ChargedMaterialPending. No state is Delivered/Acknowledged/Released.

PrivacyExecutionLease<Role> is the signed {authority_bound_header:AuthorityBoundHeader<Role>,request_key_ref,charge_binding_ref,accounting_profile_ref,privacy_epoch,allowed_snapshot_and_graph_bindings,mechanism_debit_and_seed_commitments,compute_generation,writer_or_consensus_fence,time_authority_profile_oid,not_before,expires_at,signer_epoch,signature}. DpComputeOwnerLease adds owner/resource reservation and strongly selects this lease. Reclaim requires exact expiry/fencing evidence and checked generation increment. The nonserializable DpSensitiveAccessGuard exists only from the current Computing record plus matching admission/charge/seed/complete authority/execution lease. In W12 Meta alone owns seed/noise; GlobalDpExecutionGrant and DpShardAggregateFragment have exact registered certificate schemas binding request/charge/generation/profile/mechanism, clipped shape, shard/configuration, security projection, idempotency digest, and no seed/public-output authority. Meta verifies the complete participant set and applies one seed.

DP output uses the ordinary cross-plane result machine. DpOutputCandidate<Role> binds current Computing, charge/execution/admission/release evidence, manifest/digest/contracts, and delivery policy. CommitResult atomically constructs the semantic DpCommittedOutput/ResultCommitted detachment plus the Protocol PendingVisibility owner and resource escrow in one manifest publication; neither plane strongly points back to its owner. The generated result-owner registry supplies the exact DpResult arm everywhere. Required audit creates no lease/capability; visibility maintenance releases it to ReleasedAwaitingActivation, and an independent fresh activation later creates the first lease/capability without blocking the audit prefix. Later delivery maintenance never changes the DP request and cannot redraw/recharge. DpSpentTombstone permanently retains only nonce/request/op/debit/receipt/seed/output-or-no-output/result-disposition commitments; plaintext query/parameters and seed ciphertext follow separate profiled forensic/key-retention floors.

DpRequestIndex<Role> maps the key to Detailed or a permanent DpSpentTombstone retaining key, operation, debit/receipt, seed commitment, output/no-output commitment, and result disposition commitment. Compaction cannot select a charged nonterminal state or release an independently retained result/forensic object. Same-identity restore remains hidden while it imports every post-backup external debit: matching retained seed becomes ChargedIdle, exhaustively missing material becomes UnavailableAfterCharge, and ResultCommitted must reconstruct its ordinary result index or fail as corrupt. Clone shares the source accounting domain unless threshold-authorized PrivacyDomainSplitAuthorization proves disjoint populations. Permanent tests cover fixed-point accounting, alias composition, arm-before-send, lost external replies, every seed/CAS/import crash point, no-access-before-guard compile failures, compute fencing, W12 fragment completeness/no-shard-noise, audit visibility and ordinary result races, seed secrecy, and backup-behind restore with retained/missing seeds/results.

12.8 Audit

Compliance audit is a separately retained, signed append-only chain—not “whatever commit history remains.” Signatures, sequence continuity, and anchoring prove append integrity and post-ticket gap/truncation detection, not that a buggy or compromised ingress could never omit an event before logging. Each same-identity lineage has a stable AuditDomainId. An external monotonic authority CAS-publishes reference-free AuditContinuityRecord {database_security_namespace_id,audit_domain_id,audit_epoch,highest_ticket_sequence,ticket_index_commitment,unresolved_ticket_commitment,audit_chain_head_digest,predecessor_digest,external_registry_id,cas_version,status:Complete{profile_oid}|PermanentGap{latest_transition_bytes_and_digest,current_profile_oid},last_transition:TicketIssued{ticket_digest}|TicketsResolvedBatch{role_and_group,first_pipeline_order,last_pipeline_order,batch_digest,ordered_resolution_commitment,last_candidate_root_digest:WeakDigest}|CompletenessChanged{transition_bytes_and_digest},signer_set_epoch,threshold_signatures}, while retaining authenticated ticket/event/resolution/transition/CAS-receipt bytes or authenticated resolver references—not commitments alone. A one-ticket resolution is canonically TicketsResolvedBatch with a one-entry range; TicketResolved is not a second durable encoding. The record contains no StrongRef, consumer-local locator, or future receipt identity. The batch arm is one atomic direct CAS successor and is legal only for a nonempty contiguous role-pipeline range whose individually verified entries appear in the same canonical order.

An AuditCompletenessProfile names which operations require an externally reserved AuditTicket before protected processing. Ticket issuance first CAS-adds a pending ticket externally, then orders its local import through exact AuditTicketAdmissionSpec { ticket_ref:StrongRef<AuditTicket>, expected_prior_continuity_ref:StrongRef<AuditContinuityRecord>, expected_prior_cas_version, returned_continuity_ref:StrongRef<AuditContinuityRecord>, external_cas_receipt_ref:StrongRef<AuditExternalCasReceipt> }. Admission verifies that the returned record and receipt are the direct TicketIssued CAS successor, advance the expected ticket sequence by one, add exactly this ticket to the ticket-index and unresolved commitments, and change no unrelated continuity field; orphan-ticket recovery uses the same relation. Protected processing begins only after that imported admission is audit-visible.

Protected construction has four explicit, noninterchangeable orders. Local admitted transaction: ticket admission/claim -> authorization/final rebase/outcome preparation -> ordered final-certification reservation plus coordinate/obligation holds -> sequence-neutral audit event/resolution bodies and immutable semantic plan -> replaceable event attempt/locks/shares/event -> replaceable resolution attempt/locks/shares/resolution -> triple-bearing TerminalAuditGate -> stable capsule/template/semantic prepared closure -> repeatable LocalOrderAttemptInput plus availability certificate -> command/order/candidate. Local control or pre-effect terminal: ticket/claim -> authorization -> AuditTerminalFreezeSpec::Arm plus generated control-basis hold -> the same body/semantic-plan/replaceable-attempt triple -> stable typed control base -> repeatable Local order supplement -> command/order/candidate. W12 admitted write: ticket/registration claim -> union authorization/resources/gate-free outcome preparation -> published admission -> shard fragments/prepares/constraints/serialization -> ordered Global final-certification reservation/holds -> audit semantic plan and replaceable event/resolution attempts -> gate -> stable Meta command base -> repeatable MetaOrderAttemptInput -> Global command/candidate. Read in either posture: ticket/claim -> read admission -> authorized traversal/buffered result -> release decision -> freeze/hold where state-changing publication requires it -> audit bodies/attempts/gate -> stable publication/read-close base -> role order supplement -> candidate -> external batch receipt -> gap-free AuditVisibilityAdvanceSpec (output becomes ReleasedAwaitingActivation) -> independent fresh ProtectedOutputActivationSpec -> output. Thus Local outcome preparation carries its eventual gate, W12 preparation never does, a read-release decision cannot authorize the traversal that produced it, time-authority failure cannot block the audit prefix, and neither HLC nor assigned order appears in signed audit bodies.

The event binds the exact ticket request, namespace/domain/profile/principal, authorization decision, and one tagged outcome commitment: TransactionMutation { final_effect_digest, transaction_effect_basis_commitment }, ControlMutation { control_kind, spec_body_digest, expected_state_conditions_digest, semantic_transition_basis_commitment }, canonical read result, denial, or stable failure/no-effect proof. transaction_effect_basis_commitment hashes only the sequence-neutral final effect, role-free coordinate/head expectations, schema/constraint/resource/authorization inputs, intent semantics, and transaction token; it explicitly excludes capsule/command/certificate identities, TerminalAuditGate, assigned sequence/HLC/marker identity, and chain hash. spec_body_digest hashes only canonical SequenceNeutralSpec.spec_body, excluding its terminal gate; semantic_transition_basis_commitment hashes the deterministic pre-order before/after relation expressed by that body and expected conditions, never an applied record/root identity. Event and resolution attestation times are pre-order signer observations, not the apply-assigned logical_command_hlc; expected sequence/state conditions make a stale prebuilt terminal fail closed. AuditTicketResolution is a tagged terminal in which Completed, Denied, and Failed each strongly name that exact event; Abandoned carries a signed typed no-effect reason and proof. There is no optional unbound event_digest.

State-changing apply verifies the complete staged signing chain and gate byte-for-byte and proves the later full spec/capsule/command/marker/result is the unique deterministic extension of those sequence-neutral commitments. Visibility uses a bounded ordered pipeline, not a role-global stop-the-world fence. AuditVisibilityPipelineEntry<Role> is {pipeline_order,role_order,raft_index,predecessor_candidate_identity:WeakStateIdentity,candidate_state_root_ref:StrongRef<RoleStateRoot>,proposal_configuration_ref:StrongRef<ConfigurationState>,post_apply_configuration_ref:StrongRef<ConfigurationState>,origin_local_writer_fence_epoch,release:RequiredPending{ticket_ref:StrongRef<AuditTicket>,event_ref:StrongRef<AuditEventRecord>,terminal_resolution_ref:StrongRef<AuditTicketResolution>,gate_commitment}|NotRequiredReady{nonrequired_evidence:NonRequiredAuditEvidence}|AuditSystemReady{system_authority_evidence},candidate_publication_commitment,retained_closure_bytes,body_digest}. AuditVisibilityPipeline<Role> is {role_and_group,generation,visible_pipeline_order,visible_role_order,visible_raft_index,visible_state_root_ref:StrongRef<RoleStateRoot>,applied_tail_pipeline_order,applied_tail_role_order,applied_tail_raft_index,applied_tail_state_root_ref:StrongRef<RoleStateRoot>,ordered_entries[every pipeline order in (visible_pipeline_order,applied_tail_pipeline_order]],total_retained_bytes,entry_limit,byte_limit,external_continuity_head_ref:StrongRef<AuditContinuityRecord>,body_digest}. LocalAuditVisibilityPipeline fixes Role=Local/RoleStateRoot=LogicalStateRoot; MetaAuditVisibilityPipeline fixes Role=Meta/RoleStateRoot=GlobalStateRoot; Shard is uninhabited. The pipeline is separately addressed and owned by RootManifest/Raft state—not by either state root—so construction is acyclic.

Every Local/Meta semantic logical command—Required, NotRequired, or audit-system scaffolding—applies to the pipeline's current applied semantic tail, constructs its complete command result/payload/record/candidate root first, and then constructs one pipeline successor. A NotRequired/AuditSystem-ready candidate may be released in that same composite publication only when no earlier gap exists; otherwise the successor appends exactly one entry while its effects remain unpublished. Entry i byte-matches candidate i-1 as its semantic predecessor. pipeline_order and role logical-command order are strictly contiguous; entry Raft indexes are strictly increasing, not contiguous, because registered maintenance entries may intervene. Each entry carries raft_gap_proof_ref:StrongRef<RaftGapClassificationProof> covering every index since the previous semantic entry as one exact role-valid zero-semantic/pipeline-effect maintenance command; missing, duplicate, unclassified, or semantic skipped entries fail apply/recovery. Thus recovery still has one linear semantic candidate chain without lying about the consensus log. NotRequired/AuditSystem-ready entries cannot leapfrog an earlier Required entry. The visible root remains at the last released entry; ordinary mutation/recovery may continue from applied semantic state only under the security-prerequisite rule, while reads use visible state. At pipeline limits, user semantic work receives deterministic backpressure while audit/recovery/ownership-preserving maintenance uses reserved capacity. Prepared ownership, snapshots/checkpoints, reconfiguration, GC, backup, restore, and takeover retain and transfer both the queue and every gap proof. No candidate result/error/changefeed/system-graph/metric/ack is observable before release.

Security-affecting candidates are a deliberate v1 visibility barrier. command_type_classification.toml marks every policy, revocation, verifier/evaluator, grant, service-epoch, descriptor-visibility, time-authority, and other authorization-semantic mutation security_barrier=true. AuditVisibilityPipeline records earliest_unreleased_security_barrier_order? and its exact security-binding predecessor/successor commitments. Once such a candidate is applied but not visible, no later user/protected admission, graph observation, authorization decision, capability issuance/refresh, query execution, or data-dependent response may be ordered from the applied tail. Only audit advancement, recovery, already-admitted terminalization under its pinned non-widenable authority, and ownership-preserving maintenance may proceed; every output still reauthorizes against the visible current state. The public response to a newly attempted operation is the same bounded, data-independent audit-backpressure class used at pipeline saturation, never a policy-specific denial or existence signal. This conservative barrier means a hidden widening never grants authority, a hidden narrowing never produces a distinguishable early denial, and no later command can depend on a security state that the caller cannot yet observe. A future selective meet/intersection optimization requires a separate proved noninterference feature and is off in v1.

AuditExternalResolutionBatch is the pre-CAS portable {audit_domain_id,role_and_group,expected_prior_continuity_digest,expected_prior_cas_version,first_pipeline_order,last_pipeline_order,ordered_required_entries[{pipeline_order,ticket_digest,event_digest,resolution_digest,candidate_root_digest}],interleaved_ready_entry_commitment,resulting_ticket_and_unresolved_commitments,resulting_audit_chain_head_digest,batch_digest}. The external authority verifies every required entry and atomically installs the direct TicketsResolvedBatch successor, returning reference-free AuditExternalBatchCasReceipt {authority_id,expected_head_digest,expected_cas_version,resulting_head_bytes_and_digest,resulting_cas_version,batch_digest,cas_before,cas_after,monotonic_counter,signatures}. A single-ticket resolution is the same schema with a one-entry range. Partial acceptance is impossible: conflict returns no successor, and recovery rereads the authority head before retry. Batching may stop before any not-yet-resolved Required entry, but cannot omit/reorder a Required entry inside its range. Both objects are registered PreOrderArtifact/ExternalCertificateInput, never logical commands; AuditTicketResolutionBatchSpec does not exist.

The release plane is deliberately outside canonical semantic state. AuditVisibilityProtocolState<Role> is the manifest/Raft-maintenance-owned {role_and_group,maintenance_generation,maintenance_applied_index,pipeline_ref:StrongRef<AuditVisibilityPipeline<Role>>,visible_audit_outcome_index_ref:StrongRef<VisibleAuditOutcomeIndex<Role>>,result_independent_retention_index_ref:StrongRef<ResultIndependentRetentionIndex<Role>>,subscription_cursor_delivery_index_ref:StrongRef<SubscriptionCursorDeliveryIndex<Role>>,pending_cursor_output_index_ref:StrongRef<PendingCursorOutputIndex<Role>>,artifact_output_delivery_index_ref:StrongRef<ArtifactOutputDeliveryIndex<Role>>,protected_error_delivery_index_ref:StrongRef<ProtectedErrorDeliveryIndex<Role>>,protocol_resource_escrow_index_ref:StrongRef<ProtocolResourceEscrowIndex<Role>>,external_continuity_head_ref:StrongRef<AuditContinuityRecord>,security_barrier_state:None|AppliedHidden{pipeline_order,predecessor_binding_commitment,successor_binding_commitment},nonretaining_predecessor_digest,body_digest}. VisibleAuditOutcomeIndex maps each released ticket/candidate to its exact AuditOutcomeRecord, external batch receipt/member ordinal, visibility-advance maintenance identity, and public release commitment. It contains no unreleased outcome. The delivery indexes own their exact PendingVisibility/ReleasedAwaitingActivation/ActiveDeliverable/terminal records, capability lineage where applicable, typed resource escrow, and byte-retention closure. Canonical payloads own only semantic effect, audit admission/freeze/gate commitments, and an opaque detachment commitment/key; they never claim that a later release-time outcome, lease, capability, or delivery activation is already part of an earlier candidate root.

AuditVisibilityProtectedOutputReleaseRecipe<Role> is the closed union Result{pending_ref:StrongRef<ResultIndependentRetentionRecord<Role>>,release_subject_commitment}|SubscriptionInitialBaseline{pending_ref:StrongRef<SubscriptionCursorDeliveryRecord<Role>>,release_subject_commitment}|SubscriptionDelta{pending_ref:StrongRef<SubscriptionCursorDeliveryRecord<Role>>,release_subject_commitment}|SubscriptionReset{pending_ref:StrongRef<SubscriptionCursorDeliveryRecord<Role>>,release_subject_commitment}|ArtifactOutput{pending_ref:StrongRef<ArtifactOutputDeliveryRecord<Role>>,release_subject_commitment}|ProtectedError{pending_ref:StrongRef<ProtectedErrorDeliveryRecord<Role>>,release_subject_commitment}. It contains no clock, time evidence, absolute window, lease, capability nonce, or activation recipe. AuditVisibilityAdvanceSpec<Role> is {expected_protocol_state_ref:StrongRef<AuditVisibilityProtocolState<Role>>,expected_pipeline_ref:StrongRef<AuditVisibilityPipeline<Role>>,expected_maintenance_generation,expected_visible_pipeline_order,advance_through_pipeline_order,external_batch_receipt_refs[StrongRef<AuditExternalBatchCasReceipt>],ordered_entry_release_evidence,sorted_audit_outcome_recipes[AuditOutcomeRecipe<Role>],sorted_protected_output_release_recipes[AuditVisibilityProtectedOutputReleaseRecipe<Role>],complete_released_ticket_and_pending_output_bijection_proof_ref:StrongRef<ReleasedVisibilityBijectionProof<Role>>,expected_returned_continuity_ref:StrongRef<AuditContinuityRecord>,resulting_pipeline_body_recipe,resulting_protocol_state_body_recipe,system_authority_evidence:StructuralAuditExemption::AuditSystemAuthority}. It is the sole ordered Local/Meta visibility input, but its command-contract class is Maintenance on the Protocol plane: it consumes one same-group Raft maintenance-log position, advances no LogicalCommandSeq/GlobalLogicalCommandSeq, CommitSeq, logical HLC, semantic command head, or semantic state root, and appends no pipeline candidate. AuditTicketResolutionBatchSpec and a semantic AuditVisibilityAdvance command do not exist.

When a later Local/Meta Semantic command must prove that an earlier candidate is already visible, it consumes a portable certificate rather than a Protocol-plane strong reference or “mirror.” PortableSemanticVisibilityCertificate<Role> is inhabitable only for Role=Local|Meta and is {authority_domain_projection,semantic_applied_identity,candidate_state_commitment,pipeline_order,release_kind:InlineAuditSystem|MaintenanceVisibilityAdvance,audit_release_commitment,resulting_visible_endpoint_commitment,resulting_protocol_state_commitment,root_manifest_and_slot_durability_commitment,authority_binding_public_commitment,certificate_attempt_and_signatures}. The certificate is constructed only after the releasing RootManifest/RootSlot is durable, contains no local ObjectId reference to Protocol state, and is independently verified against the same-group configuration/signing chain. SemanticVisibilityCertificateRef<Role> is a typed strong reference only within the same Local/Meta Semantic group; a shard imports a specialized CertifiedRemoteStrongRef<PortableSemanticVisibilityCertificate<Meta>> or its typed Meta projection. Freeze, terminal completion, restore activation/service preparation, role transition, backup release, and any other later Local/Meta Semantic phase use this certificate. freeze_mirror_record_ref, audit visibility mirror records, and a direct Semantic edge to an audit pipeline/protocol record are invalid schema fields.

Shard has no audit-visibility pipeline. Its equivalent publication proof is ShardStatePublicationCertificate {SameGroupCertificateHeader,source_command_identity,source_applied_shard_raft_index,resulting_shard_state_root_ref:StrongRef<ShardLogicalStateRoot>,resulting_protocol_state_commitment,current_imported_meta_authorization_visibility_commitment,configuration_and_topology_identity,writer_fence_and_continuity_commitment,root_manifest_and_slot_durability_commitment,root_publication_evidence:RootPublicationEvidence,certificate_attempt_ref:StrongRef<CertificateAttemptRecord>,canonical_signature_set}. CanonicalPublicationEvidence<Role> is the generated closed role union Local{visibility_certificate_ref:StrongRef<PortableSemanticVisibilityCertificate<Local>>}|Meta{visibility_certificate_ref:StrongRef<PortableSemanticVisibilityCertificate<Meta>>}|Shard{publication_certificate_ref:StrongRef<ShardStatePublicationCertificate>}. Cross-role users receive the matching certified-remote wrapper. Any subsystem that needs “the authorizing state is durably published” across all roles—including GC/key dispatch—uses this union; it never pretends a Shard candidate passed a nonexistent audit pipeline.

Maintenance apply verifies a gap-free prefix, direct external-head succession, every Required resolution, every NotRequired/system proof, exact candidate/configuration/fence identities, and one release recipe for every and only PendingVisibility protected output created by an entry entering the prefix. It then atomically (a) moves the pipeline visible endpoint to the last released candidate root even when a later unresolved suffix remains, (b) installs the exact release-time audit outcomes, (c) replaces each PendingVisibility owner with ReleasedAwaitingActivation carrying the immutable release evidence but still no clock/lease/capability, (d) advances the imported external continuity head, and (e) clears a security barrier exactly when its entry is released. The applied semantic tail and unresolved entries are unchanged. Time-authority unavailability, an expired prospective lease recipe, or missing capability bytes cannot block audit-prefix progress because none is an input. A ticket/output bijection mismatch or RootManifest/maintenance CAS change applies nothing. Matching retry returns the same maintenance result and protocol generation. A stale, overlapping, gapped, wrong-role, substituted candidate, partial batch, noncontiguous configuration chain, merely signed head, output-bijection mismatch, or attempted leapfrog fails.

ProtectedOutputActivationSpec<Role> is the separate Protocol-maintenance union Result{released_ref:StrongRef<ResultIndependentRetentionRecord<Role>>,time_basis_ref:StrongRef<ResultDeliveryLeaseTimeBasis<Role>>,time_evidence_ref:StrongRef<TimeValidationEvidence>,prebuilt_initial_resume_replay_ref:StrongRef<ResumeCapabilityReplayRecord>}|SubscriptionInitialBaseline{released_ref:StrongRef<SubscriptionCursorDeliveryRecord<Role>>,time_basis_ref:StrongRef<SubscriptionDeliveryLeaseTimeBasis<Role>>,time_evidence_ref,prebuilt_initial_resume_replay_ref}|SubscriptionDelta{released_ref,time_basis_ref,time_evidence_ref,prebuilt_successor_resume_replay_ref}|SubscriptionResetNotice{released_ref,time_basis_ref,time_evidence_ref,prebuilt_successor_resume_replay_ref}|SubscriptionResetBaseline{reset_ack_ref,time_basis_ref,time_evidence_ref,prebuilt_successor_resume_replay_ref}|ArtifactOutput{released_ref:StrongRef<ArtifactOutputDeliveryRecord<Role>>,time_basis_ref:StrongRef<ArtifactOutputLeaseTimeBasis<Role>>,time_evidence_ref,prebuilt_initial_resume_replay_ref}|ProtectedError{released_ref:StrongRef<ProtectedErrorDeliveryRecord<Role>>,time_basis_ref:StrongRef<ProtectedErrorLeaseTimeBasis<Role>>,time_evidence_ref}. Each arm reauthorizes the exact released subject against the current complete security binding and current service authority, proves the full minimum delivery window, and CASes only that released record to its Active state. It has structural protocol-system authority and no recursive terminal audit gate. Missing/stale evidence delays only that output; recovery may build a fresh recipe without changing audit visibility or semantic state. Same-publication inline activation remains legal only for an already-visible NotRequired subject; Required release and activation are always distinct v1 maintenance transitions.

Activation and disposition are batched, not per-delivery. ProtectedOutputActivationBatchSpec<Role> and ProtectedOutputDispositionBatchSpec<Role> are registered Protocol-plane Maintenance rows in command_contracts.toml; the latter covers ACK, explicit authenticated release, profiled expiry, and successor-resume-replay installation. Each carries canonically sorted per-subject sub-records — one per distinct released record or cursor, each sub-record being exactly one arm of the singleton union above — its per-member time_evidence_ref elided in favor of the single batch-subject evidence below — with its own expected state version, authenticated receipts, CursorOutputEndSendCompletionRecord bridge, or profiled expiry evidence, its remaining per-arm verification rules preserved verbatim — plus a member-completeness commitment binding the exact sorted member set. Apply is all-or-nothing: a stale, duplicated, omitted, or ineligible sub-record applies nothing, a matching retry returns the same maintenance result and protocol generation, and the coordinator excludes not-yet-eligible members before proposing — the same discipline AuditExternalResolutionBatch applies by stopping before a not-yet-resolved Required entry while never omitting or reordering one inside its range. A single-subject operation is canonically a one-entry batch, so no second durable encoding exists — the same rule TicketsResolvedBatch states for a one-ticket resolution. The one-current-record, at-most-one-outstanding-lease, and at-most-one-pending-output laws and the per-record CAS/immediate-predecessor retry discipline (FG-INV-15/FG-INV-16) are per-sub-record obligations and are preserved unchanged: the batch transitions N protocol records in one maintenance entry, exactly as AuditVisibilityAdvanceSpec's sorted release recipes already transition N pending outputs. PublishDeltaPending likewise batches across every cursor affected by one Ripple flush tick.

Batch activation consumes batch-shaped time evidence. time_bound_subjects.toml registers TimeBoundSubject::ActivationBatch, whose canonical pre-evidence transcript is the sorted digest set of its member lease-basis transcripts (ResultDeliveryLeaseTimeBasis/SubscriptionDeliveryLeaseTimeBasis/ArtifactOutputLeaseTimeBasis/ProtectedErrorLeaseTimeBasis). One fresh challenged threshold-signed PortableTimeAuthorityObservation per activation tick — one batched activation proposal — signs that batch subject digest, and the batch checker verifies each member's minimum-delivery-window arithmetic individually under the same set-shaped-subject derivation-proof pattern the registry already hosts for OfflineMacaroonIssuerEpochCohort; an asserted per-member window without that derivation is invalid. Challenge freshness, domain/epoch/registry-head binding, and process-incarnation freshness are preserved byte-for-byte: durable Usable bytes still authorize nothing after restart. ProtectedOutputActivationBatchSpec consumes exactly one TimeValidationEvidence whose subject is the batch — never a per-member evidence set and never one evidence smeared across unrelated subjects — and the degenerate one-member batch preserves the singleton activation's per-member semantics exactly — its evidence subject is the one-member ActivationBatch transcript, not the bare lease-basis transcript. Deriving delivery windows from a creation epoch instead of a fresh observation is explicitly rejected: it makes windows predictable and dilutes the subject binding the challenge protocol exists to provide. The maintenance-stream capacity model and the §17 cursor-scale gate price this shape — steady-state delivery activation costs one observation and one maintenance entry per activation tick per role/group instead of one of each per delivery, and those rates are capacity-model rows in the FG-CFG claim class, not invariants.

RootManifest publishes the new protocol root and visible endpoint in one D2 slot update after the maintenance Raft entry is committed/applied under the configured durability rule. Public semantic reads use the pipeline's visible candidate root; audit/status/output guards additionally require the matching current protocol release/activation entry. This two-plane join permits partial-prefix progress without pretending that release-time facts existed inside an older candidate or exposing a later unresolved candidate. Result ACK/release/expiry/resume are likewise Protocol-plane maintenance transitions over the independent index, so they can terminate transport/retention while an unrelated semantic audit suffix remains; their public replies use the same protocol maintenance durability and send guards. Recovery reconstructs the semantic candidate queue and protocol indexes from RootManifest, the maintenance log, prepared ownership, and exact external heads/receipts, then idempotently finishes committed maintenance before serving.

Required-audit throughput and latency are benchmarked as a separate governance profile with pipeline limits, batch size, external sequencer RTT, resolution throughput, visible-prefix lag, and head-of-line saturation reported. Baseline no-audit numbers never imply the same visibility latency. The pipeline amortizes external RTT through contiguous batches but does not claim to exceed the external authority's sustained resolution capacity; backpressure is the honest overload behavior.

Audit lifecycle transitions cannot recurse through their own gate. Semantic AuditTicketAdmissionSpec and narrowly scoped AuditRecoverySpec/AuditCompletenessTransitionSpec have TerminalAuditGate::StructurallyInapplicable{AuditSystemAuthority} in their sequence-neutral wrappers; AuditTerminalSpec { ticket_ref:StrongRef<AuditTicket>, expected_pending_ticket_digest:WeakDigest, event_ref:StrongRef<AuditEventRecord>, terminal_resolution_ref:StrongRef<AuditTicketResolution> } consumes exactly that already-pending ticket and may not request another. AuditVisibilityAdvanceSpec<Local|Meta> is instead a Protocol-plane maintenance input with an explicit unforgeable system-authority arm and no TerminalAuditGate or semantic wrapper. AuditTerminalSpec is for non-mutating and pre-effect terminal paths, not a second mutation terminal. Every transaction command carries its one terminal gate in its transaction input, while every semantic control obtains its one Required, validated NotRequired, or StructurallyInapplicable gate only through its referenced spec wrapper; no command-level duplicate exists. If required external evidence is unavailable, gated work remains disabled.

Resumption first builds reference-free portable AuditCompletenessTransitionRequest {audit_domain_id,expected_prior_continuity_digest,expected_prior_cas_version,exact_missing_ticket_or_event_interval,missing_commitment,evidence_or_reason,old_profile_identity_and_digest,new_profile_identity_and_digest,permanent_effective_audit_epoch,authorization_bytes_and_digest,operation_id,idempotency_key_digest,canonical_request_digest,signer_set_epoch,threshold_signatures}. Local AuditCompletenessTransitionOperationRecord<Role:AuthorityOwningRole> is the pre-send owner {authority_bound_header:AuthorityBoundHeader<Role>,portable_request_ref:StrongRef<AuditCompletenessTransitionRequest>,expected_prior_continuity_ref:StrongRef<AuditContinuityRecord>,old_profile_ref:StrongRef<AuditCompletenessProfile>,new_profile_ref:StrongRef<AuditCompletenessProfile>,authorization_decision_ref:StrongRef<AuthorizationDecisionRecord<Role>>,external_dispatch_operation_recipe,body_digest} and proves every portable identity/digest against its typed owner. Only after its role-valid publication evidence may universal dispatch send the portable request. The external authority CAS-installs the direct CompletenessChanged successor that embeds only the portable transition bytes/digest, then emits a separate reference-free AuditExternalCasReceipt.

AuditCompletenessTransitionSpec<Role> is {operation_record_ref:StrongRef<AuditCompletenessTransitionOperationRecord<Role>>,expected_prior_continuity_ref:StrongRef<AuditContinuityRecord>,expected_prior_cas_version,returned_continuity_ref:StrongRef<AuditContinuityRecord>,external_cas_receipt_ref:StrongRef<AuditExternalCasReceipt>,dispatch_terminal_evidence_ref,exact_request_returned_head_receipt_and_profile_match_digest,terminal_audit_gate:StructurallyInapplicable{AuditSystemAuthority}}; it imports that exact pair locally through the same pipeline rules. This order is acyclic: no portable pre-CAS object owns a local reference and no continuity record points to its later receipt or import. The continuity status and future profile validator permanently exclude the recorded gap; no later operator, restore, or profile change may reassert completeness across it. Semantic payload admission state plus protocol pipelines/outcomes, snapshots, configuration/GC/key floors, and backups retain the complete active chain and authenticated external locators. Same-identity restore reconciles it before ticket-gated operations resume. Only events admitted through this gate receive a source-completeness claim within the trusted-process threat model. Unticketed/sampled read telemetry is labeled non-complete.