Skip to content

Shorter replies from pr-actions-detective #684

Open

Description

Activity

  1. github-actions commented on Mar 13, 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 13, 2026

    @github-actions
    Contributor

    tl;dr: pr-actions-detective is already deduping/no-oping correctly for no-failure cases; the remaining gap for this issue is response verbosity, which is currently driven by a rigid required comment template. I recommend tightening the prompt format with explicit brevity budgets.

    Recommendation

    Update .github/workflows/gh-aw-pr-actions-detective.md Step 3 to require a minimal response shape with hard limits (for example: TL;DR ≤ 1 sentence, Remediation ≤ 3 bullets, details ≤ 5 bullets total, log excerpt ≤ 8 lines), then run make compile so lock files inherit the change.

    Findings
    • The detective prompt currently mandates a multi-section structure and says “Use this exact shape,” which encourages long comments:
      • .github/workflows/gh-aw-pr-actions-detective.md:132-166
      • Includes required TL;DR, expanded Remediation, and detailed sections (Root Cause, Evidence, Validation, Follow-up).
    • Safe output controls comment count/visibility, not brevity:
      • .github/workflows/gh-aw-fragments/safe-output-add-comment-pr-hide-older.md:3-9 (max: 1, hide-older-comments: true)
      • .github/workflows/gh-aw-fragments/safe-output-add-comment-pr-hide-older.md:14 (body max 65,536 chars)
      • .github/workflows/gh-aw-pr-actions-detective.lock.yml:761 ("maxLength": 65000)
    • Related no-failure/noise work appears already addressed and is distinct from this issue’s ask:
      • #605 (open), #620 (closed), #644 (closed), #609 (merged), #596 (merged).
    Verification

    I verified the current behavior/instructions with:

    nl -ba .github/workflows/gh-aw-pr-actions-detective.md | sed -n '132,166p'
    nl -ba .github/workflows/gh-aw-fragments/safe-output-add-comment-pr-hide-older.md | sed -n '1,22p'
    nl -ba .github/workflows/gh-aw-pr-actions-fixer.md | sed -n '136,143p'
    grep -nE 'maxLength|hide_older_comments|max":1|Maximum 1 comment' \
      .github/workflows/gh-aw-pr-actions-detective.lock.yml | head -n 20

    Observed output confirms:

    • fixed verbose response template in detective prompt,
    • no runtime short-length guardrail beyond very high max length,
    • other workflows use shorter instruction style (e.g. gh-aw-pr-actions-fixer.md:138-142).
    Detailed Action Plan
    1. Edit .github/workflows/gh-aw-pr-actions-detective.md Step 3:
      • Replace “Use this exact shape” with “Use the minimal shape below; omit empty sections.”
      • Add explicit length/bullet budgets.
    2. Keep the existing top-level structure (TL;DR, Remediation, optional <details>) so downstream readers still get consistent navigation.
    3. Recompile generated workflows:
      • make compile
    4. Validate:
      • Trigger on one failed PR check and confirm the posted detective comment is materially shorter but still actionable.
      • Confirm no regressions in safe-outputs behavior (max: 1, hide older comments still active).
    5. (Optional hardening) If you want enforcement beyond prompt-following, add a future compiler/runtime feature for per-workflow response-length caps.
    Related Items
    Type Link Relevance
    Issue #684 Current request: shorter detective replies
    Issue #605 No-failure noop history (open)
    Issue #620 No-failure noop request (closed)
    Issue #644 Similar no-failure noise report (closed)
    Issue #649 Broader multi-comment noise discussion
    PR #596 Enabled hide-older-comments for detective workflows
    PR #609 Merged no-failure noop updates
    File .github/workflows/gh-aw-pr-actions-detective.md:132-166 Current verbose response template
    File .github/workflows/gh-aw-fragments/safe-output-add-comment-pr-hide-older.md:3-9 Count/visibility controls
    File .github/workflows/gh-aw-pr-actions-detective.lock.yml:761 High max body length in generated schema

    What is this? | From workflow: Trigger Issue Triage

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

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

Metadata

Metadata

Assignees

No one assigned

    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