Repository navigation
Commit c160eaa
authored
ci: split CI from Release and gate publishing on the full suite (#7)
* fix(pi-repo-model): canonicalize git-derived repo roots to native real paths
Git prints slash-normalized paths on Windows, which made registry keys diverge
from Node-side paths. Resolve the root through fs.realpathSync.native so keys
stay stable and the test suite passes on the Windows CI matrix.
* ci: split CI from Release and gate publishing on the full suite
Publishing to npm is irreversible, but the Changesets release PR is opened with
the default GITHUB_TOKEN and therefore never triggers pull_request CI, so the
previous workflow could publish code that no job had verified.
- ci.yml becomes reusable (workflow_call) and splits into ubuntu-only checks
(typecheck, Effect check, lint, pack dry run), a 3-OS test matrix, and a
ci-ok summary job to use as the single required status check.
- release.yml calls that workflow as a verify job and depends on it.
- Namespace the CI concurrency group by workflow so the reusable invocation
does not cancel the standalone run for the same commit.
- Drop the global npm upgrade: Node 26 ships npm 11.19, which already supports
trusted publishing.
- Enable pnpm shellEmulator so POSIX-style env prefixes in package scripts run
on Windows, and add .gitattributes so LF-only content survives checkout there.
* fix(pi-antigravity): shorten home paths with os.homedir() instead of $HOME
Windows has no $HOME, so tool cards never collapsed the home directory to ~
there. os.homedir() resolves on every platform, which also makes the render
test pass on the Windows CI matrix.
* test(pi-repo-model): compare worktree keys against the native real path
os.tmpdir() yields an 8.3 short name on Windows (C:\Users\RUNNER~1\...), which
the JS realpathSync keeps but realpathSync.native expands. Assert against the
same canonical form the runtime produces.
* fix(pi-repo-skills,pi-image-cache): resolve paths through native real paths on Windows
pi-repo-skills carried the same registry-key bug pi-repo-model just fixed: git
prints slash-normalized roots on Windows, so keys diverged from Node-side paths.
pi-image-cache compared tmpdir() against candidates with the JS realpathSync,
which keeps 8.3 short names (RUNNER~1). A long-form clipboard path therefore
never matched the short-form temp root and was treated as a user file.
Both now canonicalize with fs.realpathSync.native, and the repo-skills test
asserts against that same form.
* test(pi-vscode-bridge): skip Unix-socket transport tests on Windows
The bridge listens on a .sock path, and Node has no Unix domain socket support
on Windows (it would need named pipes), so listen() fails with EACCES. Skip the
eight transport tests there; the 18 protocol, hunk, and copy tests still run on
every platform.
* test(pi-vscode-bridge): resolve the package root with fileURLToPath
URL.pathname returns /D:/... on Windows, so join() produced D:\\D:\\... and the
byte-for-byte copy checks failed with ENOENT.
* test(pi-subagents): isolate git fixtures from Windows CRLF and POSIX-only modes
Three separate Windows failures in this suite:
- Runner git defaults to core.autocrlf=true, so fixture checkouts came back as
'feature\r\n' and every patch-apply assertion failed. Each temporary repo now
pins core.autocrlf=false.
- Windows has no POSIX permission bits (stat().mode is always 0o666/0o444), so
the 0o700/0o600 artifact-privacy assertions cannot hold; assertPrivateMode
skips them there and documents that privacy relies on user-profile ACLs.
- The status-failure test corrupts .git/worktrees/<id>/index to force a git
error, which is not reproducible on Windows; it is now POSIX-only.
* fix(pi-subagents): resolve the worktree subdir through native real paths
git rev-parse --show-toplevel prints C:/Users/runneradmin/... on Windows, while
the caller's cwd is C:\\Users\\RUNNER~1\\... — the JS realpathSync normalizes
neither the separators nor the 8.3 short name, so relative() produced a bogus
subdir and join() placed the subagent work path outside its worktree. The patch
then looked already-applied on first apply.
realpathSync.native collapses both forms onto one canonical path.
* test(pi-background-terminals): force exit and serialize test files
On Windows the test runner intermittently lingered for minutes after all
tests passed when a spawned shell handle outlived its test. Force exit
after the suite finishes, and run files serially to sidestep the open
Node test-runner race (nodejs/node#64833) where --test-force-exit with
concurrency can silently drop verdicts.1 parent fb3955d commit c160eaa
28 files changed
Lines changed: 275 additions & 59 deletions
File tree
- .changeset
- .github/workflows
- packages
- pi-antigravity
- lib
- test
- pi-background-terminals
- pi-image-cache/lib
- pi-repo-model
- lib
- test
- pi-repo-skills
- lib
- test
- pi-subagents
- lib
- test
- pi-vscode-bridge/test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
20 | | - | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
24 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
25 | 33 | | |
26 | 34 | | |
27 | 35 | | |
| |||
39 | 47 | | |
40 | 48 | | |
41 | 49 | | |
42 | | - | |
| 50 | + | |
43 | 51 | | |
44 | 52 | | |
45 | 53 | | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | 54 | | |
50 | 55 | | |
51 | 56 | | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | 57 | | |
62 | 58 | | |
63 | 59 | | |
64 | 60 | | |
65 | 61 | | |
66 | 62 | | |
67 | | - | |
| 63 | + | |
68 | 64 | | |
69 | 65 | | |
70 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
96 | 105 | | |
97 | 106 | | |
98 | 107 | | |
| |||
0 commit comments