feat: defer item tagging to an external agent (phase 2)#2
Open
jansitarski wants to merge 4 commits into
Open
Conversation
b95883c to
b55786f
Compare
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.
b55786f to
5c3da0a
Compare
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.