Skip to content

Run validate-macos on every PR and require it on main - #226

Merged
seathatflowsinourveins merged 6 commits into
mainfrom
claude/require-validate-macos-20260925
Sep 25, 2026
Merged

seathatflowsinourveins merged 6 commits into
mainfrom
claude/require-validate-macos-20260925

Conversation

@seathatflowsinourveins

Copy link
Copy Markdown
Collaborator

What

This makes validate-macos (macos-15, the full test suite on macOS) safe to require on main, and adds it to the ruleset target .github/main-ruleset.json.

Why. On #219, the new credential tests failed only on macOS: 5 failures and 13 errors, because /var and /tmp are OS symlinks there and the no-follow guard refused them. validate-macos was not a required check, so nothing would have blocked that merge.

Why not just add it to the ruleset. validate-macos lives in adoption-bootstrap.yml, whose pull_request trigger had a paths: filter. On a PR that touches none of those paths, the job never runs. A required check that never reports leaves the PR waiting forever, and it also means a macOS break in unlisted code went untested.

Change:

  • adoption-bootstrap.yml drops the pull_request path filter and adds a changes job. The job runs on ubuntu, with harden-runner first, and uses plain git diff --name-only between the base and head SHAs. It adds no new third-party action.
  • bootstrap-linux, bootstrap-macos and bootstrap-macos-brew keep their path gating through needs: changes plus if:. A job skipped by if: reports success.
  • validate-macos runs on every PR. The push, schedule and dispatch triggers and their paths are unchanged, and PR concurrency with cancel-in-progress is added.
  • .github/main-ruleset.json adds {"context": "validate-macos", "integration_id": 15368}. strict_required_status_checks_policy stays false: its recorded overturn condition, a main failure traced to merge skew, has not occurred as of 2026-09-25.
  • Tests:
    • tests/test_workflow_hardening.py gains a target test that requires validate-macos and keeps strict off.
    • A new AdoptionBootstrapMacosRequiredTests checks four things: there is no PR path filter; validate-macos cannot be skipped by if or needs; the bootstrap jobs stay path-gated; and the changes pattern list equals push's paths: list.
    • tests/test_adoption_bootstrap_macos.py stale trigger assertions are fixed.
  • Docs: docs/github-automation.md gets the required-checks list and the "a required check must run on every PR" note. The decision record gains the dated section "validate-macos required (2026-09-25)", covering evidence, alternatives, cost (about 7–12 min per PR, free on a public repo) and overturn conditions.

After merge, the coordinator applies .github/main-ruleset.json to live ruleset 23739774 and verifies that the live and target rules match.

Checks

  • Tests: the full python3 -m unittest suite ran 4717 tests, all OK (534 host-expected skips). test_workflow_hardening ran 46 OK.
  • Validators: all six pass.
  • zizmor: 0 findings. It ran offline, strict, with no config or ignores.
  • Not run: actionlint is not installed on this host.

Review note: Codex CLI is at its usage limit until 2026-09-30, so this PR has an independent Claude review only.

🤖 Generated with Claude Code

…gate bootstrap-* separately

validate-macos already runs this repository's full test suite on macos-15, but
adoption-bootstrap.yml's pull_request trigger carried a paths: filter, so it never
ran at all on most PRs -- PR #219's macOS-only credential-guard failures (/var and
/tmp are OS symlinks there) would not have blocked merge under any current required
check. Drop the paths: filter from pull_request entirely, add a lightweight `changes`
job (harden-runner, contents: read, plain git diff, no new third-party action) that
keeps bootstrap-linux/bootstrap-macos/bootstrap-macos-brew path-gated on pull_request
the way GitHub's own paths: filter already gates them on push, and require
validate-macos in .github/main-ruleset.json (strict_required_status_checks_policy
stays false). Adds tests/test_workflow_hardening.py::AdoptionBootstrapMacosRequiredTests,
updates tests/test_adoption_bootstrap_macos.py's now-stale pull_request-paths
assertions, and records the decision, alternatives, cost and overturn conditions in
docs/decisions/2026-09-22-github-automation-closure.md.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

Scout and others added 5 commits September 24, 2026 22:04
CI's pinned actionlint 1.7.12 runs shellcheck on run: scripts and failed on
SC2254 at the path-pattern case match. Glob matching there is the intent: each
pattern is a path glob, and case's * also matches /, which gives the push
paths: list's ** semantics.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
evidence.json was rebuilt from main's copy with this branch's six changed
entries refreshed. #224 renamed the fixture this branch still registered under
its old path. The docs auto-merged; both changes are present.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…e changes job, NUL-safe diff

Independent review found that needs: changes plus a bare if: (no status function) applies
an implicit success() to bootstrap-linux/bootstrap-macos/bootstrap-macos-brew, so once
changes itself is skipped (it only runs on pull_request), all three jobs were skipped too
on every push, schedule and workflow_dispatch run -- confirmed live by the coordinator's
dispatch run 36085789483 (changes skipped, all three bootstrap-* jobs completed as
skipped, validate-macos ran normally). Fix: if: ${{ !cancelled() && (github.event_name !=
'pull_request' || needs.changes.outputs.bootstrap != 'false') }}, following the
security-scan.yml precedent; != 'false' also makes a failed/cancelled changes job run
everything (fail safe). The changes job itself now fails safe on a missing payload SHA or
a failed git diff (echoes bootstrap=true and exits 0 instead of exiting 1 and letting
needs: skip the dependents), and switches to git diff -z with a NUL-delimited read so a
quoted non-ASCII filename still matches a PATTERNS glob. Also: SC2254-annotated case glob
comment corrected to describe over-matching (not exact paths: semantics), stale workflow
comments and decision-record claims corrected (PR #219 did run and fail validate-macos,
just wasn't required; "fourth job" -> "fifth"; measured cost 8.2-13.4 min, median 10.9 over
36 runs; decision record restructured to flat Evidence/Alternatives/Decision/Cost/Overturn/
Measured; added a rollout note about already-open PRs needing a new push after the ruleset
is applied), and tests/test_workflow_hardening.py strengthened to require a status function
and != 'false' (proven to fail against the pre-fix condition text) plus fail-safe/NUL-safety
assertions on the changes job's script.

Verified: actionlint 1.7.12 (with shellcheck 0.11.0) and zizmor --offline --no-config
--no-ignores --persona regular --strict-collection both report 0 findings on
.github/workflows. tests.test_workflow_hardening, test_adoption_bootstrap_macos,
test_adoption_bootstrap, test_adoption_docs_consistency, test_workflow_security_coverage,
test_workflow_security and the full python3 -m unittest suite (4720 tests) all pass. All
six validators (validate.py, validate_catalogs.py, landscape.py, evidence_manifest.py
--check, verdict_review_gate.py --base origin/main, trading_gates.py --check) pass.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Run 36086815267 at 8ec88c1: changes skipped (it runs only on pull_request);
the bootstrap-linux, bootstrap-macos, bootstrap-macos-brew and validate-macos
jobs all ran and succeeded. The before-fix run 36085789483 had skipped the
three bootstrap jobs.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…s in the record

- shell: bash runs as bash -eo pipefail, so the script now runs set +e and
  guards mktemp with the fail-safe bootstrap=true write. The test asserts both.
- Workflow comment and decision record: only push is path-filtered; schedule
  and workflow_dispatch run every job.
- #219: validate-macos failed on earlier heads (72a15b8, 1bd4e2f) and passed
  at the merged head 04c867b. It was not a red run beside the merge.

From the independent delta review of 8ec88c1/c19cb31d (verdict ready).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@seathatflowsinourveins
seathatflowsinourveins merged commit 57fb6d8 into main Sep 25, 2026
23 checks passed
@seathatflowsinourveins
seathatflowsinourveins deleted the claude/require-validate-macos-20260925 branch September 25, 2026 03:02
seathatflowsinourveins pushed a commit that referenced this pull request Sep 25, 2026
…y branch

evidence.json was rebuilt from main's copy. This branch's convergence-record
entry and its ten sim-capacity file registrations were re-applied. The CI lock
path this branch still carried was not re-registered, because #233 renamed it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.

1 participant