mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-10 19:47:12 +01:00
Adds the route-independent spine of the planned art-generation bake-off: a harness that decides whether generated art is well-formed, so "non-sloppy" becomes machine-checkable instead of a judgement call. Findings that shaped the design, all measured rather than assumed: - Integer-scale invariance separates true pixel art (impurity 0.0000) from interpolated fakes (1.0000) exactly -- but passes trivially at scale 1, so it must never be trusted alone on native-resolution output. - Gate ORDER is load-bearing. A soft-alpha image has no fully-opaque pixels, so an opaque-only colour count returns 0 and silently passes. ALPHA_NOT_BINARY now runs first and COLOR_COUNT fails closed on an empty opaque set. - Counting must be over opaque RGB only: transparent pixels retain arbitrary RGB and inflated a naive RGBA count, rejecting correct art at 18/16. - Declaring a gate was not enough to run it. hand_painted.toml shipped declaring SILHOUETTE_LOW_CONTRAST with no implementation, so it parsed, ran nothing, and reported a pass. load_spec now fails closed on unimplemented gates, result-only codes, and gates missing their config. Thresholds are calibrated against 250 genuine 32x32 CC0 icons, not guessed: p50=7 p90=13 p99=26 opaque colours; cap 32 rejects 0.0% of real art while raw generator output measured 34403 colours. An initial cap of 16 wrongly rejected a real DCSS icon -- re-derived from the corpus rather than nudged. Verified: 57 tests, 100% branch coverage, zero suppressions, all hooks pass. 58/60 (96.7%) of real CC0 icons pass the full stack; both failures confirmed true positives. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T9rQ12yZ7sJxiPQTCS5dUF
18 lines
655 B
TOML
18 lines
655 B
TOML
# Hand-painted / illustrative: deliberately weakly gated.
|
|
#
|
|
# Palette conformance, colour count and scale-invariance are MEANINGLESS here --
|
|
# smooth gradients and anti-aliased edges are the point of the style, so running
|
|
# those gates would manufacture false failures on correct art. Only the
|
|
# universally-valid gates apply.
|
|
#
|
|
# Consequence, stated rather than hidden: this style's bake-off verdict leans
|
|
# almost entirely on the human contact-sheet gate. The machine gates can say
|
|
# "not malformed"; they cannot say "not sloppy" for painterly work.
|
|
name = "hand_painted"
|
|
canvas = [1024, 1024]
|
|
|
|
gates = [
|
|
"CANVAS_SIZE",
|
|
"SILHOUETTE_LOW_CONTRAST",
|
|
]
|