Repository navigation
Commit 42dac5d
fix(ci): run the real Python test suite (3 tests → 182) (#195)
## The problem
`python-test.yml` ran `pytest python/tests/` with `working-directory:
python`, which resolves to **`python/python/tests/`** — a single stale
file with 3 tests. The real suite, **`python/tests/` (24 files, 179
tests)**, was never collected. pytest exits 0 on a
valid-but-nearly-empty directory, so this failed silently.
Git history dates the split: `python/python/tests/` last changed in #59;
`python/tests/` is current through #158. **~100 PRs merged ungated** —
rollout store, async wrappers, export, ingestion.
Two further layers of silencing, each sufficient on its own:
- Only bare `pytest` was installed, never the `[tests]` extra — so
`pytest-asyncio` was absent.
- No `asyncio_mode` anywhere, so the 12 `async def` tests were
collected, never awaited, and **passed without executing a line**.
The same path bug appeared three more times: the doctest step was a
permanent no-op (an `if` on a path that never exists, plus `|| echo`),
and `ruff format --check python/` / `ruff check python/` **never linted
the 24 test files**. `.codex/.../run_ci_checks.sh` pointed at a `rust/`
directory that does not exist, so `set -e` killed it before any Python
check ran.
## CI changes
- Pin collection with `testpaths = ["tests"]` so the ambiguous relative
path cannot resurface.
- `asyncio_mode = "strict"` + `--strict-markers --strict-config` — a
mistyped marker now fails instead of silently disarming a test.
- Install `[lance-python,tests]`; lint `.` instead of `python/`; make
the doctest step real.
- Point the helper script at the real `crates/` layout.
## Turning the suite on surfaced 19 real failures
**1. Embedded `RolloutStore` silently discarded every write.** This is
the significant one. #181 made `add` durable-but-not-visible, with
visibility driven by a server-side sweeper. The embedded path has no
sweeper, and `flush()` was never exposed to Python — so:
```python
s = RolloutStore.open(d)
s.add({'id':'a','rollout_id':'t1'}) # -> {'version': 2, 'ids': ['a'], 'count': 1}
s.list() # -> [] ... and still [] after reopen
```
Data acknowledged, then unreadable forever. This PR exposes `flush()`
through the facade, PyO3, and both sync and async Python wrappers.
**2. `test_search.py`'s `DummyInner` fake had drifted** from the real
binding signature (missing `include_binary`/`include_embedding`), so all
55 tests raised `TypeError` on contact with current code.
**3. Remote rollout tests** asserted read-your-write against a server
whose default flush interval is 30s. They now set
`ROLLOUT_FLUSH_INTERVAL_SECS=1` and poll — asserting the row *arrives*
rather than pinning to the interval.
The 3 stale tests are **moved** into `python/tests/` rather than dropped
(they cover `snapshot`/`fork`/`memory://` and still pass), and the
orphaned directory is removed so nothing can silently collect it again.
## Verification
- **182 passed, 2 skipped** (179 real + 3 rescued).
- `ruff format --check .`, `ruff check .`, `pyright` — all clean.
- `cargo fmt --all -- --check` and clippy clean on the changed crates.
- Confirmed the async tests now genuinely execute by injecting a failing
assertion and watching it fail — it would not have before this change.
## Note on scope
This is deliberately scoped to *making CI honest* plus the failures that
gating surfaced. It does **not** address: publish workflows having no
`needs:` on any test job (a release cut from a red `main` ships to
PyPI/crates.io), `cargo test` covering only 2 of 8 crates and `--lib`
only, or the `DummyInner` fake asserting hardcoded literals so RRF
ranking is still never exercised. Happy to file those separately.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent ed0caaf commit 42dac5d
11 files changed
Lines changed: 152 additions & 18 deletions
File tree
- .codex/skills/ci-pr-helper/scripts
- .github/workflows
- crates/lance-context/src
- python
- python/lance_context
- src
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
| 24 | + | |
| 25 | + | |
26 | 26 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | | - | |
| 143 | + | |
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | | - | |
| 154 | + | |
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
| 160 | + | |
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | | - | |
166 | | - | |
167 | | - | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
168 | 173 | | |
169 | 174 | | |
170 | 175 | | |
| |||
198 | 203 | | |
199 | 204 | | |
200 | 205 | | |
201 | | - | |
| 206 | + | |
202 | 207 | | |
203 | 208 | | |
204 | 209 | | |
205 | 210 | | |
206 | | - | |
| 211 | + | |
207 | 212 | | |
208 | 213 | | |
209 | 214 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
67 | 88 | | |
68 | 89 | | |
69 | 90 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
63 | 73 | | |
64 | 74 | | |
65 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2579 | 2579 | | |
2580 | 2580 | | |
2581 | 2581 | | |
| 2582 | + | |
| 2583 | + | |
| 2584 | + | |
| 2585 | + | |
| 2586 | + | |
| 2587 | + | |
| 2588 | + | |
| 2589 | + | |
| 2590 | + | |
| 2591 | + | |
| 2592 | + | |
| 2593 | + | |
| 2594 | + | |
2582 | 2595 | | |
2583 | 2596 | | |
2584 | 2597 | | |
| |||
2672 | 2685 | | |
2673 | 2686 | | |
2674 | 2687 | | |
| 2688 | + | |
| 2689 | + | |
| 2690 | + | |
| 2691 | + | |
| 2692 | + | |
| 2693 | + | |
| 2694 | + | |
| 2695 | + | |
| 2696 | + | |
| 2697 | + | |
| 2698 | + | |
2675 | 2699 | | |
2676 | 2700 | | |
2677 | 2701 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2453 | 2453 | | |
2454 | 2454 | | |
2455 | 2455 | | |
| 2456 | + | |
| 2457 | + | |
| 2458 | + | |
| 2459 | + | |
| 2460 | + | |
| 2461 | + | |
| 2462 | + | |
2456 | 2463 | | |
2457 | 2464 | | |
2458 | 2465 | | |
| |||
File renamed without changes.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
601 | 601 | | |
602 | 602 | | |
603 | 603 | | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
604 | 621 | | |
605 | 622 | | |
606 | 623 | | |
| |||
619 | 636 | | |
620 | 637 | | |
621 | 638 | | |
| 639 | + | |
622 | 640 | | |
623 | 641 | | |
624 | 642 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
41 | 44 | | |
42 | 45 | | |
43 | 46 | | |
| |||
60 | 63 | | |
61 | 64 | | |
62 | 65 | | |
| 66 | + | |
63 | 67 | | |
64 | 68 | | |
65 | 69 | | |
| |||
75 | 79 | | |
76 | 80 | | |
77 | 81 | | |
| 82 | + | |
78 | 83 | | |
79 | 84 | | |
80 | 85 | | |
| |||
97 | 102 | | |
98 | 103 | | |
99 | 104 | | |
| 105 | + | |
100 | 106 | | |
101 | 107 | | |
102 | 108 | | |
| |||
121 | 127 | | |
122 | 128 | | |
123 | 129 | | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
124 | 133 | | |
125 | 134 | | |
126 | 135 | | |
| |||
160 | 169 | | |
161 | 170 | | |
162 | 171 | | |
| 172 | + | |
163 | 173 | | |
164 | 174 | | |
165 | 175 | | |
| |||
190 | 200 | | |
191 | 201 | | |
192 | 202 | | |
| 203 | + | |
193 | 204 | | |
194 | 205 | | |
195 | 206 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
46 | 65 | | |
47 | 66 | | |
48 | 67 | | |
49 | 68 | | |
50 | 69 | | |
51 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
52 | 76 | | |
53 | 77 | | |
54 | 78 | | |
| |||
59 | 83 | | |
60 | 84 | | |
61 | 85 | | |
| 86 | + | |
62 | 87 | | |
63 | 88 | | |
64 | 89 | | |
| |||
101 | 126 | | |
102 | 127 | | |
103 | 128 | | |
104 | | - | |
| 129 | + | |
105 | 130 | | |
106 | 131 | | |
107 | 132 | | |
| |||
125 | 150 | | |
126 | 151 | | |
127 | 152 | | |
128 | | - | |
| 153 | + | |
129 | 154 | | |
130 | 155 | | |
131 | 156 | | |
| |||
153 | 178 | | |
154 | 179 | | |
155 | 180 | | |
156 | | - | |
157 | | - | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
158 | 186 | | |
159 | 187 | | |
160 | 188 | | |
| |||
172 | 200 | | |
173 | 201 | | |
174 | 202 | | |
175 | | - | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
176 | 206 | | |
177 | 207 | | |
178 | 208 | | |
0 commit comments