Skip to content

fix(cursor-approve): stop advising a relabel that does nothing, and state the decision once (BE-19527) #407

fix(cursor-approve): stop advising a relabel that does nothing, and state the decision once (BE-19527)

fix(cursor-approve): stop advising a relabel that does nothing, and state the decision once (BE-19527) #407

name: Test bump-callers script
# Runs the functional tests + shellcheck for the shared caller-bump scripts
# (.github/bump-callers/bump-callers.sh and its preflight.sh staleness guard).
# That one bump script drives the SHA-bump
# fan-out for the cursor-review, cursor-review-auto-label, agents-md-integrity,
# pr-size, pr-risk, assign-reviewers, groom AND detect-unreviewed-merge caller fleets,
# so a regression here silently breaks every consumer
# repo's pin auto-bump (or, worse, leaks a private caller name into this public
# repo's run logs) — cheap to guard with a unit run on change. Mirrors
# test-cursor-review-scripts.yml / test-agents-md-integrity.yml.
#
# The suite also runs a STATIC source check over every `bump-*-callers.yml`
# (BE-6472): each must feed CALLERS_JSON from `${{ secrets.* }}`, never
# `${{ vars.* }}`. That is why the entrypoints are in the path filters below —
# a change to one of them re-runs the guard.
# The two `paths:` lists below are duplicated on purpose — GitHub Actions does
# not support YAML anchors/aliases in a workflow file, so they cannot be shared.
# Keep them identical.
on:
pull_request:
paths:
- '.github/bump-callers/**'
# A GLOB, not the eight entrypoints spelled out (BE-6472). The suite now
# carries a STATIC guard asserting every entrypoint feeds CALLERS_JSON
# from a secret rather than a variable — a variable is printed unmasked in
# the step env dump Actions emits before the step, publishing private
# caller names in this public repo's logs. An enumerated filter silently
# exempts the next fleet somebody adds, which is exactly the file most
# likely to be copied from a pre-migration template. The glob covers it on
# day one. (`bump-cursor-cli-pin.yml` is not a caller fleet — it does not
# match this pattern and is not meant to.)
- '.github/workflows/bump-*-callers.yml'
- '.github/workflows/test-bump-callers.yml'
# The contract test also reads the TREE, not just the entrypoints: since
# BE-15253 it asserts every `WATCHED_EXEC` entry is a tracked file. Those
# are ~50 hand-written literal paths, and the failure they guard is a
# SILENT FREEZE — rename or retire a listed file without editing the list
# and preflight.sh reads it as a decommission on every future run
# (`::warning::`, `proceed=false`, a green run, no caller bumped again).
# A filter listing only the entrypoints would not fire on the PR doing the
# renaming, so the guard would first speak on some unrelated later PR,
# long after the fleet froze.
#
# Deliberately the two whole trees rather than an enumeration of the
# watched surfaces: that enumeration is a roster, and a roster duplicated
# into a `paths:` filter is exactly the drift this directory exists to
# prevent. The contract test asserts this filter covers every surface it
# reads, so a fleet that ever watches a path outside these two fails here
# rather than quietly losing its trigger.
- '.github/**'
- 'scripts/**'
push:
branches: [main]
paths:
- '.github/bump-callers/**'
- '.github/workflows/bump-*-callers.yml'
- '.github/workflows/test-bump-callers.yml'
- '.github/**'
- 'scripts/**'
permissions:
contents: read
jobs:
test:
name: shellcheck + functional
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: ShellCheck the bump scripts + tests
run: shellcheck -x .github/bump-callers/bump-callers.sh .github/bump-callers/preflight.sh .github/bump-callers/tests/test_bump_callers.sh .github/bump-callers/tests/test_preflight.sh .github/bump-callers/tests/test_paths_contract.sh
- name: Run bump-callers functional tests
run: bash .github/bump-callers/tests/test_bump_callers.sh
- name: Run preflight functional tests
run: bash .github/bump-callers/tests/test_preflight.sh
# Reads the real bump-*-callers.yml entrypoints, so it must re-run when any
# of them changes — the paths: filter above already lists every one.
- name: Run paths/preflight contract test
run: bash .github/bump-callers/tests/test_paths_contract.sh