Skip to content

fix(gh-aw): activate from standalone releases - #1901

Merged
bradygaster merged 4 commits into
devfrom
bradygaster-validate-npm-free-activation
Aug 26, 2026
Merged

fix(gh-aw): activate from standalone releases#1901
bradygaster merged 4 commits into
devfrom
bradygaster-validate-npm-free-activation

Conversation

@bradygaster

Copy link
Copy Markdown
Owner

Summary

  • replace cold GH-AW npm installation with the immutable standalone action at d8d7ef2d6da93460fecbfd56f8de20f9d10fd377
  • reinterpret the two exercised SQUAD_CLI_VERSION sites as the synchronized v0.13.1 GitHub Release fallback and retarget drift detection to complete standalone assets
  • add an exact-confirmation, dev-only release dispatch that reuses the existing GITHUB_TOKEN release plus direct standalone workflow handoff

Closes #1895

End-to-end evidence

The distributed path is gh aw add .../workflows/squad.md@dev -> workflows/squad.md -> imported workflows/shared/squad.md -> squad-init -> its SHA-pinned scripts/install.sh -> releases/download/v0.13.1/squad-<target>. Both #1895 literals are exercised: the fallback env literal selects the artifact passed to squad-init, while the header literal documents that exact fallback and is guarded against drift.

Public v0.13.0 is tagged at 47fcb79ec955919534fcd04b298e2a169a53e763 and predates #1898 commit 31553830. This branch starts at d8d7ef2d6da93460fecbfd56f8de20f9d10fd377, where git merge-base --is-ancestor 31553830 HEAD succeeds. After merge, dispatching Squad Release on dev with confirm_tag=v0.13.1 tags the merged commit and directly builds all six bundles plus SHA256SUMS.txt from that tag, so the cold artifact contains #1898 without npm publication.

The guarded dispatch is necessary because the existing release workflow otherwise runs only on main; promoting to main is not part of this gate. Publishing a release manually with a user token is unsafe here because release.published can trigger the npm publisher. The workflow-created release uses GITHUB_TOKEN, suppresses that downstream event, and already calls the standalone reusable workflow directly.

npm policy

Cold activation is npm-free. GitHub Actions never configures the Microsoft npm proxy. The standalone builder retains npm only at bundle-build time because there is no practical npm-free dependency-assembly path; Actions uses its normal registry. The proxy remains mandatory only for local developer/agent npm commands. No npm package is published or used as this graduation gate.

Safe-update security review

gh aw compile --strict --approve reports one new action and the existing restricted Squad token secrets:

  • bradygaster/squad/.github/actions/squad-init@d8d7ef2d6da93460fecbfd56f8de20f9d10fd377: reviewed; immutable same-repository SHA, runs the installer shipped at that SHA, validates inputs, downloads the selected release archive and checksum, and receives no secret input.
  • SQUAD_GITHUB_APP_PRIVATE_KEY / SQUAD_GITHUB_TOKEN: existing activation credentials; neither is newly passed to the action. They remain scoped to token minting and the later init/health steps.

No redirect changes were reported.

Validation

  • node --test test/*.test.cjs — 134 passed
  • isolated consumer-layout gh aw compile v0.86.2 for all four workflows with --strict --approve --no-check-update — 4 succeeded; generated locks contain the pinned standalone action and no npm/npx activation command
  • TARGET_VERSION=v0.13.1 node scripts/bump-activation-pin.mjs — identity rewrite passed
  • node --check scripts/bump-activation-pin.mjs
  • git diff --check

Dependency-backed local Vitest/build validation is unavailable because the required Microsoft proxy returns 404 for vite@8.2.2; the proxy was not bypassed. PR CI remains the authoritative dependency-backed gate. No changeset is required because this PR does not touch the changelog gate's governed SDK/CLI source or template paths.

Post-merge human step

A maintainer must dispatch Squad Release on dev with confirm_tag=v0.13.1. No environment approval, npm approval, main promotion, or npm publication is required. After assets attach, verify the release tag contains 31553830 and run the cold GH-AW install plus /squad cast proof.

Closes #1895

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

github-actions Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

🛫 PR Readiness Check

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

PR Scope: 🔧 Infrastructure

⚠️ 2 item(s) to address before review

Status Check Details
Single commit 4 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 1 active Copilot thread(s) resolved (4 outdated skipped)
CI passing All checks passing

Files Changed (9 files, +216 −126)

File +/−
.github/workflows/squad-cli-pin-drift.yml +52 −36
.github/workflows/squad-release.yml +24 −0
docs/src/content/docs/features/standalone-install.md +8 −3
docs/src/content/docs/guide/gh-aw.md +5 −3
scripts/bump-activation-pin.mjs +18 −19
test/gh-aw-quality.test.ts +14 −7
test/squad-cli-pin.test.ts +49 −42
test/standalone-release-workflow.test.ts +11 −0
workflows/shared/squad.md +35 −16

Total: +216 −126


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

🏗️ Architectural Review

⚠️ 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

Copy link
Copy Markdown
Contributor

🟠 Impact Analysis — PR #1901

Risk tier: 🟠 HIGH

📊 Summary

Metric Count
Files changed 9
Files added 0
Files modified 9
Files deleted 0
Modules touched 5

🎯 Risk Factors

  • 9 files changed (6-20 → MEDIUM)
  • 5 modules touched (5-8 → HIGH)

📦 Modules Affected

ci-workflows (2 files)
  • .github/workflows/squad-cli-pin-drift.yml
  • .github/workflows/squad-release.yml
docs (2 files)
  • docs/src/content/docs/features/standalone-install.md
  • docs/src/content/docs/guide/gh-aw.md
root (1 file)
  • workflows/shared/squad.md
scripts (1 file)
  • scripts/bump-activation-pin.mjs
tests (3 files)
  • test/gh-aw-quality.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.

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 release workflow’s new validation step contains a shell-quoting bug that will break manual dispatch runs, and there are a few additional consistency/validation fixes needed.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR updates gh-aw activation to install Squad from immutable, npm-free standalone GitHub Release bundles (via the SHA-pinned squad-init action), and tightens the “activation pin”/drift-guard story around complete release assets rather than npm dist-tags. It also adds a dev-only, confirmation-gated manual release dispatch path and updates tests/docs to match the new activation and drift behavior.

Changes:

  • Replace activation-time npm install with a pinned squad-init action that installs from GitHub Release assets, including tag normalization and an npm-free wiring check.
  • Retarget drift detection and pin consistency checks from npm metadata to “latest release + required asset set” verification.
  • Add workflow_dispatch confirmation gating to the release workflow (dev-only) and update quality/contract tests accordingly.
File summaries
File Description
workflows/shared/squad.md Switch activation to standalone release install + add release tag resolution/validation and npm-free state wiring check.
test/standalone-release-workflow.test.ts Assert the new confirmation-gated manual release dispatch behavior.
test/squad-cli-pin.test.ts Update pin guards to expect vX.Y.Z tags and standalone-release semantics.
test/gh-aw-quality.test.ts Compile with --approve and update contracts to assert standalone action wiring (no npm/npx).
scripts/bump-activation-pin.mjs Normalize/validate TARGET_VERSION as a stable vX.Y.Z tag and update bump messaging.
docs/src/content/docs/guide/gh-aw.md Document SQUAD_CLI_VERSION as a standalone GitHub Release tag (default v0.13.1).
docs/src/content/docs/features/standalone-install.md Refresh examples and clarify npm usage boundaries (bundle build only).
.github/workflows/squad-release.yml Add confirmation-gated workflow_dispatch validation for dev-only manual releases.
.github/workflows/squad-cli-pin-drift.yml Drift guard now checks releases/latest and required standalone assets, and files an issue on drift.
Review details
  • Files reviewed: 9/9 changed files
  • Comments generated: 4
  • 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 .github/workflows/squad-cli-pin-drift.yml Outdated
Comment thread workflows/shared/squad.md Outdated
Comment thread .github/workflows/squad-cli-pin-drift.yml
Comment thread .github/workflows/squad-release.yml Outdated
brady gaster and others added 2 commits August 26, 2026 14:23
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

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

There are still a couple of user-facing strings (manual dispatch input description and drift issue title) that can mislead operators in non-“behind” drift scenarios and should be corrected before merge.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details

Suppressed comments (1)

.github/workflows/squad-cli-pin-drift.yml:108

  • The drift issue TITLE says the pin is "behind the published release", but drift is also triggered when the latest release is missing required standalone assets (even if PINNED == LATEST). In that case the issue title is misleading for triage/search.
      - name: Open drift issue
        if: steps.compare.outputs.drift == 'true'
        env:
          GH_TOKEN: ${{ github.token }}
          PINNED: ${{ steps.compare.outputs.pinned }}
          LATEST: ${{ steps.compare.outputs.latest }}
          MISSING: ${{ steps.compare.outputs.missing }}
          TITLE: 'Squad standalone activation pin is behind the published release'
        run: |
  • Files reviewed: 9/9 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread .github/workflows/squad-release.yml
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

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.

🔵 Needs a closer look

It changes core activation and release workflows (high operational impact) and should receive a final human review of the workflow gating and release side effects.

Review details
  • Files reviewed: 9/9 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@bradygaster
bradygaster merged commit b448cd3 into dev Aug 26, 2026
19 checks passed
@bradygaster
bradygaster deleted the bradygaster-validate-npm-free-activation branch August 26, 2026 21:35
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.

Squad CLI activation pin is behind the published release

2 participants