fix(registry): drop wall-clock generated_at from registry.json to stop regen churn (age-9itj)

registry.json carried a wall-clock `generated_at` that generate-registry.sh rewrote on every `make regen-all`, so back-to-back regens were never byte-identical — it conflicted or re-noised at nearly every serial landing (cherry-pick conflicts on that line, idempotency proof-runs dirtying the tree, hand-reverting the pure-timestamp bump).

Remove the field from the body: registry.json is now a pure content-derived projection of its sources, matching the other generators (generate-context-map.sh / generate-skill-domain-map.sh already carry no timestamp). No consumer read the value — registry.go declares the field but never reads it, check mode already does del(.generated_at), and no schema/doc/jq/bats asserts it. Provenance for 'when generated' = git log on the file.

Verified: make regen-all twice -> registry.json byte-identical (sha256) + empty between-runs diff; make regen-check still reds on an un-regen'd skill body edit (codex-hash drift) and is green at rest; generate-registry.sh --check, validate-sku-catalog-drift.sh, 'ao registry list', and go build/vet/test (61 pass) all still work.
This commit is contained in:
boshu
2026-07-02 10:52:07 -04:00
parent 1f54c8579c
commit 1773bf8569
2 changed files with 10 additions and 7 deletions
-1
View File
@@ -1,6 +1,5 @@
{
"schema_version": 2,
"generated_at": "2026-07-02T13:09:42Z",
"summary": {
"skills": 63,
"hooks": 0,
+10 -6
View File
@@ -536,9 +536,12 @@ build_cadence_recommendations() {
# ─── Assemble ────────────────────────────────────────────────────────────────
main() {
local generated_at
generated_at="$(date -u +%Y-%m-%dT%H:%M:%SZ)"
# No wall-clock stamp in the committed artifact: a `generated_at` timestamp
# made back-to-back regens non-byte-identical (rewrote every `make regen-all`),
# which collided/re-noised at nearly every serial landing. registry.json is now
# a pure content-derived projection of its sources — matching the other
# generators (generate-context-map.sh / generate-skill-domain-map.sh, which
# also carry no timestamp). "When was this generated" = git log on the file.
local skills hooks knowledge_stores job_types schedules evals cli_commands cadence
local ao_bin sku_block
@@ -579,7 +582,6 @@ main() {
# capabilities/capability_summary).
local registry
registry=$(jq -n \
--arg generated_at "$generated_at" \
--argjson skill_count "$skill_count" \
--argjson hook_count "$hook_count" \
--argjson store_count "$store_count" \
@@ -602,7 +604,6 @@ main() {
--argjson workflow_count "$workflow_count" \
'{
schema_version: 2,
generated_at: $generated_at,
summary: {
skills: $skill_count,
hooks: $hook_count,
@@ -639,7 +640,10 @@ main() {
echo "FAIL: registry.json does not exist. Run: bash scripts/generate-registry.sh" >&2
exit 1
fi
# Compare ignoring generated_at timestamp
# generated_at was removed from the body (was wall-clock, caused churn);
# del(.generated_at) stays as a defensive no-op so an older committed
# registry.json that still carries the field still compares clean during
# rollout (and tolerates the field being reintroduced elsewhere).
local current_no_ts new_no_ts
current_no_ts=$(jq 'del(.generated_at)' "$OUTPUT")
new_no_ts=$(echo "$registry" | jq 'del(.generated_at)')