controlplane Command RPC reports a cross-kind request-id conflict as Unavailable #1227

Closed
opened 2026-10-27 13:39:32 +00:00 by sam · 0 comments
Owner

Residual from archie-core-fcvd (fixed in 6df8daf8). internal/store.PutResource now refuses a request ID reused across resource kinds with the typed sentinel ErrResourceRequestKindConflict. In-process callers get it via errors.Is, but the only wire boundary it crosses is controlplane.v1's Command RPC, whose server-side mapError (internal/app/controlplane/controlplane.go:162) has a catch-all that returns codes.Unavailable with err.Error(). A remote caller therefore sees clientError's ErrUnavailable and must read the message text to tell a request-id conflict apart from a genuine outage. Fix direction: add a dedicated code (for example InvalidArgument or a new canonical sentinel mapped in internal/infrastructure/staterpc/values.go, taking care with the (code, exact canonical message) contract) so the conflict is distinguishable without string matching. Low impact today because no caller in the tree reuses a request ID across kinds; this is a future-proofing guard.

Close reason

Closed on GitHub with verification evidence; confirmed against the tree.


Imported from beads archie-core-aypl · GitHub #1178 · type bug · priority P3 · created 2026-09-21 · closed 2026-10-05

Residual from archie-core-fcvd (fixed in 6df8daf8). internal/store.PutResource now refuses a request ID reused across resource kinds with the typed sentinel ErrResourceRequestKindConflict. In-process callers get it via errors.Is, but the only wire boundary it crosses is controlplane.v1's Command RPC, whose server-side mapError (internal/app/controlplane/controlplane.go:162) has a catch-all that returns codes.Unavailable with err.Error(). A remote caller therefore sees clientError's ErrUnavailable and must read the message text to tell a request-id conflict apart from a genuine outage. Fix direction: add a dedicated code (for example InvalidArgument or a new canonical sentinel mapped in internal/infrastructure/staterpc/values.go, taking care with the (code, exact canonical message) contract) so the conflict is distinguishable without string matching. Low impact today because no caller in the tree reuses a request ID across kinds; this is a future-proofing guard. ### Close reason Closed on GitHub with verification evidence; confirmed against the tree. --- _Imported from beads `archie-core-aypl` · GitHub #1178 · type bug · priority P3 · created 2026-09-21 · closed 2026-10-05_
sam added the lowbug labels 2026-10-27 13:39:32 +00:00
sam self-assigned this 2026-10-27 13:39:32 +00:00
sam closed this issue 2026-10-27 13:39:32 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#1227