fix(review-swarm): expose safe failure diagnostics

Closed
KH
2mo ago
+203-25

Summary

  • render an allowlisted structural Cloud failure identity when a swarm is terminally unsuccessful
  • keep raw error/provider/agent output out of privileged Actions logs
  • tolerate malformed or non-object status payloads

Dependency

This PR extends #265’s candidate-validation workflow and is intentionally based on its branch until #265 merges. The main-owned validator required by the immutable gate is introduced there; targeting main caused the gate to correctly fail closed before launch.

Validation

  • workflow YAML parse
  • jq fixtures for queue timeout and malformed status payloads
  • git diff --check
  • Veto diff review: PASS

[!NOTE]
Medium Risk
Changes privileged CI behavior (failure reporting and a new pull_request_target gate) for the merge-blocking review swarm, though diagnostics are intentionally constrained and the guard only blocks edits to the wrapper workflow.

Overview
Replaces raw swarm failure logging in review-swarm.yml with a base-owned swarm-status-diagnostic.sh that prints only an allowlisted structural identity (phase / code tokens from .failure) to stderr and the job summary, avoiding untrusted agent/provider text in Actions logs.

Adds a pull_request_target wrapper guard (review-swarm-wrapper-guard.yml + swarm-wrapper-guard.sh) that checks out the PR base and fails closed if the candidate PR touches .github/workflows/review-swarm.yml, so the review wrapper cannot be relaxed from the PR under review.

Reviewed by Cursor Bugbot for commit f27529b2f26d1ffd5c5b4f7dcf3e7aa3a371fe38. Bugbot is set up for automated code reviews on this repo. Configure here.


Agent Relay sessions

  • codex session 01a08c06 · opened via gh pr create · last active 2026-09-10