SLICE-7 follow-ups: draft-blob→objectstore + image-fetch hardening #31
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
SLICE-7 (images pipeline, SD-0002) shipped to PPE at v0.7.0. These hardening
follow-ups were deliberately deferred and are non-blocking; grouping them so they
stay visible to triage (memory holds only the next slice).
1. Draft upload blob → objectstore (close the §6.3.1 seam). Import draft blobs
remain BYTEA on
import_draft(the §7.2 SLICE-7 ships list was images-only). Thedesigned end-state (§6.3.1) stores them at
import-drafts/{draft_id}/upload.csvin the media bucket with the 1-day GCS lifecycle rule (the
provision-bucketscript already sets that rule). Move the blob to
platform/objectstore, store thekey on the draft, read it back at confirm.
2. Multi-worker image-fetch claim.
repo.claim_image_for_fetchis apresence/idempotency check adequate for the single-uvicorn-worker, in-process
model (recovery runs at startup over prior-process runs; a fresh confirm always
targets a new run — no two phases hit the same run concurrently). It is NOT a
cross-process lock. If the fetch phase ever goes multi-worker or onto a queue
(§6.9), implement a real claim: a
pending → fetchingstatus transition withRETURNING, orSELECT … FOR UPDATE SKIP LOCKED.3.
originalrendition served asapplication/octet-stream. The servingroute (
main.py) hard-codes octet-stream for theoriginalrendition though thebytes were stored with their true content-type. Not on any current surface (export
detail), but a browser hitting the original URL gets a download. Storethe original's content-type (e.g. a column or a sidecar) and serve it.
4. Deploy-time guard on
ECOMM_IMAGE_FETCH_ALLOW_PRIVATE. The SSRFallow-private escape hatch is test-only (set in
e2e/serve.sh, never in thedeployed overlay). Add a deploy/startup assertion that it is unset in PPE/prod so
a misconfigured overlay can't silently disable the SSRF guard.
Source: SLICE-7 final code review (session 0034). Items 2–4 are review minors;
item 1 is the deferred §6.3.1 design seam.
Closing as part of the pivot from a generic multi-tenant Shopify-alternative storefront to the commitment-commerce + cross-maker verified referral network direction (see
ecomm-content/rfcs/network_strategy.md; session 0036).SLICE-7 follow-ups on the storefront image-import path. The objectstore/images infra survives, but these import-specific follow-ups are superseded; will re-file against the network catalog-image needs if they recur.
Nothing is lost — code stays in git history and the issue can be reopened if it resurfaces under the network architecture.