Repository navigation
fix(gh-aw): gate merge continuation dispatch - #2040
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
🟡 Impact Analysis — PR #2040Risk tier: 🟡 MEDIUM 📊 Summary
🎯 Risk Factors
📦 Modules Affectedroot (2 files)
tests (2 files)
This report is generated automatically for every PR. See #733 for details. |
🛫 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 | 3 unresolved Copilot thread(s) — fix and resolve before merging |
| ✅ | CI passing | All checks passing |
Files Changed (4 files, +318 −21)
| File | +/− |
|---|---|
test/gh-aw-implement-workflow.test.ts |
+180 −6 |
test/gh-aw-review-workflow.test.ts |
+4 −3 |
workflows/shared/squad-retro-provenance.mjs |
+93 −2 |
workflows/squad-implement-worker.md |
+41 −10 |
Total: +318 −21
This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Unresolved critical issues remain in workflow-run validation, merge-specific output validation, and guard capability checks.
Get a fresh assessment by requesting another Copilot review.
Review tier: Lite
Findings: 3
Open findings (3)
What changed in this PR
This pull request hardens merge-continuation dispatches with trusted provenance validation at pre-agent and safe-output boundaries.
Changes:
- Validates markers, branches, repositories, workflow runs, and timing.
- Adds trusted validation gates.
- Expands parser, runtime, compilation, and mutation tests.
| File | Summary |
|---|---|
workflows/squad-implement-worker.md |
Adds trusted checkout and validation boundaries. |
workflows/shared/squad-retro-provenance.mjs |
Implements merge provenance parsing and run validation. |
test/gh-aw-implement-workflow.test.ts |
Tests provenance and compiled workflow contracts. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| run.path !== IMPLEMENT_WORKFLOW_PATH || | ||
| run.event !== 'workflow_dispatch' || | ||
| run.status !== 'completed' || | ||
| run.conclusion !== 'success' || | ||
| run.head_branch !== env.SQUAD_IMPLEMENT_DEFAULT_BRANCH || |
| if (items === null) return { ok: false, enforced: true, violations: [{ kind: 'unreadable-agent-output' }] }; | ||
| const origin = await validateImplementOrigin(env, fetchJson); | ||
| if (!origin.ok) return origin; | ||
| if (origin.origin === 'merge-continuation') return origin; |
| run: | | ||
| set -euo pipefail | ||
| node "${GITHUB_WORKSPACE:?}/.github/workflows/shared/squad-retro-provenance.mjs" --implement-inputs | ||
| node "${GITHUB_WORKSPACE:?}/.squad-pre-agent-trusted-base/.github/workflows/shared/squad-retro-provenance.mjs" --implement-inputs |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
CI follow-up for the previously failing
This PR is now clean and ready for human merge. It has not been merged automatically. |

Summary
Validation
npm exec -- vitest run test/gh-aw-implement-workflow.test.ts test/gh-aw-quality.test.ts --reporter=dot(260 passed)gh aw compile --strict --approve --no-check-updateandgh aw compile --strict --no-check-update(6/6 compiled)npm run buildSecurity review
The compile dry run reported the existing
SQUAD_GITHUB_APP_PRIVATE_KEY,SQUAD_GITHUB_TOKEN, andbradygaster/squad/.github/actions/squad-initapproval surface. This change adds no secret, action, redirect, dependency, or permission. The existing action is repository-owned and SHA-pinned by the generated workflow contract.