Skip to content

Commit 4a5af15

Browse files
committed
fix: stabilize windows CI
1 parent fcece12 commit 4a5af15

4 files changed

Lines changed: 72 additions & 52 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
### Fixed
1313

14+
## [0.31.1] - 2026-04-01
15+
16+
### Fixed
17+
18+
- Relaxed Windows-only CI assumptions in the desktop runtime-layout tests so path separator differences no longer fail the test suite on `win32`.
19+
- Increased the Windows timeout budget for the concurrent CLI access regression test, avoiding false negatives from slower process startup on GitHub Actions runners.
20+
1421
## [0.31.0] - 2026-04-01
1522

1623
### Added

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@gmickel/gno",
3-
"version": "0.31.0",
3+
"version": "0.31.1",
44
"description": "Local semantic search for your documents. Index Markdown, PDF, and Office files with hybrid BM25 + vector search.",
55
"keywords": [
66
"embeddings",

test/cli/concurrency.test.ts

Lines changed: 47 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { fileURLToPath } from "node:url";
77
import { safeRm } from "../helpers/cleanup";
88

99
const PROJECT_ROOT = resolve(dirname(fileURLToPath(import.meta.url)), "../..");
10+
const CONCURRENCY_TIMEOUT_MS = process.platform === "win32" ? 20_000 : 5_000;
1011

1112
describe("CLI concurrent read/write access", () => {
1213
let testDir: string;
@@ -25,54 +26,58 @@ describe("CLI concurrent read/write access", () => {
2526
await safeRm(testDir);
2627
});
2728

28-
test("ls can open while update is running in another process", async () => {
29-
const env = {
30-
...process.env,
31-
GNO_CONFIG_DIR: join(testDir, "config"),
32-
GNO_DATA_DIR: join(testDir, "data"),
33-
GNO_CACHE_DIR: join(testDir, "cache"),
34-
};
29+
test(
30+
"ls can open while update is running in another process",
31+
async () => {
32+
const env = {
33+
...process.env,
34+
GNO_CONFIG_DIR: join(testDir, "config"),
35+
GNO_DATA_DIR: join(testDir, "data"),
36+
GNO_CACHE_DIR: join(testDir, "cache"),
37+
};
3538

36-
await Bun.$`bun src/index.ts init ${join(testDir, "notes")} --name notes`
37-
.cwd(PROJECT_ROOT)
38-
.env(env)
39-
.quiet();
39+
await Bun.$`bun src/index.ts init ${join(testDir, "notes")} --name notes`
40+
.cwd(PROJECT_ROOT)
41+
.env(env)
42+
.quiet();
4043

41-
const update = Bun.spawn({
42-
cmd: ["bun", "src/index.ts", "update", "--yes"],
43-
cwd: PROJECT_ROOT,
44-
env,
45-
stdout: "ignore",
46-
stderr: "ignore",
47-
});
44+
const update = Bun.spawn({
45+
cmd: ["bun", "src/index.ts", "update", "--yes"],
46+
cwd: PROJECT_ROOT,
47+
env,
48+
stdout: "ignore",
49+
stderr: "ignore",
50+
});
4851

49-
await Bun.sleep(50);
52+
await Bun.sleep(50);
5053

51-
const lsDuringUpdate = await Bun.$`bun src/index.ts ls --json`
52-
.cwd(PROJECT_ROOT)
53-
.env(env)
54-
.quiet()
55-
.text();
54+
const lsDuringUpdate = await Bun.$`bun src/index.ts ls --json`
55+
.cwd(PROJECT_ROOT)
56+
.env(env)
57+
.quiet()
58+
.text();
5659

57-
await update.exited;
60+
await update.exited;
5861

59-
const parsedDuringUpdate = JSON.parse(lsDuringUpdate) as {
60-
documents: Array<{ uri: string }>;
61-
meta: { total: number };
62-
};
63-
expect(parsedDuringUpdate.meta.total).toBeGreaterThanOrEqual(0);
62+
const parsedDuringUpdate = JSON.parse(lsDuringUpdate) as {
63+
documents: Array<{ uri: string }>;
64+
meta: { total: number };
65+
};
66+
expect(parsedDuringUpdate.meta.total).toBeGreaterThanOrEqual(0);
6467

65-
const lsAfterUpdate = await Bun.$`bun src/index.ts ls --json`
66-
.cwd(PROJECT_ROOT)
67-
.env(env)
68-
.quiet()
69-
.text();
68+
const lsAfterUpdate = await Bun.$`bun src/index.ts ls --json`
69+
.cwd(PROJECT_ROOT)
70+
.env(env)
71+
.quiet()
72+
.text();
7073

71-
const parsed = JSON.parse(lsAfterUpdate) as {
72-
documents: Array<{ uri: string }>;
73-
meta: { total: number };
74-
};
75-
expect(parsed.meta.total).toBe(1);
76-
expect(parsed.documents[0]?.uri).toBe("gno://notes/a.md");
77-
});
74+
const parsed = JSON.parse(lsAfterUpdate) as {
75+
documents: Array<{ uri: string }>;
76+
meta: { total: number };
77+
};
78+
expect(parsed.meta.total).toBe(1);
79+
expect(parsed.documents[0]?.uri).toBe("gno://notes/a.md");
80+
},
81+
CONCURRENCY_TIMEOUT_MS
82+
);
7883
});

test/desktop/runtime-layout.test.ts

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,20 @@ import {
77
getResourcesFolder,
88
} from "../../desktop/electrobun-shell/src/shared/runtime-layout";
99

10+
function normalizePathForAssert(path: string): string {
11+
return path.replaceAll("\\", "/");
12+
}
13+
1014
describe("desktop runtime layout helpers", () => {
1115
test("resolves packaged runtime paths inside Resources/app", () => {
12-
expect(getPackagedRuntimeDir("/App/Contents/Resources")).toBe(
13-
"/App/Contents/Resources/app/gno-runtime"
14-
);
15-
expect(getPackagedRuntimeEntrypoint("/App/Contents/Resources")).toBe(
16-
"/App/Contents/Resources/app/gno-runtime/src/index.ts"
17-
);
16+
expect(
17+
normalizePathForAssert(getPackagedRuntimeDir("/App/Contents/Resources"))
18+
).toBe("/App/Contents/Resources/app/gno-runtime");
19+
expect(
20+
normalizePathForAssert(
21+
getPackagedRuntimeEntrypoint("/App/Contents/Resources")
22+
)
23+
).toBe("/App/Contents/Resources/app/gno-runtime/src/index.ts");
1824
});
1925

2026
test("resolves bundled bun binary path for macOS and Windows", () => {
@@ -30,8 +36,10 @@ describe("desktop runtime layout helpers", () => {
3036
expect(getResourcesFolder("/App/Contents/MacOS/launcher", "darwin")).toBe(
3137
"/App/Contents/Resources"
3238
);
33-
expect(getResourcesFolder("C:\\GNO\\launcher.exe", "win32")).toBe(
34-
"C:\\GNO\\resources"
35-
);
39+
expect(
40+
normalizePathForAssert(
41+
getResourcesFolder("C:\\GNO\\launcher.exe", "win32")
42+
)
43+
).toBe("C:\\GNO\\resources".replaceAll("\\", "/"));
3644
});
3745
});

0 commit comments

Comments
 (0)