Skip to content

[aw-failures] [P1] PR Description Updater: update_pull_request rejects genuine pull_request-triggered runs with "empty event" er [Content truncated due to length] #53473

Description

@github-actions

Problem

Fix update_pull_request's target: triggering resolution — it rejects a genuine pull_request: closed (merged) trigger as if no PR context exists, so every invocation of PR Description Updater that actually has content to write fails. This isn't an edge case: it's the workflow's only real code path.

Affected workflows and runs

Probable root cause

The safe_outputs job's update_pull_request handler isn't seeing the real event context. The agent's tool call failed twice with: "update_pull_request requires a pull request context but the workflow is running on a \"\" event. target: triggering only applies when a pull request triggered the workflow." — first without pull_request_number, then again with pull_request_number: 53438 explicitly. Both attempts hit the identical error.

But gh run view 32051724487 confirms event: pull_request for this run, and the same run's agent job resolves github.event.pull_request.number correctly elsewhere (used for diff fetching). So the event context exists at the GitHub Actions level — the break is specifically inside the safe-outputs handler's own target: triggering resolution, which appears to read event name/PR number independently and gets an empty result even on a legitimately PR-triggered run.

Proposed remediation

  1. Trace why target: triggering evaluates event_name as empty inside the safe_outputs job container when the triggering GitHub Actions event genuinely was pull_request.
  2. Add a regression test: a workflow with update-pull-request: {operation: replace, max: 1} (no explicit target) triggered by pull_request: closed must resolve the PR number without requiring target: '*' plus an explicit pull_request_number.
  3. audit-diff against the nearest earlier run of the same workflow (§32044038495) found no usable comparator — that run took the noop path (0 GitHub API calls, no diff content) and never exercised update_pull_request. Can't yet confirm this is a new regression vs. a standing bug; treat it as a persistent break until a prior successful update_pull_request invocation on this workflow is found.

Success criteria / verification

  • A pull_request: closed (merged)-triggered run of PR Description Updater with real diff content successfully calls update_pull_request and updates the PR body — no target: triggering rejection.
  • Confirm on a fresh merged PR through this workflow (or a targeted replay of run 32051724487's scenario).

Analyzed run IDs: 32051724487 (representative), 32044038495 (comparator — inconclusive, no update_pull_request invocation to diff against).

Parent: #53129
Related to #53129

Generated by 🔍 [aw] Failure Investigator (6h) · agent · 157.7 AIC · ⌖ 9.12 AIC · ⊞ 5.8K ·

  • expires on Aug 24, 2026, 11:12 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

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions