Fix/271 anthropic workspace id #276

Merged
bermudalamb merged 3 commits from fix/271-anthropic-workspace-id into main 2026-09-02 17:25:05 -05:00
Owner
No description provided.
bermudalamb added 2 commits 2026-09-02 17:22:36 -05:00
Every draft in QA failed with a 400: "anthropic-workspace-id is required when authenticating with an identity-linked API key". A key issued against a workspace, rather than standing alone, is refused unless the request names the workspace it acts in — and the client was constructed with an API key and nothing else.

Nothing about a key's shape says which kind it is, so no amount of configuration checking would have caught this. Only a real call would, which is exactly what #223's task 8 existed to make.

Sent only when ANTHROPIC_WORKSPACE_ID is set. Plenty of keys need no workspace, and sending an empty header would turn the ordinary case into a different error rather than leaving it working. Both compose files carry it with an empty default so an unset variable cannot fail a deploy, and the cutover doc goes from fifteen interpolated names to sixteen — checked against the file, and every name in the list now matches one in the compose.

The failure handling needed no change and got none. The submission kept its photos, the draft recorded ai_error, and the review queue showed the reason. A model call failing must never lose somebody's consignment, and it did not.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
fix(intake): wake the worker when a draft is regenerated (#272)
SonarQube Analysis / sonarqube (pull_request) Successful in 25m3s
Linting / lint (pull_request) Successful in 2m8s
eb6c0f86c4
Regenerate set state='queued', cleared attempts and ai_error, and answered 200 — then nothing ran the worker, so the row sat until the five-minute sweeper happened along. From the admin's side that is indistinguishable from a dead button, and the obvious response is to press it again.

The submission path has kicked the worker since #223. Both paths put a row into 'queued'; only one asked for it to be drafted. That was an oversight in #225 rather than a decision: the kick was added to the submission path in a later task and the action routes were never revisited.

Fixed in both places that re-queue — the admin route and the signed regenerate link from the notification email, which sets the identical state. Fire and forget with a logged catch, exactly as the submission path does: a slow or failing model call must not become a failed request for the admin, and the sweeper is still the backstop if the kick misses.

The card still does not update itself once the draft lands, since drafting takes a few seconds and the screen has no way to know it finished. That is a UI question rather than this bug, and is noted on #272.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
bermudalamb added 1 commit 2026-09-02 17:22:47 -05:00
Merge branch 'main' into fix/271-anthropic-workspace-id
SonarQube Analysis / sonarqube (pull_request) Successful in 25m23s
Linting / lint (pull_request) Successful in 1m59s
1e3a418a2e
bermudalamb merged commit e19561cde6 into main 2026-09-02 17:25:05 -05:00
bermudalamb deleted branch fix/271-anthropic-workspace-id 2026-09-02 17:25:06 -05:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bermudalamb/redefined-designs#276