Skip to content

Commit 5c3bf35

Browse files
authored
fix(gh-aw): converge on 0.89.22 and restore bootstrap (#2122)
Closes octodemo/zava-social-cao-ops-20260929111840#18\nCloses octodemo/zava-social-cao-ops-20260929111840#26\n\nCo-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2 parents c497c9c + b545508 commit 5c3bf35

24 files changed

Lines changed: 119 additions & 87 deletions

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@bradygaster/squad-cli": patch
3+
"@bradygaster/squad-sdk": patch
4+
---
5+
6+
Require gh-aw v0.89.22 across the Squad workflow package, enlistment guidance, integrity contract, CI, and hosted E2E controller for central agentic ops compatibility. Validate isolated bootstrap candidates against the trusted checkout's Git history so materialization can create the Cast PR and research issue.

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ jobs:
173173
# than skipping — a skipped gate is indistinguishable from no gate. This
174174
# includes the shell input security contract gate (#1834) and the compile
175175
# contract (#1732).
176-
run: gh extension install --pin v0.89.21 github/gh-aw
176+
run: gh extension install --pin v0.89.22 github/gh-aw
177177
env:
178178
GH_TOKEN: ${{ github.token }}
179179
- name: Build
@@ -749,10 +749,10 @@ jobs:
749749
npm config set registry "https://packagefeedproxy.microsoft.io/npm/"
750750
npm ci --ignore-scripts
751751
752-
- name: Install gh-aw v0.89.21 (pinned)
752+
- name: Install gh-aw v0.89.22 (pinned)
753753
run: |
754-
gh extension install --force --pin v0.89.21 github/gh-aw
755-
test "$(gh aw --version 2>&1 | awk '{print $NF}')" = v0.89.21
754+
gh extension install --force --pin v0.89.22 github/gh-aw
755+
test "$(gh aw --version 2>&1 | awk '{print $NF}')" = v0.89.22
756756
env:
757757
GH_TOKEN: ${{ github.token }}
758758

‎.github/workflows/squad-gh-aw-hosted-e2e.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ jobs:
5050
env:
5151
GH_TOKEN: ${{ github.token }}
5252
run: |
53-
gh extension install --force --pin v0.89.21 github/gh-aw
54-
test "$(gh aw --version 2>&1 | awk '{print $NF}')" = v0.89.21
53+
gh extension install --force --pin v0.89.22 github/gh-aw
54+
test "$(gh aw --version 2>&1 | awk '{print $NF}')" = v0.89.22
5555
5656
- name: Verify trusted default-branch controller
5757
env:

‎.squad-templates/skills/gh-aw-enlistment/SKILL.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,15 @@ default_branch="$(gh repo view --json defaultBranchRef --jq '.defaultBranchRef.n
6060
echo "Repo: ${owner_repo} Default branch: ${default_branch}"
6161

6262
# Install the package-capable compiler version used by the distribution contract
63-
gh extension install --force --pin v0.89.21 github/gh-aw
64-
test "$(gh aw --version | awk '{print $NF}')" = "v0.89.21"
63+
gh extension install --force --pin v0.89.22 github/gh-aw
64+
test "$(gh aw --version | awk '{print $NF}')" = "v0.89.22"
6565

6666
# Git state must be understood and clean enough to isolate the install
6767
git status --short
6868
```
6969

7070
> **Portability — compiler check:** use the equivalent PowerShell commands to
71-
> force-install `github/gh-aw` at `v0.89.21`, then confirm `gh aw --version`
71+
> force-install `github/gh-aw` at `v0.89.22`, then confirm `gh aw --version`
7272
> reports that exact version before installation.
7373
7474
- **STOP** if `gh auth status` is not logged in, or is logged in as the wrong
@@ -222,7 +222,7 @@ This must run after any first-install approval and before committing. Success
222222
criteria:
223223

224224
- All eight workflows compile successfully.
225-
- With gh-aw v0.89.21, require exactly two warnings, one occurrence of each
225+
- With gh-aw v0.89.22, require exactly two warnings, one occurrence of each
226226
exact diagnostic header below (including its workflow path):
227227

228228
<!-- compile-warning-allowlist-start -->

‎docs/src/content/docs/guide/gh-aw.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ set -euo pipefail
3131
gh auth status
3232
owner_repo="$(gh repo view --json nameWithOwner --jq '.nameWithOwner')"
3333
default_branch="$(gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name')"
34-
gh extension install --force --pin v0.89.21 github/gh-aw
35-
test "$(gh aw --version | awk '{print $NF}')" = "v0.89.21"
34+
gh extension install --force --pin v0.89.22 github/gh-aw
35+
test "$(gh aw --version | awk '{print $NF}')" = "v0.89.22"
3636

3737
# 2. Require GitHub Issues, then allow GitHub Actions to create pull requests
3838
issues_enabled="$(gh api "repos/${owner_repo}" --jq '.has_issues')"
@@ -341,7 +341,7 @@ gh aw compile --strict
341341
```
342342
343343
Run this exact command after any required first-install approval and before
344-
committing. With gh-aw v0.89.21, require exactly two warnings, one occurrence
344+
committing. With gh-aw v0.89.22, require exactly two warnings, one occurrence
345345
of each exact diagnostic header below (including its workflow path):
346346
347347
<!-- compile-warning-allowlist-start -->
@@ -1849,7 +1849,7 @@ prints the exact safe recovery commands.
18491849
18501850
The schema-v2 integrity manifest records two complete compiled lock digests per
18511851
workflow: `lock_sha256` for a per-workflow source annotation and
1852-
`package_lock_sha256` for a package-root annotation. gh-aw v0.89.21 emits
1852+
`package_lock_sha256` for a package-root annotation. gh-aw v0.89.22 emits
18531853
`bradygaster/squad/workflows@SHA` for direct package includes, but can emit
18541854
`bradygaster/squad/workflows/package/<workflow>.md@SHA` when installing dispatched
18551855
dependencies. Fresh and forced installs can therefore contain different mixtures.
@@ -1859,7 +1859,7 @@ URLs, action pins, permissions and runtime bytes remain integrity-checked.
18591859
No additional fields are removed during lock normalization.
18601860
18611861
Manifest generation and installation test fixtures seed isolated compiler action
1862-
locks with the immutable `setup` and `setup-cli` pins for gh-aw v0.89.21. Both
1862+
locks with the immutable `setup` and `setup-cli` pins for gh-aw v0.89.22. Both
18631863
source variants use the real strict compiler and validate its version and emitted
18641864
action pins. This avoids a second network resolution returning a mutable version
18651865
tag when credentials or the API are unavailable. Missing or altered pins fail

‎packages/squad-cli/templates/skills/gh-aw-enlistment/SKILL.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,15 @@ default_branch="$(gh repo view --json defaultBranchRef --jq '.defaultBranchRef.n
6060
echo "Repo: ${owner_repo} Default branch: ${default_branch}"
6161

6262
# Install the package-capable compiler version used by the distribution contract
63-
gh extension install --force --pin v0.89.21 github/gh-aw
64-
test "$(gh aw --version | awk '{print $NF}')" = "v0.89.21"
63+
gh extension install --force --pin v0.89.22 github/gh-aw
64+
test "$(gh aw --version | awk '{print $NF}')" = "v0.89.22"
6565

6666
# Git state must be understood and clean enough to isolate the install
6767
git status --short
6868
```
6969

7070
> **Portability — compiler check:** use the equivalent PowerShell commands to
71-
> force-install `github/gh-aw` at `v0.89.21`, then confirm `gh aw --version`
71+
> force-install `github/gh-aw` at `v0.89.22`, then confirm `gh aw --version`
7272
> reports that exact version before installation.
7373
7474
- **STOP** if `gh auth status` is not logged in, or is logged in as the wrong
@@ -222,7 +222,7 @@ This must run after any first-install approval and before committing. Success
222222
criteria:
223223

224224
- All eight workflows compile successfully.
225-
- With gh-aw v0.89.21, require exactly two warnings, one occurrence of each
225+
- With gh-aw v0.89.22, require exactly two warnings, one occurrence of each
226226
exact diagnostic header below (including its workflow path):
227227

228228
<!-- compile-warning-allowlist-start -->

‎packages/squad-sdk/templates/skills/gh-aw-enlistment/SKILL.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,15 @@ default_branch="$(gh repo view --json defaultBranchRef --jq '.defaultBranchRef.n
6060
echo "Repo: ${owner_repo} Default branch: ${default_branch}"
6161

6262
# Install the package-capable compiler version used by the distribution contract
63-
gh extension install --force --pin v0.89.21 github/gh-aw
64-
test "$(gh aw --version | awk '{print $NF}')" = "v0.89.21"
63+
gh extension install --force --pin v0.89.22 github/gh-aw
64+
test "$(gh aw --version | awk '{print $NF}')" = "v0.89.22"
6565

6666
# Git state must be understood and clean enough to isolate the install
6767
git status --short
6868
```
6969

7070
> **Portability — compiler check:** use the equivalent PowerShell commands to
71-
> force-install `github/gh-aw` at `v0.89.21`, then confirm `gh aw --version`
71+
> force-install `github/gh-aw` at `v0.89.22`, then confirm `gh aw --version`
7272
> reports that exact version before installation.
7373
7474
- **STOP** if `gh auth status` is not logged in, or is logged in as the wrong
@@ -222,7 +222,7 @@ This must run after any first-install approval and before committing. Success
222222
criteria:
223223

224224
- All eight workflows compile successfully.
225-
- With gh-aw v0.89.21, require exactly two warnings, one occurrence of each
225+
- With gh-aw v0.89.22, require exactly two warnings, one occurrence of each
226226
exact diagnostic header below (including its workflow path):
227227

228228
<!-- compile-warning-allowlist-start -->

‎scripts/validate-gh-aw-cast.mjs‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ function committedRegistry(root, errors) {
531531
}
532532
}
533533

534-
function parseRegistry(root, errors) {
534+
function parseRegistry(root, errors, gitRoot = root) {
535535
let registryRaw;
536536
let historyRaw;
537537
try {
@@ -543,7 +543,7 @@ function parseRegistry(root, errors) {
543543
}
544544
const registry = parseCastingPair(registryRaw, historyRaw, 'registry', errors);
545545
if (!registry) return [];
546-
const base = committedRegistry(root, errors);
546+
const base = committedRegistry(gitRoot, errors);
547547
if (base) {
548548
const baseRevision = base.schema === 'squad-agent-provenance/v1' ? base.revision : 0;
549549
if (registry.revision <= baseRevision) {
@@ -631,7 +631,7 @@ function validateCapabilities(coordinator, active, routingRows, errors) {
631631
}
632632
}
633633

634-
export function validateCastTree({ root, payloadPath }) {
634+
export function validateCastTree({ root, payloadPath, gitRoot = root }) {
635635
const errors = [];
636636
let payloadValue;
637637
try {
@@ -660,7 +660,7 @@ export function validateCastTree({ root, payloadPath }) {
660660
if (!payload.includes(required)) errors.push(`payload: missing required path ${required}`);
661661
}
662662

663-
const active = parseRegistry(root, errors);
663+
const active = parseRegistry(root, errors, gitRoot);
664664
const activeNames = new Set(active.map(({ name }) => name));
665665
const activeCharters = active.map(({ id }) => `.squad/agents/${id}/charter.md`);
666666
const expectedPayload = new Set([...CORE_PAYLOAD, ...activeCharters, ...REQUIRED_BUILTIN_CHARTERS]);

‎templates/skills/gh-aw-enlistment/SKILL.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,15 @@ default_branch="$(gh repo view --json defaultBranchRef --jq '.defaultBranchRef.n
6060
echo "Repo: ${owner_repo} Default branch: ${default_branch}"
6161

6262
# Install the package-capable compiler version used by the distribution contract
63-
gh extension install --force --pin v0.89.21 github/gh-aw
64-
test "$(gh aw --version | awk '{print $NF}')" = "v0.89.21"
63+
gh extension install --force --pin v0.89.22 github/gh-aw
64+
test "$(gh aw --version | awk '{print $NF}')" = "v0.89.22"
6565

6666
# Git state must be understood and clean enough to isolate the install
6767
git status --short
6868
```
6969

7070
> **Portability — compiler check:** use the equivalent PowerShell commands to
71-
> force-install `github/gh-aw` at `v0.89.21`, then confirm `gh aw --version`
71+
> force-install `github/gh-aw` at `v0.89.22`, then confirm `gh aw --version`
7272
> reports that exact version before installation.
7373
7474
- **STOP** if `gh auth status` is not logged in, or is logged in as the wrong
@@ -222,7 +222,7 @@ This must run after any first-install approval and before committing. Success
222222
criteria:
223223

224224
- All eight workflows compile successfully.
225-
- With gh-aw v0.89.21, require exactly two warnings, one occurrence of each
225+
- With gh-aw v0.89.22, require exactly two warnings, one occurrence of each
226226
exact diagnostic header below (including its workflow path):
227227

228228
<!-- compile-warning-allowlist-start -->

‎test/gh-aw-bootstrap-workflow.test.ts‎

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
} from 'node:fs';
1212
import { execFileSync, spawnSync } from 'node:child_process';
1313
import { createHash } from 'node:crypto';
14-
import { dirname, join, resolve } from 'node:path';
14+
import { dirname, join, relative, resolve } from 'node:path';
1515
import { tmpdir } from 'node:os';
1616
import { fileURLToPath } from 'node:url';
1717
import { parse } from 'yaml';
@@ -31,6 +31,7 @@ import {
3131
findBootstrapResearchArtifacts,
3232
isBootstrapResearchSeed,
3333
reconstructBootstrapPayload,
34+
validateBootstrapPayload,
3435
} from '../workflows/shared/squad-bootstrap-validator.mjs';
3536

3637
const ROOT = resolve(dirname(fileURLToPath(import.meta.url)), '..');
@@ -601,6 +602,27 @@ describe('automatic Squad bootstrap workflow', () => {
601602
const result = validateFixture(fixture);
602603
expect(result.status, result.stderr).toBe(0);
603604
expect(result.stdout).toBe('Squad bootstrap validation passed.\n');
605+
});
606+
607+
it('validates an isolated candidate against the trusted checkout Git history', () => {
608+
const fixture = createFixture();
609+
const candidate = mkdtempSync(join(tmpdir(), 'gh-aw-bootstrap-candidate-'));
610+
workspaces.push(candidate);
611+
cpSync(fixture.root, candidate, {
612+
recursive: true,
613+
filter: source => relative(fixture.root, source).split('/')[0] !== '.git',
614+
});
615+
const options = {
616+
root: candidate,
617+
payloadPath: join(candidate, 'payload.json'),
618+
repository: 'octo/example',
619+
defaultBranch: 'main',
620+
linkMode: 'placeholder',
621+
};
622+
expect(validateBootstrapPayload(options)).toContainEqual(
623+
expect.stringContaining('registry base: committed HEAD is unavailable'),
624+
);
625+
expect(validateBootstrapPayload({ ...options, gitRoot: fixture.root })).toEqual([]);
604626

605627
const resolved = {
606628
...fixture.payload,
@@ -849,6 +871,7 @@ describe('automatic Squad bootstrap workflow', () => {
849871
expect(lock).not.toMatch(/"materialize-bootstrap":\{"inputs":\{"payload":/);
850872
expect(lock).toContain('reconstructBootstrapPayload(items[0])');
851873
expect(lock).toContain("mkdtempSync(join(tmpdir(), 'squad-bootstrap-candidate-'))");
874+
expect(lock).toContain('gitRoot: checkout');
852875
expect(lock).toContain('Bootstrap payload path crosses a symbolic link');
853876
expect(lock.indexOf("validate(payload, 'placeholder')"))
854877
.toBeLessThan(lock.indexOf('safeTarget(checkout, file.path)'));

0 commit comments

Comments
 (0)