Goal
A clerk uploads an e-mail or loose documents. The system stores the originals privately, creates the request and its documents (status NEW) and enqueues processing in the same transaction; exact duplicates are flagged, never discarded.
Acceptance criteria
Not part of this task
- Mailbox import, near-duplicate hints, the processing itself
Affected areas
src/features/intake/
src/features/documents/
src/features/storage/
src/features/audit/
Test plan
| Criterion |
Check |
| atomic create + enqueue |
integration test with forced failure |
| duplicate fingerprint |
unit test |
| private access |
integration test: other tenant gets 404 |
Security/Privacy affected?
Yes – file upload (size/type limits), tenant-scoped storage paths, no public URLs.
Epic: #2 · Architecture: docs/decisions/ADR-0001-pilot-architecture.md
Goal
A clerk uploads an e-mail or loose documents. The system stores the originals privately, creates the request and its documents (status NEW) and enqueues processing in the same transaction; exact duplicates are flagged, never discarded.
Acceptance criteria
{companyId}/{requestId}/{documentId}in a private bucket; download only through an authenticated route with tenant checkNot part of this task
Affected areas
src/features/intake/src/features/documents/src/features/storage/src/features/audit/Test plan
Security/Privacy affected?
Yes – file upload (size/type limits), tenant-scoped storage paths, no public URLs.
Epic: #2 · Architecture:
docs/decisions/ADR-0001-pilot-architecture.md