reuse-surface/tests
tegwick 0c6b1e2538 Harden federated compose against malformed member indexes (REUSE-WP-0020)
Repointing the production hub's 50 Gitea-hosted federation sources to Forgejo
ahead of the 2026-08-31 CoulombCore retirement took /v1/federated to HTTP 500.
One member index (evidence-binder) has capability rows with no `id`, and
compose_federated_index dereferenced item["id"] unguarded. Its Gitea copy was a
stale snapshot returning a non-mapping, so those rows had never been parsed.

A single malformed member index must not take down the whole endpoint. Extract
_read_index_entries(): unparseable YAML, a non-mapping body, an empty file, and
a non-list `capabilities` each degrade to a warning and an empty row list, and
rows without an `id` are skipped individually. A failed source stays listed with
count 0 so it remains visible to operators rather than silently disappearing.

Also fix wall-clock rot in tests/test_plan_check.py, which was already failing
at clean HEAD: three tests pinned the compose date to a literal that has now
aged past STALE_DAYS.

Add workplan REUSE-WP-0020 covering the full cutover.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-21 00:04:39 +02:00
..
test_establish.py Implement REUSE-WP-0013 registry establish, update, and stats 2026-06-16 01:21:01 +02:00
test_federation.py Harden federated compose against malformed member indexes (REUSE-WP-0020) 2026-08-21 00:04:39 +02:00
test_forge_host.py REUSE-WP-0019-T01: forge host abstraction + URL migration inventory 2026-07-07 18:14:30 +02:00
test_hub.py REUSE-WP-0019-T04: reuse telemetry store and recording 2026-07-07 22:32:19 +02:00
test_hub_sync.py Implement REUSE-WP-0012 federation scale and intent alignment 2026-06-16 00:42:50 +02:00
test_interactive.py WP-0016 finished: interactive registry maintain with llm-connect automation 2026-06-18 04:00:39 +02:00
test_llm_bridge.py Implement REUSE-WP-0013 registry establish, update, and stats 2026-06-16 01:21:01 +02:00
test_maintain.py WP-0016 finished: interactive registry maintain with llm-connect automation 2026-06-18 04:00:39 +02:00
test_plan_check.py Harden federated compose against malformed member indexes (REUSE-WP-0020) 2026-08-21 00:04:39 +02:00
test_registry.py Complete WP-0006 through WP-0009: registry expansion, catalog, graph, tests 2026-06-15 02:24:20 +02:00
test_registry_update.py Implement REUSE-WP-0013 registry establish, update, and stats 2026-06-16 01:21:01 +02:00
test_reports.py REUSE-WP-0019-T05: reuse telemetry aggregation into R-axis evidence 2026-07-07 22:47:51 +02:00
test_statehub_bridge.py REUSE-WP-0018 T01/T02/T04/T06: plan-check deterministic matching + State Hub bridge 2026-07-07 00:57:18 +02:00
test_stats.py REUSE-WP-0019-T06: hub freshness monitoring, docs, close workplan 2026-07-08 00:09:58 +02:00
test_webhooks.py REUSE-WP-0019-T02: hub recompose staleness tracking + Forgejo webhook 2026-07-07 18:24:55 +02:00