reuse-surface/reuse_surface
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
..
hub REUSE-WP-0019-T04: reuse telemetry store and recording 2026-07-07 22:32:19 +02:00
__init__.py Complete REUSE-WP-0003: registry CLI, docs alignment, and coverage 2026-06-15 01:12:09 +02:00
catalog.py Complete WP-0006 through WP-0009: registry expansion, catalog, graph, tests 2026-06-15 02:24:20 +02:00
cli.py REUSE-WP-0019-T05: reuse telemetry aggregation into R-axis evidence 2026-07-07 22:47:51 +02:00
establish.py WP-0016 finished: interactive registry maintain with llm-connect automation 2026-06-18 04:00:39 +02:00
federation.py Harden federated compose against malformed member indexes (REUSE-WP-0020) 2026-08-21 00:04:39 +02:00
forge_host.py REUSE-WP-0019-T01: forge host abstraction + URL migration inventory 2026-07-07 18:14:30 +02:00
graph.py Complete REUSE-WP-0005: registry federation and relation graphs 2026-06-15 01:43:02 +02:00
hub_client.py REUSE-WP-0019-T06: hub freshness monitoring, docs, close workplan 2026-07-08 00:09:58 +02:00
hub_sync.py Implement REUSE-WP-0012 federation scale and intent alignment 2026-06-16 00:42:50 +02:00
interactive.py WP-0016 finished: interactive registry maintain with llm-connect automation 2026-06-18 04:00:39 +02:00
llm_bridge.py Implement REUSE-WP-0013 registry establish, update, and stats 2026-06-16 01:21:01 +02:00
maintain.py WP-0016 finished: interactive registry maintain with llm-connect automation 2026-06-18 04:00:39 +02:00
maintain_llm.py REUSE-WP-0019-T01: forge host abstraction + URL migration inventory 2026-07-07 18:14:30 +02:00
overlaps.py Complete REUSE-WP-0004: CI, overlap detection, and catalog generation 2026-06-15 01:20:31 +02:00
patches.py WP-0016 finished: interactive registry maintain with llm-connect automation 2026-06-18 04:00:39 +02:00
plan_check.py REUSE-WP-0019-T04: reuse telemetry store and recording 2026-07-07 22:32:19 +02:00
registry.py WP-0016 finished: interactive registry maintain with llm-connect automation 2026-06-18 04:00:39 +02:00
registry_update.py REUSE-WP-0019-T01: forge host abstraction + URL migration inventory 2026-07-07 18:14:30 +02:00
reports.py REUSE-WP-0019-T05: reuse telemetry aggregation into R-axis evidence 2026-07-07 22:47:51 +02:00
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
stats.py REUSE-WP-0019-T06: hub freshness monitoring, docs, close workplan 2026-07-08 00:09:58 +02:00