WIP: fix: retain attachment cleanup across transaction and provider failures #45

Draft
KofTwentyTwo wants to merge 6 commits from fix/attachment-transactions-1289 into feature/collab
pull from: fix/attachment-transactions-1289
6 Commits
Author SHA1 Message Date
james.maesandGPT-6 dc65a826ce feat: resolve settled attachment uploads with retained receipts
Require identified admin evidence and locked reference checks before deleting bytes. Preserve immutable operational receipts, exclude them from retries, and expose the standard Review/Result table action with help.

Co-Authored-By: GPT-6 (Codex) <noreply@openai.com>
2026-10-26 05:46:05 -05:00
james.maesandGPT-6 a9add0501d fix: retain cleanup ownership for uncertain uploads
Do not retire a failed-upload locator merely because DELETE succeeds. Let adapters attest authoritative settlement; otherwise retain it with bounded retry scheduling. Reproduce a PUT completing after rollback and an independent sweep.

Refs QRun-IO/qqq#1289

Co-Authored-By: GPT-6 (Codex) <noreply@openai.com>
2026-10-22 18:37:09 -05:00
james.maesandCodex 4e45546c89 fix: persist attachment upload ownership before storage writes
Coordinate upload and cleanup with transactional row locks. Verify rejected intent creation, outer transaction ownership, abrupt child JVM termination and concurrent recovery. Full Maven verify passes 196 tests and coverage gates.

Co-Authored-By: Codex <noreply@openai.com>
2026-10-22 16:18:16 -05:00
james.maesandCodex 15cb8cbf72 fix: compensate ambiguous attachment uploads
Verify plain and versioned MinIO deletion replay and simultaneous PostgreSQL cleanup workers. Full verification passes 191 tests and coverage gates.

Co-Authored-By: Codex <noreply@openai.com>
2026-10-22 14:20:13 -05:00
james.maesandCodex 576f078c48 fix: persist upload compensation and defer failed cleanup
Retain cleanup locators after rollback compensation fails, keep failed batches from starving later work, and preserve pending requests across schema upgrades. Real PostgreSQL regressions and full verification pass; crash and provider acceptance remains tracked in QQQ #1289.

Co-Authored-By: Codex <noreply@openai.com>
2026-10-22 14:08:41 -05:00
james.maesandCodex 69f7caf346 fix: retain durable attachment deletion recovery
Commit cleanup intent with attachment metadata removal before deleting storage bytes. Retry committed cleanup through the existing scheduler and verify PostgreSQL rollback, failed metadata deletion, lost callbacks and replay. Remaining upload and provider recovery acceptance stays tracked in QQQ #1289.

Co-Authored-By: Codex <noreply@openai.com>
2026-10-22 14:00:39 -05:00