From 2aeba9095cbf2552c53b312e5e16ada33ff93ec0 Mon Sep 17 00:00:00 2001 From: Vladimir Date: Sun, 1 Nov 2026 22:10:25 +0500 Subject: [PATCH] test: update Guard hosted fixture to 0.13.2 --- .github/workflows/codapult-guard.yml | 22 +++++++++++++++------- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- pnpm-workspace.yaml | 1 + 4 files changed, 22 insertions(+), 13 deletions(-) diff --git a/.github/workflows/codapult-guard.yml b/.github/workflows/codapult-guard.yml index ca1a56fcb..858d05f5e 100644 --- a/.github/workflows/codapult-guard.yml +++ b/.github/workflows/codapult-guard.yml @@ -134,15 +134,23 @@ jobs: GUARD_POLICY_MODE: ${{ vars.CODAPULT_GUARD_POLICY_MODE || 'host-review' }} run: | node --input-type=module <<'NODE' - import { appendFileSync, existsSync, readFileSync, statSync } from 'node:fs'; + import { appendFileSync, readFileSync } from 'node:fs'; const resultFile = process.env.GUARD_RESULT_FILE; - if (!resultFile || !existsSync(resultFile) || statSync(resultFile).size === 0) { + let resultContent; + try { + if (!resultFile) throw new Error('missing result file path'); + resultContent = readFileSync(resultFile, 'utf8'); + } catch { + appendFileSync(process.env.GITHUB_STEP_SUMMARY, '## Codapult Guard\n\n- Result: **incomplete** (verification did not produce a result file).\n'); + process.exit(0); + } + if (resultContent.length === 0) { appendFileSync(process.env.GITHUB_STEP_SUMMARY, '## Codapult Guard\n\n- Result: **incomplete** (verification did not produce a result file).\n'); process.exit(0); } let result; try { - result = JSON.parse(readFileSync(resultFile, 'utf8')); + result = JSON.parse(resultContent); } catch { appendFileSync(process.env.GITHUB_STEP_SUMMARY, '## Codapult Guard\n\n- Result: **incomplete** (verification result was not valid JSON).\n'); process.exit(0); @@ -245,12 +253,12 @@ jobs: GUARD_STATEMENT_FILE: ${{ runner.temp }}/guard-verification.intoto.json run: | node --input-type=module <<'NODE' - import { existsSync, readFileSync, rmSync } from 'node:fs'; + import { readFileSync, rmSync } from 'node:fs'; const statementFile = process.env.GUARD_STATEMENT_FILE; const resultFile = process.env.GUARD_RESULT_FILE; let result; try { - if (!resultFile || !existsSync(resultFile)) throw new Error('missing result'); + if (!resultFile) throw new Error('missing result path'); result = JSON.parse(readFileSync(resultFile, 'utf8')); } catch { if (statementFile) rmSync(statementFile, { force: true }); @@ -275,7 +283,7 @@ jobs: - name: Upload verification receipt if: always() - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: name: codapult-guard-verification path: | @@ -310,7 +318,7 @@ jobs: - name: Upload PR review packet if: always() && github.event_name == 'pull_request' - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: name: codapult-guard-review path: ${{ runner.temp }}/guard-review.json diff --git a/package.json b/package.json index 4ec9d2f84..4e778bc5c 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "devDependencies": { "@changesets/changelog-github": "workspace:*", "@changesets/cli": "workspace:*", - "@codapult/guard": "0.13.0", + "@codapult/guard": "0.13.2", "@e18e/eslint-plugin": "^0.8.0", "@eslint/js": "10.0.1", "@manypkg/cli": "^0.25.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 353b9c0fe..d7b49478b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -20,8 +20,8 @@ importers: specifier: workspace:* version: link:packages/cli '@codapult/guard': - specifier: 0.13.0 - version: 0.13.0 + specifier: 0.13.2 + version: 0.13.2 '@e18e/eslint-plugin': specifier: ^0.8.0 version: 0.8.0(eslint@10.10.0) @@ -611,8 +611,8 @@ packages: resolution: {integrity: sha512-y7/yvZ2TPAnR9+jnc00klvNNLkJiXFFrQA/hlLCcxA9a2A4zQIOimyFQ9XfwYKiGD1fb5GY8vbKIIgO8d5Tb2A==} engines: {node: '>= 20.12.0'} - '@codapult/guard@0.13.0': - resolution: {integrity: sha512-x/EMMuq6+HYx5goBswNaSl8kyGV2hZGJYWOyu9jfXxvkiHfVgBqj0hKzCEZ8EZLyyb/xsTsK91oX5upBmpO+gQ==} + '@codapult/guard@0.13.2': + resolution: {integrity: sha512-Gdn6utLpff0q1KymZ8X8jMl2qtW7oB3MzLCFmDkabOjpAo8p+F5CvLieFHS3kTf3wjy7tUYrtba1iEZv4Hbt7w==} engines: {node: '>=20.19.0'} hasBin: true @@ -3668,7 +3668,7 @@ snapshots: fast-wrap-ansi: 0.2.2 sisteransi: 1.0.5 - '@codapult/guard@0.13.0': + '@codapult/guard@0.13.2': dependencies: '@modelcontextprotocol/sdk': 1.32.2(zod@4.6.7) commander: 15.0.0 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 4efb65928..7f8aec653 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -14,6 +14,7 @@ dedupePeerDependents: true minimumReleaseAge: 10080 minimumReleaseAgeExclude: - "@codapult/guard@0.12.0" + - "@codapult/guard@0.13.2" - "@codapult/guard@0.13.0" - "@codapult/guard@0.11.0" - "@pnpm/exe.android-arm64@12.4.1"