Avatar figures must use app greens-to-black, not the style rainbow (rings ring override) #539
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#539
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Follow-up to #525 (user directive in chat). The rings figure color comes from the style's built-in 16-color rainbow collection (coral→blue→purple→pink), so generated avatars mix app emerald (background) with indigo-family figures. r.options.color(name) (resolver.go:453) lets user-supplied colors override the style collection: pass a greens-to-black ring palette (Tailwind emerald scale + black, e.g. emerald-300→950 + 000000) via the ring option key alongside seed/backgroundColor. Test must assert none of the 16 default ring colors appear in output. Existing holders keep avatars (no migration); docs decision.
Fix PR: #540 (branch fix/issue-539). Passes emerald-300→950 + black via the ringColor option; strong pin test asserts none of the 16 style rainbow colors appears across seeds. Full identity package -race PASS, coverage 95.6%, gofmt/vet clean, no new deps, no migration.
Review of PR #540 (fix/issue-539, commit
cafa3c7) — all checks done in scratch worktree /tmp/pr540 (removed afterward); main worktree untouched (tracked files clean); no browser (SVG fill assertions + reasoning only, per task rules); no docker/compose/system changes.(1) Option key CORRECT: vendored dicebear-go/v10@v10.7.0 internal/render/options.go:173-179 reads name+"Color" (options.color), resolver.go:453 user-supplied list wins over style collection, style component is named "ring" (rings.json components+colors both keyed "ring") → "ringColor" is the right key, not "ring". JSON round-trip []string spelling matches the #525 backgroundColor precedent.
(2) Palette all app-greens + black: 6ee7b7/34d399/10b981/059669/047857/065f46/064e3b/022c22 = canonical Tailwind emerald 300→950 exactly, plus 000000. Background stays 059669 (emerald-600). Docs honestly notes tone-on-tone figure possible — acceptable, still on-brand.
(3) Rainbow-absence test STRONG + NON-VACUOUS: TestGenerateGreensOnlyFigures asserts none of the 16 style defaults appears across 8 ordinary+hostile seeds, every fill is a palette member, fills non-empty (override can't silently empty the figure), and re-runs the sanitize gate. Verified non-vacuous with a temp probe: old code (no ringColor) emits a rainbow color for dave@example.com (1/16), so the new test fails on old code. Pinned 16 values match rings.json colors.ring.values exactly (modulo # prefix/ToHex).
(4) Every fill in-palette: eyeballed generated SVG (temp probe, since removed): dave@example.com → fills {059669, 10b981}, erin@example.com → {059669, 10b981}; all palette members, no gradient elements. Test enforces this across all 8 seeds.
(5) Seed/sanitize/determinism INTACT: checkAvatarSVG + seed handling untouched by diff; TestGenerateDeterminism + TestGenerateSeedAbsent still pass.
(6) Existing holders untouched: diff is 3 files only (avatar.go, avatar_test.go, docs decision) — no profile/migration code; docs states no retroactive regen.
(7) Law 1 / law 12 / quality gates: no go.mod/go.sum change (same dicebear modules); gofmt clean; go vet clean; go build ./... OK; go test ./internal/identity/ -race full package PASS; coverage 95.4% statements (≥95% gate holds; PR claimed 95.6%, trivial variance). Docs decision entry accurate (palette, override mechanism with vendored file cites, tone-on-tone note, no migration, law-1 note). One cosmetic nit (not blocking, no fix pushed): the pre-existing "Rationale:" continuation line for #525 gained a 3-space indent in the docs diff — harmless.
MERGE RECOMMENDATION: ready to merge.
Fixed by PR #540 (review clean — ringColor key verified, palette all app-greens + black, rainbow-absence proven non-vacuous), merged. Closing.