Clarify cleanup dry-run output
GeoIntel CI / docs-smoke (push) Has been cancelled
GeoIntel CI / contract-smoke (push) Has been cancelled

This commit is contained in:
Codex
2026-06-17 23:50:56 +02:00
parent 949614e336
commit 153b29fc6d
4 changed files with 17 additions and 2 deletions
@@ -88,6 +88,7 @@ def cleanup_demo_exports(
"type_filtered_export_count": 0,
"selected_export_count": 0,
"deleted_export_count": 0,
"candidate_exports": [],
"candidate_files": [],
"deleted_files": [],
"missing_files": [],
@@ -140,6 +141,13 @@ def cleanup_demo_exports(
summary["pruned_dirs"].extend(prune_empty_parents(path, storage_root))
summary["deleted_files"].append(str(path))
else:
summary["candidate_exports"].append(
{
"export_id": str(export.id),
"export_type": str(getattr(export, "export_type", "")),
"storage_path": str(path),
}
)
summary["candidate_files"].append(str(path))
else:
summary["missing_files"].append({"export_id": str(export.id), "storage_path": str(path)})
@@ -121,6 +121,9 @@ def test_cleanup_script_reports_dry_run_candidates_separately() -> None:
content = script.read_text(encoding="utf-8")
assert '"candidate_files": []' in content
assert '"candidate_exports": []' in content
assert '"export_id": str(export.id)' in content
assert '"export_type": str(getattr(export, "export_type", ""))' in content
assert 'summary["candidate_files"].append(str(path))' in content
assert '"max_delete": max_delete' in content
assert "blocked_reason" in content