Repository navigation
fix: harden release and workflow inputs - #2542
Conversation
Relates to #2538 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
🛫 PR Readiness Check
PR Scope: 🔧 Infrastructure
|
| Status | Check | Details |
|---|---|---|
| ❌ | Single commit | 5 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 (2 outdated skipped) |
| ❌ | CI passing | 3 check(s) failing: test, docs-quality, gh-aw strict compile |
Files Changed (21 files, +11798 −54)
| File | +/− |
|---|---|
.github/workflows/squad-standalone-release.yml |
+6 −6 |
.github/workflows/squad-workflow-lint.yml |
+3 −1 |
docs/src/content/docs/scenarios/upgrading.md |
+7 −5 |
scripts/pr-readiness.mjs |
+1 −0 |
scripts/release/build-manifest.mjs |
+2 −1 |
scripts/release/check-release-scripts.mjs |
+1 −1 |
scripts/render-host-feature-matrix.mjs |
+62 −4 |
scripts/render-upgrade-matrix.mjs |
+5 −1 |
test-fixtures/spec/suite-v0.2/upgrade-matrix.json |
+11396 −2 |
test/actionlint-config.test.ts |
+17 −0 |
test/fixtures/upgrade-matrix/fs-access-log.cjs |
+1 −0 |
test/gh-aw-command-authorization.test.ts |
+78 −1 |
test/pr-readiness.test.ts |
+1 −0 |
test/release-script-policy.test.ts |
+6 −0 |
test/specification-suite.test.ts |
+17 −3 |
test/squad-20-host-feature-matrix.test.ts |
+41 −0 |
test/squad-20-preview-tarball-matrix.test.ts |
+10 −6 |
test/squad-20-upgrade-matrix.test.ts |
+113 −18 |
test/standalone-release-workflow.test.ts |
+5 −3 |
workflows/shared/squad-command-contract.mjs |
+25 −1 |
workflows/squad-workflows.manifest.json |
+1 −1 |
Total: +11798 −54
This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.
🏗️ Architectural Review
Automated architectural review — informational only. |
🟠 Impact Analysis — PR #2542Risk tier: 🟠 HIGH 📊 Summary
🎯 Risk Factors
📦 Modules Affectedci-workflows (2 files)
docs (1 file)
root (3 files)
scripts (5 files)
tests (10 files)
This report is generated automatically for every PR. See #733 for details. |
Relates to #2538 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
The guard and safe-output writers disagree on comment termination, allowing protected activation markers into published text and bypassing the trusted-writer boundary.
3 open issues
What changed in this PR
Hardens the infrastructure supporting Squad 2.0.0 promotion (#2538), focusing on trusted workflow checkouts, command authorization, and generated verification output.
Changes:
- Bind manual release and lint checkouts to the selected workflow SHA.
- Strengthen comment parsing, Markdown table escaping, and release-script policy checks.
- Update Windows npm helpers, preserve historical upgrade evidence separately, and expand regression coverage.
| File | Description |
|---|---|
workflows/squad-workflows.manifest.json |
Refreshes the command-contract integrity hash. |
workflows/shared/squad-command-contract.mjs |
Adds fail-closed HTML-comment inspection. |
test/standalone-release-workflow.test.ts |
Checks trusted checkout and SHA-binding requirements. |
test/squad-20-upgrade-matrix.test.ts |
Updates Windows npm invocation and validates historical runs. |
test/squad-20-preview-tarball-matrix.test.ts |
Updates Windows npm invocation and tests literal arguments. |
test/specification-suite.test.ts |
Replaces regex-based heading-tag removal with scanning. |
test/release-script-policy.test.ts |
Adds long-whitespace detection coverage. |
test/pr-readiness.test.ts |
Covers backslashes before filename pipes. |
test/gh-aw-command-authorization.test.ts |
Adds comment-parsing regressions and mutation coverage. |
test/actionlint-config.test.ts |
Verifies manual SHA validation precedes checkout. |
test-fixtures/spec/suite-v0.2/upgrade-matrix.json |
Separates historical results from current runs. |
scripts/render-upgrade-matrix.mjs |
Updates escaping and discloses historical evidence. |
scripts/render-host-feature-matrix.mjs |
Expands table-cell backslash escaping. |
scripts/release/check-release-scripts.mjs |
Simplifies whitespace matching in Node command detection. |
scripts/release/build-manifest.mjs |
Updates anchor and regression-title escaping. |
scripts/pr-readiness.mjs |
Adds backslash escaping for filenames. |
docs/src/content/docs/scenarios/upgrading.md |
Regenerates tables without current-harness run claims. |
docs/src/content/docs/reference/host-feature-matrix.md |
Regenerates output with updated escaping. |
.github/workflows/squad-workflow-lint.yml |
Validates requested SHA against the selected workflow ref. |
.github/workflows/squad-standalone-release.yml |
Pins release checkouts to the dispatch SHA. |
Review effort: Max (adaptive)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Bring the verified dev dependency into the upgrade-matrix branch. Closes #2538 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Preserve the instrumented Linux and Windows results for the integrated product fixes. Closes #2538 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>


What
Harden release workflows, generated tables, and command authorization to address the infrastructure-side CodeQL alerts blocking Squad 2.0.0 promotion.
Why
Relates to #2538. Release jobs must use the selected trusted workflow SHA, untrusted text must not bypass Markdown or comment guards, and matrix runners must pass npm arguments without a command shell.
How
Bind manual SHA inputs to the selected workflow ref, check out that ref, escape Markdown safely, and replace ambiguous HTML-comment processing with a fail-closed parser. Invoke npm via argument arrays on Windows. Original upgrade-matrix runs remain unchanged as historical evidence. Verified Linux and Windows results from the integrated product fix are recorded in the fixture and generated documentation. The product changes merged separately in #2543.
Validation was run on the combined remediation worktree before the PRs were separated:
npm run gh-aw:integrity:writeandnpm run gh-aw:integrity:check: passed, including strict pinned workflow compilation.npx --no-install vitest run test/gh-aw-command-authorization.test.ts -t 'fails closed on alternate|rejects comment-split lifecycle authority when the live contract is mutated' --maxWorkers=1 --testTimeout=30000 --hookTimeout=180000: passed, 3 tests and 62 skipped.npx --no-install vitest run test/squad-20-host-feature-matrix.test.ts test/actionlint-config.test.ts test/standalone-release-workflow.test.ts test/release-script-policy.test.ts --maxWorkers=2 --testTimeout=30000 --hookTimeout=30000: passed, 105 tests and 4 skipped.node scripts/render-host-feature-matrix.mjs --check,node scripts/release/check-release-scripts.mjs, andactionlint .github/workflows/squad-standalone-release.yml .github/workflows/squad-workflow-lint.yml: passed.npm run lint:docs: passed.f6c82545c764f1e1fbf4dd19f3ec4606b93f85f2, harnessed7a6a62ab80de5dd3ded1d25ead072f3538c38cb43bde356cc97aa80896da1b: Linux Node 22.23.4 and Windows Node 22.23.5 each passed 35 rows with 7 structural skips. Four rows per OS include the documented expected F3 failure of the historical 0.9.1 CLI; all six profile isolation checks passed per OS.npx vitest run test\squad-20-upgrade-matrix.test.ts test\squad-20-preview-tarball-matrix.test.ts --testTimeout 30000: passed, 29 tests and 91 opt-in skips. Two local Windows runs at the default 5-second timeout timed out during the preview test's cold import.node scripts\render-upgrade-matrix.mjs --check: passed after folding both CI artifacts.npm testwas not run locally. The full command-authorization suite had 14 pre-existing Windows virtual-path failures and two compiler timeouts locally; its Linux CI result is required.npx changeset add/.changeset/*.md, directCHANGELOG.mdentry for maintainers, orskip-changeloglabel for no user-facing changes)PR Readiness Checklist
Branch & Commit
dev(notmain)dev(git fetch upstream && git rebase upstream/dev)git diff --cached --stat)Build & Test
npm run buildpassesnpm testpasses (all tests green)npm run lintpasses (type check clean)npm run lint:eslintpassesThe full-suite checkbox awaits CI on the final head. The user approved the >20-file release remediation.
Changeset
npx changeset add(ifpackages/squad-sdk/src/orpackages/squad-cli/src/changed)CHANGELOG.mdentry (maintainers only — write-protected for external contributors)skip-changeloglabel applied (if no user-facing changes)N/A: no SDK or CLI source or shipped templates changed.
Docs
The generated matrix pages reflect the updated renderers and preserve the original results in the fixture.
Exports
N/A.
Breaking Changes
Manual workflow-lint requests must select the same ref as the requested SHA.
Waivers
None requested. Required CI must pass before merge.