Skip to content

[aw-failures] [aw-fix] P1: PR Sous Chef — resolve_pull_request_review_thread safe output fails, failing Process Safe Outputs #47659

Description

@github-actions

Fix the resolve_pull_request_review_thread safe-output handler in PR Sous Chef — it fails the whole Process Safe Outputs job on every scheduled run.

PR Sous Chef's agent succeeds, but the safe_outputs job then aborts because its review-thread resolution requests fail. This recurred twice in the 6h window (~50 min apart), so it is a persistent pattern, not a transient blip.

Problem statement

The Process Safe Outputs step fails with:

##[error]Failed to resolve review thread: Request failed due to following response errors:
##[error]✗ Message 5 (resolve_pull_request_review_thread) failed: Request failed due to following response errors:
##[error]✗ Message 6 (resolve_pull_request_review_thread) failed: Request failed due to following response errors:
##[error]2 safe output(s) failed:

The agent job concludes success (12 turns, 54.7k tokens); the failure is isolated to safe-output processing. audit-diff vs the nearest successful baseline shows no firewall or tooling regression — the baseline "success" was a 0-turn no-op, while these runs did real work and failed only at the GraphQL resolve step.

Affected workflows and run IDs

Workflow Run Result
PR Sous Chef 30022071713 representative — Msgs 5 & 6 failed
PR Sous Chef 30018005233 second occurrence, same signature
PR Sous Chef 30014223483 baseline success (no-op, 0 turns)

Probable root cause

The safe-output handler issues resolveReviewThread GraphQL mutations against thread IDs that the API rejects — most likely already-resolved threads, stale/invalid thread IDs, or threads on a PR whose state no longer accepts resolution. The handler treats any non-2xx GraphQL response as a hard error and fails the job instead of tolerating an already-resolved / non-resolvable thread.

Proposed remediation

  • Make resolve_pull_request_review_thread idempotent: treat "thread already resolved" / "thread not found" GraphQL responses as success (no-op), not job failure.
  • Log the raw GraphQL error body per failed message so the actual API error (currently truncated as "following response errors") is captured for diagnosis.
  • Consider not failing the aggregate Process Safe Outputs job when only optional review-thread resolutions fail — downgrade to a warning while still surfacing counts.

Success criteria / verification

  • PR Sous Chef scheduled runs complete with safe_outputs job success when the only issue is an already-resolved/stale review thread.
  • The full GraphQL error body is present in logs for any genuinely failed resolution.
  • No recurrence of the 2 safe output(s) failed signature across a subsequent 24h window.

Parent: #47525. Analyzed runs: 30022071713, 30018005233, 30014223483.
Related to #47525

Generated by 🔍 [aw] Failure Investigator (6h) · age00 · 131.7 AIC · ⌖ 33.1 AIC · ⊞ 5.2K ·

  • expires on Jul 30, 2026, 11:20 AM UTC-08:00

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions