reuse-surface/reuse_surface
tegwick 6cbc862371
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 1s
ci / validate-registry (push) Successful in 1m18s
Build and Publish Container Image / build-and-push (push) Successful in 23s
Invalidate the composed index when a registration changes (REUSE-WP-0020-T09)
Enabling a federation source left /v1/federated serving its cached compose and
reporting stale: false while doing it, so a repo could be correctly registered
and silently invisible for as long as its cached index survived. That is how
evidence-binder stayed missing after re-enabling until a manual
POST /v1/federated/compose was issued.

Registration writes now mark the composed index stale, and a plain GET
recomposes when the flag is set. Clearing it there is not a silent clear: that
pass really did refetch. A PATCH touching only a description does not
invalidate anything.

This changes a contract documented in specs/FederationHubAPI.md, so the
staleness section is rewritten rather than left to drift, including the two
triggers that now set the flag.

The first two tests written for this were worthless -- they passed with the fix
removed, because a newly registered repo has no cache entry and gets fetched
regardless. The real failure needs a populated cache holding stale content
inside its 24h TTL. test_re_enabled_source_refetches_a_stale_cache models that
and fails on pre-fix code; verified by reverting the mark_stale calls.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-21 13:51:58 +02:00
..
hub Invalidate the composed index when a registration changes (REUSE-WP-0020-T09) 2026-08-21 13:51:58 +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 Name the SCOPE-block mistake in compose warnings (REUSE-WP-0020-T03) 2026-08-21 03:23:29 +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