Fix #376: auto-generated avatars #379
No reviewers
Labels
No labels
actions
bug
cli
duplicate
enhancement
fork
forum
git storage
help wanted
insights
invalid
issues
moderation
oidc
ownership transfer
packages
pr/merge protection rules
projects
pull requests
question
releases
sponsorships
tags
webhooks
wiki
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
crueber/walhub!379
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/issue-376"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #376: DiceBear constellation avatars (seed = verified email) generated in background on OIDC login.
Acceptance coverage
me().avatar_url) +/:ownerheader.AvatarHookseam fires post-mint inauthCallback; per-principal single-flight goroutine + mutex dedup (task table deliberately NOT used — repo-keyed narrated work only; rationale inavatar.go+ 01 Decisions).GET /api/v1/users/{principal}/avatar(image/svg+xml,public, max-age=86400, immutable+ ETag,?v=<avatar_updated_at>busting viaUserAvatarURL).avatar_disabled; login never regenerates until POST regenerates (documented).<script>, no seed leak — fail closed). Determinism documented (same email → identical bytes; regen reproduces).Verified deviations from the issue text (checked, not assumed): (a) constellation defines NO options — the 'electric' preset names a notionists variant, not a constellation option, so generation uses defaults; (b) the library is NOT zero-dependency —
go mod graphproof below.Tests (all -race):
internal/identity95.5% (determinism, hostile-seed absence, single-flight 5-concurrent→1, headers/ETag/304, auth matrix, opt-out/regen, error branches);internal/api95.2% (TestMeAvatarURL);internal/servergreen except pre-existing env failureTestUIAssetConcepts(fails identically on main — stale dist);cmd/walhubgreen; node 750/752 (2 smoke failures also on main — stray :8080 server). gofmt/vet clean.go.mod additions (exact):
go mod graph (module requirements):
(
go mod whypins both transitives to dicebear-go's internal validate/render path; x/text was already indirect.)No browser drive (shared-daemon loopback guard per workspace rules); no docker/compose changes; no live instance touched.