molecule-core/.gitea/scripts
core-devops ecbfa60f04 fix(ci): close fail-open in qa/security review checks (RFC#324 v1.3 §A1.1) + drop dead jq fallback
Addresses hongming-pc review #1421 on PR #535.

Blocker 1 (fail-open privilege gate):
  Original v1.2 design `if:`-gated the "Check out BASE" and "Evaluate"
  steps on the privilege-check step's `proceed` output. A non-collaborator
  commenting `/qa-recheck` produced proceed=false → both steps skipped →
  job conclusion = success → `qa-review / approved` context published as
  success with ZERO real APPROVE. Any visitor could green the gate.

  Fix per RFC#324 v1.3 §A1.1 option (b): drop privilege-gating of the
  eval entirely. The eval is read-only and idempotent (reads
  pulls/{N}/reviews + teams/{id}/members/{u}, both server-side state
  uninfluenced by who commented). Re-running on a non-collaborator's
  comment is harmless: if a real team-member APPROVE exists, the eval
  flips green; if not, it stays red. The privilege step is retained as
  a `::notice::` log line only (griefer-spotting), not a gate.

Non-blocking nit 5 (dead jq fallback):
  `apt-get install jq` (no root) and `curl -o /usr/local/bin/jq` (no
  write perm on uid-1001 rootless runner) both can't succeed. Per
  feedback_ci_runner_install_needs_writable_path + #391/#402, jq is
  already baked into runner-base. Replace the install dance with a
  clear `exit 1` + diagnostic so a missing-jq runner fails loud rather
  than confusingly.

Smoke-test (mocked Gitea API):
  no-approve         → exit 1  (gate red)
  self-approve       → exit 1  (gate red)
  dismissed-approve  → exit 1  (gate red)
  non-team-approve   → exit 1  (gate red)
  team-approve       → exit 0  (gate green)

Blocker 2 (A1-α event-suffix context-name verification) is the
smoke-PR's job and is flagged in a follow-up comment on this PR — does
not require workflow changes here.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 11:45:59 -07:00
..
tests feat(ci): sop-tier-check refire workflow via issue_comment (internal#292) 2026-05-11 02:44:31 -07:00
audit-force-merge.sh ci(audit-force-merge): fan §SOP-6 force-merge audit to molecule-core 2026-05-08 20:09:35 -07:00
ci-required-drift.py feat(internal#219 §4+§6): port ci-required-drift + audit-force-merge sidecar from CP 2026-05-11 00:35:25 -07:00
compare-api-diff-files.py fix(harness-replays): use Gitea Compare API instead of git diff for detect-changes (#476) 2026-05-11 15:26:11 +00:00
main-red-watchdog.py feat(ci): main-red watchdog (Option C of main-never-red directive) — closes #420 2026-05-11 00:36:20 -07:00
push-commits-diff-files.py fix(harness-replays): use github.event.commits for push event detect-changes (#499) 2026-05-11 15:49:48 +00:00
review-check.sh fix(ci): close fail-open in qa/security review checks (RFC#324 v1.3 §A1.1) + drop dead jq fallback 2026-05-11 11:45:59 -07:00
sop-tier-check.sh fix(sop-tier-check): flip jq install to apt-get-first (infra#241 follow-up) 2026-05-11 08:19:02 +00:00
sop-tier-refire.sh feat(ci): sop-tier-check refire workflow via issue_comment (internal#292) 2026-05-11 02:44:31 -07:00