feat(publish): S6 Woo create sequence + UAT draft + dup/stale/partial failure + Publish UI
- backend/publish.py: POST /slabs/{id}/publish. Sequence (PUBLISH-5): validate ready
set -> SKU lookup (409 on dup, PUBLISH-15) -> refresh taxonomy if >1h (SETTINGS-60)
-> resolve cats/tags/5 attributes -> upload processed PNGs -> POST /products ->
finalize (set woo_product_id, purge photos, PUBLISH-25). SLAB-UAT-* always draft
(PUBLISH-10). Failure: mark failed, retain photos, sync_log, plain recoverable/
unrecoverable message (PUBLISH-30/36/37/38). Partial (media ok, POST failed):
orphan media logged + manual cleanup note (PUBLISH-31). Payload: only non-null,
slug = name+sku, sold_individually true (PUBLISH-55/60).
- frontend: create/publish/Publish.svelte (slab id, publish, result + recoverable/
orphan tags) + dev toggle.
- tests: 5 publish tests (success+purge, UAT draft, not-ready 422, dup 409,
partial-media 502). Woo transport mocked.
Verified: pytest 48 passed; gates exit 0; npm build ok.
This commit is contained in:
@@ -268,5 +268,8 @@ app.include_router(pricing_router)
|
||||
from .review import router as review_router
|
||||
app.include_router(review_router)
|
||||
|
||||
from .publish import router as publish_router
|
||||
app.include_router(publish_router)
|
||||
|
||||
# expose for tests
|
||||
__all__ = ["app", "__version__"]
|
||||
|
||||
Reference in New Issue
Block a user