Smoke Copilot: enforce add_comment budget in prompt before output phase#34611
Conversation
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
add_comment budget in prompt before output phase
|
@copilot Recompile worklfows |
I recompiled |
|
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅ |
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. No ADR enforcement needed: PR #34611 does not have the 'implementation' label and has only 33 new lines of code in business logic directories (threshold: 100). |
|
🧪 Test Quality Sentinel completed test quality analysis. No test files were added or modified in this PR. The only changes are to workflow markdown (.md) files and golden test fixtures (.golden). Test Quality Sentinel skipped. |
There was a problem hiding this comment.
Pull request overview
This PR updates the Smoke Copilot prompt/test artifacts to explicitly budget add_comment safe-output calls up front (matching safe-outputs.add-comment.max: 2) and to make the two “extra comment” outputs mutually exclusive based on event type, preventing late safe-output failures caused by overproducing add_comment calls.
Changes:
- Added a new “Hard Limit:
add_commentBudget” section that explicitly caps totaladd_commentcalls at 2 and pre-allocates them. - Tightened the Output contract so only one of the PR-summary comment vs. discussion follow-up comment can be produced (depending on
pull_requestvs. non-pull_requesttriggers). - Updated wasm golden artifacts and fixture markdown to match the new prompt rules.
Show a summary per file
| File | Description |
|---|---|
pkg/workflow/testdata/wasm_golden/WasmBinary/smoke-copilot.golden |
Adds explicit add_comment budgeting and makes Output comment steps conditional by event type. |
pkg/workflow/testdata/wasm_golden/fixtures/smoke-copilot.md |
Mirrors the new hard limit section and conditional Output instructions in the fixture prompt. |
pkg/workflow/testdata/TestWasmGolden_CompileFixtures/smoke-copilot.golden |
Updates compiled golden output to reflect the new budgeting/conditional Output contract. |
.github/workflows/smoke-copilot.md |
Adds the add_comment budget guardrail and makes the discussion Output comment conditional for non-PR runs. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 4/4 changed files
- Comments generated: 0
There was a problem hiding this comment.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · sonnet46 1.2M
|
@copilot Implement suggested fix by github-actions. |
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Implemented in |
Smoke Copilot was intermittently failing late because the prompt could ask for more
add_commentcalls thansafe-outputs.add-comment.max: 2allows. This change moves the constraint into explicit early planning instructions so the model budgets comment calls up front instead of failing at safe-output processing time.Prompt-level guardrail (primary fix)
add_commentBudget section tosmoke-copilot.md.Output contract tightened
pull_requestruns: post the brief PR summary comment.pull_requestruns: post the fun discussion comment.Golden artifacts updated
pkg/workflow/testdata/wasm_golden/fixtures/smoke-copilot.mdpkg/workflow/testdata/wasm_golden/WasmBinary/smoke-copilot.goldenpkg/workflow/testdata/TestWasmGolden_CompileFixtures/smoke-copilot.golden