GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Stabilize Docker-backed Vitest scheduling · codeabovelab/codeboost@9a0a936

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • .github/workflows
    • agent-isolation.yml
  • docs/implementation
    • agent-isolation.md
  • test
    • runner-branch-push.test.ts
    • vitest-config.test.ts
  • vitest.config.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.github/workflows/agent-isolation.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/agent-isolation.yml
+6-2Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ on:
1717
- 'runner/store.ts'
1818
- 'git/history.ts'
1919
- 'test/runner-workspace.test.ts'
20+
- 'test/vitest-config.test.ts'
21+
- 'vitest.config.ts'
2022
- '.github/workflows/agent-isolation.yml'
2123
pull_request:
2224
paths:
@@ -34,6 +36,8 @@ on:
3436
- 'runner/store.ts'
3537
- 'git/history.ts'
3638
- 'test/runner-workspace.test.ts'
39+
- 'test/vitest-config.test.ts'
40+
- 'vitest.config.ts'
3741
- '.github/workflows/agent-isolation.yml'
3842
permissions:
3943
contents: read
@@ -50,5 +54,5 @@ jobs:
5054
cache: npm
5155
- run: npm ci --ignore-scripts
5256
- run: npm run typecheck
53-
# The Docker suites share one image tag and daemon, so run test files one at a time.
54-
- run: npx vitest run --no-file-parallelism test/agent-contract.test.ts test/agent-clone.test.ts test/agent-container.test.ts test/agent-network.test.ts test/agent-policy.test.ts test/agent-proxy.test.ts test/agent-adapter.test.ts test/agent-supervisor.test.ts test/agent-output.test.ts test/agent-gate.test.ts test/agent-question.test.ts test/agent-planning.test.ts test/runner-workspace.test.ts
57+
# The Vitest projects finish ordinary tests first, then run the Docker-backed files one at a time.
58+
- run: npm test
Collapse file

‎docs/implementation/agent-isolation.md‎

Copy file name to clipboardExpand all lines: docs/implementation/agent-isolation.md
+7-5Lines changed: 7 additions & 5 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,17 @@ states what those lanes must do when they call the isolation boundary.
66

77
## Run the gate
88

9-
The gate needs a running Docker daemon. Run the suites one file at a time, because
10-
they share one image tag and one daemon:
9+
The complete gate needs a running Docker daemon:
1110

1211
```bash
13-
npx vitest run --no-file-parallelism test/agent-contract.test.ts test/agent-clone.test.ts test/agent-container.test.ts test/agent-network.test.ts test/agent-policy.test.ts test/agent-proxy.test.ts test/agent-adapter.test.ts test/agent-supervisor.test.ts test/agent-output.test.ts test/agent-gate.test.ts test/agent-question.test.ts
12+
npm test
1413
```
1514

16-
The `Agent isolation` workflow runs the same command. The main `CI` workflow skips
17-
the Docker suites so that they never run in parallel.
15+
`vitest.config.ts` finishes the ordinary test project first, then runs the Docker-backed
16+
files one at a time because they share one image tag and daemon. Use
17+
`npx vitest run --project docker` to rerun only that serial project. The `Agent isolation`
18+
workflow runs the complete gate. The main `CI` workflow skips the Docker project so that
19+
it can cover the ordinary project independently.
1820

1921
The live vendor probes need real credentials, so CI does not run them. To run them,
2022
set `CODEBOOST_RUN_AUTH_PROBES=1` and `CLAUDE_CODE_OAUTH_TOKEN`. Codex has no live
Collapse file

‎test/runner-branch-push.test.ts‎

Copy file name to clipboardExpand all lines: test/runner-branch-push.test.ts
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { chmodSync, mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync
33
import { execFileSync } from 'node:child_process';
44
import { tmpdir } from 'node:os';
55
import { join } from 'node:path';
6-
import { afterEach, describe, expect, it } from 'vitest';
6+
import { afterEach, describe, expect, it, vi } from 'vitest';
77
import { fixtureGit as git } from './fixtures/git.ts';
88
import type { PlanIdentity } from '../core/identity.ts';
99
import { GH_ENV_ALLOWLIST } from '../github/gh-env.ts';
@@ -14,6 +14,9 @@ const OWNER = '0123456789abcdef0123456789abcdef';
1414
const IDENTITY: PlanIdentity = { repositoryId: 'repo-1', taskId: 'task-1', planId: 'plan-1' };
1515
const BRANCH = 'codeboost/issue-7-task-1-0123456789abcdef', REF = `refs/heads/${BRANCH}`;
1616
const roots: string[] = [];
17+
// These are real multi-process Git integration tests. The crashed-push cases intentionally perform several clones,
18+
// bundles, remote reads and leased pushes, so five seconds is below their normal loaded runtime on development hosts.
19+
vi.setConfig({ testTimeout: 20_000 });
1720
afterEach(() => { for (const root of roots.splice(0)) rmSync(root, { recursive: true, force: true }); });
1821

1922
async function setup() {
Collapse file

‎test/vitest-config.test.ts‎

Copy file name to clipboard
+31Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import { describe, expect, it } from 'vitest';
2+
import config from '../vitest.config.ts';
3+
4+
const DOCKER_TESTS = [
5+
'test/agent-container.test.ts',
6+
'test/agent-gate.test.ts',
7+
'test/agent-network.test.ts',
8+
'test/agent-planning.test.ts',
9+
'test/agent-question.test.ts',
10+
'test/agent-supervisor.test.ts',
11+
'test/runner-workspace.test.ts',
12+
];
13+
14+
describe('Vitest scheduling', () => {
15+
it('finishes ordinary tests before running Docker-backed files one at a time', () => {
16+
const projects = (config as { test?: { projects?: Array<{ test?: Record<string, unknown> }> } }).test?.projects;
17+
expect(projects).toHaveLength(2);
18+
expect(projects?.[0]?.test).toMatchObject({
19+
name: 'parallel',
20+
include: ['test/*.test.ts'],
21+
exclude: DOCKER_TESTS,
22+
sequence: { groupOrder: 0 },
23+
});
24+
expect(projects?.[1]?.test).toMatchObject({
25+
name: 'docker',
26+
include: DOCKER_TESTS,
27+
fileParallelism: false,
28+
sequence: { groupOrder: 1 },
29+
});
30+
});
31+
});
Collapse file

‎vitest.config.ts‎

Copy file name to clipboard
+23-1Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,24 @@
11
import { defineConfig } from 'vitest/config';
2-
export default defineConfig({ test: { include: ['test/*.test.ts'] } });
2+
3+
// These files share Docker's daemon and the fixed agent-image tag. Keep them out of the ordinary worker pool so an
4+
// image build or container-heavy test cannot starve unrelated five-second tests, then run them one file at a time.
5+
const dockerTests = [
6+
'test/agent-container.test.ts',
7+
'test/agent-gate.test.ts',
8+
'test/agent-network.test.ts',
9+
'test/agent-planning.test.ts',
10+
'test/agent-question.test.ts',
11+
'test/agent-supervisor.test.ts',
12+
'test/runner-workspace.test.ts',
13+
];
14+
15+
export default defineConfig({
16+
test: {
17+
projects: [
18+
{ test: { name: 'parallel', include: ['test/*.test.ts'], exclude: dockerTests,
19+
sequence: { groupOrder: 0 } } },
20+
{ test: { name: 'docker', include: dockerTests, fileParallelism: false,
21+
sequence: { groupOrder: 1 } } },
22+
],
23+
},
24+
});

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.