testsAndMisc/docs/superpowers/evidence/ci-green-pin-only-exemption-2026-11-01.json
Krzysztof kuhy Rudnicki 2e5566e8a3 ci-green: exempt pin-only changes when red
A red baseline blocked even the pin bump that fixes it. Changes touching only .fvmrc, pubspec, package.json, lockfiles, requirements*.txt or pyproject.toml now pass, with a loud line; all else stays fail-closed. Bats tests added.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WzxdWYdwRAtMg7ki6TKxuU
2026-11-01 20:51:56 +01:00

33 lines
1.7 KiB
JSON

{
"intent": "A red CI baseline no longer blocks a commit or push that touches only dependency-pin files, so a pin bump can fix a red freshness gate.",
"scope": [
"meta/scripts/check_ci_green.sh: PIN_FILE_RE, changed_files, only_pin_files and the exemption branch",
"linux_configuration/tests/test_check_ci_green.bats (new)",
"Non-goal: any other bypass; everything else stays fail-closed on a red baseline"
],
"changes": [
"On a red baseline the hook exits 0 when every changed file is .fvmrc, pubspec.yaml/.lock, package.json, pnpm-lock.yaml, requirements*.txt or pyproject.toml, and prints an EXEMPTION FIRED line listing them",
"Scope is the push range (PRE_COMMIT_FROM_REF..TO_REF) when set, else the staged files; empty or unusable scope is not exempt"
],
"verification": [
{
"command": "bats linux_configuration/tests/test_check_ci_green.bats",
"result": "pass",
"evidence": "8/8 ok: green passes, red blocks code, empty scope, pin-only exempt, mixed blocked, lookalikes blocked, push range, bad range fails closed"
},
{
"command": "pre-commit run --files meta/scripts/check_ci_green.sh linux_configuration/tests/test_check_ci_green.bats",
"result": "pass",
"evidence": "no hook output beyond Passed/Skipped"
}
],
"risks": [
"A pin-only change can still break the build; the pre-push CI mirror and CI itself remain the guard",
"A poisoned pin file is exempt from the red-baseline check only, not from other hooks"
],
"rollback": [
"git revert the commit; the hook returns to blocking every commit on a red baseline",
"Validate by running bats linux_configuration/tests/test_check_ci_green.bats is gone and the hook still passes on green"
]
}