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>
This commit is contained in:
2026-07-07 18:14:30 +02:00
parent 5aaa4c31c9
commit 00b7eab154
11 changed files with 451 additions and 30 deletions

View File

@@ -70,7 +70,7 @@ reuse-surface maintain --all --auto --no-llm
With llm-connect for maturity suggestions:
```bash
export LLM_CONNECT_URL=http://127.0.0.1:8088
export LLM_CONNECT_URL=http://127.0.0.1:8080
reuse-surface maintain --all --from-git-since HEAD~5
```

View File

@@ -3,7 +3,7 @@ domain: helix_forge
collision_policy: warn
sources:
- repo: activity-core
url: https://gitea.coulomb.social/coulomb/activity-core/raw/main/registry/indexes/capabilities.yaml
url: https://forgejo.coulomb.social/coulomb/activity-core/raw/branch/main/registry/indexes/capabilities.yaml
enabled: true
required: false
domain: helix_forge
@@ -375,7 +375,7 @@ sources:
cache_ttl_seconds: 86400
auth_header: Authorization
- repo: state-hub
url: https://gitea.coulomb.social/coulomb/state-hub/raw/main/registry/indexes/capabilities.yaml
url: https://forgejo.coulomb.social/coulomb/state-hub/raw/branch/main/registry/indexes/capabilities.yaml
enabled: true
required: false
domain: helix_forge

View File

@@ -7,7 +7,7 @@ collision_policy: warn
sources:
- repo: activity-core
count: 1
url: https://gitea.coulomb.social/coulomb/activity-core/raw/main/registry/indexes/capabilities.yaml
url: https://forgejo.coulomb.social/coulomb/activity-core/raw/branch/main/registry/indexes/capabilities.yaml
cache: registry/federation/cache/activity-core.yaml
- repo: agentic-resources
count: 0
@@ -219,7 +219,7 @@ sources:
cache: registry/federation/cache/shard-wiki.yaml
- repo: state-hub
count: 2
url: https://gitea.coulomb.social/coulomb/state-hub/raw/main/registry/indexes/capabilities.yaml
url: https://forgejo.coulomb.social/coulomb/state-hub/raw/branch/main/registry/indexes/capabilities.yaml
cache: registry/federation/cache/state-hub.yaml
- repo: tegwick-control
count: 0
@@ -266,7 +266,7 @@ capabilities:
consumption_modes:
- informational
source_repo: activity-core
source_url: https://gitea.coulomb.social/coulomb/activity-core/raw/main/registry/indexes/capabilities.yaml
source_url: https://forgejo.coulomb.social/coulomb/activity-core/raw/branch/main/registry/indexes/capabilities.yaml
source_index: registry/federation/cache/activity-core.yaml
- id: capability.agents.cli-assistant
name: Console-Native LLM Assistant (cya)
@@ -869,6 +869,7 @@ capabilities:
consumption_modes:
- informational
- planning
- cli
source_repo: core-hub
source_url: https://forgejo.coulomb.social/coulomb/core-hub/raw/branch/main/registry/indexes/capabilities.yaml
source_index: registry/federation/cache/core-hub.yaml
@@ -1013,7 +1014,7 @@ capabilities:
summary: "Django application (with a Vite/Tailwind frontend) for managing German\
\ public-procurement (Vergabe) tender participation \u2014 Ausschreibungs- und\
\ Teilnahme-Management-System."
vector: D1 / A1 / C0 / R0
vector: D3 / A1 / C1 / R1
domain: communication
status: draft
owner: vergabe-teilnahme
@@ -1274,7 +1275,7 @@ capabilities:
consumption_modes:
- service API
source_repo: state-hub
source_url: https://gitea.coulomb.social/coulomb/state-hub/raw/main/registry/indexes/capabilities.yaml
source_url: https://forgejo.coulomb.social/coulomb/state-hub/raw/branch/main/registry/indexes/capabilities.yaml
source_index: registry/federation/cache/state-hub.yaml
- id: capability.statehub.workstream-coordinate
name: Workstream And Task Coordination
@@ -1293,7 +1294,7 @@ capabilities:
- service API
- HTTP REST
source_repo: state-hub
source_url: https://gitea.coulomb.social/coulomb/state-hub/raw/main/registry/indexes/capabilities.yaml
source_url: https://forgejo.coulomb.social/coulomb/state-hub/raw/branch/main/registry/indexes/capabilities.yaml
source_index: registry/federation/cache/state-hub.yaml
- id: capability.wiki.adapter-contract
name: Capability-Aware Shard Adapter Contract