Skip to content

test(site-monitor): fail when a site has no copy-paths.conf entry - #210

Merged
twistedmelonman merged 2 commits into
mainfrom
claude/test-sites-copy-paths-055823
Oct 20, 2026
Merged

twistedmelonman merged 2 commits into
mainfrom
claude/test-sites-copy-paths-055823

Conversation

@twistedmelonman

Copy link
Copy Markdown
Member

Summary

Closes smartwatermelon/claude-config#725. Copy gate failure mode 2 in docs/superpowers/specs/2026-10-15-copy-gate-design.md: a production site with no copy-paths.conf entry is ungated. The check runs in dev-env (decided 2026-10-19) because dev-env owns sites.json, so a PR that adds a site without an entry fails on that PR.

  • scripts/site-monitor/check-copy-paths.sh <conf> [sites.json]: exit 1 names each repo in sites.json with no owner/name include line. public=* lines, exclude-only repos and commented lines do not count. Exit 2 on bad input, including a conf with no include lines at all, so an empty or truncated download fails closed.
  • scripts/site-monitor/tests/test-check-copy-paths.sh + fixtures: covered, missing, and each fail-closed input. Repeats under /bin/bash 3.2 when the host has it.
  • .github/workflows/tests.yml: new step fetches copy-paths.conf from claude-config main with curl -fsSL (public raw URL, no token, no new action) and runs the checker.
  • test-run-monitor.sh: unset -f gh. An exported gh shell function (the dotfiles wrapper) beat the PATH stub, so the issue-write checks failed on a dev machine. CI was not affected.

Test plan

  • bash scripts/site-monitor/tests/run-tests.sh: all pass (it failed in test-run-monitor.sh before the unset -f gh line, on a clean main checkout too).
  • shellcheck -S info clean on the new and changed scripts; actionlint and zizmor clean on tests.yml.
  • Real files: the checker passes against claude-config main copy-paths.conf and the current sites.json.
  • Known bad: the real conf with the crazy-larry lines removed exits 1 and names smartwatermelon/crazy-larry. A 404 URL makes curl -f exit non-zero.
  • CI tests job green on this PR.

Limits

  • Runs on dev-env pull requests only. A claude-config change that drops an entry is not caught until the next dev-env PR.
  • One test case uses the real sites.json (the default path). It expects exit 1 against a fixture conf, so it depends on sites.json naming at least one repo.

Claude Code Bot added 2 commits October 19, 2026 17:30
copy-paths.conf is opt-in per repo, so a new production site stays
ungated until someone adds it (copy gate spec, failure mode 2). dev-env
owns sites.json, so the check runs here: a PR that adds a site without
a conf entry fails on that same PR.

- check-copy-paths.sh: exits 1 and names each sites.json repo with no
  owner/name include line. public=*, exclude-only and commented lines
  do not count. A conf with no include lines (empty or truncated
  download) exits 2, so the check fails closed.
- test-check-copy-paths.sh: fixture confs for covered, missing and
  each fail-closed input, repeated under /bin/bash 3.2 when present.
- tests.yml: fetch copy-paths.conf from claude-config main with
  curl -f and run the checker.
- test-run-monitor.sh: unset an exported gh function, which beat the
  stub on PATH and failed the issue-write checks on a dev machine.

Closes smartwatermelon/claude-config#725
Hooks merged today, the github-workflows self auto-merge, the CodeQL sweep,
and the fleet-wide removal of "require branches to be up to date".
@twistedmelonman
twistedmelonman merged commit 9342d77 into main Oct 20, 2026
5 checks passed
@twistedmelonman
twistedmelonman deleted the claude/test-sites-copy-paths-055823 branch October 20, 2026 00:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Copy gate: test that every site in sites.json has a copy-paths entry

1 participant