Commit d310828
fix(tests): make CI-environment-independent
Two test fixes that were silently passing locally because of dev-machine
artifacts but failing on clean CI runners:
1. tests/test_project_manager.py used a hardcoded "/tmp/proj" path. On
clean Linux/macOS/Windows CI runners this path doesn't exist, so
`Path("/tmp/proj").is_dir()` returned False and the live-session and
last-session-derivation code paths in `list_projects` were silently
skipped, causing the assertions to compare against the wrong values.
Locally the path happened to exist (e.g. U:\tmp\proj on the dev box)
making the test pass for the wrong reason. Fixed by using a real
`tempfile.TemporaryDirectory()` in setUp / tearDown.
2. test_ollama_embedding_path_used_when_available depends on numpy,
which oracle/services/federated_graph.py lazy-imports. numpy was in
the [vector] extra but not in [dev], so CI couldn't exercise the
embedding similarity path. Added numpy + scikit-learn to [dev] so
the CI matrix tests the production code paths end-to-end.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 1377606 commit d310828
2 files changed
Lines changed: 21 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
71 | 75 | | |
72 | 76 | | |
73 | 77 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
25 | 36 | | |
26 | 37 | | |
27 | 38 | | |
| |||
47 | 58 | | |
48 | 59 | | |
49 | 60 | | |
50 | | - | |
51 | | - | |
| 61 | + | |
| 62 | + | |
52 | 63 | | |
53 | 64 | | |
54 | 65 | | |
| |||
64 | 75 | | |
65 | 76 | | |
66 | 77 | | |
67 | | - | |
| 78 | + | |
68 | 79 | | |
69 | 80 | | |
70 | 81 | | |
| |||
86 | 97 | | |
87 | 98 | | |
88 | 99 | | |
89 | | - | |
| 100 | + | |
90 | 101 | | |
91 | 102 | | |
92 | 103 | | |
| |||
103 | 114 | | |
104 | 115 | | |
105 | 116 | | |
106 | | - | |
| 117 | + | |
107 | 118 | | |
108 | 119 | | |
109 | 120 | | |
110 | 121 | | |
111 | 122 | | |
112 | 123 | | |
113 | 124 | | |
114 | | - | |
| 125 | + | |
115 | 126 | | |
116 | 127 | | |
117 | 128 | | |
| |||
0 commit comments