HEL-892: apply user exclusion to the 155-workflow delivery scope

Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
leefer
2026-10-29 22:15:30 +08:00
co-authored by multica-agent
parent ddf56714ad
commit b01809cf8c
42 changed files with 80725 additions and 35 deletions
@@ -9,6 +9,7 @@ from collections import Counter
from pathlib import Path
from calliope.comfyui.companions import load_companions, resolve_companion
from calliope.comfyui.delivery_scope import exclusion_for
from calliope.comfyui.library import _json
from calliope.db import get_db
@@ -20,6 +21,23 @@ def audit(repo: Path, manifest: Path, db: Path, output: Path):
output.mkdir(parents=True, exist_ok=True)
try:
for path, record in records.items():
excluded = exclusion_for(path)
if excluded:
history = conn.execute(
"SELECT id FROM workflows WHERE source_repo_path=?", (path,)
).fetchone()
rows.append(
{
"id": record["binding"]["id"],
"source_path": path,
"state": "user_excluded",
"adopted": False,
"new_api_literal_params": 0,
"exclusion": excluded,
"historical_row_preserved": history is not None,
}
)
continue
raw = (repo / path).read_bytes()
prompt, evidence, issues = resolve_companion(record, path, raw, json.loads(raw))
row = conn.execute(
@@ -82,6 +100,9 @@ def audit(repo: Path, manifest: Path, db: Path, output: Path):
report = {
"cases": rows,
"adopted": sum(r["adopted"] for r in rows),
"user_excluded": sum(r["state"] == "user_excluded" for r in rows),
"source_files": 156,
"target_files": 155,
"general_conversion_verified": 0,
"execution_verified": 0,
"new_api_literal_params": sum(r["new_api_literal_params"] for r in rows),