From ffd37a2758457832bedaf450ed499e4b45fa5d76 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 28 Jul 2026 14:54:02 +0000 Subject: [PATCH 1/3] ci: fold single-grep jobs into steps, call named pnpm scripts - Merge ios-runner-swift-compat and no-test-di-seams (each just checkout + one rg assertion) into steps of a new static-checks job, keeping each step's own failure message. Removes two job-scheduling/ checkout overheads and two PR status-check lines. - Replace the layering-guard job's inlined copies of check:layering and depgraph:test with the named pnpm scripts, removing the silent-drift risk between the workflow and package.json. - Fix the same drift in conformance-regenerate.yml, which inlined maestro:conformance:regenerate byte-for-byte. - Leave affected-selector's inline node invocation as-is: R8's zero-dep closure check (scripts/layering/zero-dep-jobs.ts) finds a job's entry scripts by matching literal paths in the run: block, so switching to `pnpm check:affected:test` would zero out its entries and make R8 fail closed. Documented inline why this one stays inlined. - Leave publish-mcp-registry.yml's sync-mcp-metadata --check alone: that job never runs the setup-node-pnpm action, so pnpm isn't provisioned there at all. Refs #1462 --- .github/workflows/ci.yml | 50 ++++++++++++-------- .github/workflows/conformance-regenerate.yml | 2 +- 2 files changed, 30 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 05bec2d3c..dd483540d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,8 +22,13 @@ concurrency: cancel-in-progress: true jobs: - ios-runner-swift-compat: - name: iOS Runner Swift Compatibility + # Two single-`rg`-assertion jobs (formerly `ios-runner-swift-compat`, + # `no-test-di-seams`, added independently in b79bd8601 / 9eb060406) folded + # into steps here: each was checkout + one grep, paying full job + # scheduling/checkout overhead and its own PR status-check line for what is + # a single assertion. Each step keeps its own failure message. See #1462. + static-checks: + name: Static Checks runs-on: ubuntu-latest timeout-minutes: 10 steps: @@ -37,6 +42,13 @@ jobs: exit 1 fi + - name: Fail if test-only DI seams reappear in production code + run: | + if rg '\?\s*:\s*typeof\s+' src/ --glob '!**/__tests__/**' --glob '!*.test.ts'; then + echo "Found test-only DI seams (optional typeof params) in production code." + exit 1 + fi + swift-runner-unit-compile: name: Swift Runner Unit Compile runs-on: macos-26 @@ -56,21 +68,6 @@ jobs: build-command: AGENT_DEVICE_XCUITEST_INCLUDE_UNIT_TESTS=1 pnpm build:xcuitest:macos xcuitest-platform: macos - no-test-di-seams: - name: No test-only DI seams - runs-on: ubuntu-latest - timeout-minutes: 5 - steps: - - name: Checkout - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - - name: Fail if test-only DI seams reappear in production code - run: | - if rg '\?\s*:\s*typeof\s+' src/ --glob '!**/__tests__/**' --glob '!*.test.ts'; then - echo "Found test-only DI seams (optional typeof params) in production code." - exit 1 - fi - lint: name: Lint & Format runs-on: ubuntu-latest @@ -109,16 +106,14 @@ jobs: # Generalizes the former inline commands/-import grep into a structured # import-direction lint over the resolved graph. See scripts/layering/check.ts # and CONTEXT.md (Architecture: folder DAG + layering lint). - run: | - node --experimental-strip-types --test scripts/layering/model.test.ts - node --experimental-strip-types scripts/layering/check.ts + run: pnpm check:layering - name: Check the depgraph report agrees with the gate # scripts/depgraph reads the same model as the gate, so its inversion count must # reproduce TYPE_INVERSION_BASELINE. Free two-sources check: if the tree changes # and only one side is updated, this fails and names the difference. Runs here # rather than in its own job so the two can never be green independently. - run: node --experimental-strip-types --test scripts/depgraph/model.test.ts + run: pnpm depgraph:test affected-selector: name: Affected-check Selector @@ -136,6 +131,19 @@ jobs: # The selector is fail-open and advisory (GitHub CI stays authoritative), # so the gate only guards the derivation model. Invoked directly with no # deps, mirroring the layering guard. + # + # Kept as an inline `node` invocation rather than `pnpm check:affected:test` + # deliberately (#1462): R8's zero-dep-job closure check (scripts/layering/ + # zero-dep-jobs.ts) discovers each zero-dep job's entry scripts by matching + # literal `scripts/**/*.test.ts` paths inside the `run:` block. A bare pnpm + # script name has no such path, so the scan would find zero entries and + # check.ts fails closed on that (`no entry script was found in its run + # steps`) rather than silently exempting the job — see the model.test.ts + # case "a job with no recognizable entry script is reported rather than + # exempted". pnpm itself is provisioned regardless of this choice; R8 + # polices `pnpm install`, not the invocation style, so this is not a + # `pnpm install` for the job — the entry-detection regex is the actual + # constraint here. - name: Check affected-selector model run: node --experimental-strip-types --test scripts/check-affected/model.test.ts scripts/check-affected/run.test.ts diff --git a/.github/workflows/conformance-regenerate.yml b/.github/workflows/conformance-regenerate.yml index abeaaebc9..9f6c753fd 100644 --- a/.github/workflows/conformance-regenerate.yml +++ b/.github/workflows/conformance-regenerate.yml @@ -49,7 +49,7 @@ jobs: # Verifies the pinned jar SHA-256s against pinned-upstream.json, runs the # harness over the corpus, and rewrites fixtures/ + corpus/manifest.json. - name: Regenerate fixtures from pinned upstream - run: node scripts/maestro-conformance/regenerate.mjs + run: pnpm maestro:conformance:regenerate - name: Fail if regeneration changed anything run: | From fdc61328ea0aa9d0dfeecd1ac120419e6f14492b Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 28 Jul 2026 15:46:31 +0000 Subject: [PATCH 2/3] ci: teach R8 to resolve pnpm script names, drop affected-selector's inline copy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit R8's zero-dep-job entry scan matched literal script paths in a run: block, so a bare `pnpm