ci: restore hosted lane headroom

This commit is contained in:
Tianyi Cui
2026-07-21 21:28:49 +08:00
parent 7813dbcf0f
commit ca0c9a7c48
7 changed files with 36 additions and 27 deletions

View File

@@ -244,7 +244,12 @@ function ciStaticGates(): Gate[] {
pnpmScript('constraints', 'constraints'),
pnpmScript('package-invariants', 'verify-package-invariants', { label: 'package invariants' }),
pnpmScript('cordis-config', 'verify-cordis-config', { label: 'Cordis config' }),
...docSyncLeafGates(),
pnpmScript('build', 'build'),
...docSyncLeafGates({
docTypecheckNeeds: ['build'],
docTypecheckEnv: { DSH_DOC_TYPECHECK_USE_BUILD_OUTPUT: '1' },
docsBuildScript: 'docs:build:mpa',
}),
pnpmScript('module-graph', 'verify-module-graph', { label: 'module graph' }),
pnpmScript('knip', 'knip'),
]
@@ -366,6 +371,7 @@ function hygieneLeafGates(options: { artifactNeeds?: string[] } = {}): Gate[] {
function docSyncLeafGates(options: {
docTypecheckNeeds?: string[]
docTypecheckEnv?: Record<string, string | undefined>
docsBuildScript?: 'docs:build' | 'docs:build:mpa'
} = {}): Gate[] {
const docTypecheckOptions: Partial<Gate> = {}
if (options.docTypecheckNeeds !== undefined) docTypecheckOptions.needs = options.docTypecheckNeeds
@@ -396,7 +402,7 @@ function docSyncLeafGates(options: {
label: 'documentation projection',
}),
// Keep the VitePress build itself in one gate because projection rewrites website/.generated.
pnpmScript('docs-site-build', 'docs:build', { label: 'documentation build' }),
pnpmScript('docs-site-build', options.docsBuildScript ?? 'docs:build', { label: 'documentation build' }),
pnpmScript('package-readme-limitations', 'verify-package-readme-limitations', { label: 'package README limitations' }),
]
}

View File

@@ -26,10 +26,10 @@ describe('snapshot lanes', () => {
expect(new Set(ordinary).size).toBe(ordinary.length)
expect(acp.map(lane => lane.files)).toEqual(Array.from(
{ length: 2 },
{ length: 4 },
() => ['examples/acp-agent/tests/acp.snapshot.ts'],
))
expect(acp.map(lane => lane.scenarioShard)).toEqual(['1/2', '2/2'])
expect(acp.map(lane => lane.scenarioShard)).toEqual(['1/4', '2/4', '3/4', '4/4'])
expect([...ordinary, 'examples/acp-agent/tests/acp.snapshot.ts'].sort()).toEqual(discovered)
})

View File

@@ -13,25 +13,20 @@ export interface SnapshotLane {
/** Exhaustive file ownership plus scenario partitions for the large ACP suite. */
export const snapshotLanes: readonly SnapshotLane[] = [
{
name: 'support',
name: 'ordinary',
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',
],
},
...Array.from({ length: 2 }, (_, offset) => ({
...Array.from({ length: 4 }, (_, offset) => ({
name: `acp-${offset + 1}`,
files: ['examples/acp-agent/tests/acp.snapshot.ts'],
scenarioShard: `${offset + 1}/2`,
scenarioShard: `${offset + 1}/4`,
})),
]

View File

@@ -23,7 +23,7 @@ export const staticShards = [
},
{
name: 'api-contracts',
gateIds: ['doc-typecheck', 'cordis-api', 'export-jsdoc', 'scoped-events', 'type-equivalence'],
gateIds: ['build', 'doc-typecheck', 'cordis-api', 'export-jsdoc', 'scoped-events', 'type-equivalence'],
},
{
name: 'catalogs',