Repository navigation
fix(gh-aw): support explicit maintainer fresh bootstrap reset - #2189
Conversation
Closes #2188 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6ac716dc-d01c-4582-9a24-214cd2979f8f
🛫 PR Readiness Check
PR Scope: 🔧 Infrastructure
|
| Status | Check | Details |
|---|---|---|
| ❌ | Single commit | 3 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 | 3 active Copilot thread(s) resolved (1 outdated skipped) |
| ✅ | CI passing | All checks passing |
Files Changed (11 files, +988 −92)
| File | +/− |
|---|---|
docs/src/content/docs/guide/gh-aw.md |
+58 −0 |
test/gh-aw-bootstrap-workflow.test.ts |
+353 −21 |
test/gh-aw-install-staging.test.ts |
+38 −0 |
test/gh-aw-review-guard.test.ts |
+90 −0 |
workflows/package/squad-bootstrap.md |
+86 −19 |
workflows/package/squad-review.md |
+6 −1 |
workflows/shared/squad-bootstrap-validator.mjs |
+210 −12 |
workflows/shared/squad-review-guard.mjs |
+48 −12 |
workflows/squad-bootstrap.md |
+85 −18 |
workflows/squad-review.md |
+6 −1 |
workflows/squad-workflows.manifest.json |
+8 −8 |
Total: +988 −92
This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.
🟡 Impact Analysis — PR #2189Risk tier: 🟡 MEDIUM 📊 Summary
🎯 Risk Factors
📦 Modules Affecteddocs (1 file)
root (7 files)
tests (3 files)
This report is generated automatically for every PR. See #733 for details. |
There was a problem hiding this comment.
🟡 Changes recommended
Archived PR authorization, actor-type validation, and a default-branch race must be addressed.
3 open findings
What changed in this PR
Adds a maintainer-authorized fresh-bootstrap generation while preserving historical artifacts and existing opt-out behavior.
Changes:
- Introduces committed reset records and generation-specific bootstrap identities.
- Extends workflow authorization, provenance validation, packaging, and documentation.
- Adds reset, compiled-writer, review-guard, and installation tests.
| File | Description |
|---|---|
workflows/squad-workflows.manifest.json |
Updates workflow and runtime integrity hashes. |
workflows/squad-review.md |
Documents reset-generation review authorization. |
workflows/squad-bootstrap.md |
Implements reset dispatch and materialization. |
workflows/shared/squad-review-guard.mjs |
Validates generation-bound provenance. |
workflows/shared/squad-bootstrap-validator.mjs |
Parses, authorizes, and classifies resets. |
workflows/package/squad-review.md |
Regenerates packaged review workflow. |
workflows/package/squad-bootstrap.md |
Regenerates packaged bootstrap workflow. |
test/gh-aw-review-guard.test.ts |
Tests reset-generation review provenance. |
test/gh-aw-install-staging.test.ts |
Tests coherent package installation. |
test/gh-aw-bootstrap-workflow.test.ts |
Tests reset state and compiled writer behavior. |
docs/src/content/docs/guide/gh-aw.md |
Documents the maintainer reset procedure. |
🧠 Review effort: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Closes #2188 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6ac716dc-d01c-4582-9a24-214cd2979f8f
|
Revision evidence for 4b35b12: all three Copilot findings are addressed with executable regressions (bot rerun actor, reopened archived bot/fallback PR, mutable default-ref race). |
Closes #2188 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6ac716dc-d01c-4582-9a24-214cd2979f8f
|
Final origin-preserving revision 983bdec: |


What
Add an explicit maintainer-controlled fresh-bootstrap generation without deleting historical PRs, issues, or branches. Working as agentic-workflows-dev (Agentic Workflows Engineer).
Why
Closes #2188. Closing a stale Cast PR intentionally records opt-out; deleting its branch or changing its title cannot restart bootstrap safely. Maintainers need a supported fresh attempt without removing that default protection.
How
A reviewed default-branch
.squad/bootstrap-reset.jsonnames a stable ID and exact closed artifacts. It only arms the generation. Initial creation additionally requires default-branchworkflow_dispatch, matchingfresh_start, and authenticated human write/maintain/admin actors. Preflight and writer independently validate the record/history. Generation-specific branch and titles prevent historical artifact reuse. Installed teams, merged/open/foreign archive PRs, duplicate/ambiguous state, changed reset records, and divergent branches fail closed. The writer checks the live default-branch SHA before initial reset writes. Existing closed-current-generation opt-out, partial recovery, bounded payload validation, package integrity, and provenance remain enforced. Manual bot/fallback review authorization is limited to the committed generation and verified run actors.11 files are all workflow sources/shared runtime, generated package/manifest, documentation, and tests. No SDK/CLI source or runtime team state changed; no consumer mutations.
npx changeset add/.changeset/*.md, directCHANGELOG.mdentry for maintainers, orskip-changeloglabel for no user-facing changes)N/A: no SDK/CLI source changes.
PR Readiness Checklist
Branch & Commit
dev(notmain)dev(git fetch upstream && git rebase upstream/dev)git diff --cached --stat)Verified with
git fetch origin dev --quiet && git merge-base --is-ancestor origin/dev HEAD(passed); app-managed isolated branch, no main checkout operations.Build & Test
npm run buildpassesnpm testpasses (all tests green)npm run lintpasses (type check clean)npm run lint:eslintpassesValidation evidence:
npm run build— passed; generated version stamps restored, not committed.npm run lint— passed.npm run lint:eslint— passed, zero errors; 2246 existing repository warnings.node_modules/.bin/eslint test/gh-aw-bootstrap-workflow.test.ts test/gh-aw-review-guard.test.ts test/gh-aw-install-staging.test.ts— passed without warnings.npm test -- test/gh-aw-bootstrap-workflow.test.ts test/gh-aw-review-guard.test.ts test/gh-aw-review-workflow.test.ts test/gh-aw-install-staging.test.ts test/gh-aw-verify-resource.test.ts— passed, 291 tests. Includes executable compiled writer with historical Cast [TEST] API capability test — will be deleted #3, repeated run without duplicate artifacts, compiled authorization-removal mutation, and coherent eight-workflow package installation with committed reset state.npm run gh-aw:integrity:writethennpm run gh-aw:integrity:check— passed.workflows/squad-bootstrap.md,workflows/package/squad-bootstrap.md,workflows/squad-review.md,workflows/package/squad-review.md— all four valid, no errors/warnings. Compiled artifact inspected for input, trusted SHA checkout, preflight/writer authorization, and repository-wide concurrency. Generated ephemeral locks are not tracked by this source package.npm test— failed locally: 10,639 passed, 6 failed, 19 skipped, 47 todo. Two existing acceptance tests assume a non-worktree checkout; four existing CLI external-state tests fail on this macOS host. No affected CLI/acceptance source changed.npm test -- test/cli/cast.test.ts test/cli/copilot.test.ts test/cli/rc.test.tsreproduced those same four failures in isolation (55 passed). No full-suite green claim; require hosted CI before normal merge.git diff --check— passed.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: workflow infrastructure only; no escape-hatch label requested.
Docs
Existing gh-aw guide documents exact reset record, manual field, fallback/recovery, safety gates, and preserved history. No new SDK/CLI module.
Exports
N/A: no SDK exports.
Breaking Changes
None. Legacy opt-out and push-only legacy provenance remain unchanged. Reset generations are opt-in.
Waivers
None requested. Hosted required checks must be green; local macOS/worktree full-suite limitations are recorded above.