Commit c7e2e6f
feat(platform): declare Windows + macOS support (classifiers, CI matrix, README) (#371)
* feat(platform): declare Windows + macOS support (classifiers, CI matrix, README)
Audit confirmed the tool already runs cross-platform — every native dependency
ships win_amd64 wheels (cocoindex, ladybug/kuzu, lancedb) and the Python path
is portable (pathlib, copy-based install, list-arg subprocess, RLIMIT_NOFILE
no-op on Windows) — but nothing declared or verified it. This closes the gap.
- pyproject.toml: add Operating System classifiers for Linux/macOS/Windows
- .github/workflows/test.yml: 3-OS matrix (ubuntu/macos/windows-latest).
Ubuntu remains the required merge gate; macOS + Windows run on every
code-change PR but are continue-on-error until each is observed green
across several merges (the fast suite exercises the native kuzu/ladybug
graph layer, never before run on these OSes). fail-fast: false.
- README.md: portable smoke-test paths (/tmp/bank-chat-index ->
tmp/bank-chat-index, gitignored + works in any shell/OS), a Linux/macOS/
Windows line in Install, and a Git Bash/WSL note for the POSIX snippets.
No .py files modified; runtime behavior is unchanged.
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(windows): guard resource import + close ladybug Database handles
The Windows CI leg added in #371 surfaced two real product bugs that left
the tool non-functional on Windows.
1. _fdlimit.py imported `resource` at module scope. `resource` is Unix-only,
so the import raised ModuleNotFoundError on Windows — and because both
cli.py and server.py import raise_fd_limit, the entire CLI and MCP server
failed to start. Guard the import (try/except -> None); raise_fd_limit
already no-ops when RLIMIT_NOFILE is absent. test_fd_limit is skipped on
win32 (it asserts Unix rlimit behaviour).
2. build_ast_graph.py never called db.close(): all 8 cleanup paths in
incremental_rebuild + write_ladybug closed the Connection but leaked the
Database handle. Windows uses mandatory file locking, so the leaked handle
holds the .lbug lock and the next open fails with "Error 33: another
process has locked a portion of the file." This broke real init/increment
on Windows, not just tests. Add db.close() after every conn.close(); same
leak fixed in 4 tests that opened their own handle.
Verified locally: 53 affected tests pass on macOS (serial) — no regression.
Windows is the CI matrix's job.
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(windows): atomic config write, graceful erase EOF, cross-platform path tests
Second Windows run (after the resource/db.close fixes) failed 12 — all resolved:
Product:
- installer.py: os.rename -> os.replace for the atomic config write. On
Windows os.rename raises WinError 183 when the target already exists, so
install/update broke whenever the config file was present (the normal case).
os.replace is atomic on both platforms.
- cli.py erase: catch EOFError from input() and treat it as a non-interactive
refusal. The Windows NUL device reports isatty()==True (it's a character
device), so the non-TTY guard is bypassed and input() crashed with an EOF
traceback; now it prints the refusal and exits 2.
Tests (Unix path assumptions — the suite had never run on Windows before):
- test_incremental_graph: pair db.close() with conn.close() in the one
remaining orchestrator test (still leaking the Database handle -> Error 33).
- test_config / test_java_codebase_rag_cli: set USERPROFILE alongside HOME
(Path.home()/expanduser read %USERPROFILE% on Windows), compare paths via
Path equality instead of raw strings (forward/back-slash mismatch), and
resolve-both-sides for the drive-relative YAML source_root assertions.
Verified locally: 122 affected tests pass on macOS (serial). Windows re-run pending.
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent d1691db commit c7e2e6f
13 files changed
Lines changed: 85 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
12 | 24 | | |
13 | 25 | | |
14 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
95 | 97 | | |
96 | 98 | | |
97 | 99 | | |
98 | 100 | | |
99 | | - | |
| 101 | + | |
100 | 102 | | |
101 | 103 | | |
102 | 104 | | |
103 | | - | |
| 105 | + | |
104 | 106 | | |
105 | 107 | | |
106 | 108 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3816 | 3816 | | |
3817 | 3817 | | |
3818 | 3818 | | |
| 3819 | + | |
3819 | 3820 | | |
3820 | 3821 | | |
3821 | 3822 | | |
3822 | 3823 | | |
3823 | 3824 | | |
3824 | 3825 | | |
3825 | 3826 | | |
| 3827 | + | |
3826 | 3828 | | |
3827 | 3829 | | |
3828 | 3830 | | |
| |||
3841 | 3843 | | |
3842 | 3844 | | |
3843 | 3845 | | |
| 3846 | + | |
3844 | 3847 | | |
3845 | 3848 | | |
3846 | 3849 | | |
| |||
3859 | 3862 | | |
3860 | 3863 | | |
3861 | 3864 | | |
| 3865 | + | |
3862 | 3866 | | |
3863 | 3867 | | |
3864 | 3868 | | |
| |||
3893 | 3897 | | |
3894 | 3898 | | |
3895 | 3899 | | |
| 3900 | + | |
3896 | 3901 | | |
3897 | 3902 | | |
3898 | 3903 | | |
| |||
3977 | 3982 | | |
3978 | 3983 | | |
3979 | 3984 | | |
| 3985 | + | |
3980 | 3986 | | |
3981 | 3987 | | |
3982 | 3988 | | |
| |||
3996 | 4002 | | |
3997 | 4003 | | |
3998 | 4004 | | |
| 4005 | + | |
3999 | 4006 | | |
4000 | 4007 | | |
4001 | 4008 | | |
| |||
4200 | 4207 | | |
4201 | 4208 | | |
4202 | 4209 | | |
| 4210 | + | |
4203 | 4211 | | |
4204 | 4212 | | |
4205 | 4213 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
26 | 34 | | |
27 | 35 | | |
28 | 36 | | |
| |||
35 | 43 | | |
36 | 44 | | |
37 | 45 | | |
38 | | - | |
| 46 | + | |
39 | 47 | | |
40 | 48 | | |
41 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
632 | 632 | | |
633 | 633 | | |
634 | 634 | | |
635 | | - | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
636 | 646 | | |
637 | 647 | | |
638 | 648 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
536 | 536 | | |
537 | 537 | | |
538 | 538 | | |
539 | | - | |
| 539 | + | |
540 | 540 | | |
541 | 541 | | |
542 | 542 | | |
| |||
1258 | 1258 | | |
1259 | 1259 | | |
1260 | 1260 | | |
1261 | | - | |
| 1261 | + | |
1262 | 1262 | | |
1263 | 1263 | | |
1264 | 1264 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
24 | 27 | | |
25 | 28 | | |
26 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
| 154 | + | |
154 | 155 | | |
155 | 156 | | |
156 | 157 | | |
| |||
212 | 213 | | |
213 | 214 | | |
214 | 215 | | |
215 | | - | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
216 | 219 | | |
217 | | - | |
| 220 | + | |
218 | 221 | | |
219 | 222 | | |
220 | 223 | | |
| |||
297 | 300 | | |
298 | 301 | | |
299 | 302 | | |
300 | | - | |
301 | | - | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
302 | 306 | | |
303 | 307 | | |
304 | 308 | | |
| |||
449 | 453 | | |
450 | 454 | | |
451 | 455 | | |
| 456 | + | |
452 | 457 | | |
453 | 458 | | |
454 | 459 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
| 221 | + | |
221 | 222 | | |
222 | 223 | | |
223 | 224 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
14 | 18 | | |
15 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
16 | 28 | | |
17 | 29 | | |
18 | 30 | | |
| |||
0 commit comments