Commit Graph

7 Commits

Author SHA1 Message Date
e0a4de3310 REUSE-WP-0019-T02: hub recompose staleness tracking + Forgejo webhook
Some checks failed
ci / validate-registry (push) Has been cancelled
reuse_surface/hub/store.py: compose_state table tracking composed_at/stale,
updated only on a *forced* recompose (refresh=true, webhook, future
scheduled fallback) -- a plain GET still serves current best-effort data
but never silently reports itself as freshly composed.

reuse_surface/hub/webhooks.py: constant-time HMAC-SHA256 signature
verification (fails closed on an empty/unconfigured secret) and
path-only push-payload inspection (never parses file content, per design
principle 2 -- webhook only decides whether to trigger a pull-based
recompose).

New endpoint POST /v1/webhooks/forgejo, accepting both
X-Forgejo-Signature and X-Gitea-Signature headers since sibling repos
migrate independently. GET /v1/federated and POST /v1/federated/compose
now share an asyncio.Lock with the webhook so concurrent recompose
triggers coalesce instead of overlapping.

No separate /v1/recompose route was added -- POST /v1/federated/compose
already did that job from earlier hub work; specs/FederationHubAPI.md now
documents this explicitly instead of duplicating it.

28 new pytest cases (128 total pass). Live-verified: ran the actual hub
service locally and sent a real HMAC-signed webhook over HTTP, confirming
the full webhook-to-recompose path, signature rejection, and the
irrelevant-path no-op.

Does NOT deploy to the live reuse.coulomb.social hub -- that needs a
container rebuild/push/k8s rollout, a separate production-deployment
action out of scope here without explicit sign-off.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-07 18:24:55 +02:00
00b7eab154 REUSE-WP-0019-T01: forge host abstraction + URL migration inventory
Some checks failed
ci / validate-registry (push) Has been cancelled
reuse_surface/forge_host.py: parse/derive/rewrite raw index URLs across
Gitea and Forgejo (handles both the legacy /raw/<branch>/... form and the
canonical /raw/branch/<branch>/... form both forges serve without a 303
redirect). migrate_source_host() verifies the new URL resolves via HTTP
HEAD before writing -- refuses to point a repo at a host it hasn't
actually migrated to.

New CLI: reuse-surface federation migrate-host --repo <slug> --to
<base-url> [--from <check>] [--dry-run] [--no-verify] [--update-hub].

Inventory: cross-referenced sources.yaml against each repo's actual git
origin. 11/61 repos already on Forgejo; found 2 with stale sources.yaml
entries (activity-core, state-hub) despite having migrated. Fixed for
real: local sources.yaml + production hub registration (hub update),
verified against GET /v1/federated post-migration. config-atlas's
WP-0017-T06 303 confirmed NOT a host-transition symptom (already diagnosed
there as something else).

Also fixed two host-agnostic gaps found while inventorying:
registry_update.py and maintain_llm.py only recognized .gitea/workflows/,
missing repos already on .forgejo/workflows/. Fixed a stale copy-paste
example (state-hub's now-wrong old URL) in docs/RegistryFederation.md, and
a pre-existing unrelated port typo (8088 vs the real llm-connect default
8080) in tools/README.md and registry/README.md.

17 new pytest cases (tests/test_forge_host.py), 106 total pass.
Recomposed federated.yaml post-migration: still 61 capabilities.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-07 18:14:30 +02:00
af93b2a91c REUSE-WP-0018-T05: ecosystem rollout convention drafted and proposed
Some checks failed
ci / validate-registry (push) Has been cancelled
Gate cleared: WP-0017 finished 2026-07-07, federated.yaml now carries 61
real capabilities (was 24). Dogfooded immediately -- plan-check against
'unified interface for issue tracking across Gitea GitHub GitLab' now
correctly returns extend/capability.infotech.issue-tracking instead of new.

Drafted the query-before-build convention in .claude/rules/workplan-convention.md
(gitignored, local -- propagation happens via the custodian rules-template
mechanism, not a reuse-surface git commit). Sent State Hub message to
custodian-agent proposing it be added to the shared template
(13cecd08-14e8-46d9-880c-65b8fef857cb).

Added reuse_check frontmatter to REUSE-WP-0018 and REUSE-WP-0019 themselves
as the reference implementation, both dogfooded for real against the live
federated index (both correctly verdict 'new').

REUSE-WP-0018 is now done except T03 (LLM semantic rerank), deferred
pending a running llm-connect instance. Updated IntentScopeGapAnalysis.md
priority 29 accordingly.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-07 17:04:55 +02:00
e87a07014c chore(consistency): renormalize lifecycle state [auto]
Updated by fix-consistency on 2026-07-06:
  - workplan status: ready → active
2026-07-06 18:41:53 +02:00
493f23123c Move WP-0017, WP-0018, WP-0019 to ready
Some checks failed
ci / validate-registry (push) Has been cancelled
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-06 18:31:39 +02:00
64b57e69f0 Write back State Hub workstream/task IDs for WP-0017..0019
Some checks failed
ci / validate-registry (push) Has been cancelled
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 18:18:46 +02:00
e37fc60ecf Add workplans WP-0017..0019: coverage campaign, plan-check loop, Forgejo automation + telemetry
Some checks failed
ci / validate-registry (push) Has been cancelled
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 18:17:32 +02:00