| State Hub | Repository UUID, canonical slug, protected aliases, verified Forge identity, operation journal, continuity verification, lifecycle events | Rename Forgejo directly, rewrite another repository's source, or register a replacement repository |
| Forgejo | Git repository, numeric repository ID, canonical Forge name, Git data, redirects and Forge-owned settings | Decide State Hub UUID/alias history or consumer completion |
| HelixForge/operator | Cutover window, credentials routed through their approved custodian, Forgejo rename call, pause/continue/rollback decision, destructive cleanup approval | Put credentials in CLI arguments, evidence, Git, State Hub, or chat |
| Target repository | Repository-native migration plan, product/runtime naming decisions, source updates, fresh clone, file-first work records, aggregation of owned handoff evidence | Claim another repository's source change complete |
| External source repository | Its own CI, deployment, policy, fabric, SBOM, credential-route, package, or documentation source and its live handoff work record | Let the target repository edit or close that obligation on its behalf |
Forgejo credentials are never accepted by `statehub repo rename`. Resolve
credential ownership before the window with `warden route find` and use the
operator-approved Forgejo/HelixForge mechanism outside State Hub. Examples below
use identifiers and placeholder paths only.
## Choose the scope before planning
### Repository-only rename checklist
Use this when the Git repository coordinate changes but the product/runtime
identity does not.
- [ ] Forgejo repository name and canonical clone/web URL change.
- [ ] State Hub canonical slug changes on the existing UUID; old slug remains a
protected alias.
- [ ] Local checkout and automation checkout coordinates are re-registered.
- [ ] Repository metadata and intentional live source references are updated.
- [ ] Consumers that name the Git coordinate receive owned handoffs.
| `state` | `planned` means resumable/incomplete, `achieved` means completed, `failed` means the last attempt failed, and `rolled-back` is terminal rollback. |
| `phase` | Last durably achieved phase. An `error_code` does not advance it. |
| `result.no_op` | The submitted phase was already achieved; operation identity was preserved. |
| `next_safe_action.action` | Operator action permitted by the recorded phase. |
| `next_safe_action.command` | Exact credential-free command skeleton for that action. |
| `result.error_code` | Code from the last failed attempt; inspect it before retrying. |
capabilities, interface changes, inbox, and stale external-reference notices.
- A stale Fabric/external projection is a visible handoff, not permission for
State Hub to rewrite its source.
- The dashboard does not currently render the phase journal. Use `statehub repo
rename status` and `verify` as the authoritative operational views.
- A healthy dashboard count is insufficient: final acceptance requires the
relationship checksums in `verify`.
## Recovery playbook
Always reuse the same operation UUID. First run `status`; treat `phase` as the
achieved state and the error as the failed attempt.
| Observation | Action |
| --- | --- |
| State Hub unavailable | Stop mutations. Restore central connectivity; then query the operation UUID. Rename phases are not edge-queueable. |
| Preflight expired or evidence/head changed | Do not start. Resolve drift and issue a fresh preflight; keep or abandon the unused client operation UUID deliberately. |
| Forge rename committed but journal remains `preflighted` | Retry `forge-renamed`; State Hub recognizes the expected numeric ID at the new coordinate and records a resumed phase. |
| Forge old-slug lookup redirects to new slug | Treat the redirect as compatibility only. Verify numeric ID at the requested canonical coordinate; never use the redirect as identity evidence. |
| Journal is `forge-renamed` | Prefer `statehub-rebound`; do not register a new State Hub repository. |
| Journal is `statehub-rebound` but clone evidence is wrong | Keep both checkouts. Correct the fresh clone/remote/Forge-ID/head evidence and retry `source-synced`. |
| Consumer check fails | Remain `source-synced` or `consumers-verified`; repair the named owner handoff or enter rollback preflight. Do not complete. |
| Same phase submitted twice | A matching retry returns `no_op`. A changed operation/target/actor is a conflict, not a retry. |
| Edge outbox contains old-slug writes | Pause preflight until replayed or explicitly resolved. Alias-aware central handlers preserve idempotency after rebind. |
| Private Forge repository unreadable | Stop. Restore approved Forge access; never infer identity from a local checkout or redirect. |
## Rollback limits
Rollback is a separately confirmed two-step operation:
```text
statehub repo rename rollback <operation-id> \
--confirm 'rollback:<operation-id>' --json
# Only after reviewing safe_to_rollback, blockers, and irreversible effects: