openreader/compute/worker/tests/unit
Richard R c0de2156fe refactor(documents): centralize owned document deletion and add mutation locking
Introduce `deleteOwnedDocument` utility to encapsulate all logic for removing a user's ownership of a document, including TTS segment cache cleanup, preview artifact removal, and S3 blob deletion for last-owner cases. Add `withDocumentMutationLock` to serialize concurrent mutations on the same document, using advisory locks in Postgres and a local queue fallback. Refactor all API routes and user data flows to use these utilities, ensuring transactional safety and preventing race conditions during document deletion or transfer. Update tests for new flows and add coverage for document cleanup sequencing and locking behavior.
2026-06-06 18:09:47 -06:00
..
jetstream-adapters.test.ts refactor(worker): modularize worker entrypoint and add vitest infra 2026-05-30 11:00:01 -06:00
key-and-progress.test.ts refactor(worker): modularize worker entrypoint and add vitest infra 2026-05-30 11:00:01 -06:00
orphan-recovery.test.ts feat: improve PDF parsing recovery and reader UI (#98) 2026-06-03 04:44:55 -06:00
pdf-artifact-persistence.test.ts refactor(documents): centralize owned document deletion and add mutation locking 2026-06-06 18:09:47 -06:00
worker-loop-policy.test.ts refactor(worker): modularize worker entrypoint and add vitest infra 2026-05-30 11:00:01 -06:00