Prevent dispatch_workflow schema probes - #1766
Merged
Merged
Conversation
Document dispatch_workflow as write-once in the implement worker prompt so schema discovery probes cannot consume the single safe-output slot before the real continuation payload. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 26891f18-3f78-4cda-801b-ee668fecae33
Contributor
🟡 Impact Analysis — PR #1766Risk tier: 🟡 MEDIUM 📊 Summary
🎯 Risk Factors
📦 Modules Affectedroot (1 file)
tests (1 file)
This report is generated automatically for every PR. See #733 for details. |
Contributor
🛫 PR Readiness Check
PR Scope: 🔧 Infrastructure
|
| Status | Check | Details |
|---|---|---|
| ❌ | Single commit | 2 commits — consider squashing before review |
| ✅ | Not in draft | Ready for review |
| ✅ | Branch up to date | Up to date with dev |
| ❌ | Copilot review | No Copilot review yet — it may still be processing |
| ✅ | Changeset present | No source files changed — changeset not required |
| ✅ | Scope clean | No .squad/ or docs/proposals/ files |
| ✅ | No merge conflicts | No merge conflicts |
| ❌ | Copilot threads resolved | 1 unresolved Copilot thread(s) — fix and resolve before merging |
| ✅ | CI passing | All checks passing |
Files Changed (2 files, +27 −5)
| File | +/− |
|---|---|
test/gh-aw-quality.test.ts |
+14 −0 |
workflows/squad-implement-worker.md |
+13 −5 |
Total: +27 −5
This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.
Keep the test focused on the stable contract: dispatch_workflow must not be probed with empty or placeholder arguments, and noop is the alternative when there is nothing to dispatch. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 26891f18-3f78-4cda-801b-ee668fecae33
Contributor
There was a problem hiding this comment.
Pull request overview
This PR hardens the merge-continuation worker prompt to prevent “schema probe” dispatch_workflow calls that can consume gh-aw’s write-once safe-output budget and discard the real dispatch payload.
Changes:
- Adds explicit WRITE-ONCE guidance forbidding empty/placeholder
dispatch_workflowcalls and explaining the “first call wins” consequence. - Names
noopas the alternative when no dispatch should occur. - Adds a Vitest contract asserting the worker prompt contains the anti-probe / write-once guidance.
Show a summary per file
| File | Description |
|---|---|
| workflows/squad-implement-worker.md | Adds write-once / no-schema-probe dispatch guidance for merge continuation. |
| test/gh-aw-quality.test.ts | Adds a contract test asserting the worker prompt includes the new guidance. |
Review details
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Lite
Comment on lines
+229
to
+233
| discover its schema. The full schema is already given in this prompt; there | ||
| is nothing to discover. If you are not ready to dispatch, or there is no next | ||
| wave to dispatch, call `noop` instead of `dispatch_workflow`. The FIRST | ||
| `dispatch_workflow` call wins and all later calls are silently discarded, so | ||
| a probe destroys the real dispatch. When dispatching, nest the workflow |
This was referenced Aug 20, 2026
bradygaster
added a commit
that referenced
this pull request
Aug 20, 2026
- workflows/squad-implement-worker.md: raise dispatch-workflow max from 1 to 2
so the real dispatch survives an LLM probe. With max:1, the empty probe consumed
the only slot and the real payload was silently discarded (confirmed 3 live runs
in aspiregregator-squad-e2e). Raising to 2 gives the real dispatch a second slot.
- scripts/check-workflow-input-interpolation.mjs: extend static gate with
checkDispatchWorkflowSchemas() that validates every JSON code block adjacent to a
dispatch_workflow reference. Catches: missing workflow_name (failure shape 3 from
run 32316227601), missing inputs object (top-level keys are silently dropped by
gh-aw), missing inputs.issue_number, and top-level command/issue_number.
Supports SQUAD_GATE_SCAN_OVERRIDE env var for fixture-based testing.
- test/gh-aw-quality.test.ts: add 6 tests
- 'worker dispatch-workflow max is at least 2': fails against old max:1 state,
passes after fix. This is the structural test the prompt-wording approach lacked.
- 4 gate failure tests: missing workflow_name, top-level inputs, missing
issue_number, valid schema passes.
- Regression guard: gate passes against current workflow files.
Closes #1772. Supersedes failed prompt-only approach in #1766.
Coordination needed: Procedures to add squad.md empty-command guard (separate PR) —
when workflow_dispatch fires with no command/issue_number, squad should detect and
report failure immediately rather than running in undefined mode.
Co-authored-by: brady gaster <bradygaster@github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This was referenced Aug 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1765
Summary
dispatch_workflowinstruction.noopas the alternative.Context
Live run 32324473906 in
bradygaster/aspiregregator-squad-e2eproduced two safe-output calls: first an emptydispatch_workflowschema-discovery probe, then the correct{ workflow_name: "squad", inputs: { command: "implement", issue_number: "5" } }payload. gh-aw safe-output collection for this item ismax: 1, so the first matching item won and the real payload was silently discarded.This PR is a workaround in our own prompt for a gh-aw collection behavior we do not control. The #1752 safety net worked as intended: it surfaced the missing
commandas a visible failure instead of letting Squad silently default tocast.Validation
npx vitest run test/gh-aw-quality.test.tsnpx vitest run test/gh-aw-implement-workflow.test.ts