From c5161b1d4648a727fd7bec42ae5e6e690dd34dce Mon Sep 17 00:00:00 2001 From: wallstop Date: Sun, 12 Jul 2026 17:34:45 -0700 Subject: [PATCH] fix(ci): provision upstream policy parser --- .github/workflows/upstream-sync.yml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/upstream-sync.yml b/.github/workflows/upstream-sync.yml index f6d8b26f4..4dbd5caa5 100644 --- a/.github/workflows/upstream-sync.yml +++ b/.github/workflows/upstream-sync.yml @@ -32,7 +32,7 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 - persist-credentials: true + persist-credentials: false - id: sync name: Discover and classify upstream changes env: @@ -71,6 +71,13 @@ jobs: [[ -z "$pr" ]] || gh pr close "$pr" --comment "$1" done UPSTREAM_COMMIT git add UPSTREAM_COMMIT git commit -m "chore: record upstream ${upstream_sha:0:12}" + gh auth setup-git git push --force-with-lease origin "$SYNC_BRANCH" candidate_sha="$(git rev-parse HEAD)" pr_number="$(gh pr list --state open --head "$SYNC_BRANCH" --json number --jq '.[0].number // empty')" @@ -234,8 +242,13 @@ jobs: ref: ${{ needs.discover.outputs.candidate-sha }} path: _candidate persist-credentials: false + - name: Install trusted verifier parser + run: | + mkdir -p /tmp/upstream-verifier + npm install --prefix /tmp/upstream-verifier --ignore-scripts --no-save --package-lock=false --no-audit --no-fund yaml@2.8.4 + cp _policy/scripts/verify-resource-cleanup-contract.mjs /tmp/upstream-verifier/verify.mjs - name: Verify lifecycle contract with trusted policy - run: node _policy/scripts/verify-resource-cleanup-contract.mjs _candidate + run: node /tmp/upstream-verifier/verify.mjs _candidate - name: Install package manager and dependencies working-directory: _candidate env: