Office sample: round 28 — palette-law fix for face/hair blue-collapse (t-141 handoff) - #40
Closed
mahoudeau wants to merge 1 commit into
Closed
Conversation
…apse (t-141 lead-in) Root cause found for the round-14-through-26 face/hair craft gap moneta kept naming as the single biggest open item: not the 48px-anchor scale (round 24's faceFidelity note assumed this without empirically checking). Direct pixel inspection of cast/sheet-agent-undercut-typing.jpg's own source art shows a fully legible face and hair at native resolution (warm skin ramp, brow shadow, fade haircut) — the extraction was destroying it, not the source lacking it. Traced to round 25's own fix: setting accent_max_area_frac to 0 (to kill JPEG-ringing speckle noise, a real bug) had a collateral side effect — it disabled the only mechanism that could preserve small-area-but-visually- critical colors (skin/eye/brow) against a 28-color palette budget dominated by the character's much-larger-area suit. Verified mechanically: the best skin-tone color bucket ranked #58 by raw frequency, never surviving the palette_size=28 cut, so every warm face-region cell snapped to the nearest available color — always a dark suit-navy, hence the flat blue-grey face every critic pass correctly flagged. This is the exact mechanism t-141's own PALETTE LAW names as the blue-face defect's root cause. Fix: added magenta_hue_score() (round 27's own hue-diagnostic function, reused) as a second, independent gate in build_shared_palette, alongside the existing distance-to-background check — applied to the opaque/base- vs-accent palette path, which round 27's edge-band fix never reached. With that gate in place, accent_max_area_frac was restored to 0.01 (the tool's documented default) across all four manifests — safe now because hue, not the accent toggle, is what keeps noise out. New palette_hue_tolerance=25 calibrated directly against every concrete bad- pixel example cited across rounds 25-27 (all score 38-108, comfortably rejected) and every skin/hair/suit color actually present in the current sheets (all score <=17, comfortably kept). Verified: all four manifests re-ran; every shipped atlas region's sha256 matches its rectify-manifests/report-*.json exactly (byte-for-byte reproducible); determinism confirmed by double-run; sprite pixel dimensions unchanged for every region (pitch/anchor untouched — a color- fidelity fix, not a re-crop); zero magenta-hued opaque palette entries anywhere in the rebuilt atlas. NOT claiming this closes the craft gap outright — an inner-critic pass (this round's own, not a substitute for the real critic) confirmed genuine, non-lateral progress (skin tone, jaw contour, one legible eye pixel now present, where none existed before) but found the reference still wins: no eye highlight/brow line, no mouth, hair still one flat tone with no shading band or outline separating it from scalp/background. The pipeline bug is fixed; feature-level facial/hair detail is a separate, still-open pass. Built on top of kassad's round-27 commit (3071ab5). t-59 itself was closed `discarded` mid-round by consul's re-scope (staged t-141/t-143/ t-144 pipeline replacing the monolithic loop) while this was already built and verified; t-141 (stage 1: sprites) was already claimed by kassad when this landed, so it's handed over via message + this side branch rather than parked as a new t-59 round or claimed out from under them. Additive on top of round 27, not a replacement — diff and cherry-pick freely. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0192LDwTNhegzGYK1Ke8yQ3s
Owner
Author
|
Backlog purge (t-274): superseded by PR #50 (round 5 of the same t-141 work, critic-passed) and conflicting with main. The palette-law fix it carried landed in later rounds. |
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.
Handoff PR, not for direct merge — t-141 (stage 1: sprites) is already claimed by kassad, this is offered for review/cherry-pick, not landed unilaterally.
What this fixes
t-141's own mission body names "THE PALETTE LAW" as the root cause of the blue-face defect. This PR is that fix.
Root cause: round 25's
accent_max_area_frac = 0(a real fix for JPEG-ringing speckle noise) had a collateral side effect — it disabled the only mechanism that could preserve small-area-but-critical colors (skin/eye/brow) against a 28-color palette budget dominated by the character's much-larger-area suit. Verified mechanically: the best skin-tone color bucket ranked #58 by raw frequency, never surviving thepalette_size=28cut, so every warm face-region cell snapped to the nearest available color — always a dark suit-navy. That's the entire "flat blue face" bug across rounds 14–26.The fix
Built on top of kassad's round-27 commit (
3071ab5), reusing theirmagenta_hue_score():build_shared_palette's opaque-candidate path (round 27's fix only covered the edge-band decontamination path, a different code path).accent_max_area_fracto0.01(the tool's documented default) across all four manifests, now safe because hue — not the accent toggle — is what keeps noise out.palette_hue_tolerance = 25, calibrated directly against every concrete bad-pixel example cited across rounds 25–27 (min score 38) and every real skin/hair/suit color in the current sheets (max score 17) — wide margin both sides.Verification
rectify-manifests/report-*.jsonexactly (byte-for-byte reproducible).Full writeup in the commit message and in
frames.json'sround28Fixes.faceHairPaletteStarvation. Evidence screenshots:projects/bureau/deliverables/t-141-handoff-{idle,typing,face-closeup}.png.Context
t-59 was closed
discardedmid-round by consul's re-scope (staged t-141/t-143/t-144 pipeline) while this fix was already built and verified. t-141 was already claimed by kassad when this landed, so it's offered here rather than pushed into their active work or claimed out from under them. Diff and cherry-pick freely — additive on top of round 27, not a replacement.Generated by Claude Code