Skip to content

fix(workflows): harden implement relay provenance - #1869

Merged
bradygaster merged 2 commits into
devfrom
bradygaster-1731-provenance-relay
Aug 25, 2026
Merged

bradygaster merged 2 commits into
devfrom
bradygaster-1731-provenance-relay

Conversation

@bradygaster

Copy link
Copy Markdown
Collaborator

Summary

  • add deterministic issue/run provenance to every implement-worker-created PR
  • require merged PRs to target the repository default branch and carry matching Squad provenance before refill dispatch
  • assert compiler-owned aw_context propagation while preserving the existing default-branch target-ref

Validation

  • 14 focused Vitest assertions passed
  • targeted ESLint passed
  • gh aw compile squad-implement-worker --strict --no-check-update --approve passed with no warnings

Security 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

Closes #1731

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings August 25, 2026 03:05
@github-actions

github-actions Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

🛫 PR Readiness Check

ℹ️ This comment updates on each push. Last checked: commit 8a98fdc

PR Scope: 🔧 Infrastructure

⚠️ 2 item(s) to address before review

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.

@github-actions

Copy link
Copy Markdown
Contributor

🟡 Impact Analysis — PR #1869

Risk tier: 🟡 MEDIUM

📊 Summary

Metric Count
Files changed 2
Files added 0
Files modified 2
Files deleted 0
Modules touched 2

🎯 Risk Factors

  • 2 files changed (≤5 → LOW)
  • 2 modules touched (2-4 → MEDIUM)

📦 Modules Affected

root (1 file)
  • workflows/squad-implement-worker.md
tests (1 file)
  • test/gh-aw-implement-workflow.test.ts

This report is generated automatically for every PR. See #733 for details.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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: closed workflow 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_context propagation via gh 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.

Comment thread test/gh-aw-implement-workflow.test.ts Resolved
Closes #1731

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: c5968b29-5eb9-4e27-8b10-659579646eef
@bradygaster
bradygaster merged commit eaba923 into dev Aug 25, 2026
17 checks passed
@bradygaster
bradygaster deleted the bradygaster-1731-provenance-relay branch September 9, 2026 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Phase 0b: Add PR provenance marker and tighten implement-worker merge relay

2 participants