fix: make smoke-claude safe outputs trigger-aware for workflow_dispatch#2036
fix: make smoke-claude safe outputs trigger-aware for workflow_dispatch#2036
Conversation
The smoke-claude prompt unconditionally instructs the agent to add comments and labels to 'the pull request', but workflow_dispatch and schedule triggers have no PR context. The add_labels handler hard-fails (unlike add_comment which skips gracefully), causing the safe_outputs job to fail on manual runs. Update the prompt to only emit add_comment/add_labels when triggered by a pull_request, and use noop for non-PR triggers. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (1 files)
Coverage comparison generated by |
Smoke Test Results
Overall: PASS
|
✅ Smoke Test PASSEDTest Results:
Status: PASS
|
🔥 Smoke Test: Copilot BYOK (Offline) — PASS ✅
Running in BYOK offline mode ( cc @lpcox
|
Smoke Test: GitHub Actions Services Connectivity ✅All checks passed:
|
There was a problem hiding this comment.
Pull request overview
Updates the “Smoke Claude” agentic workflow to avoid failing safe-outputs processing on non-PR triggers (manual/scheduled runs) by making the reporting instructions trigger-aware, then recompiles the generated lock workflow and updates the pinned setup action reference.
Changes:
- Adjusts the smoke-claude prompt to differentiate PR vs non-PR (workflow_dispatch/schedule) reporting behavior.
- Recompiles
.github/workflows/smoke-claude.lock.ymlwith newer gh-aw tooling (v0.68.4) and associated generated updates. - Updates
.github/aw/actions-lock.jsonto pingithub/gh-aw-actions/setupto v0.68.4.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/smoke-claude.md | Makes output instructions trigger-aware, introducing a non-PR reporting path via noop safe output. |
| .github/workflows/smoke-claude.lock.yml | Regenerates the compiled workflow with updated gh-aw versions and generated steps/config. |
| .github/aw/actions-lock.json | Updates the pinned github/gh-aw-actions/setup action version/SHA used by compilation. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 3/3 changed files
- Comments generated: 2
| If all tests pass, add the label `smoke-claude` to the pull request. No newline at end of file | ||
| If all tests pass, add the label `smoke-claude` to the pull request. | ||
|
|
||
| **If triggered by workflow_dispatch or schedule** (no PR context), use a noop safe output to report the test results summary instead. Do NOT attempt to add comments or labels when there is no pull request. No newline at end of file |
There was a problem hiding this comment.
The new non-PR trigger path relies on the agent producing a safe-output entry, but the instruction says "use a noop safe output" without explicitly naming the tool (noop) or making it unambiguous that it must be invoked as a safe-output tool call. Consider wording this as an explicit requirement to call the noop safe-output tool with the short test summary, so workflow_dispatch/schedule runs don't fail the "Validate safe outputs were invoked" post-step due to the agent only printing text.
| **If triggered by workflow_dispatch or schedule** (no PR context), use a noop safe output to report the test results summary instead. Do NOT attempt to add comments or labels when there is no pull request. | |
| **If triggered by workflow_dispatch or schedule** (no PR context), you must call the `noop` safe-output tool with a very brief test results summary. Do NOT only print the summary as plain text. Do NOT attempt to add comments or labels when there is no pull request. |
| - name: Upload agent artifacts | ||
| if: always() | ||
| continue-on-error: true | ||
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7 | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | ||
| with: |
There was a problem hiding this comment.
The workflow no longer uploads a dedicated firewall-audit-logs artifact (firewall logs/audit are now bundled into the agent artifact). Many other workflows in this repo still publish firewall-audit-logs, so removing it here can break any tooling that expects that artifact name and makes logs harder to consume independently. Consider restoring the separate firewall-audit-logs upload step (or uploading both) for consistency/backward-compatibility.
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — ✅ PASS
|
|
Smoke test report:
|
Problem
The smoke-claude workflow fails on
workflow_dispatch(manual) andscheduletriggers because the prompt unconditionally tells the agent to add comments and labels to "the pull request."add_commentgracefully skips when there's no PR contextadd_labelshard-fails with:No issue/PR number availableThis causes the
safe_outputsjob to fail, marking the entire run as failed even though the agent job succeeded.Failed run: https://github.com/github/gh-aw-firewall/actions/runs/24535395752
Fix
Updated the prompt to be trigger-aware:
Also recompiled the lock file and ran post-processing.