@@ -739,8 +739,20 @@ jobs:
739739 steps :
740740 - uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
741741
742- - name : Install gh-aw v0.87.10 (pinned)
743- run : gh extension install --pin v0.87.10 github/gh-aw
742+ - uses : actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v6
743+ with :
744+ node-version : 22
745+ cache : npm
746+
747+ - name : Install verifier dependencies
748+ run : |
749+ npm config set registry "https://packagefeedproxy.microsoft.io/npm/"
750+ npm ci --ignore-scripts
751+
752+ - name : Install gh-aw v0.89.21 (pinned)
753+ run : |
754+ gh extension install --force --pin v0.89.21 github/gh-aw
755+ test "$(gh aw --version 2>&1 | awk '{print $NF}')" = v0.89.21
744756 env :
745757 GH_TOKEN : ${{ github.token }}
746758
@@ -750,68 +762,38 @@ jobs:
750762 gh aw --version | tee -a "$GITHUB_STEP_SUMMARY"
751763 echo "" >> "$GITHUB_STEP_SUMMARY"
752764
753- - name : Set up deploy layout
754- # Mirror workflows/ → <tmpdir>/.github/workflows/ then git init so
755- # gh aw compile sees the directory structure it expects in a consumer
756- # repo after `gh aw add`.
757- run : |
758- COMPILE_DIR=$(mktemp -d)
759- echo "COMPILE_DIR=$COMPILE_DIR" >> "$GITHUB_ENV"
760- mkdir -p "$COMPILE_DIR/.github/workflows"
761- cp -r workflows/. "$COMPILE_DIR/.github/workflows/"
762- git -C "$COMPILE_DIR" init --quiet
765+ - name : Verify canonical package manifest and generated digests
766+ run : npm run gh-aw:integrity:check
763767
764- - name : Compile all seven workflows (--strict) and verify lock files
765- # Failures accumulate rather than short-circuit so every result is
766- # visible in one run. A compiler that exits 0 without emitting a lock
767- # file is treated as failure — silent-success is a gate gap.
768+ - name : Verify a clean native package consumer
769+ env :
770+ SQUAD_SOURCE_REVISION : ${{ github.sha }}
768771 run : |
769772 set -euo pipefail
770- FAILED=0
771- echo "### Compile results" >> "$GITHUB_STEP_SUMMARY"
772- for WF in squad squad-implement-worker squad-review squad-deps-worker squad-retro squad-improvement-worker; do
773- printf -- '--- Compiling %s ---\n' "$WF"
774- if (cd "$COMPILE_DIR" && gh aw compile "$WF" --strict --approve --no-check-update 2>&1); then
775- printf ' => OK\n'
776- echo "✅ \`$WF\`" >> "$GITHUB_STEP_SUMMARY"
777- else
778- echo "::error::gh aw compile $WF --strict failed"
779- echo "❌ \`$WF\` compile failed" >> "$GITHUB_STEP_SUMMARY"
780- FAILED=$((FAILED + 1))
781- fi
782- done
783- printf -- '--- Compiling squad-bootstrap ---\n'
784- if (cd "$COMPILE_DIR" && gh aw compile squad-bootstrap --strict --approve --no-check-update 2>&1); then
785- printf ' => OK\n'
786- echo "✅ \`squad-bootstrap\`" >> "$GITHUB_STEP_SUMMARY"
787- else
788- echo "::error::gh aw compile squad-bootstrap --strict failed"
789- echo "❌ \`squad-bootstrap\` compile failed" >> "$GITHUB_STEP_SUMMARY"
790- FAILED=$((FAILED + 1))
791- fi
792- echo "" >> "$GITHUB_STEP_SUMMARY"
793- echo "### Lock files" >> "$GITHUB_STEP_SUMMARY"
794- for LOCK in squad.lock.yml squad-implement-worker.lock.yml squad-review.lock.yml squad-deps-worker.lock.yml squad-retro.lock.yml squad-improvement-worker.lock.yml; do
795- if [ ! -f "$COMPILE_DIR/.github/workflows/$LOCK" ]; then
796- echo "::error::$LOCK not emitted — compiler exited 0 without writing output"
797- echo "❌ missing: \`$LOCK\`" >> "$GITHUB_STEP_SUMMARY"
798- FAILED=$((FAILED + 1))
799- else
800- echo "✅ \`$LOCK\`" >> "$GITHUB_STEP_SUMMARY"
801- fi
802- done
803- if [ ! -f "$COMPILE_DIR/.github/workflows/squad-bootstrap.lock.yml" ]; then
804- echo "::error::squad-bootstrap.lock.yml not emitted — compiler exited 0 without writing output"
805- echo "❌ missing: \`squad-bootstrap.lock.yml\`" >> "$GITHUB_STEP_SUMMARY"
806- FAILED=$((FAILED + 1))
807- else
808- echo "✅ \`squad-bootstrap.lock.yml\`" >> "$GITHUB_STEP_SUMMARY"
809- fi
810- if [ "$FAILED" -gt 0 ]; then
811- echo "" >> "$GITHUB_STEP_SUMMARY"
812- echo "**❌ $FAILED failure(s) — gate fails closed**" >> "$GITHUB_STEP_SUMMARY"
813- echo "::error::$FAILED failure(s) — gate fails closed"
814- exit 1
815- fi
816- echo "" >> "$GITHUB_STEP_SUMMARY"
817- echo "**✅ All seven workflows compiled, all seven lock files emitted**" >> "$GITHUB_STEP_SUMMARY"
773+ CONSUMER_DIR="$GITHUB_WORKSPACE/.gh-aw-consumer"
774+ rm -rf "$CONSUMER_DIR"
775+ trap 'rm -rf "$CONSUMER_DIR"' EXIT
776+ mkdir -p "$CONSUMER_DIR"
777+ git -C "$CONSUMER_DIR" init --quiet
778+ git -C "$CONSUMER_DIR" remote add origin https://github.com/example/squad-consumer.git
779+ (
780+ cd "$CONSUMER_DIR"
781+ gh aw add "$GITHUB_WORKSPACE/workflows"
782+ node .github/workflows/shared/squad-install-verifier.mjs \
783+ --write-local-test-ownership \
784+ --source-revision "$SQUAD_SOURCE_REVISION"
785+ node .github/workflows/shared/squad-install-verifier.mjs --materialize-runtime
786+ test "$(find .github/workflows -maxdepth 1 -name 'squad*.md' | wc -l | tr -d ' ')" = 7
787+ test "$(find .github/workflows/shared -type f ! -name 'squad-bootstrap-trigger-probe.json' | wc -l | tr -d ' ')" = 15
788+ test "$(find .github/skills/gh-aw-enlistment -type f | wc -l | tr -d ' ')" = 1
789+ gh aw compile --strict --approve --no-check-update
790+ for workflow in squad squad-implement-worker squad-review squad-deps-worker squad-retro squad-improvement-worker squad-bootstrap; do
791+ gh aw compile "$workflow" --strict --no-check-update
792+ test -f ".github/workflows/${workflow}.lock.yml"
793+ done
794+ gh aw compile --strict --no-check-update
795+ node .github/workflows/shared/squad-install-verifier.mjs \
796+ --verify-install \
797+ --source-revision "$SQUAD_SOURCE_REVISION" \
798+ --strict-compile
799+ )
0 commit comments