`git diff --name-only | grep -qE` matched, grep exited, git died on SIGPIPE, and
`pipefail` turned the whole pipeline into a failure — so a push that edited the
schema alongside enough other files printed `changed=false` and skipped the
freshness check entirely. Read the list into a variable and match it in the
shell instead.
The two unresolvable-base cases could not see any of this: they asserted
`changed=true`, which the diff-failed fallback also prints, so deleting the
guard they were named for left them green. The script now names the branch it
took on stderr and they assert that.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
On pull_request, `github.event.before` is the PR's previous head, so the second
push to a PR diffs a range that no longer contains the commit that edited the
schema: the detector emits changed=false, the freshness step is skipped by its
`if:`, and lint-and-test goes green on a stale src/graphql/types.ts. Every
later push that does not itself touch one of the five inputs repeats it, forks
included — which is the case the trigger was added for. Nothing else covers the
gap: tsc reads the committed file as truth, eslint ignores it, and prettier
passes on codegen's own output.
Diff from pull_request.base.sha on PR events and keep `before` for push. The
range selection moves out of the YAML into .github/scripts so it can be driven
over real git fixtures: on the three-commit fixture the old range yields
changed=false and the new one changed=true.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>