Uh oh!
There was an error while loading. Please reload this page.
fix(client create): honest conflict message — name the owner, handle cluster_in_use - #191
Conversation
…cluster_in_use The CLI mapped every provisioning 409 to a static "registered to a different tracebloc account — sign in to that account, or ask your admin" — which was often FALSE (the same-account phantom case) and a dead end. With the backend's fix#2 (backend#1021) the 409 body now distinguishes: • cluster_conflict — genuinely another account; body carries owner_email; • cluster_in_use — a same-account client is live on this cluster. New conflictMessage() parses the 409 body and picks the right guidance: • cross-account → "registered to another tracebloc account (<owner_email>) — ask them to release it, or sign in as that account" (contact-the-owner, never "delete the cluster" — it isn't ours to wipe; names the owner when supplied); • cluster_in_use → "another tracebloc client (<name>) in your account is already live on this cluster — offboard it first with `tracebloc delete`, or provision on a separate machine". Degrades gracefully against a backend without fix#2 (empty/unparseable body → the generic cross-account text). The client-side not-owned refusal (no HTTP body) keeps the generic message. Reworded crossAccountConflictMsg to match. Companion to backend#1021 (fix#2) and cli#190 (fix#1) of the phantom-client migration. Tests: owner_email surfaced; cluster_in_use names the live client and does NOT read as cross-account; existing cross-account + client-side-refusal messages updated to the new wording. Full suite green; gofmt -s / errcheck / ineffassign / misspell clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
saadqbal
commented
Jul 9, 2026
Clean companion to fix #2 👍 Reading the structured Tiny cosmetic nit, non-blocking: when |
Summary
The CLI mapped every provisioning 409 to a single static message — "registered to a different tracebloc account — sign in to that account, or ask your admin" — which was frequently false (the same-account phantom case) and a dead end.
With the backend's fix#2 (backend#1021) the 409 body now distinguishes two cases, and this PR makes the CLI read them:
cluster_conflict(+owner_email)cluster_in_use(+holder_name)tracebloc delete, or provision on a separate machine"This is the CLI companion to fix#2, and part of the phantom-client migration alongside cli#190 (fix#1).
Notes
crossAccountConflictMsgreworded to match ("another … ask its owner to release it").Tests
owner_emailsurfaced + contact-the-owner guidance;cluster_in_usenames the live client and must not read as cross-account; existing cross-account + client-side-refusal assertions updated to the new wording. Fullgo test ./...green;gofmt -s/errcheck/ineffassign/misspellclean.Note
Low Risk
User-facing error text and JSON parsing only; no auth or provisioning flow changes beyond clearer 409 handling.
Overview
tracebloc client createno longer treats every provisioning 409 as a generic cross-account conflict. It parses the API error body and shows guidance that matches what the backend reports (fix#2).For
cluster_conflict, the message can includeowner_emailand tells the user to ask that owner to release the cluster or sign in as that account. Forcluster_in_use, it names the live client (holder_name) and points totracebloc deleteor another machine—without implying another account. The sameconflictMessagelogic applies on PATCH anchor backfill 409s during R7 adopt.If the body is missing or old, behavior falls back to updated generic cross-account copy (“another tracebloc account … ask its owner to release it”). Tests cover owner email,
cluster_in_use, and updated wording.Reviewed by Cursor Bugbot for commit 3f1c6c8. Bugbot is set up for automated code reviews on this repo. Configure here.