Sanitize camera-aware composition wording

This commit is contained in:
2026-06-28 00:58:22 +02:00
parent b8d8066fdb
commit 8d58bfdf6a
3 changed files with 25 additions and 1 deletions
+22
View File
@@ -881,6 +881,26 @@ def smoke_row_camera_policy() -> None:
"coworking lounge frame with the couple near a desk edge" in updated.get("composition", ""),
"row camera policy did not adapt coworking composition for couple rows",
)
stale_internal_row = dict(row)
stale_internal_row["pov_character_labels"] = []
stale_internal_row["composition"] = "camera-aware coworking lounge frame with subjects near a desk edge"
stale_internal_row["prompt"] = (
"A generated adult prompt. Framed as camera-aware coworking lounge frame with subjects near a desk edge. "
"Avoid: low quality."
)
updated_stale_internal = row_camera.apply_camera_config(
stale_internal_row,
_orbit_camera(horizontal_angle=45, vertical_angle=0, zoom=5.5),
compact_labels=pb.CAMERA_COMPACT_LABELS,
)
_expect(
"camera-aware" not in str(updated_stale_internal.get("composition", "")).lower(),
"row camera policy leaked internal camera-aware composition wording",
)
_expect(
"camera-aware" not in str(updated_stale_internal.get("prompt", "")).lower(),
"row camera policy left internal camera-aware wording in prompt",
)
library_row = {
"prompt": "A generated adult prompt. Composition: vertical polished mirror view with bag and shoes visible. Avoid: low quality.",
"caption": "sxcppnl7, generated adult prompt, polished mirror view with bag and shoes visible, illustration",
@@ -1848,6 +1868,8 @@ def smoke_location_config_policy() -> None:
"Workspace theme lost coworking lounge location slug",
)
_expect(workspace_composition_payload.get("composition_entries"), "Workspace theme did not output compositions")
workspace_compositions_text = " ".join(str(entry) for entry in workspace_composition_payload.get("composition_entries") or [])
_expect("camera-aware" not in workspace_compositions_text.lower(), "Workspace theme leaked internal camera-aware wording")
replaced_after_theme = json.loads(
location_config.build_location_pool_json(
enabled=True,