Repository navigation
3.x.x: HA Compose overlay and database reference architecture - #304
Conversation
|
@cursor review |
|
Deep-review dispositions on final pushed head Initial lanes reviewed frozen
Focused verification also noted that fixes needed publication and Rust validation: the commits are now pushed, local PostgreSQL-backed tests passed, and final-head Rust CI passed. Its informational DSN-equality observation is an intentional future-regression guard; no change is required. |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 8f80052. Configure here.
Refs #281
PRISM previously shipped one coordinator with fixed host ports. This adds an opt-in two-frontend Compose overlay with distinct instance IDs, separate RPC wiring, non-colliding ports and one shared database DSN, plus a live-instance section in self-check and CI validation.
Provided here and operator-supplied
Provided here: two active frontend services, the existing bundled primary plus one asynchronous standby and checked public reader, configuration tracing, and a reference architecture covering all seven deployment requirements. Self-check distinguishes live, inactive, stale, unknown and failed heartbeat observations using a database-clock sample and a 15-second freshness window.
Operator-supplied: the highly available Stratum TCP load balancer/hashrouter, independent production nodes and failure-domain placement, database replication policy, promotion authority, fencing, stable writer endpoint, storage and secrets. No load-balancer service or automatic database failover is added. The document specifies the external health-check contract and recommended rise/fall hysteresis.
Supported Compose stacks
Apply
compose.prism-ha.yamllast, with theprismprofile:compose.yaml+ HAcompose.yaml+compose.production.yaml+ HAcompose.yaml+compose.prism-external-db.yaml+ HAcompose.yaml+compose.production.yaml+compose.prism-external-db.yaml+ HAProduction image/storage restrictions and external-DB dependency overrides reach both frontends. Without HA, the second service stays inactive. The lab defaults share bundled
qbitd; separate production nodes remain operator-supplied.Acceptance evidence
Checks were rerun after rebasing onto
f394427, then again on review fix-ups51b5d79and893141b. The base includes the ledger split and development-line banner at1bcd61e.docker compose -f compose.yaml -f compose.prism-ha.yaml configand new push/PR CI stepcheck-configcommands passed; self-check countedb9-eastandb9-west; nondefault runtime IDs, RPC wiring and ports verified; host health probes passed with both::and0.0.0.0, despite base loopback/disabled-port settings.cargo +1.89.0 fmt --checkcargo +1.89.0 test --locked -p qbit-prism-serverPRISM_TEST_DATABASE_URL; includes the new SQL heartbeat test.config --resolve-image-digestsQBITD_BIN/PRISM_TEST_PG_BIN_DIROpen D3 policy and finding for the ledger owner (A/C) and #291
Topology is decided: one primary plus one standby. Dan still needs to choose the replication level/name matching and what share ACKs do while that standby is unavailable, including the post-promotion interval with no standby. See D3: replication and ACK policy still needs a decision for the decision table and recommendation; the overlay does not select a production policy.
Finding for the ledger owner (A/C) and #291: existing writer connections force
synchronous_commit=onunless alreadyremote_apply. PostgreSQL can cancel a synchronous replication wait after local commit with a warning, so the finite statement timeout must not be assumed to enforce no positive ACKs during standby loss. Qualify the actual share path through timeout/cancellation and lost-response cases before claiming strict durability; no ledger behavior is changed here.Coordination and remainder
16364c5and its tools-only fix-up893141bindependently; it contains only the self-check section and tests intools.rs, without ledger/schema/config-reader changes. Shared heartbeat writer/reader typing is explicitly deferred to Workstream C in 3.x.x: unify heartbeat status writers and self-check reader #307 with coordinator approval. The read-only snapshot deliberately precedes the existing coordinator initialization, which writes a starting heartbeat.extendsresolves before overlay merging and loses effective overrides.Refs #281, not an automatic issue closure.Deep-review dispositions
Initial lanes reviewed frozen
16364c5: Codex medium found no actionable regressions; thermo reported 10 findings; Fable adversarial reported 3; Codex adversarial reported 3; Cursor reported 1. Including one cosmetic item from focused verification, duplicates reduce these to 14 unique findings: 13 fixed, 1 explicitly deferred, 0 rebutted. Codex medium's review of16364c5..893141bis also clean; focused Fable verification confirmed the fixes and approved deferral, unchanged single-frontend stacks, and effective negative controls. Final documentation follow-up8f80052has also been pushed; Final-head CI is green: 11 workflow checks plus Cursor pass; optional Codesmith is skipped. Cursor re-reviewed8f80052and found no new issues; the original thread is replied to and resolved.51b5d79PRISM_HA_AUDIT_BIND, default reachable listener; rendered and live host probes pass.51b5d7951b5d79893141bok=falsealways exits nonzero.single_instance=falseand untyped report893141b893141bPgConnection; live PostgreSQL tests pass.51b5d7951b5d7951b5d7951b5d7951b5d79PRISM_HA_AUDIT_PORTfeeds listener and published target; audit-disabled HA requires an operator override/readiness contract.51b5d79, refined in8f800528f80052Focused verification also noted that fixes needed publication and Rust validation: the commits are now pushed, local PostgreSQL-backed tests passed, and final-head Rust CI passed. Its informational DSN-equality observation is an intentional future-regression guard; no change is required.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Generated with Codex, supervised by the PRISM B Coordinator session