Skip to content

fix(gh-aw): install latest stable Squad CLI by default - #2167

Merged
bradygaster merged 6 commits into
devfrom
bradygaster-latest-cli-workflow-default
Oct 8, 2026
Merged

bradygaster merged 6 commits into
devfrom
bradygaster-latest-cli-workflow-default

Conversation

@bradygaster

@bradygaster bradygaster commented Oct 3, 2026 •

Copy link
Copy Markdown
Collaborator

What

Activation now lets the SHA-pinned squad-init action install the latest complete stable GitHub Release through its built-in default. The workflow-level CLI override/resolver and obsolete CLI pin drift/bump automation are removed, directly coupled documentation/tests are updated, and stable release promotion is delayed until all standalone archives plus SHA256SUMS.txt exist. Working as agentic-workflows-dev (Agentic Workflows Engineer).

Why

A real research activation installed v0.13.1 even though newer CLI releases existed: https://github.com/octodemo/zava-social-frontend-002/actions/runs/37085867778. Hardcoded release selection delayed fixes reaching users. The initial latest-default implementation also exposed an availability window where GitHub marked a stable release latest before its standalone assets were attached; this PR now closes that window. This is a user-directed bounded change; no unrelated issue is closed.

How

The shared activation workflow omits the action's version input and pins bradygaster/squad/.github/actions/squad-init@5c662ba015ec4f99befa51b0e8ca4f2148b0497f. A committed independently retrieved fixture binds that immutable action and its fail-closed checksum installer by SHA-256 and Git blob identity, then executes checksum success and failure cases.

Stable GitHub Releases are created with --latest=false. A promote-latest job waits for the reusable standalone publication workflow to finish, verifies all six platform archives and SHA256SUMS.txt on the release, and only then runs gh release edit --latest; a regression test asserts incomplete releases cannot be promoted. Preview releases remain prereleases, and npm/package-manager publication behavior is otherwise unchanged.


⚠️ Quick Check

  • If SDK/CLI source files changed: completed the applicable Changeset step below (npx changeset add / .changeset/*.md, direct CHANGELOG.md entry for maintainers, or skip-changelog label for no user-facing changes)

N/A: no SDK/CLI source, product template, dependency manifest, or lockfile changes are introduced by this PR.

PR Readiness Checklist

The PR readiness bot will validate these automatically after push.
Check each item before requesting review. See CONTRIBUTING.md for full details.

Branch & Commit

  • Branch created from dev (not main)
  • Branch is up to date with dev (git fetch upstream && git rebase upstream/dev)
  • Verified diff contains only intended changes (git diff --cached --stat)
  • PR is not in draft mode (mark ready when checks pass)
  • Commit history is clean (squash fixups before review)

The branch was merged with current origin/dev without force-pushing.

Build & Test

  • npm run build passes
  • npm test passes (all tests green)
  • npm run lint passes (type check clean)
  • npm run lint:eslint passes
  • For migration PRs (>20 files): include test output summary in PR description

Validation evidence:

  • node workflows/shared/squad-install-verifier.mjs --check-source — PASSED after the remediation and again after merging current dev; verifies generated package manifest/digests and strict gh-aw compilation contract.
  • Direct parsed workflow contract check — PASSED: stable creation contains --latest=false; promotion depends on both release and standalone; all six archives plus SHA256SUMS.txt are required before gh release edit --latest.
  • git diff --check — PASSED.
  • Full local dependency restore — BLOCKED by npm CLI Exit handler never called! through the required corporate proxy. The proxy also exposes Vitest 4.1.9 while this branch requires 5.0.2.
  • SKIP_BUILD_BUMP=1 npm run build — BLOCKED because the failed restore leaves tsc unavailable. Required GitHub CI is expected to provide authoritative full build/test/lint results for the pushed commit.

Changeset

  • Changeset added via npx changeset add (if packages/squad-sdk/src/ or packages/squad-cli/src/ changed)
  • Or direct CHANGELOG.md entry (maintainers only — write-protected for external contributors)
  • Or skip-changelog label applied (if no user-facing changes)

N/A: infrastructure/workflow changes are exempt and no package source changed.

Docs

  • README section updated (if new feature/module)
  • Docs feature page (if new user-facing capability)

Updated the gh-aw guide and directly coupled release-process guidance; no new SDK/CLI feature or module requires a README section.

Exports

  • package.json subpath exports updated (if new module)

N/A: no SDK modules or exports changed.


Breaking Changes

The shared workflow no longer reads vars.SQUAD_CLI_VERSION; activation follows the latest complete stable GitHub Release. Direct consumers of the installer/action can still select a version.

Waivers

None requested. Merge remains gated on required GitHub checks and repository protections.

Delegate activation release selection to the SHA-pinned squad-init action and retire obsolete CLI pin automation. Regenerate package consumers and integrity digests; cover source and strict-compiled contracts.

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

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

🏗️ Architectural Review

Authoritative evidence: base-controlled pull_request_target reporter.

⚠️ Architectural review: 1 info.

Severity Category Finding Files
ℹ️ info template-sync Template files changed in .github/workflows/ but not in other template locations. If these templates should stay in sync, consider updating the others too. Changed: .github/workflows/, Unchanged: templates/, .squad-templates/, packages/squad-cli/templates/

Automated architectural review — informational only.

@github-actions

github-actions Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

🟠 Impact Analysis — PR #2167

Risk tier: 🟠 HIGH

📊 Summary

Metric Count
Files changed 18
Files added 3
Files modified 12
Files deleted 3
Modules touched 6

🎯 Risk Factors

  • 18 files changed (6-20 → MEDIUM)
  • 6 modules touched (5-8 → HIGH)
  • 3 file(s) deleted

📦 Modules Affected

ci-workflows (3 files)
  • .github/workflows/squad-cli-pin-drift.yml
  • .github/workflows/squad-npm-publish.yml
  • .github/workflows/squad-release.yml
copilot-config (1 file)
  • .copilot/skills/release-process/SKILL.md
docs (1 file)
  • docs/src/content/docs/guide/gh-aw.md
root (6 files)
  • workflows/package/squad-deps-worker.md
  • workflows/package/squad-implement-worker.md
  • workflows/package/squad-retro.md
  • workflows/package/squad.md
  • workflows/shared/squad.md
  • workflows/squad-workflows.manifest.json
scripts (1 file)
  • scripts/bump-activation-pin.mjs
tests (6 files)
  • test/fixtures/squad-init-approved.json
  • test/gh-aw-quality.test.ts
  • test/helpers/refresh-squad-init-fixture.mjs
  • test/squad-cli-latest.test.ts
  • test/squad-cli-pin.test.ts
  • test/standalone-release-workflow.test.ts

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

@github-actions

github-actions Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

🛫 PR Readiness Check

ℹ️ This comment updates on each push. Last checked: commit 2d38a4e

PR Scope: 🔧 Infrastructure

⚠️ 3 item(s) to address before review

Status Check Details
❌ Single commit 6 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 4 active Copilot thread(s) resolved (1 outdated skipped)
❌ CI passing 4 check(s) failing: test, docs-quality, samples-build, gh-aw strict compile

Files Changed (18 files, +417 −880)

File +/−
.copilot/skills/release-process/SKILL.md +2 −2
.github/workflows/squad-cli-pin-drift.yml +0 −163
.github/workflows/squad-npm-publish.yml +0 −112
.github/workflows/squad-release.yml +51 −1
docs/src/content/docs/guide/gh-aw.md +14 −9
scripts/bump-activation-pin.mjs +0 −175
test/fixtures/squad-init-approved.json +16 −0
test/gh-aw-quality.test.ts +25 −22
test/helpers/refresh-squad-init-fixture.mjs +31 −0
test/squad-cli-latest.test.ts +219 −0
test/squad-cli-pin.test.ts +0 −269
test/standalone-release-workflow.test.ts +33 −14
workflows/package/squad-deps-worker.md +2 −19
workflows/package/squad-implement-worker.md +2 −19
workflows/package/squad-retro.md +2 −19
workflows/package/squad.md +2 −19
workflows/shared/squad.md +5 −24
workflows/squad-workflows.manifest.json +13 −13

Total: +417 −880


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

@bradygaster
bradygaster marked this pull request as ready for review October 4, 2026 03:57
Copilot AI balanced review requested due to automatic review settings October 4, 2026 03:57

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 pinned action lacks the claimed mandatory checksum behavior, release ordering exposes incomplete latest releases, and a stale assertion breaks the full test suite.

5 open findings
What changed in this PR

Updates gh-aw activation to install the latest stable Squad CLI release by default.

Changes:

  • Removes the workflow-level CLI pin and related automation.
  • Regenerates workflow packages and integrity hashes.
  • Updates tests, documentation, and release guidance.
File Description
workflows/​squad-workflows.manifest.json Updates generated integrity hashes.
workflows/​shared/​squad.md Delegates CLI selection to the pinned action.
workflows/​package/​squad.md Regenerates the main workflow package.
workflows/​package/​squad-retro.md Regenerates the retrospective workflow.
workflows/​package/​squad-implement-worker.md Regenerates the implementation worker.
workflows/​package/​squad-deps-worker.md Regenerates the dependency worker.
test/​standalone-release-workflow.test.ts Removes publication pin-job assertions.
test/​squad-cli-pin.test.ts Deletes obsolete pin tests.
test/​squad-cli-latest.test.ts Adds latest-release contract tests.
test/​gh-aw-quality.test.ts Updates compiled workflow assertions.
scripts/​bump-activation-pin.mjs Deletes obsolete pin updater.
docs/​src/​content/​docs/​guide/​gh-aw.md Documents latest-release activation.
.github/​workflows/​squad-npm-publish.yml Removes activation-pin publication job.
.github/​workflows/​squad-cli-pin-drift.yml Removes scheduled pin drift detection.
.copilot/​skills/​release-process/​SKILL.md Updates release-process guidance.

🧠 Review effort: Balanced


💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread workflows/shared/squad.md Resolved
Comment thread workflows/shared/squad.md Resolved
Comment thread workflows/shared/squad.md Resolved
Comment thread test/squad-cli-latest.test.ts Resolved
Comment thread docs/src/content/docs/guide/gh-aw.md Resolved
Closes #2167

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

Copy link
Copy Markdown
Collaborator

Test-only correction pushed at 2385cf7.

  • Updates the health contract to check the actual installed CLI capability branch and the version-specific warning for the next published release.
  • Refreshes the workflow/package digest expectations after the latest-stable install change. Both values were independently regenerated using the repository fixture helpers and pinned gh-aw v0.89.22, with canonical LF validation fixtures. Immutable-action validation still passes, and replacing the pin with a mutable version still throws as expected.
  • All existing digest-mismatch, missing/noncanonical-pin, and tamper-rejection assertions remain intact. Only test/gh-aw-quality.test.ts changed (8 additions, 5 removals).

Local validation: health contract assertions and independent digest/pin checks passed; git diff --check passed. Full Vitest/build could not run locally because locked CFS restore failed with 404 for cspell-trie-lib@10.3.6, followed by Windows cleanup permission errors. No public-registry fallback was used.

The user explicitly authorized this test-only push for hosted CI with that blocker documented. This is not a merge/release waiver or a claim that new-head CI has passed. Please use the fresh checks and review on this head before merging/integrating it into the 1.0.1 candidate.

Pin the npm-free activation action to the maintainer-approved immutable release revision. Exercise the exact pinned action and installer offline, fail closed on checksum download and tampering, and regenerate canonical workflow contracts without weakening existing compiler-pin checks.

Closes #2167

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

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

Copy link
Copy Markdown
Collaborator

Installer-pin correction pushed for fresh hosted CI

Revision: 0e881f72e417cf935473b0bf63007f0c76dc647b (11 owned revision files; 17 total PR files). The upstream head was checked before committing and immediately before the normal, non-force feature-branch push. No main/dev push, release dispatch, or review approval was performed.

Actual activation path corrected: shared activation and its four generated package copies now use the maintainer-approved immutable official action revision 5c662ba015ec4f99befa51b0e8ca4f2148b0497f (published main, #2164). Independently retrieved both .github/actions/squad-init/action.yml and scripts/install.sh at that exact SHA and verified their Git blob identities before generating the offline fixture. The action executes its own revision's installer; no mutable/self pin or workflow-level version override is introduced. Latest stable selection and npm-free platform archives remain unchanged.

The hermetic regression executes the pinned action's actual install step and installer, not the current checkout's installer. Valid checksum installation succeeds. Checksum-download failure, missing entry, duplicate entries, malformed digest, and checksum mismatch fail before extraction and preserve the existing CLI installation. Fixture bytes are bound to the actual activation pin with checked SHA-256/Git blob identities; refresh is an explicit maintenance command, not a network-per-test dependency. Existing compiler-pin tamper checks remain intact.

Validation:

  • npm test -- test/squad-cli-latest.test.ts test/standalone-release-workflow.test.ts test/standalone-build.test.ts: 61 passed, using bounded CFS-restored test tooling.
  • Focused test/gh-aw-quality.test.ts contracts: 4 passed (health/init contract, both strict source-binding compiler-pin tamper cases, native-consumer unauthenticated pin seeding/tampering). The Windows native-consumer verification uses SQUAD_GH_AW_BIN pointing to the already installed gh-aw v0.89.22 binary, avoiding extension lookup under the verifier's sanitized environment.
  • Canonical LF-only scratch export: generated materializations/manifest via the existing integrity verifier's writeSource, verified checkSource, and independently recompiled both source bindings with test/helpers/gh-aw-install-fixture.ts and immutable compiler actions. Only the four activation workflow entries and shared activation runtime digest changed in the manifest.
  • Independently regenerated mutable-compiler-pin regression digests: workflow e28d35cd3ae0b920479279c777b26c68a339163a6886794ba82c1c04e28e75d6; package 7077085c3f31824fbea10ad7e963e10e5cb67819523a1815b9795839fe97fb02.
  • Pinned action SHA-256: c759c5425c710db59a1a33f4a59f53117a2f2e25c1f0df4e41f27507afd82aa8; pinned installer SHA-256: 35713fde7941b64d4e46fb04fbf7dc16d5df9e4d03609f7de86154525c533723.
  • git diff --cached --check: passed; staged deletion guard: 0. Revision-owned scratch/tooling junctions were removed.

Local full-build blocker (not waived as a success): SKIP_BUILD_BUMP=1 npm run build failed in the SDK with the incomplete dependency installation: TS2305 (RuntimeConnection missing), TS2353 (connection absent from CopilotClientOptions), TS2322 (timestamp number versus string), TS2339 (tokenPrices/onLifecycle absent), TS7016 (missing ws/sql.js declarations), and resulting TS7006 parameter errors. A bounded exact build-dependency restoration through the mandatory https://packagefeedproxy.microsoft.io/npm/ feed returned npm error code ETARGET / No matching version found for @types/ws@8.18.2. No public-registry fallback, dependency downgrade, product-source change, or repeated full-root restoration was used.

The user explicitly selected “Push the correction for hosted CI, documenting the local blocker (Recommended)” for this source-pin/regression revision. This authorizes this push only, not merge or publication. Require fresh hosted CI on 0e881f72e417cf935473b0bf63007f0c76dc647b and independent review before merging. Green CI on the earlier 2385cf7 does not certify this new source correction.

Run the approved install step in its declared Bash shell rather than Ubuntu generic sh, enforce POSIX Bash selection, and report premature subprocess status and stderr before reading the download trace. Preserve the approved installer fixture and every checksum-negative assertion.

Closes #2167

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

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

Copy link
Copy Markdown
Collaborator

Surgical Bash-harness correction: fresh CI required

Pushed 50e4b3ad0d6cb3c81fe2723336b8d9ffa5956346 normally to the existing feature branch, after verifying upstream still matched 0e881f72e417cf935473b0bf63007f0c76dc647b. Exactly one test file changed; total PR scope remains 17 files. No force/amend, main/dev push, review approval, or release dispatch.

Verified cause: the approved fixture install step declares shell: bash and starts with set -euo pipefail, but the existing generic POSIX resolver returns /bin/sh on the hosted ubuntu-latest runner. The harness therefore ran a Bash body through generic sh. Its unconditional read of fetches then raised ENOENT before exposing the child status/stdout/stderr; the old CI log consequently does not retain that underlying child diagnostic. This was a harness-shell mismatch, not evidence against the approved installer checksum behavior.

The fix follows existing Bash-selection prior art: use the fixture's declared Bash on POSIX and Git-for-Windows Bash on Windows, with --noprofile --norc. Contract assertions enforce Bash selection for Linux/macOS. Missing download traces now fail loudly with the subprocess status, signal, stdout and stderr, rather than substituting empty logs. A new real-subprocess premature-failure test verifies those diagnostics. All checksum-negative assertions remain unchanged.

Bounded validation without installing/restoring dependencies:

  • Reused already cached Vitest 5.0.2 / YAML 2.9.1. Across test/squad-cli-latest.test.ts and test/standalone-build.test.ts, all 30 distinct targeted cases passed across the initial run and bounded retry. The initial Windows run passed 29 cases but its valid-install case hit the 60-second Git-Bash launcher timeout; retrying valid-install plus the new diagnostic case passed 2/2. This is not a claim that the initial run was green.
  • Executed the actual pinned-action harness under available Linux Bash 5.3.3 via WSL, with only the platform/process bridge adapted: valid install and all five checksum failures (download failure, missing, duplicate, malformed, mismatch) passed twice, preserving existing installations and forbidding extraction on failures. A separate WSL premature-exit diagnostic probe encountered a cross-filesystem cleanup EPERM; that diagnostic contract passed the native Windows Vitest run and retry. No production/helper cleanup behavior was changed to hide that limitation.
  • Staged whitespace/deletion guards passed; 0 staged deletions. Owned scratch folders and cache junctions were removed; checkout is clean.

The approved official action pin 5c662ba015ec4f99befa51b0e8ca4f2148b0497f, golden fixture identities, canonical generated workflow contracts and both compiler-tamper digests are unchanged. No product SDK source or other repository area changed.

The previously disclosed local full-build dependency/CFS blocker (ETARGET: No matching version found for @types/ws@8.18.2) remains; no root restore was attempted. The user's explicit permission covers this same correction's push for hosted CI only. Require new-head hosted CI and independent review before merge; failed run 37186537108 and its 10,524 other passing tests do not certify this new harness revision. Merge/publication gates remain intact.

tamirdresher pushed a commit to tamirdresher/squad that referenced this pull request Oct 4, 2026
Integrate only the approved technical changes from 90c5396, 2385cf7, 0e881f7 and 50e4b3a into the existing main-based 1.0.1 candidate for github#2166, without merging dev history. Resolve canonical conflicts surgically and regenerate package workflows, manifest and compiler-tamper fixtures from the combined main tree.

Preserve the github#2165 health fix, root/SDK/CLI 1.0.1 lockstep and SDK floor. SDK runtime, NuGet and historical changesets remain untouched. Build and targeted contracts passed; current-head hosted CI and human review remain required before merge/publication.

Closes github#2167

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

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
tamirdresher pushed a commit that referenced this pull request Oct 4, 2026
* fix(cli): accept persistent names in health routes (#2165)

Co-authored-by: brady gaster <bradygaster@github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
(cherry picked from commit d2364df)

* chore(release): prepare surgical npm v1.0.1 patch

Closes #2165. Consume only its approved CLI health patch changeset; preserve historical main fragments and unchanged SDK/NuGet source.

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

* fix(release): include approved latest-stable activation correction

Integrate only the approved technical changes from 90c5396, 2385cf7, 0e881f7 and 50e4b3a into the existing main-based 1.0.1 candidate for #2166, without merging dev history. Resolve canonical conflicts surgically and regenerate package workflows, manifest and compiler-tamper fixtures from the combined main tree.

Preserve the #2165 health fix, root/SDK/CLI 1.0.1 lockstep and SDK floor. SDK runtime, NuGet and historical changesets remain untouched. Build and targeted contracts passed; current-head hosted CI and human review remain required before merge/publication.

Closes #2167

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

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

---------

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

Copilot-Session: d0223600-b85d-432c-ba7b-24ada4558cb1
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

🔒 Security Review

Authoritative evidence: base-controlled pull_request_target reporter.

🔒 Security review: 1 info.

Severity Category Finding Location
ℹ️ info workflow-permissions Workflow grants write permission — verify this is the minimum required scope. .github/workflows/squad-release.yml:236

Automated security review — informational only.

@bradygaster
bradygaster merged commit 9815d63 into dev Oct 8, 2026
25 of 29 checks passed
tamirdresher added a commit that referenced this pull request Oct 14, 2026
…rough v1.0.1 (#2220)

Drain all 76 pending .changeset/*.md fragments on dev into CHANGELOG.md:
- Sync the [1.0.1] release entry from main (#2165, #2167)
- Expand [1.0.0] and [0.13.1] with pre-release changesets that shipped in those releases
- Populate [Unreleased] with post-1.0.1 changesets landed on dev
- Remove consumed .changeset/*.md fragment files so scripts/check-changeset-drift.mjs --mode=fail exits 0

Closes #2180
Refs #1273

Co-authored-by: Copilot <Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5cf0811c-a02a-41a7-ab00-904b6900db7b
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.

4 participants