diff --git a/qa/test_render_recipe.py b/qa/test_render_recipe.py index dd0bfecb..c927e0ea 100644 --- a/qa/test_render_recipe.py +++ b/qa/test_render_recipe.py @@ -219,7 +219,13 @@ def test_every_recipe_class_keeps_its_static_prompt_keys(): def test_dwing_recipes_carry_hand_authored_flavor_keys(): # The ONLY prose left to hand-author: the per-class flavor sentence (#1619) — style/mood/ # atmosphere ONLY. Counts, shape, door walls and placement belong to the generator. - for name in ("dwing_room_0", "dwing_room_1"): + # SCOPE (evaOS #1629): this guard covers the FLAVOR KEYS of geometry-driven classes only. + # Legacy STATIC base_prompt/gemini_grounding keys (all classes) still hand-author feature + # prose — they are the no-`--geometry` fallback, superseded by the geometry path; the one + # measured-dangerous pattern there ('altar WHERE PRESENT', the shareable hedge) is gone. + flavored = [n for n, c in _RECIPES["classes"].items() if c.get("flavor") or c.get("gemini_flavor")] + assert set(flavored) >= {"dwing_room_0", "dwing_room_1"}, "known geometry-driven classes missing" + for name in flavored: # derived, not hand-listed — the guard auto-extends to future classes cls = _RECIPES["classes"][name] assert cls.get("flavor"), name assert cls.get("gemini_flavor"), name @@ -231,6 +237,15 @@ def test_dwing_recipes_carry_hand_authored_flavor_keys(): f"{name}.flavor carries generator-owned structure ({keyword.lower()!r}) — " "flavor is style/mood only; render_recipe.py owns counts/shape/doors/placement" ) + # Room-SPECIFIC feature nouns are generator-owned too: a flavor key asserting an altar + # while the geometry has none puts the flavor in direct CONFLICT with the generated + # NEGATIVE clause — the exact contradiction class #1619 exists to kill. Altar presence/ + # position is always derived (FOCAL clause / NEGATIVE), so no flavor key may name it. + assert "altar" not in lowered, f"{name}.flavor names an altar (generator-owned feature)" + assert "altar" not in cls["gemini_flavor"].lower(), ( + f"{name}.gemini_flavor names an altar — room-specific features are generator-owned " + "(caught live: room_0's flavor asserted the altar the NEGATIVE clause must own)" + ) def test_paint_room_composes_from_geometry_without_mutating_the_recipe(): diff --git a/qa/unified_paint_recipes.json b/qa/unified_paint_recipes.json index ff72be99..1a0eda49 100644 --- a/qa/unified_paint_recipes.json +++ b/qa/unified_paint_recipes.json @@ -41,9 +41,9 @@ }, "dwing_room_0": { "base_prompt": "Painterly isometric medieval stone dungeon shrine-storeroom undercroft interior, firelit, in the Pillars of Eternity 2 Deadfire hand-painted concept-art style. A sealed square store chamber kept as a shrine: back-centre a low carved stone ALTAR ringed by three standing iron BRAZIERS with glowing coals at the altar approach — the room's light and focal point; stacked wooden CRATES, BARRELS and supply SACKS ranged along the walls with masonry RUBBLE between them; ONE arched stone doorway set into the right-hand (east) wall exactly where the depth map shows the opening, with clear floor before it. Rough-hewn grey stone block walls and floor flags, two structural STONE PILLARS on square bases rising to the ceiling; warm amber firelight from the braziers pooled on the stone, deep cool BLUE-VIOLET shadows pooling in the corners and along the walls (never pure black), a gentle atmospheric haze falloff toward the room edges, the stone walls richly worked with visible coursing, cracked mortar and aged water stains, hand-painted texture detail, oil-painted texture, no people, no characters. FEATURE COUNTS (strict): EXACTLY TWO stone pillars, EXACTLY ONE altar, EXACTLY THREE braziers, EXACTLY ONE arched doorway (east wall); every other wall surface is unbroken solid stone — NO other doorways, arches, gates or openings, NO other pillars or columns. BRAZIER PLACEMENT (strict): the three braziers ring the altar approach — two flanking the altar and one standing watch on the approach — exactly where the input image shows their stands; do NOT move them.", - "gemini_grounding": "Repaint this image in EXACTLY the hand-painted style of a Pillars of Eternity 2: Deadfire pre-rendered isometric background: visible oil-brush strokes, cool stone palette with warm fire-core accents, warm-core/cool-periphery chiaroscuro pooled at the braziers, DEEP BLUE-VIOLET cool shadows (never flat black) graded into every corner, a soft atmospheric falloff at the room edges, varied hand-worked texture on every stone plane (no repeated block pattern). SCENE-CONTENT GROUNDING: the low box masses are stacked WOODEN CRATES, BARRELS and burlap SACKS with some masonry RUBBLE; the single-cell posts with fire are standing iron BRAZIERS with glowing coals; the wide low mass near them is a carved stone ALTAR where present; the tall shafts on square bases are structural STONE PILLARS rising to the ceiling; every wall opening shown in the depth is an arched stone DOORWAY; stone flag FLOOR; stone walls with NO windows. FEATURE COUNTS (strict): EXACTLY TWO stone pillars, EXACTLY ONE altar, EXACTLY THREE braziers, EXACTLY ONE arched doorway (east wall); every other wall surface is unbroken solid stone — NO other doorways, arches, gates or openings, NO other pillars or columns.", + "gemini_grounding": "Repaint this image in EXACTLY the hand-painted style of a Pillars of Eternity 2: Deadfire pre-rendered isometric background: visible oil-brush strokes, cool stone palette with warm fire-core accents, warm-core/cool-periphery chiaroscuro pooled at the braziers, DEEP BLUE-VIOLET cool shadows (never flat black) graded into every corner, a soft atmospheric falloff at the room edges, varied hand-worked texture on every stone plane (no repeated block pattern). SCENE-CONTENT GROUNDING: the low box masses are stacked WOODEN CRATES, BARRELS and burlap SACKS with some masonry RUBBLE; the single-cell posts with fire are standing iron BRAZIERS with glowing coals; the wide low mass near them is a carved stone ALTAR; the tall shafts on square bases are structural STONE PILLARS rising to the ceiling; every wall opening shown in the depth is an arched stone DOORWAY; stone flag FLOOR; stone walls with NO windows. FEATURE COUNTS (strict): EXACTLY TWO stone pillars, EXACTLY ONE altar, EXACTLY THREE braziers, EXACTLY ONE arched doorway (east wall); every other wall surface is unbroken solid stone — NO other doorways, arches, gates or openings, NO other pillars or columns.", "flavor": "Painterly isometric medieval stone dungeon shrine-storeroom undercroft interior, firelit, in the Deadfire hand-painted concept-art style. Rough-hewn grey stone block and worn floor flags richly worked with visible coursing, cracked mortar and aged water stains; warm amber firelight pooled on the stone, deep cool BLUE-VIOLET shadows in the corners and at the room edges (never pure black), a gentle atmospheric haze falloff, hand-painted texture detail, oil-painted texture, no people, no characters.", - "gemini_flavor": "Repaint this image in EXACTLY the hand-painted style of a Pillars of Eternity 2: Deadfire pre-rendered isometric background: visible oil-brush strokes, cool stone palette with warm fire-core accents, warm-core/cool-periphery chiaroscuro pooled at the braziers, DEEP BLUE-VIOLET cool shadows (never flat black) graded into every corner, a soft atmospheric falloff at the room edges, varied hand-worked texture on every stone plane (no repeated block pattern). SCENE-CONTENT GROUNDING: the low box masses are stacked WOODEN CRATES, BARRELS and burlap SACKS with some masonry RUBBLE; the single-cell posts with fire are standing iron BRAZIERS with glowing coals; the wide low mass near them is a carved stone ALTAR; the tall shafts on square bases are structural STONE PILLARS rising to the ceiling; every wall opening shown in the depth is an arched stone DOORWAY; stone flag FLOOR; stone walls with NO windows." + "gemini_flavor": "Repaint this image in EXACTLY the hand-painted style of a Pillars of Eternity 2: Deadfire pre-rendered isometric background: visible oil-brush strokes, cool stone palette with warm fire-core accents, warm-core/cool-periphery chiaroscuro pooled at the braziers, DEEP BLUE-VIOLET cool shadows (never flat black) graded into every corner, a soft atmospheric falloff at the room edges, varied hand-worked texture on every stone plane (no repeated block pattern). SCENE-CONTENT GROUNDING: the low box masses are stacked WOODEN CRATES, BARRELS and burlap SACKS with some masonry RUBBLE; the single-cell posts with fire are standing iron BRAZIERS with glowing coals; the tall shafts on square bases are structural STONE PILLARS rising to the ceiling; every wall opening shown in the depth is an arched stone DOORWAY; stone flag FLOOR; stone walls with NO windows." }, "dwing_room_1": { "base_prompt": "Painterly isometric medieval stone dungeon vault passage chamber interior, firelit, in the Pillars of Eternity 2 Deadfire hand-painted concept-art style. A low wide vault chamber linking two corridors — markedly WIDER than it is deep, roughly twice as wide as deep; preserve the input image's exact room proportions and camera framing. Three standing iron BRAZIERS with glowing fire — a pair flanking the central walking lane and one corner watch-brazier; long rows of stacked wooden CRATES and supply SACKS along the back and front walls leaving the middle lane clear; TWO arched stone doorways, one in the LEFT (west) SIDE wall and one in the RIGHT (east) SIDE wall at mid-depth — the BACK wall is unbroken solid stone with NO openings. Rough-hewn grey stone block walls and floor flags, one structural STONE PILLAR on a square base rising to the ceiling; warm amber firelight from the braziers pooled on the stone, deep cool BLUE-VIOLET shadows pooling in the corners and along the walls (never pure black), a gentle atmospheric haze falloff toward the room edges, the stone walls richly worked with visible coursing, cracked mortar and aged water stains, hand-painted texture detail, oil-painted texture, no people, no characters. FEATURE COUNTS (strict): EXACTLY ONE stone pillar, EXACTLY THREE braziers, EXACTLY TWO arched doorways (west side wall + east side wall, NEVER the back wall); NO other openings, NO other pillars or columns. ROOM SHAPE (strict): the chamber is markedly WIDER than it is deep — a low broad vault roughly twice as wide as it is deep; preserve the input image's exact room proportions, floor extent and camera framing (the output must overlay the input). DOOR WALLS (strict): the two arched doorways are in the LEFT (west) and RIGHT (east) SIDE walls at mid-depth; the BACK wall is unbroken solid stone with NO openings. BRAZIER PLACEMENT (strict): two of the three braziers stand mid-room flanking the central walking lane and the third is a corner watch-brazier, all exactly where the input image shows their stands — do NOT move them.",