diff --git a/.agents/notes/implemented/process/2026-07-06-parallel-github-ci-gates.md b/.agents/notes/implemented/process/2026-07-06-parallel-github-ci-gates.md index f80568510e..70a8a4d2a1 100644 --- a/.agents/notes/implemented/process/2026-07-06-parallel-github-ci-gates.md +++ b/.agents/notes/implemented/process/2026-07-06-parallel-github-ci-gates.md @@ -16,7 +16,7 @@ The artifact boundary remains load-bearing. `publint`, `verify-node-next-types`, [scripts/run-gates.ts](../../../../scripts/run-gates.ts) remains the common bounded scheduler, but GitHub supplies explicit shard names for the expensive gate families. [scripts/static-shards.ts](../../../../scripts/static-shards.ts) partitions static gates into foundation, documentation-type, API-contract, catalog, prose, documentation-projection, and documentation-build lanes and rejects a missing or duplicate gate assignment. Lint uses disjoint package-source, package-test, and repository-complement lanes; the complement still starts from `.` so a new top-level lint target cannot disappear between shards, and it owns the single cross-file duplication run. [scripts/coverage-shards.ts](../../../../scripts/coverage-shards.ts) assigns every workspace package to exactly one source-coverage lane; its test expands the live package tree, so a new package makes CI red until it has an owner. Each coverage lane includes only its owned source files, repeats the exhaustive companion topology test, and runs without a preceding build because the complete coverage suite passes from a tree with every generated `lib/` removed. -Snapshot replay uses one explicit multi-file lane and four scenario partitions of the large ACP file. [scripts/snapshot-shards.ts](../../../../scripts/snapshot-shards.ts) owns that inventory, and its test discovers every file admitted by the snapshot config so a new file cannot land outside CI. Each snapshot job builds the shipped runtime while its Linux runner installs bubblewrap from the hosted image's existing package index, then runs only its assigned replay surface. CI explicitly retains the suite's bounded concurrency of five subprocesses instead of clamping it to the runner's two logical CPUs, because replay spends most of its time waiting on child protocol I/O. Fixture guards still inspect the complete ACP scenario table in every partition. Static, lint, coverage, and snapshot sharding changes only GitHub scheduling: the ordinary local package scripts still run their complete suites. +Snapshot replay uses two explicit multi-file lanes and four scenario partitions of the large ACP file. [scripts/snapshot-shards.ts](../../../../scripts/snapshot-shards.ts) owns that inventory, and its test discovers every file admitted by the snapshot config so a new file cannot land outside CI. Each snapshot job builds the shipped runtime while its Linux runner installs bubblewrap from the hosted image's existing package index, then runs only its assigned replay surface. CI explicitly retains the suite's bounded concurrency of five subprocesses instead of clamping it to the runner's two logical CPUs, because replay spends most of its time waiting on child protocol I/O. Fixture guards still inspect the complete ACP scenario table in every partition. Static, lint, coverage, and snapshot sharding changes only GitHub scheduling: the ordinary local package scripts still run their complete suites. Cold standalone documentation typechecking rebuilds the complete project-reference graph, so a dedicated documentation-type lane builds once and checks Markdown blocks against those declarations. The Linux documentation lane uses VitePress's MPA build to retain page rendering and dead-link validation inside the one-minute budget; the blocking Windows build also produces the normal production SPA, preserving the shipped-site check under its three-minute budget. @@ -26,7 +26,7 @@ Artifacts use two lanes: one metadata lane for `publint`, NodeNext declarations, Compatibility lanes run the source worker and Zstandard runtime smokes on every advertised Node line. TypeScript checks the source graph once in a dedicated primary Node 24 lane; repeating the same compiler analysis in runtime compatibility jobs added time without runtime-specific signal. -The workflow caches the pnpm store, preserves native PowerShell for Windows measurements, and retains one aggregate `all checks passed` status for branch protection. Windows reuses the three exhaustive lint partitions and groups foundation, catalog, and prose gates behind one shared runner setup; only scheduling differs from the Linux partitions. Windows build remains blocking; the wider Windows static, lint, and artifact matrix remains observational while carrying the same three-minute ceiling. +The workflow caches the pnpm store, preserves native PowerShell for Windows measurements, and retains one aggregate `all checks passed` status for branch protection. Windows reuses the three exhaustive lint partitions and groups foundation/catalog/prose plus documentation-type/API-contract gates behind shared runner setups; only scheduling differs from the Linux partitions. Windows build remains blocking; the wider Windows static, lint, and artifact matrix remains observational while carrying the same three-minute ceiling. ## Alternatives considered diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5abe8a7371..82df288a23 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -141,10 +141,16 @@ jobs: gate_concurrency: '1' coverage_max_workers: '4' coverage_shard: capabilities - - lane: snapshot-ordinary + - lane: snapshot-support command: pnpm run check:ci:snapshot gate_concurrency: '1' - snapshot_lane: ordinary + snapshot_lane: support + snapshot_max_concurrency: '5' + snapshot_prebuilt: '1' + - lane: snapshot-agents + command: pnpm run check:ci:snapshot + gate_concurrency: '1' + snapshot_lane: agents snapshot_max_concurrency: '5' snapshot_prebuilt: '1' - lane: snapshot-acp-1 @@ -352,14 +358,10 @@ jobs: command: pnpm run check:ci:static gate_concurrency: '4' static_shard: 'foundation,catalogs,prose' - - lane: static-doc-types - command: pnpm run check:ci:static - gate_concurrency: '1' - static_shard: doc-types - - lane: static-api-contracts + - lane: static-contracts command: pnpm run check:ci:static gate_concurrency: '4' - static_shard: api-contracts + static_shard: 'doc-types,api-contracts' - lane: lint-package-sources command: pnpm run check:ci:lint gate_concurrency: '1' diff --git a/scripts/snapshot-shards.ts b/scripts/snapshot-shards.ts index a72a4e0e77..179c2e1517 100644 --- a/scripts/snapshot-shards.ts +++ b/scripts/snapshot-shards.ts @@ -13,11 +13,16 @@ export interface SnapshotLane { /** Exhaustive file ownership plus scenario partitions for the large ACP suite. */ export const snapshotLanes: readonly SnapshotLane[] = [ { - name: 'ordinary', + name: 'support', files: [ 'packages/sdk/scripts/tests/config.snapshot.ts', 'packages/sdk/create-sdk/tests/create.snapshot.ts', 'packages/ui/tui/tests/tui.snapshot.ts', + ], + }, + { + name: 'agents', + files: [ 'examples/tui-agent/tests/tui.snapshot.ts', 'examples/acp-agent/tests/goal.snapshot.ts', 'examples/headless-agent/tests/headless.snapshot.ts',