ci: run PostgreSQL tests in isolated lane - #6730
Conversation
de8c835 to
0ffeede
Compare
0ffeede to
92c231e
Compare
60086c1 to
05dcc2a
Compare
TheSentinel454
left a comment
There was a problem hiding this comment.
Checks are failing, please look into that.
42097c0 to
e5ab1bb
Compare
|
🤖 Follow-up on the earlier “Checks are failing” review note: I fixed the workflow environment scoping and the PostgreSQL schema/isolation issues exposed by the broad lane, then reran the exact pushed head. The PostgreSQL job passed 282/282 tests, and the complete GitHub CI workflow is green: https://github.com/block/buzz/actions/runs/32867749069. An independent exact-head Blox review also found no substantive issues. |
b702a5c to
89228d7
Compare
d75c468 to
616d23f
Compare
🔐 Codex Security Review
|
7809198 to
8ab6bba
Compare
wpfleger96
left a comment
There was a problem hiding this comment.
🤖 I combined three independent source/runtime passes at 8ab6bba4882e48c738e38b9e3b1b9a7ae193c20c. The new lane covers the intended PostgreSQL tests and the hosted run passed 364/364, but there are three blocking reliability/compatibility gaps to address before approval:
-
IMPORTANT — the lane flakes under its configured cold parallel load. A clean PostgreSQL 16/Redis run of the exact workflow command discovered all 364 tests but finished 363/364 because
pool_observabilitycould not create its size-one pool during the initial eight-way clone/connect burst (PoolTimedOut). That test passed alone and the warmed full lane then passed 364/364, which rules out a deterministic product failure but demonstrates nondeterministic CI failure. Remove the startup/connect race or shape/reduce concurrency, then repeat the cold full lane. -
IMPORTANT — the documented local guard fails with supported macOS tooling.
scripts/check-postgres-test-discovery.pyimports Python 3.11-onlytomllib, while Hermit does not pin Python and the scripts invoke unversionedpython3. Following the documented command on macOS with Python 3.9.6 fails withModuleNotFoundError: tomllib; it passes under Python 3.12. Pin Python 3.11+ in the repo toolchain or use a compatible TOML parser. -
IMPORTANT — ordinary out-of-line Rust modules are falsely rejected. The discovery parser associates only
#[path = "..."] mod postgres_tests;declarations with their files. A conventionalmod postgres_tests;plussrc/postgres_tests.rslayout is compiled and discovered by Rust/nextest, but the guard rejects its ignored PostgreSQL tests. Add standard Rust module-path resolution and a regression fixture.
The package finder otherwise returns the expected seven packages; the wrapper schema-mode checks pass; and the removed bespoke PostgreSQL selectors are represented in the successful hosted lane. This review applies only to the named head. Since the branch also needs a rebase, rerun the guard fixtures and a cold full PostgreSQL lane at the rebased tip before requesting approval.
8ab6bba to
b68d083
Compare
|
🤖 Thanks for the thorough review — I pushed fixes for all three findings in
The GitHub checks are running on the new exact head |
d47a07c to
c9a2f13
Compare
|
🤖 Final update: the PR is now rebased onto current All review findings are addressed, including the conventional nested-module single-file case, Python 3.9/no- Final evidence:
When you have a chance, please re-review the updated head so the stale changes-requested state can be cleared. |
wpfleger96
left a comment
There was a problem hiding this comment.
The three previously reported findings are addressed: the pool setup now has cold-start headroom, discovery supports Python 3.9 without tomllib, and conventional nested out-of-line modules have regression coverage. Exact-head CI is green, including 367/367 PostgreSQL tests.
IMPORTANT — migration-module tests do not receive the promised empty database. scripts/postgres-test-wrapper.sh:52-57 matches migration::postgres_tests::*, but nextest supplies the full test path, for example runtime::migration::postgres_tests::run_migrations_applies_consolidated_initial_schema_on_fresh_database. Bash case patterns match the whole string, so this falls through to schema_mode=desired and clones the desired-state template rather than template0. I reproduced that exact name through the wrapper; it emitted BUZZ_TEST_SCHEMA_MODE=desired and --template=desired_template. The current migration tests mask the defect by resetting public themselves, but a future test following crates/buzz-db/TESTING.md can begin from the wrong schema or have a helper skip migration setup.
Make the pattern prefix-aware and add a wrapper regression using the realistic fully qualified name (for example runtime::migration::postgres_tests::...) that asserts migration mode and template0. This is a correctness blocker because the lane's documented schema-isolation contract does not currently hold.
|
🤖 Addressed the latest migration-mode selector finding in
GitHub CI is running on the new head. Please re-review this revision when the checks complete. |
dea2d0d to
f045371
Compare
|
🤖 Rebased and reverified at exact head
All inline review threads are resolved. The remaining changes-requested state is the stale review body for the migration selector that is now covered by the regression above; please re-review this head when convenient.
|
Signed-off-by: Luke Tornquist <tornquist@squareup.com>
Signed-off-by: Luke Tornquist <tornquist@squareup.com>
|
🤖 Fresh review/update at exact head
The remaining changes-requested state is the stale review body for the migration selector, which is covered by the realistic wrapper regression and the focused migration test above. Please re-review this head when convenient. |
wpfleger96
left a comment
There was a problem hiding this comment.
The prior migration-routing blocker is fixed. Prefixing the nextest name with :: and matching *::migration::postgres_tests::* correctly covers both root and fully qualified nested paths while preserving segment boundaries; migration_schema_* remains prefix-aware. The regression fixture now uses the real runtime::migration::postgres_tests::run_migrations_applies_consolidated_initial_schema_on_fresh_database path and asserts both BUZZ_TEST_SCHEMA_MODE=migration and template0.
I also reviewed the rebase range against the previously reviewed tip. The material differences are upstream conflict resolutions in the CI selectors/test-module classification plus this focused wrapper fix; I found no new CRITICAL or IMPORTANT issue. Exact-head CI is green: discovery scanned 392 Rust files, wrapper schema-mode checks passed, and the isolated PostgreSQL lane ran 380/380 tests successfully, including the fully qualified migration suite and cold pool-observability case.
* origin/main: ci: run PostgreSQL tests in isolated lane (#6730) Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
* origin/main: ci: run PostgreSQL tests in isolated lane (#6730) Add voice notes to desktop messages (#6978) feat(desktop): add thread-scoped ACP session experiment (#6909) fix(desktop): scope composer autocomplete to focus (#6860) feat(desktop): add isolated named demo builds (#6407) fix(model-capabilities): humanize databricks goose model names (#7135) Signed-off-by: Hayt <9e1c23a3fd83f61da34420e4e88ff1b16e45cafcc0cd9019eb07d4ecfa8ca9b0@buzz.block.builderlab.xyz>
…bound-membership * origin/main: ci: run PostgreSQL tests in isolated lane (#6730) Add voice notes to desktop messages (#6978) feat(desktop): add thread-scoped ACP session experiment (#6909) fix(desktop): scope composer autocomplete to focus (#6860) feat(desktop): add isolated named demo builds (#6407) Signed-off-by: Storme Drone <49c46e84758b2ebff4abf5abbbd44ee4ce788fc3b55db9fa703eec124eead621@buzz.block.builderlab.xyz>
…c-agent-commit-identity * origin/main: ci: run PostgreSQL tests in isolated lane (#6730) Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
…-history * origin/main: ci: run PostgreSQL tests in isolated lane (#6730) Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com> # Conflicts: # .github/workflows/ci.yml
…factor The origin/main Postgres-test isolation refactor (#6730) extracted the local test DATABASE_URL fallback into crate::test_support::database_url(). The merge conflict resolution in bridge.rs left two raw TEST_DB_URL references behind; replace them with the new helper to restore compilation. Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
…thority (Design C) Implements PostgreSQL as the final authority for NIP-FI kind-9 admission on the Design C (one READ COMMITTED transaction) path. This is PR 4 in the Phase A stack; it builds on PR 3 (buzz-auth production assertion runtime, merged as 70895b3). ## Changes ### Migration 0044 + schema.sql - Add `connection_id UUID NOT NULL` to `nip_fi_proof_replay_claims`. Records the WebSocket connection UUID that first claimed each proof event, enabling per-connection ownership checks at admission time. ### Deterministic operation IDs (UUID v5) - `NS_ADMISSION_OP`: domain-separated namespace constant (SHA-256 of "buzz.nip-fi.admission-op.v1", first 16 bytes). - `deterministic_admission_op_id(community_id, proof_event_id, signed_event_id)`: derives the admission operation_id via UUID v5 (SHA-1 namespaced), replacing the previous `Uuid::new_v4()` call in `commit_kind9_inner`. Same (community, proof, event) triple always produces the same operation_id, enabling idempotent exact-replay detection via the receipt protocol. - `Kind9Params` no longer carries an `operation_id` field; callers no longer allocate or pass it. ### Event duplicate precheck (step 3c) - `commit_admission_body` reads `events FOR SHARE` after acquiring the NIP-FI writer lock. If the exact (community_id, created_at, id) row already exists, returns `AdmissionError::DuplicateEvent` immediately, writing zero new authority rows. ### Proof-owner claim read (step 3d) - Reads `nip_fi_proof_replay_claims FOR SHARE` before any write. Same `conn_id` → same-connection reuse, continues. Different `conn_id` → returns `ProofReplayed`. ### Receipt read-time exact-replay / conflict protocol (step 3e) - Reads `authorization_operation_receipts FOR SHARE` before any write. Same `operation_id` + same `request_fingerprint` → `DuplicateEvent`. Same `operation_id` + different fingerprint → `Transient` (intent conflict). ### Proof-owner INSERT moved to step 13 (after auth writes) - Moved from old step 10 (before epoch/POA) to after the epoch/fence and POA upserts. Uses `ON CONFLICT (community_id, proof_event_id) DO NOTHING`. After a DO NOTHING (PK race), re-reads the winning row under FOR SHARE: same conn_id → same-connection race resolved; different → `ProofReplayed`. - Includes `connection_id` in the INSERT. ### Explicit rollback on was_inserted==false (step D) - If `insert_event_with_thread_metadata_in_tx` returns `was_inserted=false` after the authority mutations succeed (race that bypasses the precheck), `commit_kind9_inner` explicitly rolls back before returning the result, preventing orphaned authority mutations. ### DuplicateEvent handling in ingest.rs - `AdmissionError::DuplicateEvent` is intercepted before the error-mapping closure. Returns `IngestResult { accepted: true, message: "duplicate:" }` immediately — the same duplicate response as the non-NIP-FI path. ### Seal crate removal - Deleted `crates/buzz-nip-fi-seal-test/` and `crates/buzz-nip-fi-inner-seal-test/`. - Removed both from workspace `Cargo.toml` members. - Removed `nip-fi-boundary-test = []` feature from `buzz-relay/Cargo.toml`. - Collapsed cfg-split `mod nip_fi` / `pub mod nip_fi` in `lib.rs` to single private `mod nip_fi`. - Collapsed cfg-split `mod context` / `pub mod context` in `nip_fi/mod.rs`. - Updated `context.rs` doc comment (no longer references deleted crate). ### Six new falsifying PG race tests (postgres_ prefix) Named per the #6730 `postgres_tests` CI convention so they are selected automatically once this branch lands on main: 1. `postgres_same_conn_proof_reuse_allowed` — step 3d same-conn path 2. `postgres_cross_conn_proof_replay_rejected` — step 3d cross-conn path 3. `postgres_duplicate_event_precheck_is_noop` — step 3c precheck 4. `postgres_concurrent_same_conn_pk_race_both_succeed` — step-13 DO NOTHING 5. `postgres_concurrent_cross_conn_pk_race_one_rejected` — step-13 cross-conn 6. `postgres_deterministic_op_id_exact_replay_is_noop` — op_id idempotence Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
…thority (Design C) Implements PostgreSQL as the final authority for NIP-FI kind-9 admission on the Design C (one READ COMMITTED transaction) path. This is PR 4 in the Phase A stack; it builds on PR 3 (buzz-auth production assertion runtime, merged as 70895b3). ## Changes ### Migration 0044 + schema.sql - Add `connection_id UUID NOT NULL` to `nip_fi_proof_replay_claims`. Records the WebSocket connection UUID that first claimed each proof event, enabling per-connection ownership checks at admission time. ### Deterministic operation IDs (UUID v5) - `NS_ADMISSION_OP`: domain-separated namespace constant (SHA-256 of "buzz.nip-fi.admission-op.v1", first 16 bytes). - `deterministic_admission_op_id(community_id, proof_event_id, signed_event_id)`: derives the admission operation_id via UUID v5 (SHA-1 namespaced), replacing the previous `Uuid::new_v4()` call in `commit_kind9_inner`. Same (community, proof, event) triple always produces the same operation_id, enabling idempotent exact-replay detection via the receipt protocol. - `Kind9Params` no longer carries an `operation_id` field; callers no longer allocate or pass it. ### Event duplicate precheck (step 3c) - `commit_admission_body` reads `events FOR SHARE` after acquiring the NIP-FI writer lock. If the exact (community_id, created_at, id) row already exists, returns `AdmissionError::DuplicateEvent` immediately, writing zero new authority rows. ### Proof-owner claim read (step 3d) - Reads `nip_fi_proof_replay_claims FOR SHARE` before any write. Same `conn_id` → same-connection reuse, continues. Different `conn_id` → returns `ProofReplayed`. ### Receipt read-time exact-replay / conflict protocol (step 3e) - Reads `authorization_operation_receipts FOR SHARE` before any write. Same `operation_id` + same `request_fingerprint` → `DuplicateEvent`. Same `operation_id` + different fingerprint → `Transient` (intent conflict). ### Proof-owner INSERT moved to step 13 (after auth writes) - Moved from old step 10 (before epoch/POA) to after the epoch/fence and POA upserts. Uses `ON CONFLICT (community_id, proof_event_id) DO NOTHING`. After a DO NOTHING (PK race), re-reads the winning row under FOR SHARE: same conn_id → same-connection race resolved; different → `ProofReplayed`. - Includes `connection_id` in the INSERT. ### Explicit rollback on was_inserted==false (step D) - If `insert_event_with_thread_metadata_in_tx` returns `was_inserted=false` after the authority mutations succeed (race that bypasses the precheck), `commit_kind9_inner` explicitly rolls back before returning the result, preventing orphaned authority mutations. ### DuplicateEvent handling in ingest.rs - `AdmissionError::DuplicateEvent` is intercepted before the error-mapping closure. Returns `IngestResult { accepted: true, message: "duplicate:" }` immediately — the same duplicate response as the non-NIP-FI path. ### Seal crate removal - Deleted `crates/buzz-nip-fi-seal-test/` and `crates/buzz-nip-fi-inner-seal-test/`. - Removed both from workspace `Cargo.toml` members. - Removed `nip-fi-boundary-test = []` feature from `buzz-relay/Cargo.toml`. - Collapsed cfg-split `mod nip_fi` / `pub mod nip_fi` in `lib.rs` to single private `mod nip_fi`. - Collapsed cfg-split `mod context` / `pub mod context` in `nip_fi/mod.rs`. - Updated `context.rs` doc comment (no longer references deleted crate). ### Six new falsifying PG race tests (postgres_ prefix) Named per the #6730 `postgres_tests` CI convention so they are selected automatically once this branch lands on main: 1. `postgres_same_conn_proof_reuse_allowed` — step 3d same-conn path 2. `postgres_cross_conn_proof_replay_rejected` — step 3d cross-conn path 3. `postgres_duplicate_event_precheck_is_noop` — step 3c precheck 4. `postgres_concurrent_same_conn_pk_race_both_succeed` — step-13 DO NOTHING 5. `postgres_concurrent_cross_conn_pk_race_one_rejected` — step-13 cross-conn 6. `postgres_deterministic_op_id_exact_replay_is_noop` — op_id idempotence Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
The previous merge kept our branch's pre-#6730 ci.yml wholesale, which deleted main's PostgreSQL Tests job, discovery validation steps, updated cache key hashes, and postgres-test-packages.sh archive-build wiring. The observability test filter also used the pre-#6730 module path (observability::tests::pool_…) that #6730 nested under postgres_tests, causing Backend Integration to exit 4 (0 tests matched). Re-resolve by starting from origin/main:.github/workflows/ci.yml verbatim and inserting the 5 intentional canvas lanes (writer-pin dispatch, ingest guard HTTP wiring, ingest guard ingest_event_inner wiring, CAS DB tests with --test-threads=1/--no-tests=fail, CAS ingest-path wiring) before the Upload relay log step in Backend Integration. All canvas tests use backend-integration-tests.tar.zst and the #[ignore] attribute without postgres_tests module nesting, so they are not discovered by postgres-test-packages.sh and do not belong in the new PostgreSQL Tests job. Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
* origin/main: chore(ci): lower Codex security review effort (#7179) fix(dev-mcp): extend shell timeout cap to 20 minutes and align outer budgets (#7185) fix(dev): keep the canonical profile when launching from desktop/ (#7143) feat(buzz-auth): add production NIP-FI federated assertion runtime (#7109) Hide download action on voice notes (#7182) ci: run PostgreSQL tests in isolated lane (#6730) Add voice notes to desktop messages (#6978) feat(desktop): add thread-scoped ACP session experiment (#6909) fix(desktop): scope composer autocomplete to focus (#6860) Signed-off-by: Tom Brow <tomb@block.xyz>
Main's #6730 postgres-test-packages.sh / check-postgres-test-discovery.py discovery mechanism selects all five canvas tests (handlers::ingest, api::bridge, store::event all sit under postgres_tests modules at this head). The PostgreSQL Tests job runs them green under discovery at 399/399. The kept name-pinned selectors used the pre-#6730 ::tests:: paths, matched 0 tests, and exited nextest 4 (no-tests=fail). Drop the 130-line block so ci.yml is byte-identical to origin/main. Discovery-validation CI step is the typo-guard going forward. Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
…n-surface No conflicts. Auto-merge correct: - lib.rs: admin init + command registrations retained (origin/main removed them for a voice-notes PR that didn't include admin surface) - commands/mod.rs: pub mod admin + pub use admin::* retained - buzz-relay admin/mod.rs: origin/main inline + processing-status changes taken as-is (no overlap with desktop admin surface changes) * origin/main: feat(buzz-auth): add production NIP-FI federated assertion runtime (#7109) Hide download action on voice notes (#7182) ci: run PostgreSQL tests in isolated lane (#6730) Add voice notes to desktop messages (#6978) Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
…thority (Design C) Implements PostgreSQL as the final authority for NIP-FI kind-9 admission on the Design C (one READ COMMITTED transaction) path. This is PR 4 in the Phase A stack; it builds on PR 3 (buzz-auth production assertion runtime, merged as 70895b3). - Add `connection_id UUID NOT NULL` to `nip_fi_proof_replay_claims`. Records the WebSocket connection UUID that first claimed each proof event, enabling per-connection ownership checks at admission time. - `NS_ADMISSION_OP`: domain-separated namespace constant (SHA-256 of "buzz.nip-fi.admission-op.v1", first 16 bytes). - `deterministic_admission_op_id(community_id, proof_event_id, signed_event_id)`: derives the admission operation_id via UUID v5 (SHA-1 namespaced), replacing the previous `Uuid::new_v4()` call in `commit_kind9_inner`. Same (community, proof, event) triple always produces the same operation_id, enabling idempotent exact-replay detection via the receipt protocol. - `Kind9Params` no longer carries an `operation_id` field; callers no longer allocate or pass it. - `commit_admission_body` reads `events FOR SHARE` after acquiring the NIP-FI writer lock. If the exact (community_id, created_at, id) row already exists, returns `AdmissionError::DuplicateEvent` immediately, writing zero new authority rows. - Reads `nip_fi_proof_replay_claims FOR SHARE` before any write. Same `conn_id` → same-connection reuse, continues. Different `conn_id` → returns `ProofReplayed`. - Reads `authorization_operation_receipts FOR SHARE` before any write. Same `operation_id` + same `request_fingerprint` → `DuplicateEvent`. Same `operation_id` + different fingerprint → `Transient` (intent conflict). - Moved from old step 10 (before epoch/POA) to after the epoch/fence and POA upserts. Uses `ON CONFLICT (community_id, proof_event_id) DO NOTHING`. After a DO NOTHING (PK race), re-reads the winning row under FOR SHARE: same conn_id → same-connection race resolved; different → `ProofReplayed`. - Includes `connection_id` in the INSERT. - If `insert_event_with_thread_metadata_in_tx` returns `was_inserted=false` after the authority mutations succeed (race that bypasses the precheck), `commit_kind9_inner` explicitly rolls back before returning the result, preventing orphaned authority mutations. - `AdmissionError::DuplicateEvent` is intercepted before the error-mapping closure. Returns `IngestResult { accepted: true, message: "duplicate:" }` immediately — the same duplicate response as the non-NIP-FI path. - Deleted `crates/buzz-nip-fi-seal-test/` and `crates/buzz-nip-fi-inner-seal-test/`. - Removed both from workspace `Cargo.toml` members. - Removed `nip-fi-boundary-test = []` feature from `buzz-relay/Cargo.toml`. - Collapsed cfg-split `mod nip_fi` / `pub mod nip_fi` in `lib.rs` to single private `mod nip_fi`. - Collapsed cfg-split `mod context` / `pub mod context` in `nip_fi/mod.rs`. - Updated `context.rs` doc comment (no longer references deleted crate). Named per the #6730 `postgres_tests` CI convention so they are selected automatically once this branch lands on main: 1. `postgres_same_conn_proof_reuse_allowed` — step 3d same-conn path 2. `postgres_cross_conn_proof_replay_rejected` — step 3d cross-conn path 3. `postgres_duplicate_event_precheck_is_noop` — step 3c precheck 4. `postgres_concurrent_same_conn_pk_race_both_succeed` — step-13 DO NOTHING 5. `postgres_concurrent_cross_conn_pk_race_one_rejected` — step-13 cross-conn 6. `postgres_deterministic_op_id_exact_replay_is_noop` — op_id idempotence Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
* origin/main: feat(buzz-agent): add DatabricksAuthCoordinator single-flight OAuth (#5545) fix(desktop): preserve keyring identity during recovery (#7203) feat(mobile): prepare `buzz-push-gateway` for deployment (#7158) ci: relax file-size ceilings by surface (#6485) fix(mobile): isolate extension linker flags; complete iOS build in CI (#7187) chore(ci): lower Codex security review effort (#7179) fix(dev-mcp): extend shell timeout cap to 20 minutes and align outer budgets (#7185) fix(dev): keep the canonical profile when launching from desktop/ (#7143) feat(buzz-auth): add production NIP-FI federated assertion runtime (#7109) Hide download action on voice notes (#7182) ci: run PostgreSQL tests in isolated lane (#6730) Add voice notes to desktop messages (#6978) Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
…rding-v3 * origin/main: feat(buzz-agent): add DatabricksAuthCoordinator single-flight OAuth (#5545) fix(desktop): preserve keyring identity during recovery (#7203) feat(mobile): prepare `buzz-push-gateway` for deployment (#7158) ci: relax file-size ceilings by surface (#6485) fix(mobile): isolate extension linker flags; complete iOS build in CI (#7187) chore(ci): lower Codex security review effort (#7179) fix(dev-mcp): extend shell timeout cap to 20 minutes and align outer budgets (#7185) fix(dev): keep the canonical profile when launching from desktop/ (#7143) feat(buzz-auth): add production NIP-FI federated assertion runtime (#7109) Hide download action on voice notes (#7182) ci: run PostgreSQL tests in isolated lane (#6730) Add voice notes to desktop messages (#6978) Signed-off-by: Clay Delk <clay.delk@gmail.com>
`postgres-tests` landed on main (block#6730) after this branch's base, and `ci-complete` was not updated to need it. The aggregate contract in `.github/scripts/pr-auto-merge-aggregate.test.py` caught it on the rebase: a red PostgreSQL lane would have left `CI Complete` green, which is the one thing that job exists to prevent. Signed-off-by: Junchao Yan <yjc801@gmail.com>
…factor The origin/main Postgres-test isolation refactor (#6730) extracted the local test DATABASE_URL fallback into crate::test_support::database_url(). The merge conflict resolution in bridge.rs left two raw TEST_DB_URL references behind; replace them with the new helper to restore compilation. Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
Four items from the rebase round: 1. Delete five stale canvas CI steps from _ci-relay.yml whose selectors used the old `::tests::` module path. After #6730 renamed all modules to `postgres_tests`, the first step matched zero tests and exited 4. All five tests already run and pass in the new discoverable PostgreSQL Domain lane (396/396 at this head). Deletion confirmed by check-postgres-test-discovery.py: all five tests remain discoverable. 2. Add `disabled={restoreMutation.isPending}` to CanvasHistoryPanel row buttons. Without this guard, clicking another row during a pending restore calls `restoreMutation.reset()`, unobserving the running mutation so a subsequent rejection never reaches `restoreMutation.error` and isPending clears, permitting a second concurrent restore. Regression test: CanvasRestorePendingGuard.test.mjs (mounted, real QueryClient, deferred IPC) — revert-red confirmed. 3. Reconcile ambiguous CLI restore submits in `cmd_restore_canvas`. If A(expected=H) commits but the response is lost, B(expected=A) commits, and the retry of identical A sees RevisionMismatch. The CLI now catches a conflict-shaped relay error and walks the writer-pinned ancestry: A reachable → Conflict (superseded, preserved); A absent → genuine Relay error; ancestry read fails → Other with explicit unknown-outcome naming our_id. Three new CLI unit tests cover all three cases. 4. Fix JSON-only stdout for the already-current short-circuit. The bare `println!("revision ... is already the current revision")` violated VISION.md:163. Now emits `{event_id, accepted:true, message:"already-current"}` on stdout and moves the human-readable note to stderr. Two unit tests cover the short-circuit exit path. Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
…factor The origin/main Postgres-test isolation refactor (#6730) extracted the local test DATABASE_URL fallback into crate::test_support::database_url(). The merge conflict resolution in bridge.rs left two raw TEST_DB_URL references behind; replace them with the new helper to restore compilation. Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
Four items from the rebase round: 1. Delete five stale canvas CI steps from _ci-relay.yml whose selectors used the old `::tests::` module path. After #6730 renamed all modules to `postgres_tests`, the first step matched zero tests and exited 4. All five tests already run and pass in the new discoverable PostgreSQL Domain lane (396/396 at this head). Deletion confirmed by check-postgres-test-discovery.py: all five tests remain discoverable. 2. Add `disabled={restoreMutation.isPending}` to CanvasHistoryPanel row buttons. Without this guard, clicking another row during a pending restore calls `restoreMutation.reset()`, unobserving the running mutation so a subsequent rejection never reaches `restoreMutation.error` and isPending clears, permitting a second concurrent restore. Regression test: CanvasRestorePendingGuard.test.mjs (mounted, real QueryClient, deferred IPC) — revert-red confirmed. 3. Reconcile ambiguous CLI restore submits in `cmd_restore_canvas`. If A(expected=H) commits but the response is lost, B(expected=A) commits, and the retry of identical A sees RevisionMismatch. The CLI now catches a conflict-shaped relay error and walks the writer-pinned ancestry: A reachable → Conflict (superseded, preserved); A absent → genuine Relay error; ancestry read fails → Other with explicit unknown-outcome naming our_id. Three new CLI unit tests cover all three cases. 4. Fix JSON-only stdout for the already-current short-circuit. The bare `println!("revision ... is already the current revision")` violated VISION.md:163. Now emits `{event_id, accepted:true, message:"already-current"}` on stdout and moves the human-readable note to stderr. Two unit tests cover the short-circuit exit path. Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
Why
PR #6660 introduced four PostgreSQL-backed persistence tests and a focused CI selector, but an exact test-name list does not automatically cover future database tests. Broad ignored-test execution also exposed shared-schema races and ambiguity between desired-state and migration-applied schema expectations.
What
postgres_tests, PostgreSQL integration binaries use apostgres_prefix, and unrelated external-infrastructure tests use anexternal_infra_prefix.template0databases while desired-state tests clone the desired-state database.This is intentionally limited to test and CI harness behavior. It does not move production database code, change persistence semantics, or implement issue #20's broader shared test-utility refactor.
Risk
Low production risk because all changes are confined to tests, CI configuration, documentation, and test harness scripts.
Remaining operational risks:
dropdb --forcefive times across roughly four seconds. Exhaustion warns with the database name but deliberately does not mask the test result; individual PostgreSQL diagnostics are suppressed.buzz-voicebecausesherpa-onnx-c-apiis absent. The branch changes no voice/build/toolchain inputs; the exact parent previously passed that job, and Blox passes the same infrastructure-free suite (1,450/1,450). A prior-head one-job retry and the final-head run both reproduced the hosted-runner failure.Verification
Author Blox workstation
2020088:cargo fmt --all -- --checkjust clippyjust test-unit: 1,450 passed; PostgreSQL tests remain skipped in fast jobsCREATEDB,CREATEROLE, andpg_read_all_statsGitHub exact final head
92c231e48f299ea2af23817763f5ae80ac013d68:sherpa-onnx-c-apinative-link failure described above2022762: no substantive findings after all initial findings were addressed. The reviewer independently verified cleanup retry behavior, exit-status preservation, shell portability, syntax, and a clean exact-head worktree.References
561de54be4d9c2b622b7c2aa5b61bc3068f47e2aGenerated with Codex.
Update — August 24, 2026 review follow-up
just goosefor one-command agent setup + fix API token auth #20.external_infra_*_testsmodules now own exclusion, and the nextest filter only recognizes module path segments.Performance profiling on Blox workstation
2027352(same prebuilt archive and cargo-nextest 0.9.143 for every comparison):createdbcalls and 284dropdbcalls consumed 28.85–29.46 aggregate seconds, about 39–40% of aggregate test-process duration.TRUNCATE … RESTART IDENTITY CASCADE: all 282 tests passed, but total time regressed to 10.47–10.67s. The 265 truncate calls consumed 24.34–25.45 aggregate seconds, so truncation merely replaced most clone/drop cost.pg_stat_activityrace. The profile remains at the proven-safe 8 workers.Decision: retain unique per-test databases. Harness cleanup uses
dropdb --if-exists --force; it drops the database rather than truncating tables or deleting rows.Verification at local branch head
60086c1f6ee34a193c342255a5e8e6293b60e988:cargo fmt --all -- --checkand all-target/all-feature clippy forbuzz-db,buzz-deletion, andbuzz-relaypassed.Final independent re-review at exact head
42097c0136ab3fa8f0efe5720ae829c04575b9b6on separate Blox workstation2028455: no substantive residual findings. The reviewer independently exercised ordinary strings, zero/one/three-hash raw strings, line/block comments, and string-contained lookalikes, then reran the full 353-file scan, shell syntax, Python AST parsing, and diff check.Independent review found that the source guard's initial regular expression could miss raw-string ignore reasons and treat a commented attribute as real. Final head
42097c0136ab3fa8f0efe5720ae829c04575b9b6parses valid ordinary/raw Rust string literals only at attributes found in comment-sanitized source; regression fixtures cover both cases. The fixture suite, Python compilation, shell syntax, diff check, and full 353-file repository scan pass on Blox.Update — August 25, 2026 restack
PR #6660 merged, so this follow-up was rebased from its former exact parent onto current
origin/main(8d2d0ff5ad42733e9949442c4b6358d0ba87f9a8). The final candidate head is05dcc2ab28948e3ab79bb44839a69f2ba44648a2; the PR no longer carries #6660's pre-squash history.Fresh exact-head verification on Blox workstation
2028572:cargo fmt --all -- --checkand all-target/all-feature clippy forbuzz-db,buzz-deletion, andbuzz-relaypassed.Update — August 25, 2026 final hosted verification
42097c0136ab3fa8f0efe5720ae829c04575b9b6.