Route pair metadata structurally
This commit is contained in:
@@ -2932,7 +2932,6 @@ def smoke_formatter_input_policy() -> None:
|
||||
row, method = formatter_input.row_from_inputs(source_json, "", "prompt")
|
||||
_expect(row is None and method == "text", "Formatter input parser should not parse source JSON in explicit prompt mode")
|
||||
pair_metadata = {
|
||||
"mode": "Insta/OF",
|
||||
"trigger": Trigger,
|
||||
"softcore_row": {
|
||||
"prompt": f"{Trigger}, {Trigger}, embedded-only soft.",
|
||||
@@ -2952,8 +2951,10 @@ def smoke_formatter_input_policy() -> None:
|
||||
"camera_scene_directive": "Row hard scene camera layout.",
|
||||
},
|
||||
}
|
||||
_expect(formatter_input.is_pair_metadata(pair_metadata), "Formatter input policy should detect structural pair metadata")
|
||||
parsed_pair, pair_method = formatter_input.row_from_inputs("", _json(pair_metadata), "metadata_json")
|
||||
_expect(pair_method == "metadata_json", "Formatter input parser should read pair metadata JSON")
|
||||
_expect(formatter_input.is_pair_metadata(parsed_pair), "Formatter input parser should preserve structural pair metadata")
|
||||
_expect_trigger_once("formatter_input.pair.soft_prompt", parsed_pair.get("softcore_prompt"), Trigger)
|
||||
_expect(
|
||||
parsed_pair.get("softcore_partner_styling") == parsed_pair["softcore_row"].get("softcore_partner_styling"),
|
||||
@@ -6107,7 +6108,6 @@ def smoke_formatter_metadata_fixtures() -> None:
|
||||
_expect("sdxl route tag" not in caption_text, "Caption naturalizer leaked SDXL formatter hint")
|
||||
|
||||
external_pair = {
|
||||
"mode": "Insta/OF",
|
||||
"trigger": Trigger,
|
||||
"shared_descriptor": "25-year-old adult woman, slim figure, fair skin, blonde hair, blue eyes",
|
||||
"shared_cast_descriptors": [
|
||||
|
||||
Reference in New Issue
Block a user