Skip to content

Commit aa81f08

Browse files
bradygasterCopilot
andauthored
Merge pull request #2204: finalize activation bindings and reconciliation
Closes #2203 Reviewed head f558617; independent approvals and required checks passed. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9cb2dad2-b638-45e5-840b-6ccc12e94499
2 parents fc1cf59 + f558617 commit aa81f08

41 files changed

Lines changed: 10596 additions & 4369 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
"@bradygaster/squad-sdk": patch
3+
---
4+
5+
Validate real numeric task and epic issue references and add an explicit activation
6+
reader for independently verified current-state-authorized reconciliations.
7+
Preserve valid legacy activation records while rejecting ambiguous, malformed,
8+
or unverified replacements without rewriting historical acceptance.
9+
Require exactly one matching verifier evidence record and bind any selected
10+
phase scope to its canonical, independently verified phase IDs.
11+
Require activation-source phases to exactly match verifier evidence, rejecting
12+
internally inconsistent caller-supplied evidence without changing verifier trust.
13+
Reject malformed legacy phase scopes with non-positive, unsafe, nonnumeric, or
14+
duplicate phase IDs consistently with the packaged activation checker.
15+
Allow a verifier-supplied full frozen-plan assignment context to validate complete
16+
epic identity sets across phase subsets; retain strict exact-row validation when
17+
that independent context is absent.
18+
Normalize verifier and producer display names consistently with trim/lowercase
19+
while retaining exact stable agent identity checks.
20+
Reject task issues that collide with the origin or any epic issue, and prevent
21+
non-origin epics from reusing the origin issue.
22+
Support explicit verifier-authorized pending-source reconciliation with matching
23+
capture metadata, frozen plan and registry digests, and phase scope. Pending
24+
reservations and their prior references never authorize activation on their own.
25+
Select complete transitive phase histories only when every reconciliation has an
26+
independent verifier proof and exact source links form one fully consumed chain
27+
with consistent frozen snapshots, expanding phases, and preserved prior mappings.
28+
Ignore unrelated discussion in scoped pairs and complete histories while retaining
29+
rejection of extra activation or pending candidates and ambiguous chains.
30+
Require a nonempty, strictly shorter positional phase prefix across ancestors;
31+
reject whole-plan phase expansion and explicitly selected phases absent from the
32+
frozen plan without requiring consecutive phase IDs.

‎.github/workflows/squad-agent-binding-check.yml‎

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Squad Agent Binding Check
22

33
on:
4+
workflow_dispatch:
45
workflow_run:
56
# "Squad" is the installed gh-aw workflow; "Squad CI" keeps this source
67
# repository's checker wired to a workflow that exists here.
@@ -13,37 +14,28 @@ permissions:
1314

1415
jobs:
1516
check:
17+
name: Historical bindings (not current-run completion)
1618
runs-on: ubuntu-latest
1719
steps:
1820
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7
1921
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 #v6
2022
with:
2123
node-version: 22
22-
- name: Collect activation evidence from the completed run
24+
- name: Collect historical activation records (not run outputs)
2325
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 #v9
2426
with:
2527
script: |
2628
const fs = require('node:fs');
27-
const started = new Date(context.payload.workflow_run.run_started_at);
28-
const completed = new Date(context.payload.workflow_run.updated_at);
29-
const comments = await github.paginate(github.rest.issues.listCommentsForRepo, {
30-
...context.repo,
31-
since: started.toISOString(),
32-
per_page: 100,
33-
});
34-
const activationComments = comments
35-
.filter(comment => new Date(comment.created_at) <= completed)
36-
.filter(comment => /Structured data:/i.test(comment.body ?? '')
37-
&& /"squad_artifact"\s*:\s*"?(?:phases-activated|activated|phases-accepted|plan-accepted)/i.test(comment.body ?? ''))
38-
.map(comment => ({
39-
body: comment.body,
40-
issue: Number(comment.issue_url.split('/').at(-1)),
41-
}));
29+
const { pathToFileURL } = require('node:url');
30+
const { join } = require('node:path');
31+
const { collectHistoricalActivationRecords } = await import(pathToFileURL(
32+
join(process.env.GITHUB_WORKSPACE, 'workflows/shared/check-agent-binding.mjs')).href);
33+
const audit = await collectHistoricalActivationRecords({ github, context });
4234
fs.writeFileSync(
4335
`${process.env.RUNNER_TEMP}/activation-comments.json`,
44-
JSON.stringify(activationComments),
36+
JSON.stringify(audit),
4537
);
46-
- name: Check agent bindings
38+
- name: Audit historical bindings without asserting current-run completion
4739
env:
4840
GITHUB_TOKEN: ${{ github.token }}
4941
run: >-

‎.github/workflows/squad-ci.yml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,8 @@ jobs:
788788
--source-revision "$SQUAD_SOURCE_REVISION"
789789
node .github/workflows/shared/squad-install-verifier.mjs --materialize-runtime
790790
test "$(find .github/workflows -maxdepth 1 -name 'squad*.md' | wc -l | tr -d ' ')" = 8
791-
test "$(find .github/workflows/shared -type f ! -name 'squad-bootstrap-trigger-probe.json' | wc -l | tr -d ' ')" = 17
791+
test "$(find .github/workflows/shared -type f ! -name 'squad-bootstrap-trigger-probe.json' | wc -l | tr -d ' ')" = 19
792+
test -f .github/workflows/squad-agent-binding-check.yml
792793
test "$(find .github/skills/gh-aw-enlistment -type f | wc -l | tr -d ' ')" = 1
793794
node --input-type=module -e '
794795
import { compileWithPinnedActions } from "./.github/workflows/shared/squad-install-verifier.mjs";

0 commit comments

Comments
 (0)