M6 [P1]: Export must not report success when its WORM audit write fails #246

Closed
opened 2026-07-31 14:40:28 +00:00 by KofTwentyTwo · 1 comment
KofTwentyTwo commented 2026-07-31 14:40:28 +00:00 (Migrated from github.com)

In the export path (db.rs:2093-2100) the WORM audit-record write uses let _ = ... — a failed audit write is silently swallowed while export still returns success, so an unaudited export looks audited. Goal: propagate the audit-write failure (fail the export, or surface an explicit error) instead of discarding it; test that an audit-write failure is not reported as a successful audited export.

Source: full-tree audit 2026-07-30 (scratchpad/audit/AUDIT-SUMMARY.md). Follow docs/STORY-WORKFLOW.md: engine+proto(if surface)+CLI+offline E2E, mock-only tests, no fabricated data, comment convention, PR to dev, PO reviews before close.

In the export path (db.rs:2093-2100) the WORM audit-record write uses `let _ = ...` — a failed audit write is silently swallowed while export still returns success, so an unaudited export looks audited. Goal: propagate the audit-write failure (fail the export, or surface an explicit error) instead of discarding it; test that an audit-write failure is not reported as a successful audited export. Source: full-tree audit 2026-07-30 (scratchpad/audit/AUDIT-SUMMARY.md). Follow docs/STORY-WORKFLOW.md: engine+proto(if surface)+CLI+offline E2E, mock-only tests, no fabricated data, comment convention, PR to dev, PO reviews before close.
KofTwentyTwo commented 2026-07-31 16:40:17 +00:00 (Migrated from github.com)

Delivered via PR #268 (squash-merged to dev). export_messages_to_file now propagates a failed WORM audit-record write (let _ = ... -> ...?) instead of swallowing it, so an export whose audit record can't persist fails rather than reporting an unaudited export as successful. The gRPC Export handler already maps Err->Status::internal. Genuine forced-failure test via pool-close. Reconciles the export audit-swallow finding.

Delivered via PR #268 (squash-merged to dev). export_messages_to_file now propagates a failed WORM audit-record write (let _ = ... -> ...?) instead of swallowing it, so an export whose audit record can't persist fails rather than reporting an unaudited export as successful. The gRPC Export handler already maps Err->Status::internal. Genuine forced-failure test via pool-close. Reconciles the export audit-swallow finding.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: KofTwentyTwo/nuncio#246