HEL-892: pin VideoInfoLoaded entity schema and typed root alias composition
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
@@ -44,6 +44,7 @@ from calliope.comfyui.structure_reference import (
|
||||
SETGET_COMMIT,
|
||||
SETGET_PROFILES,
|
||||
STRUCTURE_PROFILES,
|
||||
VIDEOINFO_PROFILES,
|
||||
)
|
||||
from calliope.comfyui.ui2api import convert, convert_reference
|
||||
|
||||
@@ -299,6 +300,7 @@ REFERENCE_PROFILES = (
|
||||
*CROP_SPLIT_PROFILES,
|
||||
*VHS_PROFILES,
|
||||
*SETGET_PROFILES,
|
||||
*VIDEOINFO_PROFILES,
|
||||
)
|
||||
|
||||
|
||||
@@ -502,6 +504,7 @@ def profile_attempt(source, profile):
|
||||
CASE04_PROFILE: "1.53.6",
|
||||
**VHS_PROFILES,
|
||||
**SETGET_PROFILES,
|
||||
**VIDEOINFO_PROFILES,
|
||||
}.get(profile, "1.37.11")
|
||||
assumptions = {
|
||||
"frontend": expected,
|
||||
@@ -579,7 +582,7 @@ def profile_attempt(source, profile):
|
||||
"serialization-evidence/sources.json",
|
||||
]
|
||||
base = {"profile": profile, "assumptions": assumptions}
|
||||
if profile in SETGET_PROFILES:
|
||||
if profile in (*SETGET_PROFILES, *VIDEOINFO_PROFILES):
|
||||
assumptions["setget_reference"] = {
|
||||
"commit": SETGET_COMMIT,
|
||||
"missing_version": "explicit_fixed_reference_assumption_only",
|
||||
@@ -603,7 +606,29 @@ def profile_attempt(source, profile):
|
||||
}
|
||||
for i, n in enumerate(source.get("nodes", []))
|
||||
]
|
||||
if not any(n.get("type") in ("SetNode", "GetNode") for n in source.get("nodes", [])):
|
||||
if profile in VIDEOINFO_PROFILES:
|
||||
assumptions["videoinfo_reference"] = {
|
||||
"commit": "537f3a02269e14ab4b0350d4189a52034e9a3b12",
|
||||
"contract": "videoinfo-reference/contract.json",
|
||||
"composition": "pinned VideoInfoLoaded + old KJ/root/VHS/core; no other versions",
|
||||
"scalar_values": "unknown; no media or info dictionary evaluated",
|
||||
}
|
||||
assumptions["reference_sources"].insert(0, "videoinfo-reference/sources.json")
|
||||
base["verified_reference_facts"] = "videoinfo-reference/contract.json"
|
||||
if not any(n.get("type") == "VHS_VideoInfoLoaded" for n in source.get("nodes", [])):
|
||||
return {
|
||||
**base,
|
||||
"status": "not_applicable",
|
||||
"issues": [
|
||||
{
|
||||
"code": "videoinfo_not_present",
|
||||
"message": "新组合仅覆盖含VideoInfoLoaded的图",
|
||||
}
|
||||
],
|
||||
}
|
||||
if profile in SETGET_PROFILES and not any(
|
||||
n.get("type") in ("SetNode", "GetNode") for n in source.get("nodes", [])
|
||||
):
|
||||
return {
|
||||
**base,
|
||||
"status": "not_applicable",
|
||||
@@ -634,25 +659,26 @@ def profile_attempt(source, profile):
|
||||
)
|
||||
assumptions["missing_frontend_policy"] = (
|
||||
"explicit_1.37.11_reference_assumption"
|
||||
if profile in SETGET_PROFILES
|
||||
if profile in (*SETGET_PROFILES, *VIDEOINFO_PROFILES)
|
||||
else "explicit_media_reference_assumption"
|
||||
if profile in (*MEDIA_PROFILES, SEPARATION_PROFILE, *CROP_SPLIT_PROFILES, *VHS_PROFILES)
|
||||
else "explicit_legacy_reference_assumption"
|
||||
if profile in (PROFILE, AUX_PROFILE, PRIMITIVE_PROFILE)
|
||||
else "requires_explicit_declaration"
|
||||
)
|
||||
if profile in (*VHS_PROFILES, *SETGET_PROFILES) and expected == "1.48.6":
|
||||
if profile in (*VHS_PROFILES, *SETGET_PROFILES, *VIDEOINFO_PROFILES) and expected == "1.48.6":
|
||||
assumptions["missing_frontend_policy"] = "requires_explicit_1.48.6"
|
||||
assumptions["missing_node_declarations"] = [
|
||||
n["pointer"]
|
||||
for n in node_inventory(
|
||||
source, include_aux=profile in (*CROP_SPLIT_PROFILES, *SETGET_PROFILES)
|
||||
source,
|
||||
include_aux=profile in (*CROP_SPLIT_PROFILES, *SETGET_PROFILES, *VIDEOINFO_PROFILES),
|
||||
)
|
||||
if n["type"] not in ("Note", "MarkdownNote", "Reroute", "PrimitiveNode")
|
||||
and (n["provider"] is None or n["version"] is None)
|
||||
]
|
||||
if (
|
||||
profile in (*VHS_PROFILES, *SETGET_PROFILES)
|
||||
profile in (*VHS_PROFILES, *SETGET_PROFILES, *VIDEOINFO_PROFILES)
|
||||
and expected == "1.48.6"
|
||||
and declared_frontend is None
|
||||
) or (
|
||||
@@ -669,6 +695,7 @@ def profile_attempt(source, profile):
|
||||
*CROP_SPLIT_PROFILES,
|
||||
*VHS_PROFILES,
|
||||
*SETGET_PROFILES,
|
||||
*VIDEOINFO_PROFILES,
|
||||
)
|
||||
)
|
||||
):
|
||||
@@ -694,7 +721,7 @@ def profile_attempt(source, profile):
|
||||
"unresolved_boundaries": result.unresolved_boundaries,
|
||||
**(
|
||||
{"virtual_resolutions": result.virtual_resolutions}
|
||||
if profile in SETGET_PROFILES
|
||||
if profile in (*SETGET_PROFILES, *VIDEOINFO_PROFILES)
|
||||
else {}
|
||||
),
|
||||
}
|
||||
@@ -710,7 +737,7 @@ def profile_attempt(source, profile):
|
||||
"candidate_prompt": result.prompt,
|
||||
**(
|
||||
{"virtual_resolutions": result.virtual_resolutions}
|
||||
if profile in SETGET_PROFILES
|
||||
if profile in (*SETGET_PROFILES, *VIDEOINFO_PROFILES)
|
||||
else {}
|
||||
),
|
||||
**(
|
||||
@@ -798,7 +825,8 @@ def audit_library(repo: Path, profiles=REFERENCE_PROFILES, *, baseline_profiles=
|
||||
for issue in attempt["issues"]:
|
||||
gap_inventory = (
|
||||
node_inventory(source, include_aux=True)
|
||||
if attempt["profile"] in (*CROP_SPLIT_PROFILES, *SETGET_PROFILES)
|
||||
if attempt["profile"]
|
||||
in (*CROP_SPLIT_PROFILES, *SETGET_PROFILES, *VIDEOINFO_PROFILES)
|
||||
else inventory
|
||||
)
|
||||
matches = [n for n in gap_inventory if n["node_id"] == issue.get("node_id")]
|
||||
@@ -824,7 +852,9 @@ def audit_library(repo: Path, profiles=REFERENCE_PROFILES, *, baseline_profiles=
|
||||
}
|
||||
if baseline_profiles is None:
|
||||
excluded_profiles = (
|
||||
SETGET_PROFILES
|
||||
VIDEOINFO_PROFILES
|
||||
if any(p in VIDEOINFO_PROFILES for p in profiles)
|
||||
else SETGET_PROFILES
|
||||
if any(p in SETGET_PROFILES for p in profiles)
|
||||
else VHS_PROFILES
|
||||
if any(p in VHS_PROFILES for p in profiles)
|
||||
|
||||
Reference in New Issue
Block a user