refactor: make inventory images the publication source
Remove the temporary listing-level image count from the schema, validation, DTO, and draft contract. Publication now requires the persisted inventory image repository count. Add migration 0009 and update listing tests and implementation status. Verification: npm test passed 62 tests and integration passed 14 tests. No build script is configured in this repository.
This commit is contained in:
@@ -40,6 +40,7 @@ docker context use orbstack
|
||||
- `0006_listings`: listing records and lifecycle enum.
|
||||
- `0007_listing_image_count`: persisted image prerequisite for publication.
|
||||
- `0008_inventory_images`: item-owned image metadata and processing state.
|
||||
- `0009_remove_listing_image_count`: publication no longer stores a listing-level image snapshot.
|
||||
- Isolated integration tests require a database name ending in `_test` and truncate only that database's tables.
|
||||
- Local-only `npm run provision:admin` creates the first Admin User and linked Seller atomically. It requires `INITIAL_ADMIN_EMAIL`, `INITIAL_ADMIN_PASSWORD`, and `INITIAL_SELLER_NAME`, hashes the password with scrypt, and refuses once any User exists.
|
||||
|
||||
@@ -107,8 +108,7 @@ Latest result: `npm test` passed 62 tests; `npm run test:integration` passed 14
|
||||
Complete the inventory/listing integrity boundary before starting pricing and acquisition.
|
||||
|
||||
1. Add upload transport, MIME/signature/size validation, and processing/derivative lifecycle for persisted image metadata.
|
||||
2. Remove the temporary listing image-count snapshot after storage-backed image counts are fully established.
|
||||
3. Begin acquisition and pricing foundations after the listing/image boundary is complete.
|
||||
2. Begin acquisition and pricing foundations after the listing/image boundary is complete.
|
||||
|
||||
Acceptance criteria: listing reads and lifecycle writes preserve seller ownership, CSRF, inventory status, and publication prerequisites.
|
||||
|
||||
@@ -129,7 +129,7 @@ Work through one bounded vertical slice at a time. The linked documentation rema
|
||||
## Known Gaps
|
||||
|
||||
- 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 and removal of the legacy listing snapshot remain.
|
||||
- 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.
|
||||
- `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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user