From 855b394fb6129049e31ac67977c8ae6d09edb079 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 27 Aug 2026 10:11:00 +0000 Subject: [PATCH] =?UTF-8?q?[TRACK=5FF]=20FIX:=20publish=20scripts/sync-met?= =?UTF-8?q?rics.sh=20=E2=80=94=20the=20public=20tree=20referenced=20a=20fi?= =?UTF-8?q?le=20it=20did=20not=20ship?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `sync-metrics.sh` was excluded from the public branch under "internal sync/verification scripts (not needed by external users)". That rationale did not hold for this one: TWELVE published files reference it, so the public tree shipped tooling that pointed at a file that was not there. Not only prose. `00_SETUP/hooks/pre-commit` INVOKES it, so a public clone's pre-commit hook called a missing script; and `riinac/tests/metrics_doc_consistency.rs` fails with "run `bash scripts/sync-metrics.sh` and stage the result" — advice a public clone could not follow. The other references are .cursorrules, copilot-instructions, MAINTAINER_ONBOARDING, AGENTS.md, COPILOT.md, llms.txt, DOMAIN_R5_CHECKLIST, audit-docs.sh and generate-metrics.sh. FOUND while back-merging riina #15, which adds a mirror-local `scripts/mirror-propagate-metrics.sh`. That commit exists precisely because the mirror lacks this script, and says the last three metrics refreshes propagated the count into the docs BY HAND as a result. The workaround was the symptom; the exclusion was the cause. SAFE TO PUBLISH, verified rather than assumed: - no secrets, tokens or container-absolute paths (grepped) - no gate depends on its exclusion (verify-public.sh, public-quality-gates.sh) - it guards every target with `if [ -f ]`, so the internal-only files it also knows about (CLAUDE.md, PROGRESS.md) are skipped on a tree that lacks them Proved by running it against a PUBLIC-SHAPED tree — metrics.json plus only the published docs, deliberately no CLAUDE.md and no PROGRESS.md: 5 public docs updated, the two internal ones skipped silently, exit 0, no error output. The four scripts left in that block stay internal because they genuinely are: they act on the public/riina remotes or on the private generator, and an external clone can neither run them nor need them. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01Uu28z8CdRQ1SLzTv8yszth --- scripts/sync-public.sh | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/scripts/sync-public.sh b/scripts/sync-public.sh index b37494f81..9447e160c 100755 --- a/scripts/sync-public.sh +++ b/scripts/sync-public.sh @@ -110,9 +110,26 @@ INTERNAL_PATHS=( "04_SPECS/cross-cutting/RESEARCH_COMPONENTS_AUDIT_*.md" # --- Internal sync/verification scripts (not needed by external users) --- + # + # `scripts/sync-metrics.sh` WAS listed here and is deliberately NOT any more. + # The rationale above did not hold for it: 12 files that ARE published + # reference it, so excluding it published a tree whose own tooling pointed at + # a file that was not there. Not only prose — `00_SETUP/hooks/pre-commit` + # invokes it, and `riinac/tests/metrics_doc_consistency.rs` fails with + # "run `bash scripts/sync-metrics.sh` and stage the result", advice a public + # clone could not follow. + # + # It is safe to publish: it holds no secrets and no container-absolute paths, + # and it guards every target with `if [ -f ]`, so the internal-only files it + # also knows about (CLAUDE.md, PROGRESS.md) are simply skipped on a tree that + # lacks them. Verified by running it against a public-shaped tree: 5 public + # docs updated, the two internal ones skipped silently, exit 0. + # + # The four below stay internal because they genuinely are: they act ON the + # public/riina remotes or on the private generator, and an external clone can + # neither run them nor need them. "scripts/sync-public.sh" "scripts/verify-public.sh" - "scripts/sync-metrics.sh" "scripts/verify-riina-deploy.sh" "scripts/generate-full-stack.py"