feat: advance conformance and deterministic ID migration
Assistant: codex Assistant-Model: gpt-5.6-sol Assistant-Session: 01a023c0-a0a3-7c03-b395-5a0d2757214d
This commit is contained in:
parent
3791411591
commit
ad621d6c0d
10 changed files with 513 additions and 20 deletions
46
docs/evidence/RMGR-WP-0005-orphan-disposition-2026-08-21.md
Normal file
46
docs/evidence/RMGR-WP-0005-orphan-disposition-2026-08-21.md
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
---
|
||||
id: RMGR-EVIDENCE-0005-ORPHANS-20260821
|
||||
type: evidence
|
||||
workplan_task: RMGR-WP-0005-T09
|
||||
created: "2026-08-21"
|
||||
source: local State Hub at http://127.0.0.1:8000
|
||||
---
|
||||
|
||||
# Local-cache orphan disposition rebaseline
|
||||
|
||||
The 2026-08-17 baseline of 28 workplans without `backing_filename` is stale.
|
||||
On 2026-08-21 the local State Hub returned 224 unbound rows:
|
||||
|
||||
| Status | Count | Disposition class |
|
||||
| --- | ---: | --- |
|
||||
| `active` | 1 | live, broken link |
|
||||
| `blocked` | 1 | live, broken link |
|
||||
| `proposed` | 3 | live, broken link |
|
||||
| `ready` | 2 | live, broken link |
|
||||
| `finished` | 201 | closed provenance |
|
||||
| `archived` | 16 | closed provenance |
|
||||
|
||||
Every one of the seven live rows has a matching repository file. There are no
|
||||
confirmed live hub-first workplans in this snapshot.
|
||||
|
||||
| Hub slug | Repository file |
|
||||
| --- | --- |
|
||||
| `nk-wp-0027` | `net-kingdom/workplans/NK-WP-0027-reef-placement-reconciliation.md` |
|
||||
| `state-wp-0081` | `state-hub/workplans/STATE-WP-0081-cluster-self-sufficiency-and-registrar.md` |
|
||||
| `railiance-wp-0022` | `railiance-platform/workplans/RAILIANCE-WP-0022-agent-high-risk-boundary-coverage.md` |
|
||||
| `railiance-wp-0023` | `railiance-platform/workplans/RAILIANCE-WP-0023-hub-core-candidate-credential-lanes.md` |
|
||||
| `rail-en-wp-0001` | `railiance-enablement/workplans/RAIL-EN-WP-0001-private-by-default-templates.md` |
|
||||
| `rail-ho-wp-0010` | `railiance-infra/workplans/RAIL-HO-WP-0010-new-reef-ports-need-a-grant.md` |
|
||||
| `ops-wp-0003` | `ops-hub/workplans/OPS-WP-0003-extension-contract-alignment.md` |
|
||||
|
||||
The 217 closed rows remain cheap historical provenance. They need not be
|
||||
reconstructed as files, but the cache-rebuild procedure must export or retain
|
||||
them before replacing the local database. Repairing the seven live bindings is
|
||||
the remaining prerequisite for T07.
|
||||
|
||||
## Reproduction
|
||||
|
||||
The counts came from `GET /workplans/`, selecting rows whose
|
||||
`backing_filename` is null and grouping by status. Repository UUIDs were joined
|
||||
to `GET /repos/`; canonical ids and exact titles were then searched in each
|
||||
reported checkout. This evidence records no secret or credential value.
|
||||
55
docs/hub-record-authority_v1.md
Normal file
55
docs/hub-record-authority_v1.md
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
---
|
||||
id: RMGR-CONTRACT-AUTHORITY-0001
|
||||
type: contract
|
||||
title: "State Hub record authority and offline behaviour"
|
||||
version: "1"
|
||||
status: draft-reviewable
|
||||
created: "2026-08-21"
|
||||
updated: "2026-08-21"
|
||||
workplan_task: RMGR-WP-0005-T08
|
||||
---
|
||||
|
||||
# State Hub record authority and offline behaviour v1
|
||||
|
||||
`config/hub-record-authority.yaml` classifies every table imported by the State
|
||||
Hub model package on 2026-08-21. It is the machine-readable routing contract;
|
||||
this document defines the meaning of its classes.
|
||||
|
||||
| Class | Truth source | Offline behaviour | Central write rule |
|
||||
| --- | --- | --- | --- |
|
||||
| `file-derived` | Repository file and Git history | Change the source file and commit. The commit is the write. | Re-index after Git settles; reject direct state pushes. |
|
||||
| `hub-native-append` | The named central hub | Append to an idempotent local outbox and replay. | Accept append-only events with a stable source identity. |
|
||||
| `hub-native-control` | The named central hub | Do not apply generic append-only replay. Stay read-only unless the record type has an ordered, idempotent command contract. | Accept commands at the one authoritative owner. |
|
||||
| `derived-cache` | A named upstream source, repository file, log, or runtime observation | Do not buffer. Rebuild or refresh. | Replaceable projection only. |
|
||||
| `retired` | Archived provenance | Reject new writes. | Read-only until physical deletion. |
|
||||
|
||||
The first class is ADR-010's file-derived side. The next two are subdivisions of
|
||||
its hub-native side. This subdivision is necessary because the current schema
|
||||
contains mutable control records: message read/archive markers, launch-request
|
||||
status, service catalog changes, and domain/topic administration are not
|
||||
append-only events and cannot safely be reconciled by unordered union. A generic
|
||||
offline buffer is therefore valid only for `hub-native-append`.
|
||||
|
||||
Several current State Hub REST endpoints still mutate records classified as
|
||||
file-derived. Those endpoints are compatibility surfaces during extraction;
|
||||
their existence does not confer authority. Decisions and intakes are
|
||||
file-derived under the ratified work-record standard and Repo Manager's governed
|
||||
commands, superseding ADR-010's older examples.
|
||||
|
||||
`managed_repos` is a composite projection. Repository identity, purpose, and
|
||||
classification derive from repository declarations and Forge; host paths and
|
||||
observation timestamps are replaceable observations. No field in that row makes
|
||||
the database a source of repository truth.
|
||||
|
||||
## Consequences for the offline edge
|
||||
|
||||
- Buffer only progress and token event appends under the generic replay path.
|
||||
- Route file-derived commands to Repo Manager; when central is absent, commit
|
||||
the file and let later indexing observe it.
|
||||
- Keep control-plane commands online-only until their owning hub publishes
|
||||
ordering and idempotency semantics. Queuing them in the append-only stream
|
||||
would silently invent a conflict policy.
|
||||
- Rebuild caches and reject writes to retired suggestion tables.
|
||||
|
||||
This narrows the offline-buffer part of `STATE-WP-0068`; it does not authorize
|
||||
changes in repositories owned by hub-core, activity-core, ops-hub, or fin-hub.
|
||||
|
|
@ -39,8 +39,17 @@ silently disambiguated with a repository slug.
|
|||
```bash
|
||||
rmgr identifier derive --namespace <fleet-namespace> --record-id RMGR-WP-0005
|
||||
rmgr identifier preflight --root /path/to/fleet
|
||||
rmgr identifier migration-plan --root /path/to/fleet \
|
||||
--namespace <fleet-namespace> --output uuid-migration.json
|
||||
```
|
||||
|
||||
Activation and bulk migration remain separate governed steps. Publishing this
|
||||
function does not retroactively rewrite existing identifiers.
|
||||
`migration-plan` is non-mutating. Its versioned JSON output preserves every
|
||||
current-to-derived UUID mapping and marks each repository as one atomic apply
|
||||
unit. A collision or malformed live identifier makes that whole repository
|
||||
ineligible while leaving unaffected repositories visible in the plan. Existing
|
||||
output files are not replaced unless `--force` is explicit.
|
||||
|
||||
Activation and applying a bulk migration remain separate governed steps.
|
||||
Publishing or planning this function does not retroactively rewrite existing
|
||||
identifiers. The caller must supply the namespace explicitly until the current
|
||||
fleet namespace is declared by the namespace owner under ADR-011.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue