ci: add tail-lane headroom

This commit is contained in:
Tianyi Cui
2026-07-21 22:00:34 +08:00
parent 311cbe1e4c
commit e4c56b35e8
5 changed files with 69 additions and 42 deletions

View File

@@ -13,12 +13,44 @@ export interface CoverageShard {
/** Exhaustive, non-overlapping ownership of workspace packages in coverage CI. */
export const coverageShards = [
{
name: 'core',
packageRoots: ['core', 'context'],
extraTestRoots: ['packages/examples/cli-demo/tests'],
name: 'core-loop',
packageRoots: ['core/agent', 'core/agent-loop', 'core/tools'],
},
{
name: 'state-session',
packageRoots: [
'core/session',
'core/scope',
'core/system-prompt',
'context',
'session-persistence',
'session-query',
'support/invariants',
],
extraTestRoots: [
'packages/examples/cli-demo/tests',
'packages/llm/token-meter/tests',
'scripts',
],
},
{
name: 'models-integrations',
packageRoots: ['llm', 'compact', 'hooks/hook-protocol', 'lsp', 'mcp', 'hooks/hooks-claude'],
},
{
name: 'sdk-capabilities',
packageRoots: [
'sdk',
'hooks/hooks-codex',
'web',
'skill',
'spill',
'util',
'guard',
'todo',
'timeout',
],
},
{ name: 'models-protocol', packageRoots: ['llm', 'compact', 'hooks/hook-protocol'] },
{ name: 'sdk-codex', packageRoots: ['sdk', 'hooks/hooks-codex'] },
{
name: 'interfaces',
packageRoots: ['ui', 'examples', 'goal'],
@@ -29,7 +61,10 @@ export const coverageShards = [
name: 'workflow',
packageRoots: ['workflow/workflow', 'workflow/tool-workflow', 'workflow/tool-ralph'],
},
{ name: 'workflow-worker', packageRoots: ['workflow/workflow-workerthread'] },
{
name: 'workflow-worker',
packageRoots: ['workflow/workflow-workerthread'],
},
{ name: 'delegation', packageRoots: ['subagent', 'tasks'] },
{
name: 'repository',
@@ -41,16 +76,6 @@ export const coverageShards = [
'support/loader-smoke',
],
},
{
name: 'session-scripts',
packageRoots: ['session-persistence', 'session-query', 'support/invariants'],
extraTestRoots: ['scripts'],
},
{ name: 'integrations-claude', packageRoots: ['lsp', 'mcp', 'hooks/hooks-claude'] },
{
name: 'capabilities',
packageRoots: ['web', 'skill', 'spill', 'util', 'guard', 'todo', 'timeout'],
},
] as const satisfies readonly CoverageShard[]
/**

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

View File

@@ -28,10 +28,10 @@ export const snapshotLanes: readonly SnapshotLane[] = [
'examples/headless-agent/tests/headless.snapshot.ts',
],
},
...Array.from({ length: 4 }, (_, offset) => ({
...Array.from({ length: 6 }, (_, offset) => ({
name: `acp-${offset + 1}`,
files: ['examples/acp-agent/tests/acp.snapshot.ts'],
scenarioShard: `${offset + 1}/4`,
scenarioShard: `${offset + 1}/6`,
})),
]