Commit 390b106
fix(sync): derive uuid from the repo's actual owner, not a hardcoded one (#48)
The uuid is **derived, not allocated**. The spec defines it as
```
uuid = UUIDv5(namespace = URL, name = "github.com/<owner>/<name>")
```
so the **owner segment is part of the identity**. Both derivation sites
hardcoded it to `hyperpolymath`:
- `sync/deploy-clade-a2ml.sh:80`
- `sync/export-json.sh:28`
Every estate repo is hyperpolymath-owned today, so the bug is invisible.
It stops being invisible the moment a repo is hosted anywhere else: the
script derives a uuid from an owner path **that does not exist**, writes
it into `CLADE.a2ml` as fact, and the repo wears an identity belonging
to nothing.
Found while creating `metadatastician/cadastra`. Its true uuid is:
```
uuidgen --sha1 --namespace @url --name "github.com/metadatastician/cadastra"
-> da97ea76-1715-5331-963b-27f011b10d22
```
but these scripts would have written:
```
uuidgen --sha1 --namespace @url --name "github.com/hyperpolymath/cadastra"
-> 78c31c34-79c3-584d-bc94-50064431ca33
```
## Changes
- **`parse-repos.sh`** — optional `owner` field, emitted as TSV column
7, defaulting to `hyperpolymath`. Existing entries need no edit. Last
column, so consumers reading the first six fields are unaffected.
- **`deploy-clade-a2ml.sh`** — takes owner as `$7`; uses it for the
uuid, `primary-owner`, and all three forge lines. Now reads 7 fields (a
7th column would otherwise be absorbed into `description`).
- **`export-json.sh`** — same fix. **No new JSON key** — schema
unchanged on purpose, since `github` already carries `owner/name`.
### Two related hazards fixed while here
- **Registry/remote disagreement is now loud.** If `repos.a2ml` says one
owner and `git remote get-url origin` says another, deploy warns and
skips rather than silently deriving a wrong identity.
- **`ALREADY` checks both layouts.** Two are in use:
`.machine_readable/CLADE.a2ml` (this script + CLADE-001) and
`.machine_readable/descriptiles/CLADE.a2ml` (rsr-template-repo,
chronicles-of-slavia). Checking only the first meant a
descriptiles-layout repo looked like it had **no** CLADE, so this script
wrote a **second** one — two files, two identities, no error. Which
layout is authoritative is an unresolved canon disagreement and yours to
settle; until then, refusing to overwrite is the safe reading.
## Verification
Clean worktree from `origin/main`:
- ✅ **`repos.json` regenerated before/after is BYTE-IDENTICAL** — all
319 existing entries derive exactly as before (none sets an explicit
owner).
- ✅ The registry's own worked examples still reproduce: `januskey →
e216170e-…`, `gv-clade-index → c88e9ff3-…`, `rsr-template-repo →
a5ea1382-…`.
- ✅ A temporary entry with `owner = "metadatastician"` derives
`da97ea76-…` and `github "metadatastician/cadastra"`. **The seed entry
was reverted** — registering cadastra is outward-facing and yours
(doctrine 11), not this PR's.
Every uuid quoted was recomputed with `uuidgen`, not recalled.
## Not addressed (pre-existing)
The committed `worker/data/` artifacts **do not match what
`export-json.sh` produces** — `repos.json` is pretty-printed in git but
the generator emits compact (3646 vs 321 lines); `index.json` differs by
~1380 lines. Regenerating is a separate, owner-facing decision, so
`worker/data/` is deliberately untouched.
Draft: this changes how estate identity is derived, so it is for the
owner to review and merge.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 241dc5b commit 390b106
3 files changed
Lines changed: 84 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
47 | 50 | | |
48 | 51 | | |
49 | 52 | | |
| |||
68 | 71 | | |
69 | 72 | | |
70 | 73 | | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
75 | 117 | | |
76 | 118 | | |
77 | 119 | | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | 120 | | |
83 | 121 | | |
84 | 122 | | |
| |||
94 | 132 | | |
95 | 133 | | |
96 | 134 | | |
97 | | - | |
| 135 | + | |
98 | 136 | | |
99 | 137 | | |
100 | 138 | | |
| |||
105 | 143 | | |
106 | 144 | | |
107 | 145 | | |
108 | | - | |
109 | | - | |
110 | | - | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
111 | 149 | | |
112 | 150 | | |
113 | 151 | | |
| |||
148 | 186 | | |
149 | 187 | | |
150 | 188 | | |
151 | | - | |
152 | | - | |
| 189 | + | |
| 190 | + | |
153 | 191 | | |
154 | 192 | | |
155 | 193 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | | - | |
28 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
29 | 33 | | |
30 | 34 | | |
31 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
32 | 39 | | |
33 | 40 | | |
34 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
4 | 17 | | |
5 | 18 | | |
6 | 19 | | |
| |||
10 | 23 | | |
11 | 24 | | |
12 | 25 | | |
13 | | - | |
| 26 | + | |
14 | 27 | | |
15 | 28 | | |
16 | 29 | | |
17 | 30 | | |
18 | 31 | | |
19 | 32 | | |
20 | | - | |
| 33 | + | |
21 | 34 | | |
22 | 35 | | |
23 | 36 | | |
| |||
44 | 57 | | |
45 | 58 | | |
46 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
47 | 65 | | |
48 | 66 | | |
49 | | - | |
| 67 | + | |
50 | 68 | | |
51 | 69 | | |
52 | 70 | | |
0 commit comments