ci: fold single-grep jobs into steps, call named pnpm scripts - #1465
Conversation
- 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
Size Report
Startup median (7 runs, lower is better):
Top changed chunks: no changes in the largest emitted chunks. |
|
Blocking architecture cleanup at |
…nline copy R8's zero-dep-job entry scan matched literal script paths in a run: block, so a bare `pnpm <script>` invocation found zero entries and R8 failed closed — the reason affected-selector kept an inline node command instead of calling pnpm check:affected:test (#1462). zeroDepJobs now also resolves a pnpm script name against package.json and scans the resolved command for entry paths, so affected-selector can call the named script like every other job. Also replaced the other workflows' inlined copies of named package.json scripts (test:replay:*, perf, perf:android, maestro:conformance:differential, check:mcp-metadata, size) with their pnpm names, keeping each job's CI-specific trailing flags — found via a repo-wide sweep for any run: block whose text duplicates a scripts entry. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L67kDSTAJwaoLCwANEJFRM
|
Done in fdc6132: While auditing, I also swept every workflow for other Generated by Claude Code |
…ermi-owp5ov # Conflicts: # .github/workflows/ci.yml
|
Two blockers remain on the current head:
The direct |
…solution publish-mcp-registry.yml's job only provisions Node via actions/setup-node, never the repo's setup-node-pnpm action, so pnpm is never installed there — the earlier sweep's `pnpm check:mcp-metadata` would have broken the release path. Reverted to the direct node invocation with a comment explaining why, matching the PR's own stated rationale for leaving it alone. zeroDepJobs' pnpm-alias resolution only expanded one level: a resolved script that itself invoked another named pnpm script had its entries silently dropped from R8's closure. resolveRunEntries now recurses through chained aliases with a per-chain visited set, so a nested alias's entries are found and a cycle stops re-expanding a repeated name instead of recursing forever. Added coverage for both the chained and cyclic cases. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L67kDSTAJwaoLCwANEJFRM
|
Both confirmed and fixed in f95e307:
Generated by Claude Code |
|
Re-reviewed exact head |
|
Updated the PR body to match Generated by Claude Code |
…ermi-owp5ov # Conflicts: # .github/workflows/replays-nightly.yml
|
Merged latest
Generated by Claude Code |
|
Re-reviewed exact head 216502e. The main merge and sole replay-workflow conflict resolution are clean: the iOS simulator UDID and expanded fixture-backed E2E from main are preserved, while Android, iOS simulator/device, and macOS still route through the intended named pnpm scripts with their CI retry and artifact flags intact. Exact-head checks are green. Code review is clean and ready for human review; the documented branch-protection check-name update remains maintainer-owned follow-up. |
|
Closes #1462.
Summary
ios-runner-swift-compatandno-test-di-seams— each justcheckout+ onergassertion — into two named steps of a newstatic-checksjob, each keeping its own failure message. This removes two job-scheduling/checkout overheads and two PR status-check lines while keeping the same signal.layering-guard, replaced the inlined byte-copies ofcheck:layeringanddepgraph:testwith the named pnpm scripts (pnpm check:layering,pnpm depgraph:test), removing the silent-drift risk between the workflow andpackage.json.affected-selectornow callspnpm check:affected:test— no longer inlined. R8's zero-dep-job closure check (scripts/layering/zero-dep-jobs.ts) used to discover a job's entry scripts by matching literalscripts/**/*.test.tspaths inside therun:block, which a barepnpm <script>name has none of.zeroDepJobsnow also resolves apnpm <name>invocation againstpackage.json's own scripts and scans the resolved command for entry paths — recursively, so a resolved script that itself calls another named script still has its entries found, with a per-chain visited set so an alias cycle terminates instead of hanging. Covered by new tests: direct resolution, chained aliases, cycle safety, and "a pnpm word that names no real script resolves to nothing" (sopnpm installetc. can't be mistaken for a script name).git grep'd every workflow for otherrun:blocks duplicating apackage.jsonscript body and fixed each one to call it by name instead, keeping each job's own CI-specific trailing flags (retries, artifact paths, etc. — verifiedpnpmforwards these through unchanged):conformance-differential.yml,conformance-regenerate.yml,linux.yml,macos.yml,perf-nightly.yml(×2),replays-nightly.yml(×4),size.yml(×2).What was deliberately left alone
publish-mcp-registry.yml'snode scripts/sync-mcp-metadata.mjs --check(matchescheck:mcp-metadata) stays inlined: that job provisions Node via plainactions/setup-node, never the repo's./.github/actions/setup-node-pnpm, so pnpm is never installed there — calling the pnpm script would fail before publishing on a real release. Commented in the workflow so it isn't "fixed" again.I don't have visibility into this repo's branch protection settings from here. If
iOS Runner Swift CompatibilityorNo test-only DI seamsare configured as required status checks, those check names will disappear once this merges (replaced by a singleStatic Checksjob), and PRs could get stuck unable to satisfy an unsatisfiable required check. Please verify in Settings → Branches, and if either name is required, update the required-checks list toStatic Checksbefore or right after merging this.Verification
pnpm check:layering— passes locally (R1–R9, including R8 zero-dep-job closure, 34 tests).pnpm depgraph:test,pnpm check:affected:test— pass.pnpm format:check,pnpm lint— clean.Generated by Claude Code