feat(#16): bounded final HA acceptance - #27
Merged
Conversation
Add signed external cutover evidence, durable Redis quorum fencing, fresh snapshot import, promotion readiness binding, and executable crash/partition/rollback drills. Issue #16 remains open pending independent review and hosted evidence.
Govern Redis genesis in PostgreSQL, bind signed fence and readiness evidence to the actual PostgreSQL system identity, require an independent snapshot signer, revalidate FENCED retries, and prove an in-flight mutation fails closed when quorum disappears.
Handle cloned-authority rejection inside the assertion, compare actual public-key fingerprints across guard and snapshot custody, and retain exact governed genesis and promotion bindings.
Expose the enforced transactor deadline, bind it into the signed cutover history, require the source fence binding to match the exact transactor, and remove caller-selected drain arithmetic from the controller.
Pin the full bpc_ha catalog, mint transactor-bound readiness capabilities, re-attest before opening HA authorities, and bind the signed cutover drain window to the exact source transactor deadline.
Bind a node credential key into the signed Redis authority and require a fresh Ed25519 proof on every authoritative transaction. Production custody is explicitly TPM/HSM-backed; software keys remain test-only evidence.
Sign and persist the enforced transaction duration in the source lease chain, prohibit within-epoch changes, require the live source binding to match, and reject cutover fencing when its signed drain window differs.
Require signed single-use admission before authoritative outbox locks, bind signer policy to canonical mutation and DML context, and close checkpoint/fence privilege-drift coverage. Keep signer custody as an explicit external policy boundary.
Make authenticated outbox admission and insertion one atomic database function, verify canonical mutation-to-DML identity and opDigest policy, and fail closed on DML drift across every governed outbox/evidence table.
Sanitize every mutation, recompute its digest, open sealed state, compare complete DML payloads, and reject effective DML or TRUNCATE authority across all governed public and bpc_ha tables.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scope
Bounded BPC HA mechanism slice: signed external cutover witness, source pre-commit fencing, three-member durable Redis quorum, signed snapshot import, authenticated tail replay, promotion readiness/activation, and a database-enforced least-privilege mutation boundary.
Executable evidence
appendfsync always.bpc_hacatalog/version attestation, transactor-bound readiness, distinct guard/snapshot SPKI custody.SECURITY DEFINERappend function verifies a single-use DB-clocked transaction/lease/payload/policy-bound ticket before locking, then locks/rechecks/admission-checks/inserts/advances without a caller-controlled lock gap.maxPendingRowsis bound into the canonical policy, ticket HMAC, and DB recomputation. A valid committed ticket reused with a raised limit fails closed.bpc_haauthority tables, plus ticket-key access, object replacement, and controlled-function owner/ACL drift.Local exact-head verification at
d007e75: workspace tests green (@bpc/server340/340), package boundary 3/3, and real frozen A/B/control PostgreSQL + three-Redis acceptance green.Boundary
Draft pending frozen independent review and exact-head hosted CI. Production ticket signing requires a non-exportable HSM/TPM policy key and a closed signer policy that validates every sealed field, current external authority, and independently governed admission/approval-capacity limits. The drill signer is test-only and not exported. Stolen runtime DB credentials are inside the tested database boundary; signer policy/key compromise is a distinct revocation-and-recovery event. No universal-uptime, government-authorization, or certification claim. Issue #16 remains open pending reviewed merge disposition.