DatabaseEngine::export_messages_to_file (crates/nuncio-store/src/db.rs) discarded the result of its WORM audit-log write with let _ = ..., so an export whose audit record failed to persist still returned Ok -- an unaudited export was indistinguishable from a properly audited one, defeating the tamper-evidence the WORM log exists to provide.
The audit write is now ?-propagated: any failure to append the WORM audit record now fails the export with DatabaseError (surfaced by the gRPC handler in crates/nunciod/src/grpc.rs as Status::internal, which was already correctly wired to map an Err here -- it just never received one).
Test plan
Added export_messages_to_file_fails_when_worm_audit_write_fails in crates/nuncio-store/src/db.rs, which forces a genuine storage failure (closing the connection pool out from under the engine, mirroring the existing check_integrity_pool_propagates_transient_timeout_without_masking_as_corrupt technique in the same file) and asserts the export returns Err.
## Summary
- `DatabaseEngine::export_messages_to_file` (`crates/nuncio-store/src/db.rs`) discarded the result of its WORM audit-log write with `let _ = ...`, so an export whose audit record failed to persist still returned `Ok` -- an unaudited export was indistinguishable from a properly audited one, defeating the tamper-evidence the WORM log exists to provide.
- The audit write is now `?`-propagated: any failure to append the WORM audit record now fails the export with `DatabaseError` (surfaced by the gRPC handler in `crates/nunciod/src/grpc.rs` as `Status::internal`, which was already correctly wired to map an `Err` here -- it just never received one).
## Test plan
- [x] Added `export_messages_to_file_fails_when_worm_audit_write_fails` in `crates/nuncio-store/src/db.rs`, which forces a genuine storage failure (closing the connection pool out from under the engine, mirroring the existing `check_integrity_pool_propagates_transient_timeout_without_masking_as_corrupt` technique in the same file) and asserts the export returns `Err`.
- [x] `cargo fmt --all -- --check`
- [x] `cargo check-all` (clippy `--all-targets --workspace -D warnings`, 0 warnings)
- [x] `cargo test-all` (0 failed, 0 ignored)
Refs #246
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
DatabaseEngine::export_messages_to_file(crates/nuncio-store/src/db.rs) discarded the result of its WORM audit-log write withlet _ = ..., so an export whose audit record failed to persist still returnedOk-- an unaudited export was indistinguishable from a properly audited one, defeating the tamper-evidence the WORM log exists to provide.?-propagated: any failure to append the WORM audit record now fails the export withDatabaseError(surfaced by the gRPC handler incrates/nunciod/src/grpc.rsasStatus::internal, which was already correctly wired to map anErrhere -- it just never received one).Test plan
export_messages_to_file_fails_when_worm_audit_write_failsincrates/nuncio-store/src/db.rs, which forces a genuine storage failure (closing the connection pool out from under the engine, mirroring the existingcheck_integrity_pool_propagates_transient_timeout_without_masking_as_corrupttechnique in the same file) and asserts the export returnsErr.cargo fmt --all -- --checkcargo check-all(clippy--all-targets --workspace -D warnings, 0 warnings)cargo test-all(0 failed, 0 ignored)Refs #246