Fix #385: owner profile off SWR #388

Merged
crueber merged 1 commit from fix/issue-385 into main 2026-09-12 15:53:26 +00:00
Owner

Fixes #385 (option a, the #381/#384 pattern).\n\nGET /api/v1/owners/{owner}/profile served the PUT-editable bio (plus display name, location, timezone) under ccSWR with no ETag — the same stale-serve trap class #381 fixed on the summary, worse (no revalidation story). Now serves ccMutable (private, no-cache) with a content ETag (p over the served doc, the #384 detailedETag shape) covering all mutable projections plus request-scoped can_edit, so grant-only changes bust revalidation too. Unchanged profiles still 304 with zero body (law 6 economics kept; single exact-key sidecar GET unchanged, off the budgeted paths).\n\nIssue avatar question answered: no avatar projection on this route (avatars ride me.avatar_url, #376); documented in §8 + Decisions. SPA needs no change (already invalidates profile:{owner} on save).\n\nTests: TestProfileMutableClassAndETagEconomics (200→304→edit→200→304) + updated SWR assertion; internal/api -race green, 95.3% package cover (profile.go 100%); gofmt/vet clean; 07_api §4/§8/Decisions updated. No new deps.

Fixes #385 (option a, the #381/#384 pattern).\n\nGET /api/v1/owners/{owner}/profile served the PUT-editable bio (plus display name, location, timezone) under ccSWR with no ETag — the same stale-serve trap class #381 fixed on the summary, worse (no revalidation story). Now serves ccMutable (private, no-cache) with a content ETag (p<fnv1a32hex> over the served doc, the #384 detailedETag shape) covering all mutable projections plus request-scoped can_edit, so grant-only changes bust revalidation too. Unchanged profiles still 304 with zero body (law 6 economics kept; single exact-key sidecar GET unchanged, off the budgeted paths).\n\nIssue avatar question answered: no avatar projection on this route (avatars ride me.avatar_url, #376); documented in §8 + Decisions. SPA needs no change (already invalidates profile:{owner} on save).\n\nTests: TestProfileMutableClassAndETagEconomics (200→304→edit→200→304) + updated SWR assertion; internal/api -race green, 95.3% package cover (profile.go 100%); gofmt/vet clean; 07_api §4/§8/Decisions updated. No new deps.
Sign in to join this conversation.
No description provided.