feat: add image derivative worker lifecycle
Add worker-owned image derivative job execution with explicit PROCESSING, COMPLETED, and FAILED outcomes, plus tests and documentation. Verification: npm test passed 70 tests, worker tests passed 2 tests, and integration passed 14 tests. No build script is configured.
This commit is contained in:
@@ -73,6 +73,10 @@ variants and writes them through `ImageStorage` using an injected renderer.
|
||||
The concrete decoder/encoder and worker queue remain separate infrastructure
|
||||
work so local development does not depend on a machine-specific binary.
|
||||
|
||||
The worker now owns the derivative job lifecycle and reports explicit
|
||||
`PENDING`, `PROCESSING`, `COMPLETED`, or `FAILED` outcomes. Queue transport and
|
||||
persistent job records remain deployment-specific work.
|
||||
|
||||
## Metadata
|
||||
|
||||
Store:
|
||||
|
||||
@@ -92,6 +92,7 @@ docker context use orbstack
|
||||
- Item-owned image metadata can be added through a seller-scoped, CSRF-protected admin route; publication uses the persisted image count.
|
||||
- `ImageStorage`, traversal-safe local storage, multipart upload transport, and binary signature validation are implemented; derivative processing remains.
|
||||
- Derivative orchestration now defines thumbnail, medium, and large WebP storage outputs behind an injected renderer; the concrete worker-backed renderer remains.
|
||||
- The worker owns an image derivative job runner with explicit processing, completion, and failure outcomes; queue transport and persistent job records remain.
|
||||
- Image metadata limits are enforced in the service boundary: supported MIME types, 10 MiB default file size, and 10,000-pixel maximum dimensions.
|
||||
|
||||
### Verified Baseline
|
||||
@@ -103,7 +104,7 @@ docker context use orbstack
|
||||
| HTTP | Product and inventory creation, validation, authentication/recovery, CSRF, rate limiting, and session management |
|
||||
| Integration | PostgreSQL catalog/session/audit/password recovery persistence and Redis-shared login throttling |
|
||||
|
||||
Latest result: `npm test` passed 70 tests; `npm run test:integration` passed 14 tests against OrbStack PostgreSQL and Redis.
|
||||
Latest result: `npm test` passed 70 tests; worker tests passed 2 tests; `npm run test:integration` passed 14 tests against OrbStack PostgreSQL and Redis.
|
||||
|
||||
## Next Milestone
|
||||
|
||||
@@ -132,7 +133,7 @@ Work through one bounded vertical slice at a time. The linked documentation rema
|
||||
|
||||
- No initial User/Seller is provisioned in the development database yet. Run `npm run provision:admin` after setting its required local `.env` variables.
|
||||
- Listings are partially implemented: draft creation, seller-scoped reads, publication gating, lifecycle writes, archive behavior, sold/archived inventory checks, and item-owned image metadata are complete; storage-backed processing remains.
|
||||
- Sales, acquisitions, pricing, image processing, search, worker jobs, web UI, CI, and deployment services remain unimplemented.
|
||||
- Sales, acquisitions, pricing, concrete image rendering, search, queue transport, persistent worker jobs, web UI, CI, and deployment services remain unimplemented.
|
||||
- `npm install` currently reports dependency audit findings. Review and remediate them before production deployment; do not use `npm audit fix --force` without reviewing its changes.
|
||||
|
||||
## Local Commands
|
||||
|
||||
Reference in New Issue
Block a user