Skip to content

feat: defer item tagging to an external agent (phase 2)#2

Open
jansitarski wants to merge 4 commits into
mainfrom
jansitarski/external-item-tagging
Open

feat: defer item tagging to an external agent (phase 2)#2
jansitarski wants to merge 4 commits into
mainfrom
jansitarski/external-item-tagging

Conversation

@jansitarski

@jansitarski jansitarski commented Jun 19, 2026

Copy link
Copy Markdown
Owner

No description provided.

@jansitarski jansitarski force-pushed the jansitarski/external-item-tagging branch from b95883c to b55786f Compare July 2, 2026 15:04
Add TaggingStatus (pending|tagged) and TaggedBy (auto|manual) enums with
tagging_status/tagged_by/tagged_at columns on clothing_items, exposed on
ItemResponse and filterable via ItemFilter. tagged_by records how the current
tags were produced and is only ever set server-side: auto (internal AI worker)
or manual (supplied through the API). Existing rows are backfilled as
tagged/auto so they do not appear as pending external work.
…rface

With internal vision disabled (or auto_tag=false on upload), items skip the
tagging queue and are left ready + tagging_status=pending, immediately usable
while untagged. GET /items?tagging_status=pending is the external tagger's
work queue. A content-bearing PATCH on a pending item marks it tagged with a
server-derived manual origin — a one-way transition that never rewrites an
existing origin — and projects tag attributes onto their first-class columns
(parity with the worker's dual-write). POST /items/{id}/retag resets an item
to the queue. The internal worker stamps tagged/auto on successful auto-tag
and leaves skipped items pending.
The features block shipped false pending the write-back surface; the
tagging surface now exists, so flip external_tagging on. Suggestions and
pairings stay false until their authoring endpoints land.
AI-on and AI-off paths: the auto_tag / vision enqueue guards, the pending
work-queue filter, write-back origin stamping and its one-way transition,
origin forgery rejection, empty write-backs staying pending, tag-to-column
projection, and the retag reset. Default behavior (vision on) is asserted
unchanged.
@jansitarski jansitarski force-pushed the jansitarski/external-item-tagging branch from b55786f to 5c3da0a Compare July 2, 2026 17:04
jansitarski added a commit to jansitarski/wardrowbe-mcp that referenced this pull request Jul 2, 2026
…columns

The Gap 2 workaround duplicated colors/primary_color outside the tags
payload because the backend only wrote the JSONB. The backend now projects
every tag attribute onto its first-class column on write-back
(jansitarski/wardrowbe#2), so set_item_tags sends a single tags payload.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant