Repository navigation
test(v2): pin that people and agents draw on disjoint background families - #1843
Merged
Merged
Conversation
samxu01
force-pushed
the
test/task-148-avatar-ground-families
branch
from
September 23, 2026 09:37
474bf14 to
92632be
Compare
lilyshen0722
commented
Sep 23, 2026
lilyshen0722
left a comment
Contributor
Author
There was a problem hiding this comment.
GATE: PASS at 92632be5 — measured. This closes the gap I filed on #1834 (71419). BASE 31/31 across four avatar suites, RESTORED 31/31, tree clean after every mutation. Anchor count 1 on each.
mutation on avatars.ts |
expected | result |
|---|---|---|
M1 AGENT_BG := HUMAN_BG |
red | 1 red — the new test |
M2 HUMAN_BG := AGENT_BG |
red | 1 red |
M3 partial overlap, AGENT_BG = [1, 2, 6, 0] |
red | 1 red |
M4 legit reorder, HUMAN_BG = [3, 0, 5, 4] (same set) |
green | 31/31 green |
M5 AGENT_BG = [1, 1, 1, 1] (disjoint but no variety) |
red | 1 red |
M1 and M2 are the two you ran. The three I added are the ones that decide whether the test is the right shape rather than merely red:
- M3 is the realistic drift. A future edit does not swap a whole family, it changes one index — and a full-swap-only test would sleep through that. This one catches a single slot.
- M4 is the important green. Your stated limit — disjointness is pinned, the 4+4 partition and which family is warm are not — is now measured rather than asserted: reordering a family within itself keeps all 31 green, so a designer can re-rank the palette without fighting the test.
- M5 shows the two
toBeGreaterThanOrEqual(3)lines are load-bearing, not decoration. Without them a family could collapse to one colour and still be "disjoint".
The seed sweep is the right call for the reason your comment gives: hashString(key) % 4 means a single seed exercises one slot, so a hand-picked pair could pass on a wrong family by luck. No gap found — nothing further from me.
samxu01
force-pushed
the
test/task-148-avatar-ground-families
branch
from
September 23, 2026 09:49
92632be to
996bebb
Compare
…lies sprint-review 71419 measured that setting AGENT_BG to HUMAN_BG left every suite green: the dress half of the species signal was pinned twice and the ground half not at all, so a same-seed human and agent could share one wash and nothing failed. Walks 200 seeds through characterAvatarFor for each kind, reads the ground back out of the rendered SVG (the first layer renderFace paints) and asserts the two ground sets do not intersect. The sweep is the point — the index is hashString(key) % 4, so one hand-picked pair exercises a single slot. Mutation-proven both ways: AGENT_BG := HUMAN_BG and HUMAN_BG := AGENT_BG each red exactly this test, reporting the shared families; the restored file is green. avatarCharacter 14/14, and 29/29 with V2Avatar, avatarInitials and avatarPresetFaces.
samxu01
force-pushed
the
test/task-148-avatar-ground-families
branch
from
September 23, 2026 23:17
996bebb to
7f84b07
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes TASK-148. Follow-up to #1834 (
58a6f2c2), which moved the species signal onto disjoint background families.Why
sprint-review measured (71419) that pointing
AGENT_BGatHUMAN_BGinfrontend/src/v2/utils/avatars.tsleft every suite green. The dress half of the signal (agents in ink, cobalt collar) is pinned twice; the ground half was pinned nowhere — so a same-seed human and agent could wear the identical wash and nothing failed.What
Test-only.
characterAvatarForis walked with 200 seeds for each kind, the ground is read back out of the rendered SVG (the first layerrenderFacepaints), and the two ground sets must not intersect. The sweep matters: the family index ishashString(key) % 4, so one hand-picked pair exercises one slot and a wrong-but-lucky family would pass.Proof
Mutation-proven in both directions, which is the asymmetry the row was filed about:
AGENT_BG := HUMAN_BGHUMAN_BG := AGENT_BGThe failure is the disjointness assertion (
expect(received).toEqual(expected)), reporting the shared families — not a count or a length.With the three neighbouring avatar suites (
V2Avatar,avatarInitials,avatarPresetFaces): 4 suites, 29/29. eslint clean on the touched file.Limit
It pins disjointness, not the 4+4 partition or the specific warm/cool split — asserting exact membership would freeze the palette, which is a design call. It also depends on the ground being the first painted layer; the existing "the traits draw is stable" test is what guards layer order, so a reorder must change both together.