Files
palette/internal
agent 4f8c5b0c63 fix: atomic burn-after-read claim (#58)
SoftDelete now reports whether it performed the delete (conditional
UPDATE ... WHERE deleted_at IS NULL via RowsAffected). RegisterRead
returns an admitted flag: legacy burn pastes admit exactly one reader
(atomic soft-delete win), and burn-after-N pastes increment reads_used
via a conditional UPDATE guarded on reads_used < reads_limit, so
concurrent readers cannot both consume the final read. API/HTML/raw
read paths return 404 when the reader loses the burn claim.

Adds concurrency regression tests: 24 parallel readers of a burn paste
(exactly one receives content) and 30 parallel readers vs a 3-read
budget (exactly 3 admitted).
2026-09-09 09:12:49 -05:00
..