Repository navigation
fix(gh-aw): validate isolated bootstrap candidate against the checkout's committed registry - #2121
Closed
bradygaster wants to merge 2 commits into
Closed
bradygaster wants to merge 2 commits into
bradygaster wants to merge 2 commits into
Conversation
…ating an isolated bootstrap candidate The materialize step copies the checkout into a .git-less candidate (#2120), but committedRegistry() ran git rev-parse/ls-tree/show in that candidate, so every bootstrap failed with 'registry base: committed HEAD is unavailable'. Thread an optional gitRoot (default root) through validateBootstrapPayload -> validateCastTree -> parseRegistry, and pass gitRoot: checkout from the materializer. Adds a regression test. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…alidator Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
🛫 PR Readiness Check
PR Scope: 🔧 Infrastructure
|
| Status | Check | Details |
|---|---|---|
| ❌ | Single commit | 2 commits — consider squashing before review |
| ❌ | Not in draft | PR is still in draft — mark as ready for review when done |
| ✅ | 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 | No Copilot review threads |
| ❌ | CI passing | 8 check(s) failing: sdk-exports-validation, samples-build, Policy Gates, test, docs-quality, Changeset Drift, gh-aw strict compile, Shebang EOL |
Files Changed (10 files, +51 −26)
| File | +/− |
|---|---|
scripts/validate-gh-aw-cast.mjs |
+4 −4 |
test/gh-aw-bootstrap-workflow.test.ts |
+22 −0 |
test/gh-aw-quality.test.ts |
+3 −3 |
workflows/package/squad-bootstrap.md |
+3 −2 |
workflows/package/squad.md |
+1 −1 |
workflows/shared/squad-bootstrap-validator.mjs |
+2 −1 |
workflows/shared/squad-cast-validator.mjs |
+4 −4 |
workflows/squad-bootstrap.md |
+3 −2 |
workflows/squad-workflows.manifest.json |
+8 −8 |
workflows/squad.md |
+1 −1 |
Total: +51 −26
This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.
Contributor
🟡 Impact Analysis — PR #2121Risk tier: 🟡 MEDIUM 📊 Summary
🎯 Risk Factors
📦 Modules Affectedroot (7 files)
scripts (1 file)
tests (2 files)
This report is generated automatically for every PR. See #733 for details. |
8 of 17 tasks
Collaborator
Author
|
Superseded by #2122, which merged the committed-registry gitRoot fix and equivalent isolated-candidate regression coverage. The remaining branch changes duplicate that coverage, so this draft will not be merged. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Fixes a regression from #2120: every
squad-bootstraprun fails in Materialize validated Squad bootstrap withregistry base: committed HEAD is unavailable (git rev-parse --verify HEAD … not a git repository). No Cast PR or Research Proposals issue is ever published.Why
#2120 validates the bootstrap output in an isolated
mkdtempcandidate copied without.git.squad-cast-validator.mjscommittedRegistry(root)runsgit rev-parse/ls-tree/show HEAD:in that root, so it can never succeed. This was found in a live trial: octodemo/zava-social-cao-ops-20260929111840#26 (run 36836179263). I rebuilt that run's payload, and it validates once committed HEAD is read from the checkout.How
gitRoot(defaults toroot, so existing callers and the CLI are unchanged) throughvalidateBootstrapPayload→validateCastTree→parseRegistry→committedRegistry.workflows/squad-bootstrap.mdand the package copy) passesgitRoot: checkout. The candidate stays.git-less and isolated; only the committed-HEAD reads go to the checkout, whose HEAD is the base the candidate was copied from.scripts/validate-gh-aw-cast.mjskept byte-identical to the shipped resource.npm run gh-aw:integrity:writerefreshed the manifest and the embedded validator digests. The pinned squad lock digests ingh-aw-quality.test.tswere updated to match..git-less candidate fails withoutgitRootand passes withgitRoot: checkout.Validation (Windows, gh-aw v0.89.21)
npm run gh-aw:integrity:check: current.npx vitest run test/gh-aw: 1692 passed. The same 6 failures occur on unmodifiedc497c9con this machine (Windows shell-script fixtures in bootstrap submit and install-staging, plus 2 quality tests). There are no new failures. Please let CI confirm on Linux.eslintclean on the changed tests.Draft: opened by an agent overnight; please review.
Breaking Changes
None.
gitRootis optional.