reuse-surface/reuse_surface/hub
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
..
__init__.py Implement WP-0011 hub service, CLI, and deployment artifacts 2026-06-15 08:48:06 +02:00
app.py Invalidate the composed index when a registration changes (REUSE-WP-0020-T09) 2026-08-21 13:51:58 +02:00
compose.py Align naming with coulomb.social reuse-surface conventions 2026-06-15 09:02:02 +02:00
hub-registration.schema.yaml Bundle hub registration schema in the installed package 2026-06-15 10:11:41 +02:00
store.py REUSE-WP-0019-T04: reuse telemetry store and recording 2026-07-07 22:32:19 +02:00
webhooks.py REUSE-WP-0019-T02: hub recompose staleness tracking + Forgejo webhook 2026-07-07 18:24:55 +02:00