Skip to content

Noop on no failure #605

Closed
Closed

Description

@strawgate

Activity

  1. github-actions commented on Mar 8, 2026

    @github-actions
    Contributor
    3 related issues

    What is this? | From workflow: Trigger Duplicate Issue Detector

    Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

  2. github-actions commented on Mar 8, 2026

    @github-actions
    Contributor

    No-failure runs currently produce a full detective comment instead of a noop because the PR Actions Detective prompt has no explicit "no failed jobs/steps => noop" branch, and this surfaced in elastic/beats where the trigger lacks a failure gate.

    Recommendation

    Add a defensive noop branch in the PR Actions Detective prompt (and mirror in branch detective), then document the trigger-level failure guard as required for downstream adopters.

    Findings
    • The issue reproducer comment is for a successful checked run and says "Failed jobs/steps found: none" (elastic/beats PR comment linked from this issue).
    • Verified run status: elastic/beats workflow run 22827629972 is conclusion: success, with one job check also conclusion: success (github-actions_get/list_workflow_jobs output).
    • Upstream trigger examples are failure-gated:
      • .github/workflows/trigger-pr-actions-detective.yml:18-19
      • gh-agent-workflows/pr-actions-detective/example.yml:16-19
        both require github.event.workflow_run.conclusion == 'failure'.
    • Current PR Actions Detective prompt lacks a no-failure noop path:
      • .github/workflows/gh-aw-pr-actions-detective.md:95 noop only when no PR is associated.
      • .github/workflows/gh-aw-pr-actions-detective.md:113-115 assumes failures exist ("Identify the failing job/step...").
      • .github/workflows/gh-aw-pr-actions-detective.md:120 noop only for duplicate prior diagnosis.
    • The workflow can noop technically, but prompt logic doesn’t choose it for no-failure cases:
      • .github/workflows/gh-aw-pr-actions-detective.lock.yml:180 tools include noop.
      • .github/workflows/gh-aw-pr-actions-detective.lock.yml:608 safe-outputs config enables noop.
    • Downstream trigger drift in beats explains this specific incident:
      • elastic/beats/.github/workflows/trigger-pr-actions-detective.yml:13-18 has no if: ... conclusion == 'failure' guard.
    Verification

    Commands/API checks run during triage:

    - github-actions_get(owner=elastic, repo=beats, run=22827629972)
      => conclusion: success
    - github-actions_list(owner=elastic, repo=beats, method=list_workflow_jobs, run=22827629972)
      => total_count: 1; job "check" conclusion: success
    - web_fetch(raw trigger file):
      https://raw.githubusercontent.com/elastic/beats/main/.github/workflows/trigger-pr-actions-detective.yml
      => workflow uses gh-aw-pr-actions-detective without failure `if` guard
    - local repo reads:
      .github/workflows/gh-aw-pr-actions-detective.md
      .github/workflows/trigger-pr-actions-detective.yml
      gh-agent-workflows/pr-actions-detective/example.yml
    
    Detailed Action Plan
    1. Add no-failure noop guard to PR detective prompt
      • File: .github/workflows/gh-aw-pr-actions-detective.md
      • In Step 1, after listing jobs, add explicit instruction:
        • If run conclusion is not failure or no jobs/steps have failure-like conclusions, call noop (e.g., "No failed jobs/steps in workflow run; nothing to diagnose") and stop.
    2. Mirror guard in branch detective for consistency
      • File: .github/workflows/gh-aw-branch-actions-detective.md
      • Add equivalent no-failure early noop branch.
    3. Document trigger requirement clearly for adopters
      • File: gh-agent-workflows/pr-actions-detective/README.md
      • Add explicit “Required trigger guard” snippet using:
        if: github.event.workflow_run.conclusion == 'failure' && toJSON(github.event.workflow_run.pull_requests) != '[]'.
    4. Recompile generated lock files
      • Run make compile so .lock.yml prompts inherit the new noop logic.
    5. Validate behavior
      • Trigger against a successful run: expect noop path (no PR comment noise).
      • Trigger against a failed run: expect normal detective comment path.
    Related Items
    Type Link Relevance
    Issue #605 Current report
    Issue #448 Active no-op tracking issue ([aw] No-Op Runs)
    Issue #83 Prior no-op tracking issue ([agentics] No-Op Runs)
    File .github/workflows/gh-aw-pr-actions-detective.md:95,113-120 Prompt branches showing missing no-failure noop condition
    File .github/workflows/trigger-pr-actions-detective.yml:18-19 Upstream failure-gated trigger pattern
    File gh-agent-workflows/pr-actions-detective/example.yml:16-19 Published example includes failure gate
    External File https://raw.githubusercontent.com/elastic/beats/main/.github/workflows/trigger-pr-actions-detective.yml Consumer trigger missing failure gate
    External Evidence https://github.com/elastic/beats/pull/49335#issuecomment-4019793376 No-failure detective comment that prompted this issue

    What is this? | From workflow: Trigger Issue Triage

    Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

  3. v1v commented on Mar 10, 2026

    @v1v
    Member

    plan again because this is not solved see #644

    confirm if the exeuction of the workflow that can be found at #644 was before any actions were taken

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

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions