Repository navigation
fix(workflows): harden implement relay provenance - #1869
Conversation
Closes #1731 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
🛫 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 | 0 active Copilot thread(s) resolved (1 outdated skipped) |
| ✅ | CI passing | All checks passing |
Files Changed (2 files, +102 −9)
| File | +/− |
|---|---|
test/gh-aw-implement-workflow.test.ts |
+77 −2 |
workflows/squad-implement-worker.md |
+25 −7 |
Total: +102 −9
This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.
🟡 Impact Analysis — PR #1869Risk tier: 🟡 MEDIUM 📊 Summary
🎯 Risk Factors
📦 Modules Affectedroot (1 file)
tests (1 file)
This report is generated automatically for every PR. See #733 for details. |
There was a problem hiding this comment.
🟡 Changes recommended
The new compiled safe-output test currently relies on JSON key ordering (startsWith('{\"add_comment\":')), which is brittle and can cause flaky failures without behavior changes.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds deterministic provenance and tighter merge-relay gating to the Squad implement worker so only correctly-provenanced implement PR merges into the default branch can trigger a refill dispatch, while preserving relay correlation (aw_context) via the compiled safe-output contract.
Changes:
- Tightens the
pull_request: closedworkflow gate to require merged PRs targeting the repo default branch and containing a provenance marker. - Documents a strict provenance marker format for worker-created PRs and a “fail closed” provenance-validation procedure before re-dispatch.
- Extends Vitest coverage to assert the new gating/marker requirements and to contract-test
aw_contextpropagation viagh aw compile.
File summaries
| File | Description |
|---|---|
| workflows/squad-implement-worker.md | Adds base-branch + provenance marker gating and documents strict provenance validation + marker emission. |
| test/gh-aw-implement-workflow.test.ts | Adds tests for base-branch gating, marker format, and compiled dispatch contract (aw_context). |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Closes #1731 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: c5968b29-5eb9-4e27-8b10-659579646eef
Summary
aw_contextpropagation while preserving the existing default-branchtarget-refValidation
gh aw compile squad-implement-worker --strict --no-check-update --approvepassed with no warningsSecurity review
No new secrets, actions, permissions, or redirects. The relay treats PR body/head data as untrusted, requires one exact marker matched to the head issue, and fails closed before dispatch on malformed or conflicting provenance.
Working as EECOM (Core Dev).
Closes #1731