HEL-892: apply user exclusion to the 155-workflow delivery scope
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
@@ -9,6 +9,8 @@ import json
|
||||
from collections import Counter
|
||||
from pathlib import Path
|
||||
|
||||
from calliope.comfyui.delivery_scope import exclusion_for
|
||||
|
||||
|
||||
def audit(repo: Path, directory: Path) -> dict:
|
||||
manifest = json.loads((directory / "manifest.json").read_text(encoding="utf-8"))
|
||||
@@ -17,8 +19,12 @@ def audit(repo: Path, directory: Path) -> dict:
|
||||
for p in (repo / "example_ComfyUI_workflows").rglob("*")
|
||||
if p.is_file()
|
||||
}
|
||||
assert {e["path"] for e in manifest} == sources
|
||||
assert len(manifest) == len(sources)
|
||||
manifest_paths = {e["path"] for e in manifest}
|
||||
# Old immutable reports still audit against their historical full source set.
|
||||
historical = manifest_paths == sources
|
||||
target_sources = {p for p in sources if not exclusion_for(p)}
|
||||
assert manifest_paths == (sources if historical else target_sources)
|
||||
assert len(manifest) == len(manifest_paths)
|
||||
files = []
|
||||
for entry in manifest:
|
||||
raw = (repo / entry["path"]).read_bytes()
|
||||
@@ -126,6 +132,10 @@ def audit(repo: Path, directory: Path) -> dict:
|
||||
return {
|
||||
"files": files,
|
||||
"total": len(files),
|
||||
"audit_scope": "historical_source_inventory" if historical else "current_delivery",
|
||||
"source_files": len(sources),
|
||||
"target_files": len(target_sources),
|
||||
"user_excluded": len(sources - target_sources),
|
||||
"source_structure_purpose_partially_reviewed": len(files),
|
||||
"full_documents_completed": 0,
|
||||
"files_with_selected_named_fields_reviewed": sum(
|
||||
|
||||
Reference in New Issue
Block a user