Extract row pool routing policy

This commit is contained in:
2026-06-27 08:47:22 +02:00
parent d9275f5f0c
commit e5822e42f8
5 changed files with 170 additions and 76 deletions
+21
View File
@@ -52,6 +52,7 @@ import row_normalization # noqa: E402
import route_metadata # noqa: E402
import row_camera # noqa: E402
import row_location # noqa: E402
import row_pools # noqa: E402
import server_routes # noqa: E402
import sdxl_formatter # noqa: E402
import sdxl_presets # noqa: E402
@@ -1662,6 +1663,26 @@ def smoke_category_library_route() -> None:
_expect(expressions, "category inheritance did not resolve expressions")
_expect(compositions, "category inheritance did not resolve compositions")
_expect(any("oral" in _clean_key(entry.get("prompt") if isinstance(entry, dict) else entry) for entry in scenes), "oral scene pool did not contribute")
location_override = {"enabled": True, "apply_mode": "replace", "scene_entries": ["custom scene"]}
composition_override = {"enabled": True, "apply_mode": "replace", "composition_entries": ["custom composition"]}
_expect(
pb._scene_pool(category, subcategory, item, "configured_cast", location_override)
== row_pools.scene_pool(category, subcategory, item, "configured_cast", location_override),
"Prompt builder scene pool should delegate to row_pools",
)
_expect(
pb._expression_pool(category, subcategory, item) == row_pools.expression_pool(category, subcategory, item),
"Prompt builder expression pool should delegate to row_pools",
)
_expect(
pb._pose_pool(category, subcategory, item, "couple", "standard") == row_pools.pose_pool(category, subcategory, item, "couple", "standard"),
"Prompt builder pose pool should delegate to row_pools",
)
_expect(
pb._composition_pool(category, subcategory, item, "configured_cast", composition_override)
== row_pools.composition_pool(category, subcategory, item, "configured_cast", composition_override),
"Prompt builder composition pool should delegate to row_pools",
)
def smoke_hardcore_category_routes() -> None: