FrankenGraphDB

Observability & Operations

2,702 words1 listingA design document: it describes the 1.0 target, not what runs today.

  1. Process tree (Spork supervision, restart topologies declared):
FgdbRootRegion
 ├── ChronicleRegion      (WriteCoordinator · scrubber · checkpointer)
 ├── StrataRegion         (sealers · compactors per partition-group · GC/demotion)
 ├── RippleRegion         (view circuits · subscription fan-out · stats maintainers · index feeders)
 ├── BeaconRegion         (index builders · HNSW mergers · path-index manager)
 ├── PrismRegion          (analytics bulkhead)
 ├── WardenRegion         (policy/revocation authority · lease issuer · DP coordinator · audit anchor)
 ├── AegisRegion          (raft · replication streams · donor service)
 ├── FabricRegion         (listeners · sessions · admission)
 └── ObservatoryRegion    (metrics export · task inspector · spectral health · deadline monitor)
  1. Telemetry: asupersync metrics + OTel export, authorized/redacted trace context, EXPLAIN, and SHOW surfaces cover transactions, compaction debt, Ripple/index watermarks, buffer residency, resource reservations, obligations, GC membership epoch, key epochs, and commit phases. Little's-law checks and shadow prices are diagnostics under stationarity/model assumptions and live in evidence/SLO registries, not the safety-invariant registry.

  2. Early warning: wait-graph, futurelock, autocorrelation/variance, and coupled-controller monitors provide model-qualified alerts. FG-CFG-02 rejects defaults predicted unstable by a versioned fluid model with sensitivity analysis; it does not claim every real workload lies in that model. Hard safety comes from bounded queues, resource reservations, cancellation checkpoints, and deterministic fallback controls.

  3. Ops verbs: online COMPACT/SCRUB/REBUILD INDEX/ANALYZE; fgdb doctor verifies root slots, closure, full digests/encodings, marker/branch continuity, constraint state, key wraps, payload availability, GC epoch, and model-qualified configuration reports. Support bundles carry replay-completeness/redaction grades. Cancellation exposes phase and deterministic drain progress; any probabilistic remaining-work/stall estimate names its model and is not a quiescence proof. Quiescence is asserted only when obligations and resource ledgers reach their exact terminal state.

  4. The system graph: the database's own runtime — sessions, transactions, queries, plans, operators, snapshots + leases, obligations, segments, compaction jobs, subscriptions, replication streams, repairs, decision cards — is exposed as a read-only, access-controlled temporal property graph, queryable in GQL like any other graph (MATCH (q:Query)-[:WAITS_FOR]->(x) WHERE q.elapsed_ms > 250 RETURN q, x). The wait-for graph is literally a graph: deadlock and contention analysis run Prism's own cycle detection and centrality over it, and incidents become subgraphs you can diff across time. This surface has a declared degraded mode: with fgdb-prism disabled by its posture/feature activation predicate, the system graph remains a queryable read-only temporal property graph, while the fnx-backed analyses over it — wait-for cycle detection, centrality, incident diffing — return a typed FeatureDisabled error rather than degrading silently, with the corresponding feature-disable registry row recorded per G0's per-clause rule. Nothing safety-bearing degrades with them: deadlock and starvation safety come from §16.3's bounded queues, resource reservations, cancellation checkpoints, and deterministic fallback controls, and the §16.3 early-warning wait-cycle probe is owned by fgdb-observatory with its own small bounded cycle check, so the observability plane never imports the analytics bulkhead for an alerting primitive. The database dogfoods its data model as its ops surface — bounded cardinality, sampled under load, redacted per capability (§12.6).

  5. Admission, backup, and upgrade: ephemeral hierarchical ledgers reserve/charge/release the transient portion of §13's ResourceVector; Chronicle's canonical durable ledger atomically accounts for persistent branches/indexes/views/subscriptions/history/durable bytes through ResourceChargeEffects. Startup/recovery reconciles ephemeral reservations by obligation generation and verifies durable ledger state against committed effects—neither local session counters nor telemetry are quota authority. Maintenance and recovery retain protected emergency capacity. Optimization models may advise allocations, but hard caps and shedding order govern ENOSPC, quorum loss, key unavailability, output backpressure, and tenant isolation.

    Backup uses ordered source pins, not a manifest that permanently retains the live database. Local lifecycle is Absent -> Pinned -> ClosureCertified -> Sealed -> (PublicationReceiptedPendingTransparency ->)? Published -> ArtifactVerified -> ReleasedPendingArchiveHoldCompletion -> Released; Sharded Meta lifecycle adds exact shard pin/certify and release-authorize/ack phases around the same publication and hold-completion states. Appendix A defines the exact commands, certificates, and registry states. A Local barrier fixes one published root/checkpoint/vector/configuration/floor/prepared/certificate/remote/history closure. A Sharded barrier fixes one Meta-issued global prefix P, exact Meta closure/topology/configurations, and one closure from every and only required shard. A shard supplies either its exact current state at P or an authenticated historical state/cut at P; latest >= P is not a legal proof. Every pin is a durable strong root until an independently reopened published artifact, signed manifest publication, valid required transparency inclusion, archive retention grant, source release, external hold-completion CAS, and ordered completion mirror all finish.

    BackupManifestBody -> BackupManifestSignatureSet -> BackupManifest -> BackupPublicationReceipt -> BackupTransparencyInclusion? -> ArchiveRetentionGrant -> BackupArtifactReopenProof is the acyclic publication order. The content archive inventory is fixed before the body and explicitly excludes the publication envelope; the later publication receipt durably locates and authenticates the body/signature-set/manifest tuple, and the grant enumerates that tuple, the content inventory, the receipt, and the required inclusion without including itself. A manifest body may name the prior transparency checkpoint but never its own future inclusion proof, receipt, grant, or reopen proof. Released manifests contain only typed BackupSourceIdentity<T> plus BackupArchiveRef<T>, not live StrongRef<T> or CertifiedRemoteStrongRef<T>. They pin database/security namespace/incarnation, exact posture and barrier, logical/commit/base/anti-rollback ranges, branch/checkpoint/history/prepared/certificate/key/derived/trust/continuity/cursor/delivery/replay/format inventories, recipient/escrow policy, canonical semantic digest, and signer/configuration chain. Legacy Local backups remain Local after W12 activation. Verification reopens the actually published envelope and content inventory independently, reconstructs every physical realization and logical digest, and recomputes the posture-specific semantic digest before release.

    Restore acquires a new archive-owned RestoreSourceLease; it cannot reuse the source-database backup pin released after publication. RecoverSameIdentity first advances the external ClusterIncarnationContinuityRecord through Operational(I) -> RestoreFencePending -> RestoreReserved(J), where all old incarnation leases are revoked/expired and J > max(external retired floor, current live incarnation, backup incarnation). Only one CAS contender can reserve J. A member-bound ClusterIncarnationLease(scope=RecoveryOnly|OrdinaryWrite) is checked together with the inode lease/fence immediately before every irreversible seal, prepared publication, receipt, Raft proposal/ack, certificate, and RootSlot publication. Recovery-only authority cannot serve or perform ordinary work; unavailable/stale continuity authority makes same-identity recovery read-only or forces CloneNewIdentity.

    Archived content crosses only through BackupArchiveRef<T> -> PriorIncarnationObjectRef<T> -> RestoreArchiveRef<T> under the live restore-source lease. The publication envelope crosses separately through BackupPublicationArtifactRef<T> -> RestorePublicationArtifactRef<T> under that same holder-scoped lease, publication receipt, and grant subject set; a raw manifest artifact ref is not restore authority. RecoveryIncarnationTransformPlan is pre-order; leaves-first execution produces RecoveryIncarnationProjectionResult before any bridge. For every changed canonical body it verifies/decrypts the source, rewrites only already-produced target references, recomputes ObjectId, performs new AEAD because AAD includes that ObjectId, builds new CiphertextId/EncodingId/Placement/openers/wraps, and proves target availability. Registry-proved incarnation-neutral values alone may reuse a realization. Externally signed historical evidence remains byte-identical as CarryPriorIncarnationEvidence; it is not rewritten or fraudulently re-signed. Current configurations/certificates/keys/trust are recreated, and old sessions/capabilities are invalidated with tombstones—new capabilities require fresh authentication/authorization.

    PendingRestoreCreationGuard is the only filesystem path that can publish the first non-Genesis RecoveryReconciling root. It is limited to the exact projection result, recreated current authority, role-tagged RestoreState, bridge, bootstrap closure, manifest, and RootSlot; it cannot encode user work, ordinary receipts/Raft, Operational, or service advertisement. It follows the same exclusive staging-inode, sync, no-replace rename, directory-sync, inode-reread, and loser isolation as creation, then yields only RecoveryWriterLeaseGuard. The bridge uses typed nonretaining prior-incarnation identities and never validates an old root as current.

    Before activation, recovery CAS-reserves an allocation epoch above the external identity floor; burns every possibly issued post-backup range; reconciles latest privacy/audit continuity and pending DP/audit transitions; resolves or explicitly retains prepared/decision, remote retention/trust, key, backup/replay, cursor/delivery, resource, and derived obligations; and rotates current channel/signing/wrap/verifier authority. RestoreReconciliationRoot has one generated slot per obligation class, each Pending|Resolved|ExplicitlyRetained|DisabledFailClosed; readiness forbids Pending. Unavailable privacy authority disables DP, unavailable audit evidence disables completeness-gated work, and a permanent gap requires the exact external CAS plus local mirror. Incarnation change hides no obligation.

    Canonical Local state is Reconciling -> VisibilityCommitted -> ServicePreparedHidden -> Operational; Sharded Meta is Reconciling -> ActivationOrdered -> VisibilityCommitted -> ServicePreparedHidden -> Operational; each shard is Reconciling -> ActivationAppliedHidden -> VisibilityApplied -> ServicePreparedHidden -> Operational. “Ready” is not an unsequenced canonical-state mutation: it is a same-group certificate over a current hidden Reconciling root whose exhaustive reconciliation status is Complete. Activation, visibility, service-ready, and operational certificates/acknowledgements are likewise created only after their source root exists, are owned by the certificate ledger, and are consumed by a later command; the source RestoreState never points forward to one. Every such artifact strongly owns its exact local closure and binds one restore/service-visibility epoch. Visibility is never endpoint publication. After every shard is visibility-applied, Meta orders GlobalRestoreServicePrepareSpec, shards order their prepare and export ready acks, and only then can a portable manifest CAS the continuity head and external catalog and yield RestoreServicePromotionReceipt. GlobalRestoreServiceFinalizeSpec and each ShardRestoreServiceOpenSpec must consume that existing receipt before clearing restore state. Fabric/direct endpoints require the current receipt plus the role-valid local open state; Meta routing also requires the destination shard operational ack. Every handshake, request, session, forwarded shard request, query/transaction child, delivery cursor, and cross-session capability binds {cluster_incarnation,service_visibility_epoch}; missing or stale values fail before observation. The RestoreSourceLease remains live through independent target reopen and the post-open completion record, then releases.

    CloneNewIdentity uses the same archive lease, exhaustive transform, staging guard, reconciliation, and service gate, but assigns a new database/security namespace, K_oid, continuity domain, group IDs, and current authority. It preserves source posture—Local stays Local, Sharded stays Sharded; Local→W12 is a later separate audited activation. Historical signed evidence remains behind an explicit clone boundary; only current target authority is newly signed. Old capabilities are invalid. The privacy domain remains shared unless an externally authorized disjoint-population record permits a new one; a new AuditDomainId plus signed AuditCloneBoundary links source evidence without claiming old tickets were target-issued. RPO/RTO, incremental-base retention, offsite failure domains, key recovery, continuity split-brain, rollback/ID/privacy/audit detection, Local/Sharded restore drills, and every backup/restore/service-gate crash point are deployment gates.

  6. Durable-format capability and activation. Decoder compatibility is not inferred from a binary version. Every process presents a signed immutable FormatCapabilityManifest {binary_build_id,toolchain_profile,logical_schema_major_ranges,per_schema_read_minor_ranges,per_schema_write_epoch_ranges,bootstrap_and_root_slot_versions,required_flag_and_extension_support,canonical_default_law_ids,transform_artifact_ids,protocol_version_ranges,manifest_epoch,signer_id,signature}. A member advertisement is accepted only after its bytes and implementation-generated decoder/encoder conformance suite agree. FormatCompatibilityState<Role> is rooted in Local/Meta canonical state and certified into Shard projection state; it records {generation,active_read_epoch_set,active_write_epoch,target_epoch?,phase,exact_voter_storage_reader_support_matrix_ref,first_target_write_position?,rewrite_generation?,old_decoder_retention_floor,body_digest}. Protocol negotiation uses its own connection state and never selects a durable write epoch.

    FormatTransitionSpec<Role> is the closed Semantic ordered union: AdvertiseTarget{target_epoch,sorted_member_capability_refs,exact_current_and_prospective_configuration_refs,support_matrix_ref,required_transform_refs,rollback_profile}; ActivateWriteEpoch{advertisement_ref,expected_old_write_epoch,target_write_epoch,bootstrap_transition_plan_ref,all_current_and_joint_quorum_decode_proof_ref}; RecordFirstTargetWrite{activation_ref,escape_receipt_ref:StrongRef<FormatFirstTargetEscapeReceipt<Role>>,expected_latch_state:Escaped}; RewriteEquivalent{activation_ref,source_epoch,target_epoch,bounded_object_set,semantic_equivalence_proof_refs,physical_publication_plan}; and RetireOldDecoder{activation_ref,old_epoch,target_epoch,checkpoint_and_config_floor_refs,complete_reachable_object_scan_ref,backup_restore_replay_capability_promise_floor_refs,all_member_target_only_support_ref}. ActivateWriteEpoch contains no guessed future position; its applied command record supplies the assigned activation_applied_position, which every later activation reference authenticates. Local uses LocalFormatTransitionSpec; W12 Meta uses GlobalFormatTransitionSpec and shards accept only certified ShardFormatProjectionInstallSpec/ShardFormatRewriteApplySpec/ShardFormatRetirementApplySpec. Unsupported commands cannot be proposed, voted, acknowledged for payload availability, applied, snapshotted, or served; under joint consensus both old and new voter/storage quorums satisfy the active read/write matrix.

    The irreversible cutoff precedes the first authoritative escape of target-format bytes. Pre-arm encoding is allowed only in an isolated, whole-inode-fenced, unowned staging area that is absent from prepared ownership, receipts, consensus, authenticated indexes, reachability roots, and service-visible paths and can be discarded without semantic effect. Consensus state owns predecessor-format-readable FormatFirstTargetEscapeLatch<Role> = NotArmed{activation_identity,activation_applied_position,old_write_epoch,target_write_epoch}|Armed{activation_identity,activation_applied_position,arm_operation_id,assigned_maintenance_index,old_write_epoch,target_write_epoch,first_escape_plan:{subject_class,object_or_root_kind,exact_target_identity_and_digest,exact_target_closure_inventory_digest,intended_publication_class,bootstrap_or_rootslot_transition_digest?},support_matrix_commitment,configuration_commitment,nonretaining_prior_latch_digest}|Escaped{armed_fields,arm_visibility_evidence_ref:StrongRef<FormatArmVisibilityEvidence<Role>>,first_escape_receipt_ref:StrongRef<FormatFirstTargetEscapeReceipt<Role>>}. Every Armed field is known before encoding the containing RaftStateRoot; it contains no identity or digest of that future root, RootManifest, RootSlot, or publication receipt. FormatFirstTargetEscapeArmSpec<Role> is a Raft maintenance command encoded entirely under the predecessor-compatible epoch. It publishes Armed in Consensus/Raft state and RootManifest before any staged target-format byte may become prepared-owned, receipted, ordered, acknowledged, authenticated-indexed, rooted, or slot-visible. Armed is itself the permanent no-downgrade boundary—even if the planned escape later fails—and has no ordinary unarm transition. It names one exact first-escape plan so recovery can finish only that operation or require a fenced new-incarnation migration.

    After the Armed-containing RootSlot is durable, FormatArmVisibilityEvidence<Role> {activation_identity,arm_operation_id,assigned_maintenance_index,armed_latch_commitment,containing_raft_state_root_identity,containing_root_manifest_identity,winning_root_slot_and_generation,other_slot_observation,root_publication_evidence:RootPublicationEvidence,current_configuration_and_writer_fence_commitment,body_digest} is constructed; it proves membership/publication without being embedded back into Armed and is reconstructible after a crash. A linear runtime-only FirstTargetEscapeGuard<Role> {armed_latch_commitment,arm_visibility_evidence_ref:StrongRef<FormatArmVisibilityEvidence<Role>>,exact_planned_target_identity,current_manifest_and_slot,live_writer_fence,action_bound_incarnation_guard,current_configuration_and_support_matrix,unconsumed} rereads the current manifest/slot, verifies that exact still-current Armed latch and evidence, and is consumed immediately before the first irreversible target-format action. Completion creates FormatFirstTargetEscapeReceipt<Role> {header:FenceBoundIrreversibleReceiptHeader,armed_latch_commitment,arm_visibility_evidence_ref,target_epoch,target_identity_and_kind,first_escape_class:PreparedReceipt|RaftAcceptance|ReplicaAcknowledgement|RootPublication|RootSlotPublication,exact_durability_or_consensus_receipt,resulting_manifest_or_log_position,signer_and_configuration_evidence,body_digest,signature} and maintenance CASes Armed to Escaped. Only then may RecordFirstTargetWrite reconcile the Semantic FormatCompatibilityState; that semantic command is no longer the safety boundary. A crash at any point after Armed remains non-downgradeable and recovers the one named escape idempotently.

    Activation authorizes a future target writer only through the Armed latch at the exact ordered prefix; no encoder may select target bytes from FormatCompatibilityState alone. Additive-minor readers may skip a length-delimited unknown field only when its registered canonical_default_law_id proves that absence and skipping have identical semantics; an unknown required flag, union tag, reference edge, retention rule, security rule, or non-defaultable field fails closed. A breaking logical major requires an explicit total transform with old/new semantic equivalence evidence and a new registered construction DAG; if no reverse transform exists, durable Armed makes downgrade permanently fail-closed before the first escape. RootSlot/bootstrap major changes additionally require a pre-activation dual-reader bootstrap plan whose old path can still locate/authenticate the active root; otherwise they are offline migration or new-incarnation restore, never rolling activation. Optional RewriteEquivalent creates new physical/canonical objects before swapping their typed roots and preserves old versions until the floor closes. RetireOldDecoder is legal only when no reachable root, prepared/log suffix, checkpoint, backup/base, restore lease, replay manifest, durable capability, remote grant, or promised historical interval can require old bytes. Crash, cancellation, and retry at every phase are idempotent; rolling old/new/joint membership, unknown-tag, old-backup restore, replay, every arm/escape/receipt/reconcile boundary, old-binary open, bootstrap tear, transform mismatch, and GC/key-retention tests are permanent release gates.

  7. The external-authority surface. Every registered posture publishes its authority footprint table: for each external authority — identity/allocation continuity (IdentityContinuityRecord/AllocationEpochReservation), cluster incarnation (ClusterIncarnationContinuityRecord), the time authority (PortableTimeAuthorityObservation), audit continuity (AuditContinuityRecord), the DP registry (PrivacyContinuityRecord), archive/grant (ArchiveRetentionGrant), reservation (ReservationAuthorityHead), catalog (CatalogAuthorityHead), the restore dispatch journal's ExternalCasContinuity head, transparency witnesses (WitnessPolicy), and KMS/HSM — the table states whether the authority sits on a synchronous operation path and exactly where. The v1 footprint: audit continuity touches a Required operation three times (the strictly serial one-at-a-time TicketIssued issuance CAS, the admission visibility advance, and its share of one batched TicketsResolvedBatch resolution); the time authority is consumed per protected-output activation tick — batch-subject amortized under §12.8 — and per IdRangeLease use window; incarnation continuity only at ExternalCas lease acquisition/renewal; KMS/HSM only at a key-unwrap miss; identity/allocation continuity only at allocation-epoch mint; the DP registry only at DP charges; archive, reservation, catalog, and the restore journal only in backup/restore flows; witnesses only at transparency-proof freshness. The embedded DirectoryBound posture's footprint table is empty: it consumes zero external authorities.

    Availability is stated per operation class as three lines, never as one product. Apply-durability availability is local storage plus Raft only — applies continue behind a stalled Required entry up to §12.8's pipeline limits, then degrade to deterministic backpressure, so a stalled audit authority cannot lose or block durable ordering. Visibility availability multiplies in the audit authority's availability under Required profiles, because only the Protocol-plane AuditVisibilityAdvanceSpec can release a Required entry. Delivery availability multiplies in the time authority's per-tick availability, which the design deliberately keeps off the audit prefix. Per-posture numbers for all three lines are slo.toml rows, never invariants; the §20 authority-availability risk row tracks them.

    The external authorities are inside the declared trust boundary and carry their own registered HA/durability contract: threshold signer sets with registered rotation, durable CAS heads with an explicit anti-rollback story, and a specified successor-authority migration. A threshold-authorized authority-succession transition — recorded as a permanent continuity event in the affected chain, format reserved at G0 — is the only path off a permanently dead authority; the completeness-transition escape hatch is not one, because its CompletenessChanged successor is CAS-installed by the same authority it would have to replace. §15.2's authority-chain checking runs the same no-fork lineage verification over succession events as over ordinary direct CAS successors.

    The audit-stall isolation unit is the database. Each same-identity lineage has its own AuditDomainId, its own AuditVisibilityPipeline, and its own RootManifest, and fgdbd is multi-database by capability (§13), so tenants that require independent audit-availability domains are separate databases under one server. Intra-database per-tenant audit-visibility domains are a registered rejection with the reason recorded: pipeline entries are cumulative role state roots in one linear chain — entry i byte-matches candidate i-1 — so releasing one tenant's entry past another tenant's unresolved Required entry would expose a state root containing the unaudited effects, and §12.8's security-barrier noninterference argument requires one total admission order; independent per-tenant visibility would demand partitioned candidate roots, a W12-scale redesign, not an additive registry change. Within one database the mitigations are per-tenant ticket-resolution SLOs at the external authority — an slo.toml surface, not a pipeline change — plus §12.8's existing reserved capacity and pipeline limits.