mirror of
https://github.com/deepseek-ai/deepseek-harness
synced 2026-08-15 21:04:50 +00:00
ci: rebalance hosted concurrency budget
This commit is contained in:
@@ -14,7 +14,7 @@ The artifact boundary remains load-bearing. `publint`, `verify-node-next-types`,
|
||||
|
||||
[CI](../../../../.github/workflows/ci.yml) treats one minute for non-Windows jobs and three minutes for Windows jobs as observed performance targets, not cancellation deadlines. Hosted-runner variance should leave complete timing evidence and useful failure logs instead of cancelling an otherwise-correct gate. The [serial cross-platform CI reference](2026-07-21-serial-cross-platform-ci-reference.md) independently runs the complete unsharded primary Node aggregate on Linux, macOS, and Windows so the optimized lane inventory is not its own completeness oracle.
|
||||
|
||||
[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 ownership and rejects a missing or duplicate gate assignment; low-cost ownership groups may share one hosted lane to stay below the runner-provisioning concurrency wave. Linux lint uses disjoint A-C, D-M, N-S, and T-Z package-source and package-test lanes, while the longer Windows target uses A-M and N-Z halves; both topologies include a repository complement that still starts from `.` so a new top-level lint target cannot disappear between shards and 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. Directory filters retain a trailing separator because Vitest positional filters match substrings and would otherwise admit prefix-named sibling packages. 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.
|
||||
[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 ownership and rejects a missing or duplicate gate assignment; low-cost ownership groups may share one hosted lane to stay below the runner-provisioning concurrency wave. Linux lint uses disjoint A-C, D-M, N-S, and T-Z package-source and package-test lanes, while the longer Windows target uses one complete package-source lane and one complete package-test lane; both topologies include a repository complement that still starts from `.` so a new top-level lint target cannot disappear between shards and 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. Directory filters retain a trailing separator because Vitest positional filters match substrings and would otherwise admit prefix-named sibling packages. 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 two explicit multi-file lanes and eight 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 installs dependencies while its Linux runner installs bubblewrap, refreshing APT indexes and retrying if the hosted image's initial package install fails, then builds the shipped runtime and 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.
|
||||
|
||||
|
||||
22
.github/workflows/ci.yml
vendored
22
.github/workflows/ci.yml
vendored
@@ -45,10 +45,14 @@ jobs:
|
||||
command: pnpm run check:ci:static
|
||||
gate_concurrency: '1'
|
||||
static_shard: doc-types
|
||||
- lane: static-api-catalogs
|
||||
- lane: static-api-contracts
|
||||
command: pnpm run check:ci:static
|
||||
gate_concurrency: '4'
|
||||
static_shard: 'api-contracts,catalogs'
|
||||
static_shard: api-contracts
|
||||
- lane: static-catalogs
|
||||
command: pnpm run check:ci:static
|
||||
gate_concurrency: '4'
|
||||
static_shard: catalogs
|
||||
- lane: static-prose
|
||||
command: pnpm run check:ci:static
|
||||
gate_concurrency: '4'
|
||||
@@ -438,22 +442,12 @@ jobs:
|
||||
command: pnpm run check:ci:lint
|
||||
gate_concurrency: '1'
|
||||
eslint_cache: '1'
|
||||
lint_shard: package-sources-a-m
|
||||
- lane: lint-package-sources-n-z
|
||||
command: pnpm run check:ci:lint
|
||||
gate_concurrency: '1'
|
||||
eslint_cache: '1'
|
||||
lint_shard: package-sources-n-z
|
||||
lint_shard: package-sources
|
||||
- lane: lint-package-tests
|
||||
command: pnpm run check:ci:lint
|
||||
gate_concurrency: '1'
|
||||
eslint_cache: '1'
|
||||
lint_shard: package-tests-a-m
|
||||
- lane: lint-package-tests-n-z
|
||||
command: pnpm run check:ci:lint
|
||||
gate_concurrency: '1'
|
||||
eslint_cache: '1'
|
||||
lint_shard: package-tests-n-z
|
||||
lint_shard: package-tests
|
||||
- lane: lint-repository
|
||||
command: pnpm run check:ci:lint
|
||||
gate_concurrency: '1'
|
||||
|
||||
@@ -44,20 +44,12 @@ describe('lint gate shards', () => {
|
||||
eslintTargets: ['packages/[t-z]*/*/tests/**/*.ts'],
|
||||
includeDuplication: false,
|
||||
})
|
||||
expect(selectLintShard('package-sources-a-m')).toEqual({
|
||||
eslintTargets: ['packages/[a-m]*/*/src/**/*.ts'],
|
||||
expect(selectLintShard('package-sources')).toEqual({
|
||||
eslintTargets: ['packages/*/*/src/**/*.ts'],
|
||||
includeDuplication: false,
|
||||
})
|
||||
expect(selectLintShard('package-sources-n-z')).toEqual({
|
||||
eslintTargets: ['packages/[n-z]*/*/src/**/*.ts'],
|
||||
includeDuplication: false,
|
||||
})
|
||||
expect(selectLintShard('package-tests-a-m')).toEqual({
|
||||
eslintTargets: ['packages/[a-m]*/*/tests/**/*.ts'],
|
||||
includeDuplication: false,
|
||||
})
|
||||
expect(selectLintShard('package-tests-n-z')).toEqual({
|
||||
eslintTargets: ['packages/[n-z]*/*/tests/**/*.ts'],
|
||||
expect(selectLintShard('package-tests')).toEqual({
|
||||
eslintTargets: ['packages/*/*/tests/**/*.ts'],
|
||||
includeDuplication: false,
|
||||
})
|
||||
expect(selectLintShard('repository')).toEqual({
|
||||
@@ -72,20 +64,15 @@ describe('lint gate shards', () => {
|
||||
})
|
||||
})
|
||||
|
||||
it('assigns every package group once in the Linux and Windows topologies', () => {
|
||||
it('assigns every package group once in the Linux topology', () => {
|
||||
const groups = readdirSync(packagesRoot, { withFileTypes: true })
|
||||
.filter(entry => entry.isDirectory())
|
||||
.map(entry => entry.name)
|
||||
.sort()
|
||||
const topologies = [
|
||||
[/^[a-c]/u, /^[d-m]/u, /^[n-s]/u, /^[t-z]/u],
|
||||
[/^[a-m]/u, /^[n-z]/u],
|
||||
]
|
||||
const ranges = [/^[a-c]/u, /^[d-m]/u, /^[n-s]/u, /^[t-z]/u]
|
||||
const assignments = ranges.flatMap(range => groups.filter(group => range.test(group))).sort()
|
||||
|
||||
for (const ranges of topologies) {
|
||||
const assignments = ranges.flatMap(range => groups.filter(group => range.test(group))).sort()
|
||||
expect(assignments).toEqual(groups)
|
||||
}
|
||||
expect(assignments).toEqual(groups)
|
||||
})
|
||||
|
||||
it('rejects an unknown lane', () => {
|
||||
|
||||
@@ -27,10 +27,8 @@ export function selectLintShard(name?: string): LintSelection {
|
||||
return { eslintTargets: ['packages/[n-s]*/*/src/**/*.ts'], includeDuplication: false }
|
||||
case 'package-sources-t-z':
|
||||
return { eslintTargets: ['packages/[t-z]*/*/src/**/*.ts'], includeDuplication: false }
|
||||
case 'package-sources-a-m':
|
||||
return { eslintTargets: ['packages/[a-m]*/*/src/**/*.ts'], includeDuplication: false }
|
||||
case 'package-sources-n-z':
|
||||
return { eslintTargets: ['packages/[n-z]*/*/src/**/*.ts'], includeDuplication: false }
|
||||
case 'package-sources':
|
||||
return { eslintTargets: ['packages/*/*/src/**/*.ts'], includeDuplication: false }
|
||||
case 'package-tests-a-c':
|
||||
return { eslintTargets: ['packages/[a-c]*/*/tests/**/*.ts'], includeDuplication: false }
|
||||
case 'package-tests-d-m':
|
||||
@@ -39,10 +37,8 @@ export function selectLintShard(name?: string): LintSelection {
|
||||
return { eslintTargets: ['packages/[n-s]*/*/tests/**/*.ts'], includeDuplication: false }
|
||||
case 'package-tests-t-z':
|
||||
return { eslintTargets: ['packages/[t-z]*/*/tests/**/*.ts'], includeDuplication: false }
|
||||
case 'package-tests-a-m':
|
||||
return { eslintTargets: ['packages/[a-m]*/*/tests/**/*.ts'], includeDuplication: false }
|
||||
case 'package-tests-n-z':
|
||||
return { eslintTargets: ['packages/[n-z]*/*/tests/**/*.ts'], includeDuplication: false }
|
||||
case 'package-tests':
|
||||
return { eslintTargets: ['packages/*/*/tests/**/*.ts'], includeDuplication: false }
|
||||
case 'repository':
|
||||
return {
|
||||
eslintTargets: [
|
||||
|
||||
Reference in New Issue
Block a user