Skip to content

fix(gh-aw): bind implementation acceptance to selected plan revision (#2206) - #2222

Merged
tamirdresher merged 1 commit into
github:devfrom
tamirdresher:fix/2206-bind-impl-acceptance-to-plan-revision
Oct 14, 2026
Merged

tamirdresher merged 1 commit into
github:devfrom
tamirdresher:fix/2206-bind-impl-acceptance-to-plan-revision

Conversation

@tamirdresher

Copy link
Copy Markdown
Collaborator

Summary

  • Require granular activation (impl-accepted and impl-phases-accepted) in prepareActivation to uniquely reference the selected implementation plan comment revision (planComment.id) using standard producer plan-link representations (#issuecomment- URLs and comment-id references).
  • Verify Implementation SHA-256: when present so edited/stale plan revisions are rejected before reservation or issue creation.
  • Select the latest matching implementation acceptance artifact (.at(-1)) consistent with scope and �alidation selection, while rejecting missing, ambiguous, or stale plan links.
  • Add regression tests in est/gh-aw-plan-lifecycle.test.ts and est/gh-aw-activation-finalization.test.ts covering matching revisions, newer unaccepted revisions, missing/ambiguous/stale links, and phased implementation acceptance.

Closes #2206

Copilot AI balanced review requested due to automatic review settings October 14, 2026 14:26
@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

🛫 PR Readiness Check

ℹ️ This comment updates on each push. Last checked: commit 04f4140

PR Scope: 🔧 Infrastructure

⚠️ 2 item(s) to address before review

Status Check Details
✅ Single commit 1 commit — clean history
✅ 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 11 check(s) still running

Files Changed (6 files, +163 −8)

File +/−
test/gh-aw-activation-finalization.test.ts +23 −1
test/gh-aw-activation-label-provisioning.test.ts +5 −1
test/gh-aw-activation-summary-outcomes.test.ts +5 −1
test/gh-aw-plan-lifecycle.test.ts +85 −2
workflows/shared/squad-activation.mjs +44 −2
workflows/squad-workflows.manifest.json +1 −1

Total: +163 −8


This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

🟡 Impact Analysis — PR #2222

Risk tier: 🟡 MEDIUM

📊 Summary

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

🎯 Risk Factors

  • 6 files changed (6-20 → MEDIUM)
  • 2 modules touched (2-4 → MEDIUM)

📦 Modules Affected

root (2 files)
  • workflows/shared/squad-activation.mjs
  • workflows/squad-workflows.manifest.json
tests (4 files)
  • test/gh-aw-activation-finalization.test.ts
  • test/gh-aw-activation-label-provisioning.test.ts
  • test/gh-aw-activation-summary-outcomes.test.ts
  • test/gh-aw-plan-lifecycle.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 SHA parser ignores bulleted acceptance metadata, allowing a present stale digest to bypass validation.

1 open finding
What changed in this PR

Binds implementation acceptance artifacts to the selected plan revision before activation.

Changes:

  • Validates plan comment links and optional SHA-256 digests.
  • Selects the latest applicable acceptance artifact.
  • Adds stale, missing, ambiguous, and phased-acceptance tests.
File Description
workflows/​shared/​squad-activation.mjs Adds revision-binding validation.
test/​gh-aw-plan-lifecycle.test.ts Adds lifecycle regression coverage.
test/​gh-aw-activation-summary-outcomes.test.ts Updates acceptance fixture links.
test/​gh-aw-activation-label-provisioning.test.ts Updates acceptance fixture links.
test/​gh-aw-activation-finalization.test.ts Tests stale acceptance during finalization.

Review effort: Balanced

const ids = extractImplementationPlanCommentIds(body, repository, origin);
requireThat(ids.length === 1 && ids[0] === planComment.id,
'implementation acceptance must uniquely reference the selected implementation plan revision');
const shas = [...body.matchAll(/^\*\*Implementation SHA-256:\*\*\s*(\S+)\s*$/gm)].map(match => match[1]);
@tamirdresher
tamirdresher force-pushed the fix/2206-bind-impl-acceptance-to-plan-revision branch from 787c5ab to 28e9f24 Compare October 14, 2026 14:53
…ithub#2206)

Require granular activation (impl-accepted and impl-phases-accepted)
to uniquely reference the selected implementation plan comment revision
and match any recorded Implementation SHA-256 before reservation or
issue creation.

Closes github#2206

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5cf0811c-a02a-41a7-ab00-904b6900db7b
@tamirdresher
tamirdresher force-pushed the fix/2206-bind-impl-acceptance-to-plan-revision branch from 28e9f24 to 04f4140 Compare October 14, 2026 15:03
@tamirdresher
tamirdresher merged commit f8ed4b9 into github:dev Oct 14, 2026
18 checks passed
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.

Bind implementation acceptance to the selected plan revision before activation

2 participants