REUSE-WP-0017-T01: explicit capability_status on roster + coverage split in report gaps
Some checks failed
ci / validate-registry (push) Has been cancelled

Adds capability_status: has|none|pending to every roster row (10 has /
51 pending currently), a coverage_ratio headline, and splits the gap
report's empty-scaffold section into unclassified vs explicitly-none.
Adds templates/NO_CAPABILITIES.template.md for the no-capability marker.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-06 18:36:05 +02:00
parent 493f23123c
commit 8219a5d253
6 changed files with 154 additions and 11 deletions

View File

@@ -96,9 +96,39 @@ def test_collect_gap_report_from_roster():
root = Path(__file__).resolve().parent.parent
roster = root / "registry/federation/local-repo-roster.yaml"
report = collect_gap_report(roster)
assert report["summary"]["total"] == 60
assert len(report["publish_fail"]) == 0
assert report["summary"]["total"] == 61
assert len(report["publish_fail"]) == 1
assert report["empty_scaffold_count"] >= 40
assert report["unclassified_count"] + report["explicit_none_count"] == report["empty_scaffold_count"]
assert "/" in report["coverage_ratio"]
def test_collect_gap_report_splits_unclassified_and_explicit_none(tmp_path):
roster_path = tmp_path / "roster.yaml"
roster_path.write_text(
"""
summary:
total: 3
repos:
- slug: has-repo
status: established
capability_count: 1
capability_status: has
- slug: none-repo
status: established
capability_count: 0
capability_status: none
- slug: pending-repo
status: established
capability_count: 0
capability_status: pending
"""
)
report = collect_gap_report(roster_path, index={"capabilities": []})
assert report["unclassified"] == ["pending-repo"]
assert report["explicit_none"] == ["none-repo"]
assert report["empty_scaffold_count"] == 2
assert report["coverage_ratio"] == "2/3"
def test_format_gap_markdown_lists_publish_fail():
@@ -108,6 +138,11 @@ def test_format_gap_markdown_lists_publish_fail():
"publish_fail": [{"slug": "inter-hub", "publish_note": "missing repo"}],
"empty_scaffold_count": 1,
"empty_scaffolds": ["ops-bridge"],
"unclassified_count": 1,
"unclassified": ["ops-bridge"],
"explicit_none_count": 0,
"explicit_none": [],
"coverage_ratio": "59/60",
"seeded_repos": [],
"dedup_pending_local_owners": [],
"local_capability_count": 2,