Commit 166f649
committed
ci: run strict-no-cover in scripts/test to catch stale pragmas locally
PR #2302 passed ./scripts/test (100% coverage) but failed CI when
strict-no-cover found lines marked '# pragma: no cover' that the new
test actually executed. The claim in CLAUDE.md that ./scripts/test
'matches CI exactly' was false.
Adds strict-no-cover as a final step in scripts/test. The tool
internally spawns 'uv run coverage json' without --frozen, which
rewrites uv.lock on machines with registry overrides; UV_FROZEN=1
propagates to that subprocess.
Also converts session.py:426 from 'no cover' to 'lax no cover'. The
except-handler during connection cleanup is a genuine race (stream may
or may not already be closed depending on timing), so it is
nondeterministically covered. strict-no-cover would have flagged it
intermittently on high-core machines.
CLAUDE.md now documents the fast targeted path (single test file +
strict-no-cover, ~4s, no false positives on partial runs), the three
pragma types, and the known coverage.py ->exit arc quirk with nested
async-with that only the CI matrix catches.1 parent 75a80b6 commit 166f649
3 files changed
+26
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
| 42 | + | |
40 | 43 | | |
41 | 44 | | |
42 | 45 | | |
43 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
44 | 63 | | |
45 | 64 | | |
46 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
423 | 423 | | |
424 | 424 | | |
425 | 425 | | |
426 | | - | |
| 426 | + | |
427 | 427 | | |
428 | 428 | | |
429 | 429 | | |
| |||
0 commit comments