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
@@ -12,6 +12,8 @@ import json
from collections import Counter
from pathlib import Path
from calliope.comfyui.delivery_scope import exclusion_for
def graph_rows(graph: dict, pointer: str = "", scope: str = ""):
(
@@ -127,7 +129,7 @@ RULES = {
}
def inventory(repo: Path) -> dict:
def inventory(repo: Path, *, historical: bool = False) -> dict:
docs = repo / "docs/hel-892"
manifest = json.loads((docs / "offline/manifest.json").read_text(encoding="utf-8"))
cases = json.loads((docs / "golden-cases.json").read_text(encoding="utf-8"))["cases"]
@@ -332,7 +334,7 @@ def inventory(repo: Path) -> dict:
}
assert len(files) == len(actual_ui) == 146
assert {f["path"] for f in files} == actual_ui
return {
report = {
"schema_version": 1,
"files": files,
"total_ui_files": len(files),
@@ -347,6 +349,22 @@ def inventory(repo: Path) -> dict:
"negative_finding_limit": "未命中命名候选或静态环不证明没有插件隐藏循环/虚拟语义",
}
if not historical:
excluded = [f for f in files if exclusion_for(f["path"])]
active = [f for f in files if not exclusion_for(f["path"])]
for row in files:
row["delivery_status"] = "user_excluded" if exclusion_for(row["path"]) else "in_scope"
report.update(
inventory_scope="all_source_files_with_current_delivery_scope",
source_files=len(manifest), target_files=len(manifest) - len(excluded),
target_ui_files=len(active), user_excluded=len(excluded),
remaining_reliable_conversions=len(active),
historical_exact_golden_candidates=report["exact_golden_candidates"],
exact_golden_candidates=sum(bool(f["golden_case_ids"]) for f in active),
exclusions=[{"path": f["path"], **exclusion_for(f["path"])} for f in excluded],
)
return report
if __name__ == "__main__":
parser = argparse.ArgumentParser(description=__doc__)