Skip to content

fix(prompt-clustering): add explicit safeoutputs create_discussion call - #49760

Merged
pelikhan merged 3 commits into
mainfrom
copilot/aw-debug-copilot-agent-prompt-clustering
Aug 2, 2026
Merged

fix(prompt-clustering): add explicit safeoutputs create_discussion call#49760
pelikhan merged 3 commits into
mainfrom
copilot/aw-debug-copilot-agent-prompt-clustering

Conversation

Copilot AI commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

The Prompt Clustering Analysis workflow was completing its NLP analysis successfully but never posting results — the agent consumed all 22 turns and exited with no safe output produced (total_items: 0, posture read_only).

Root cause: The workflow prompt described what to analyze and how to format the report, but gave no explicit instruction to call safeoutputs create_discussion. Without it, the agent finished the analysis phase, ran out of turns, and returned garbled output.

Changes

  • prompt-clustering-analysis.md: Added explicit posting instructions at the end of Phase 5 — write the rendered report to /tmp/gh-aw/agent/discussion_body.md, then:

    safeoutputs create_discussion \
      --title "Prompt Clustering Analysis - $(date +%Y-%m-%d)" \
      --body "$(cat /tmp/gh-aw/agent/discussion_body.md)"

    Also updated the closing directive to explicitly require safeoutputs create_discussion (or noop on failure), matching the pattern used in other daily audit workflows.

  • cmd/gh-aw/format_list_test.go: Removed pre-existing tt := tt loop variable copy flagged by golint as unnecessary since Go 1.22.


Generated by 👨‍🍳 PR Sous Chef · gpt54 · 15.5 AIC · ⌖ 5.53 AIC · ⊞ 8.3K ·
Comment /souschef to run again

…t-clustering-analysis

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Debug issue with Copilot Agent prompt clustering analysis fix(prompt-clustering): add explicit safeoutputs create_discussion call Aug 2, 2026
Copilot AI requested a review from pelikhan August 2, 2026 11:11
@pelikhan
pelikhan marked this pull request as ready for review August 2, 2026 11:19
Copilot AI review requested due to automatic review settings August 2, 2026 11:19
@pelikhan

pelikhan commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

@copilot suggest stdin syntax for safe outputs , more robust

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Ready to approve

The targeted workflow fix is valid, compiled consistently, and introduces no unresolved issues.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Pull request overview

Fixes missing safe outputs in the prompt-clustering workflow.

Changes:

  • Explicitly posts the generated report as a discussion, with noop fallback.
  • Regenerates workflow metadata.
  • Removes an obsolete Go loop-variable copy.
File summaries
File Description
.github/workflows/prompt-clustering-analysis.md Adds explicit discussion publishing instructions.
.github/workflows/prompt-clustering-analysis.lock.yml Updates the compiled body hash.
cmd/gh-aw/format_list_test.go Removes an unnecessary Go loop-variable copy.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 0
  • Review effort level: Balanced

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

Copilot AI commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

@copilot suggest stdin syntax for safe outputs , more robust

Addressed in c4ea16b. The workflow now builds a JSON payload with jq and posts it via safeoutputs create_discussion . < /tmp/gh-aw/agent/create_discussion_payload.json instead of shell-quoting the body with $(cat ...).

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot Please give this PR a finishing pass and run the pr-finisher skill.

This PR currently looks unblocked from triage. Please verify readiness, re-run formatting/checks as needed, and push any final polish before handoff.

Generated by PR Sous Chef · run: https://github.com/github/gh-aw/actions/runs/30746134504

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 15.5 AIC · ⌖ 5.53 AIC · ⊞ 8.3K ·
Comment /souschef to run again

Copilot AI commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

@copilot Please give this PR a finishing pass and run the pr-finisher skill.

This PR currently looks unblocked from triage. Please verify readiness, re-run formatting/checks as needed, and push any f...

Finishing pass complete on c4ea16b. No additional code changes were needed. Local make fmt, make lint, make test-unit, make test, and make recompile all passed; the PR Sous Chef run had no failed jobs. CI on the latest head still needs a maintainer re-trigger before merge because agent pushes do not start workflows.

@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

PR Triage

  • Category:
  • Risk:
  • Priority: (score: 55/100)
    • Impact: 25/50, Urgency: 10/30, Quality: 20/20
  • Recommended action:

Automated triage — see full report issue for details.

Structured data:

{
  "action": "auto_merge",
  "category": "bug",
  "pr_number": 49760,
  "risk": "low"
}

Generated by 🔧 PR Triage Agent · auto · 73.4 AIC · ⌖ 3.47 AIC · ⊞ 8K ·

@pelikhan
pelikhan merged commit 08ed007 into main Aug 2, 2026
1 check passed
@pelikhan
pelikhan deleted the copilot/aw-debug-copilot-agent-prompt-clustering branch August 2, 2026 12:55
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.84.3

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[aw] Copilot Agent Prompt Clustering Analysis produced no safe outputs

4 participants