Skip to content

Commit 913169d

Browse files
committed
ci: shorten VS Code test profile path
1 parent b2288ad commit 913169d

7 files changed

Lines changed: 24 additions & 5 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626

2727
env:
2828
VSCODE_TEST_VERSION: stable
29+
VSCODE_TEST_USER_DATA_DIR: ${{ runner.temp }}/kimi-vscode-test
2930

3031
steps:
3132
- name: Checkout repository
@@ -63,6 +64,7 @@ jobs:
6364

6465
env:
6566
VSCODE_TEST_VERSION: ${{ matrix.vscode }}
67+
VSCODE_TEST_USER_DATA_DIR: ${{ runner.temp }}/kimi-vscode-test
6668

6769
steps:
6870
- name: Checkout repository

‎.github/workflows/release.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ jobs:
1313
name: Package GitHub release
1414
runs-on: ubuntu-latest
1515
timeout-minutes: 15
16+
env:
17+
VSCODE_TEST_USER_DATA_DIR: ${{ runner.temp }}/kimi-vscode-test
1618
permissions:
1719
contents: write
1820

‎AGENTS.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Use `npm ci --ignore-scripts` for a clean, reproducible install. Do not replace
5858

5959
- Add unit tests for helper edge cases and metadata tests for public contract changes.
6060
- Keep `@types/vscode` pinned to the minimum version declared by `engines.vscode`.
61-
- The integration runner accepts `VSCODE_TEST_VERSION`; CI covers stable VS Code on Windows, Linux, and macOS plus the minimum supported VS Code on Linux.
61+
- The integration runner accepts `VSCODE_TEST_VERSION` and `VSCODE_TEST_USER_DATA_DIR`. CI uses a short temporary profile path to stay within macOS Unix-socket limits and covers stable VS Code on Windows, Linux, and macOS plus the minimum supported VS Code on Linux.
6262
- Never weaken tests merely to make a change pass. Update brittle exact assertions only when the public contract intentionally changes.
6363

6464
## Documentation and Releases

‎CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and
1616
- Added Biome linting and formatting checks plus stricter TypeScript compiler options
1717
- Aligned VS Code type definitions and integration coverage with the minimum supported editor version
1818
- Expanded CI coverage to Windows, Linux, macOS, and the minimum supported VS Code release
19+
- Isolated Extension Host test profiles under the runner temporary directory to avoid macOS socket-path limits
1920
- Updated repository documentation, contributor guidance, and AI-agent instructions
2021

2122
## 0.1.2 - 2026-07-25

‎docs/SECURITY_REVIEW.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Resolution:
2626
- `brace-expansion` is locked to 5.0.9 (`package-lock.json:1510`).
2727
- `fast-uri` is locked to 3.1.5 (`package-lock.json:2167`).
2828
- `npm run check:security` now audits the lockfile at high severity (`package.json:127`).
29-
- CI and release jobs run the audit before accepting or publishing artifacts (`.github/workflows/ci.yml:104`, `.github/workflows/release.yml:42`).
29+
- CI and release jobs run the audit before accepting or publishing artifacts (`.github/workflows/ci.yml:106`, `.github/workflows/release.yml:44`).
3030

3131
## Medium-Severity Findings
3232

@@ -36,8 +36,8 @@ The CI workflow referenced `actions/checkout@v7` and `actions/setup-node@v6`. Ma
3636

3737
Resolution:
3838

39-
- All checkout and Node setup steps are pinned to verified full commit SHAs, with their major release retained in same-line comments for maintainability (`.github/workflows/ci.yml:32`, `.github/workflows/ci.yml:35`, `.github/workflows/release.yml:21`, `.github/workflows/release.yml:24`).
40-
- Default workflow permissions remain read-only; only the release job receives scoped `contents: write` permission (`.github/workflows/release.yml:8`, `.github/workflows/release.yml:16`).
39+
- All checkout and Node setup steps are pinned to verified full commit SHAs, with their major release retained in same-line comments for maintainability (`.github/workflows/ci.yml:33`, `.github/workflows/ci.yml:36`, `.github/workflows/release.yml:23`, `.github/workflows/release.yml:26`).
40+
- Default workflow permissions remain read-only; only the release job receives scoped `contents: write` permission (`.github/workflows/release.yml:8`, `.github/workflows/release.yml:18`).
4141

4242
## Low-Severity Findings
4343

‎test/integration/runTest.js‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,18 @@ const { runTests } = require('@vscode/test-electron');
44
async function main() {
55
const extensionDevelopmentPath = path.resolve(__dirname, '..', '..');
66
const extensionTestsPath = path.resolve(__dirname, 'suite');
7+
const launchArgs = ['--disable-extensions'];
8+
const userDataDir = process.env.VSCODE_TEST_USER_DATA_DIR;
9+
10+
if (userDataDir) {
11+
launchArgs.push(`--user-data-dir=${userDataDir}`);
12+
}
713

814
try {
915
await runTests({
1016
extensionDevelopmentPath,
1117
extensionTestsPath,
12-
launchArgs: ['--disable-extensions'],
18+
launchArgs,
1319
version: process.env.VSCODE_TEST_VERSION || 'stable',
1420
});
1521
} catch (error) {

‎test/metadata.test.js‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ test('CI validates securely across supported platforms and editor versions', ()
156156
assert.match(workflow, /ubuntu-latest/);
157157
assert.match(workflow, /macos-latest/);
158158
assert.match(workflow, /vscode: '1\.103\.0'/);
159+
assert.match(workflow, /VSCODE_TEST_USER_DATA_DIR: \$\{\{ runner\.temp \}\}\/kimi-vscode-test/);
159160
assert.match(workflow, /cache: npm/);
160161
assert.match(workflow, /npm ci --ignore-scripts/);
161162
assert.match(workflow, /npm run check/);
@@ -166,6 +167,13 @@ test('CI validates securely across supported platforms and editor versions', ()
166167
assert.doesNotMatch(workflow, /uses: actions\/(?:checkout|setup-node)@v\d+/);
167168
});
168169

170+
test('integration runner supports a short isolated VS Code profile path', () => {
171+
const runner = readText('test/integration/runTest.js');
172+
173+
assert.match(runner, /process\.env\.VSCODE_TEST_USER_DATA_DIR/);
174+
assert.match(runner, /--user-data-dir=\$\{userDataDir\}/);
175+
});
176+
169177
test('release workflow validates, audits, packages, and publishes matching tags', () => {
170178
const workflow = readText('.github/workflows/release.yml');
171179

0 commit comments

Comments
 (0)