reuse-surface/reuse_surface
tegwick d181043717
Some checks failed
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 10s
ci / validate-registry (push) Has been cancelled
Build and Publish Container Image / build-and-push (push) Successful in 1m16s
REUSE-WP-0019-T04: reuse telemetry store and recording
Implements the hub side of the shared reuse-event schema (already drafted
in WP-0018-T01, schemas/reuse-event.schema.json): a SQLite reuse_events
table, POST /v1/reuse-events (token-auth), GET /v1/reuse-events?capability_id=
(read-only).

reuse_surface/plan_check.py: refactored record_outcome around a new
shared post_or_fallback_reuse_event() helper -- tries the hub first, falls
back to the local JSONL only on failure/unreachability, never both. New
record_manual_reuse_event() backs a new CLI command, reuse-surface
record-reuse, for retroactive facts recorded outside plan-check.

Privacy/scope (repo slugs and capability ids only, no code, no secrets) is
enforced structurally via the schema's additionalProperties: false, not
just by convention.

21 new pytest cases, 145 total pass. Live-verified against a real running
hub instance: POST/GET /v1/reuse-events directly, record-reuse and
plan-check --record-outcome both posting successfully to the hub, and --
after actually killing the hub process -- confirmed the fallback path
writes correctly to the local JSONL instead of erroring.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-07 22:32:19 +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-T04: reuse telemetry store and recording 2026-07-07 22:32:19 +02:00
establish.py WP-0016 finished: interactive registry maintain with llm-connect automation 2026-06-18 04:00:39 +02:00
federation.py Implement WP-0011 hub service, CLI, and deployment artifacts 2026-06-15 08:48:06 +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-T04: reuse telemetry store and recording 2026-07-07 22:32:19 +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-0017-T01: explicit capability_status on roster + coverage split in report gaps 2026-07-06 18:36:05 +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-0014: T11 docs, roster stats, workplan finished 2026-06-16 02:09:57 +02:00