molecule-core/runbooks
Molecule AI Core-DevOps df821c8258 fix(ci): sop-tier-check gracefully handles empty/invalid token
SOP_FAIL_OPEN=1 was not preventing CI failures because three API calls
with `set -euo pipefail` would abort the script before reaching the
SOP_FAIL_OPEN exit block:

1. `WHOAMI=$(curl ... | jq -r ...)` — jq exits 1 on empty input,
   triggering set -e → script exits before SOP_FAIL_OPEN check.
2. `curl` for reviews — curl exits non-zero on 401 from empty token,
   triggering set -e → same problem.
3. `curl` for org teams list — same issue.

Fix: add `|| true` to jq pipelines and `set +e` / `set -e` guards
around curl calls that may fail with empty token. When SOP_FAIL_OPEN=1
and the token is invalid, the script now exits 0 instead of 1,
preventing blocking CI failures on unconfigured runners.

Refs: sop-tier-check failure on PRs #617, #621, #587, #562
2026-05-12 03:16:17 +00:00
..
gitea-actions-migration-checklist.md refactor(ci): drop "canary-" prefix → staging-smoke/staging-verify (Hongming directive 2026-05-11) (#443) 2026-05-11 11:25:29 +00:00
gitea-operational-quirks.md fix(ci): sop-tier-check gracefully handles empty/invalid token 2026-05-12 03:16:17 +00:00