ci: bound hosted fanout

This commit is contained in:
Tianyi Cui
2026-07-21 21:14:55 +08:00
parent 25f9035ecd
commit 7813dbcf0f
6 changed files with 26 additions and 85 deletions

View File

@@ -17,8 +17,8 @@ export const coverageShards = [
packageRoots: ['core', 'context'],
extraTestRoots: ['packages/examples/cli-demo/tests'],
},
{ name: 'models', packageRoots: ['llm', 'compact'] },
{ name: 'sdk', packageRoots: ['sdk'] },
{ name: 'models-protocol', packageRoots: ['llm', 'compact', 'hooks/hook-protocol'] },
{ name: 'sdk-codex', packageRoots: ['sdk', 'hooks/hooks-codex'] },
{
name: 'interfaces',
packageRoots: ['ui', 'examples', 'goal'],
@@ -42,18 +42,11 @@ export const coverageShards = [
],
},
{
name: 'scripts',
packageRoots: ['support/invariants'],
name: 'session-scripts',
packageRoots: ['session-persistence', 'session-query', 'support/invariants'],
extraTestRoots: ['scripts'],
},
{ name: 'integrations', packageRoots: ['lsp', 'mcp'] },
{
name: 'session-state',
packageRoots: ['session-persistence', 'session-query'],
},
{ name: 'hook-protocol', packageRoots: ['hooks/hook-protocol'] },
{ name: 'hooks-claude', packageRoots: ['hooks/hooks-claude'] },
{ name: 'hooks-codex', packageRoots: ['hooks/hooks-codex'] },
{ name: 'integrations-claude', packageRoots: ['lsp', 'mcp', 'hooks/hooks-claude'] },
{
name: 'capabilities',
packageRoots: ['web', 'skill', 'spill', 'util', 'guard', 'todo', 'timeout'],

View File

@@ -263,8 +263,7 @@ function ciArtifactGates(): Gate[] {
builtPackageInvariantsGate(['build']),
]
if (shard === 'metadata') return metadataGates
if (shard === 'smoke-1') return [pnpmScript('build', 'build'), builtBinSmokeGate('1/2')]
if (shard === 'smoke-2') return [pnpmScript('build', 'build'), builtBinSmokeGate('2/2')]
if (shard === 'smoke') return [pnpmScript('build', 'build'), builtBinSmokeGate()]
if (shard !== undefined && shard !== '') {
throw new Error(`run-gates: unknown DSH_ARTIFACT_SHARD ${JSON.stringify(shard)}.`)
}

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: 4 },
{ length: 2 },
() => ['examples/acp-agent/tests/acp.snapshot.ts'],
))
expect(acp.map(lane => lane.scenarioShard)).toEqual(['1/4', '2/4', '3/4', '4/4'])
expect(acp.map(lane => lane.scenarioShard)).toEqual(['1/2', '2/2'])
expect([...ordinary, 'examples/acp-agent/tests/acp.snapshot.ts'].sort()).toEqual(discovered)
})

View File

@@ -16,27 +16,22 @@ export const snapshotLanes: readonly SnapshotLane[] = [
name: 'support',
files: [
'packages/sdk/scripts/tests/config.snapshot.ts',
'packages/ui/tui/tests/tui.snapshot.ts',
],
},
{
name: 'demos',
files: [
'examples/tui-agent/tests/tui.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: 4 }, (_, offset) => ({
...Array.from({ length: 2 }, (_, offset) => ({
name: `acp-${offset + 1}`,
files: ['examples/acp-agent/tests/acp.snapshot.ts'],
scenarioShard: `${offset + 1}/4`,
scenarioShard: `${offset + 1}/2`,
})),
]