Skip to content

Commit 7694d58

Browse files
chore(registry): pre-commit drift guard + document 2026-06-03 session (#368)
Wrap-up for the 2026-06-03 registry + workflow session (#356, #366, #363 all merged). ## Config update — anti-drift guard `hooks/pre-commit` now runs `bash scripts/build-registry.sh --check` (only where the generator exists, so the shared estate hook is safe elsewhere). If a tracked file under a spec home — or `STATE.a2ml` — changes without regenerating the derived registry/topology, the commit is blocked locally with a fix hint, **instead of** red-ing `registry-verify` on `main`. > This is the local backstop for the failure mode that reded `main` three times this session (spec-home edits, including in-home `.github/workflows/*`, merged without `build-registry.sh`). The remaining estate-side piece — making `registry-verify` a **required** check — is noted as follow-up. ## Documentation - `STATE.a2ml`: new `[session-history-2026-06-03]` block (PRs #356/#366/#363, the external-pointer registry + HYP-S006 capabilities, and the two open follow-ups); `last-updated`/`maintenance-status` refreshed; `version` 0.2.0 → 0.3.0. - `TOPOLOGY.md`: regenerated from the updated `STATE.a2ml` (derived file, not hand-edited). - `CHANGELOG.md`: **intentionally untouched** — it's generated from conventional commits by `changelog-reusable.yml`; the merged `feat(registry)`/`fix(ci)` commits flow in automatically. ## Verification - `build-registry.sh --check` → **OK** (green). - `bash -n hooks/pre-commit` → syntax OK. - `REGISTRY.a2ml` unchanged (STATE isn't a spec home; only `TOPOLOGY.md`'s `last-updated` moved). https://claude.ai/code/session_0178nMYCNXgotTeekePkoUjd --- _Generated by [Claude Code](https://claude.ai/code/session_0178nMYCNXgotTeekePkoUjd)_ Co-authored-by: Claude <noreply@anthropic.com>
1 parent 33a82ee commit 7694d58

3 files changed

Lines changed: 39 additions & 5 deletions

File tree

.machine_readable/6a2/STATE.a2ml

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99

1010
[metadata]
1111
project = "standards"
12-
version = "0.2.0"
13-
last-updated = "2026-06-02T18:00:00Z"
12+
version = "0.3.0"
13+
last-updated = "2026-06-03T00:00:00Z"
1414
status = "active"
15-
session = "2026-06-02 inbox cleanup + license-policy hardening + estate sweeps"
15+
session = "2026-06-03 AffineScript external-pointer registry + registry-verify repair + workflow startup_failure fixes"
1616

1717
[project-context]
1818
name = "Standards"
@@ -39,9 +39,26 @@ actions = [
3939
]
4040

4141
[maintenance-status]
42-
last-run-utc = "2026-06-02T18:00:00Z"
42+
last-run-utc = "2026-06-03T00:00:00Z"
4343
last-result = "pass" # unknown | pass | warn | fail
4444

45+
[session-history-2026-06-03]
46+
session = "2026-06-03 AffineScript external-pointer registry + registry-verify repair + workflow startup_failure fixes"
47+
prs-merged = [
48+
"#356 feat(registry): index AffineScript .affine/.affex/.affmap as verified external pointers (fold into main's generated registry)",
49+
"#366 fix(registry): regenerate to clear accumulated source_hash drift (registry-verify red on main)",
50+
"#363 fix(ci): clear residual workflow startup_failures (secrets-in-if, hashFiles-in-job-if)"
51+
]
52+
capabilities-added = [
53+
"Registry now indexes EXTERNAL specs (kind=external): verified pointers (canonical_url + version_pin + recorded source_hash) to specs whose SSOT is another repo. AffineScript v2 (.affine/.affex/.affmap, SSOT hyperpolymath/affinescript) are the first; source_hash sentinel PENDING-FIRST-SYNC until upstream lands.",
54+
"HYP-S006 (registry-staleness) extended to verify external pointers by re-fetching canonical_url (network-side), rejecting md5/sha1, capping external re-pin to :review.",
55+
"hooks/pre-commit gains a registry/topology drift guard (runs build-registry.sh --check where the generator is present) so spec-home edits can't merge stale and red main."
56+
]
57+
notes = [
58+
"registry-verify went red on main 3x this session: spec-home content (incl. in-home .github/workflows/*) was merged without `bash scripts/build-registry.sh`. The pre-commit guard above is the local backstop; making registry-verify a REQUIRED check is the remaining estate-side follow-up.",
59+
"Open follow-up: teach hypatia secret_action_without_presence_gate to accept an env-mapped-from-secret gate (instant-sync false-positive after the secrets-in-if fix)."
60+
]
61+
4562
[session-history-2026-06-02]
4663
session = "2026-06-02 inbox cleanup wave + license-policy hardening + estate sweeps"
4764
prs-merged = [

TOPOLOGY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
> `.machine_readable/6a2/STATE.a2ml` by `scripts/build-registry.sh`.
99
> It cannot freeze: every regeneration re-reads ground truth. Do not edit by hand.
1010
11-
- **Phase:** active &nbsp;|&nbsp; **Maturity:** experimental &nbsp;|&nbsp; **STATE last-updated:** 2026-06-02T18:00:00Z
11+
- **Phase:** active &nbsp;|&nbsp; **Maturity:** experimental &nbsp;|&nbsp; **STATE last-updated:** 2026-06-03T00:00:00Z
1212
- **Registry entries:** 31 specs across 6 streams
1313
- **Front door:** human → [README.adoc](README.adoc); machine → [0-AI-MANIFEST.a2ml](0-AI-MANIFEST.a2ml)
1414
- **Registry:** [.machine_readable/REGISTRY.a2ml](.machine_readable/REGISTRY.a2ml) (index + source hashes) · prose: [REGISTRY.adoc](REGISTRY.adoc)

hooks/pre-commit

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,23 @@ for file in $SOURCE_FILES; do
7474
fi
7575
done
7676

77+
# Registry / topology drift guard (standards repo only — runs where the
78+
# generator is present). The verifiable spec registry records a content
79+
# hash per spec home; when a tracked file under a home changes without
80+
# regenerating, the recorded source_hash goes stale and registry-verify.yml
81+
# reds main. (It did, three times, when spec-home edits merged without a
82+
# regenerate.) Catch it locally, before the commit, instead of in CI.
83+
if [ -f scripts/build-registry.sh ]; then
84+
if ! bash scripts/build-registry.sh --check >/dev/null 2>&1; then
85+
echo -e "${RED}✗ REGISTRY.a2ml / TOPOLOGY.md are stale — regenerate before committing.${NC}"
86+
echo " A tracked file under a spec home (or STATE.a2ml) changed without"
87+
echo " regenerating the derived registry/topology."
88+
echo " Fix: bash scripts/build-registry.sh"
89+
echo " git add .machine_readable/REGISTRY.a2ml TOPOLOGY.md"
90+
ERRORS=$((ERRORS + 1))
91+
fi
92+
fi
93+
7794
# Final result
7895
echo ""
7996
if [ $ERRORS -gt 0 ]; then

0 commit comments

Comments
 (0)