HEL-892: add pinned controlnet aux reference widget conversion
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
@@ -18,6 +18,7 @@ from compare_frontend_exports import differences
|
||||
from calliope.comfyui.companions import load_companions
|
||||
from calliope.comfyui.delivery_scope import exclusion_for
|
||||
from calliope.comfyui.serialization_reference import (
|
||||
AUX_PROFILE,
|
||||
PROFILE,
|
||||
resolve_reference_link,
|
||||
serialize_reference_widgets,
|
||||
@@ -25,7 +26,7 @@ from calliope.comfyui.serialization_reference import (
|
||||
from calliope.comfyui.ui2api import convert, convert_reference
|
||||
|
||||
|
||||
def audit(repo: Path) -> dict:
|
||||
def audit(repo: Path, profile: str = PROFILE) -> dict:
|
||||
rows = []
|
||||
records = load_companions(repo / "docs/hel-892/supplied-api/manifest.json")
|
||||
for path, record in records.items():
|
||||
@@ -44,7 +45,7 @@ def audit(repo: Path) -> dict:
|
||||
if node.get("type") in ("Reroute", "Note", "MarkdownNote"):
|
||||
continue
|
||||
try:
|
||||
values = serialize_reference_widgets(node)
|
||||
values = serialize_reference_widgets(node, profile)
|
||||
except ValueError as exc:
|
||||
unsupported.append({"node_id": nid, "type": node["type"], "reason": str(exc)})
|
||||
else:
|
||||
@@ -86,7 +87,7 @@ def audit(repo: Path) -> dict:
|
||||
"differences": differences(expected, endpoint),
|
||||
}
|
||||
)
|
||||
candidate = convert_reference(source)
|
||||
candidate = convert_reference(source, profile)
|
||||
rows.append(
|
||||
{
|
||||
"id": binding["id"],
|
||||
@@ -109,9 +110,19 @@ def audit(repo: Path) -> dict:
|
||||
}
|
||||
)
|
||||
return {
|
||||
"profile": PROFILE,
|
||||
"profile": profile,
|
||||
"authority": "public_reference_only_not_object_info",
|
||||
"comparison_scope": "supported root scalar widgets and legacy root link endpoints only",
|
||||
"reference_conditions": {
|
||||
"unmodified_frontend_widgets_assumed": True,
|
||||
"ue_extension_serializer_match": "unknown",
|
||||
"aux_release_artifact_commit_match": "unknown"
|
||||
if profile == AUX_PROFILE
|
||||
else "not_used",
|
||||
"aio_combo_membership": "unknown_not_evaluated",
|
||||
"model_and_media_files_available": "unknown",
|
||||
"resolution_bounds": "schema metadata only; integer values serialized without clamping",
|
||||
},
|
||||
"target_version_match": "unknown",
|
||||
"whole_source_equivalence_verified": False,
|
||||
"execution_verified": False,
|
||||
@@ -123,8 +134,9 @@ def main():
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument("--repo", type=Path, required=True)
|
||||
parser.add_argument("--output", type=Path, required=True)
|
||||
parser.add_argument("--profile", choices=(PROFILE, AUX_PROFILE), default=PROFILE)
|
||||
args = parser.parse_args()
|
||||
report = audit(args.repo)
|
||||
report = audit(args.repo, args.profile)
|
||||
args.output.parent.mkdir(parents=True, exist_ok=True)
|
||||
args.output.write_text(json.dumps(report, ensure_ascii=False, indent=2) + "\n")
|
||||
print(json.dumps({"reference_only": True, "active_cases": len(report["cases"])}))
|
||||
|
||||
Reference in New Issue
Block a user