Add UpdateMyAvatar and DeleteMyAvatar

Merged
JE
3d ago
+2425-47

outside-text: this change stems from external feedback, which an outside agent wrote on the Agent Feedback card. Jeremy chose its shape on 2026-11-27. A person must read this diff before it lands.

Depends on basecamp/bc3#14716 (stacked on basecamp/bc3#14708). Draft until it merges and this repins bc3.

What

  • UpdateMyAvatar: PUT /{accountId}/my/avatar.json, @basecampMultipart(field: "avatar"), 204. It's shaped exactly like UpdateAccountLogo and UpdateProjectLogo. The avatar couldn't be modeled on PUT /my/profile.json: a second operation on that path fails make smithy-build with HttpUriConflict. That's why bc3 gets its own path.
  • DeleteMyAvatar: DELETE /{accountId}/my/avatar.json, 204. bc3 has routed this for a long time, but undocumented, and until bc3#14716 it refused API-host writes from untrusted tokens.
  • Both are tagged People and regenerated in all seven languages. Go also gets PeopleService.UpdateMyAvatar(ctx, r, filename, contentType) and DeleteMyAvatar(ctx), using the same multipartFileBody as AccountService.UpdateLogo.
  • TypeScript fix: PeopleService was built without authenticatedFetch, baseUrl or enableRetry, so a multipart call on it built a relative URL and threw Invalid URL. It's now wired as projects and account are. The new upload test caught this.
  • Breaking for custom Go mocks: like the logo operations in #1057, the new methods are added to generated.ClientInterface and ClientWithResponsesInterface. MIGRATING.md says so, and the PR carries breaking for API Compatibility.
  • Counts updated: check-idempotency-parity (107/249), the Rust guarantees.rs counts (302 operations), and SECURITY.md's retry summary.

Tests

Every language has tests for both operations: Go, TypeScript, Ruby, Python (sync and async), Kotlin, Swift and Rust. Each one checks:

  • an upload is a PUT to exactly /{account}/my/avatar.json, with one multipart part named avatar carrying the exact filename, content type and bytes, and it returns void on 204;
  • a 422 surfaces as a validation error;
  • a DELETE returns void;
  • a 403 surfaces as forbidden.

Go also checks that a 503 retry replays the identical body, and that a missing reader, filename or content type is a usage error and sends no request. TypeScript also checks the operation hooks.

Gates

make check passes everything except bc3-route-parity, and its self-test test-bc3-route-parity fails its positive control for the same reason:

DeleteMyAvatar: SDK declares DELETE /my/avatar, which bc3 does not document. Fix the route, or allowlist it with a reason.
UpdateMyAvatar: SDK declares PUT /my/avatar, which bc3 does not document. Fix the route, or allowlist it with a reason.

This is correct: the pinned bc3 revision doesn't document these routes yet. It isn't waived, because any waiver here would claim bc3 serves routes it doesn't yet serve. The fix is to repin spec/api-provenance.json to bc3#14716's merge commit and run make bc3-routes, once it merges, as #1075 did for doors.

basecamp/basecamp-cli's people update me --avatar PR points at this branch.