Commit 4e58d3d
PR-N4: remove SDK conftest stub + finalize no-doubles cleanup
Final installment of the no-test-doubles cleanup. Closes the
sequence PR-N1 \u2192 N2 \u2192 N3 \u2192 N4. After PR-N4 lands, NO
test doubles implementing the verifier / engine / tokenizer
protocols remain in the Linux test tree.
What was deleted
----------------
tests/sdk/python/conftest.py
-203 lines. Contained _start_runtime / _stop_runtime helpers
that spun up an in-process gRPC server with a FakeVerifier
(later replaced by _MinimalVerifierStub in PR-N1's preview
cleanup) on a background thread. The runtime_address +
runtime_address_no_inspector fixtures are gone with it.
tests/sdk/python/test_client.py
-157 lines, 13 tests. Exercised Client + Session lifecycle
against the FakeVerifier-backed runtime.
tests/sdk/python/test_session.py
-502 lines, 33 tests. Exercised Session.append + .generate +
.info + .close end-to-end against the FakeVerifier-backed
runtime.
What was added
--------------
tests/integration/test_sdk_real.py +137 lines, 11 tests
SDK Client + Session integration tests against a real
Qwen3-0.6B-backed gRPC runtime:
- Client: create_session round-trip, eos_token_ids round-
trip, idempotent close, address property
- Session: append + generate yield tokens + metadata,
info reflects history, close returns final length,
close is locally idempotent
- End-to-end error mapping: SessionNotFoundError on
unknown id, InvalidArgumentError on max_tokens=0,
SessionClosedError on append-after-close
tests/integration/conftest.py +180 lines
- pytest_collection_modifyitems hook (auto-marks everything
under tests/integration/ with @pytest.mark.integration)
- real_speculative_engine fixture (session-scoped, Qwen3-0.6B)
- real_grpc_runtime_address fixture (session-scoped,
in-process gRPC server backed by real Qwen3-0.6B verifier
on a background thread; yields the host:port the SDK can
connect to)
tests/integration/__init__.py +0 lines (placeholder)
scripts/review_pr_n4_on_mac.sh +93 lines
Mac M4 reviewer aid running the full accumulated integration
suite (PR-E1 INV-3 + PR-N1 coordinator/generator + PR-N2
scheduler + PR-N3 http_shim/engine/tokenizer/streaming +
PR-N4 SDK).
What stays on Linux
-------------------
tests/sdk/python/test_errors.py (unchanged, 9 tests)
Pure _wrap_grpc_error mapping with synthesized
grpc.RpcError objects. Verifier-independent;
transport-only error-class translation. Stays on Linux.
CI workflow change
------------------
.github/workflows/ci.yaml: dropped kakeya.client and kakeya.session
from the --include= filter. Linux gate now covers ONLY:
inference_engine/server/{auth, config, errors, grpc_app,
metrics, schemas, proto_gen}
inference_engine/memory/*
inference_engine/scheduler/{config, session, pooled_verifier}
inference_engine/pipeline/*
inference_engine/session/store
sdks/python/kakeya/{__init__, errors}
training/repr_align/*
That's the verifier-independent boundary, frozen post PR-N4.
Final state of the no-doubles cleanup
-------------------------------------
PR-N1 (#53): retired FakeVerifier hierarchy
(tests/inference_engine/session/test_coordinator.py,
test_generator.py, test_grpc_app.py FakeVerifier-using
sections).
PR-N2 (#54): retired DeterministicEngine + DeterministicTokenizer
(tests/inference_engine/scheduler/conftest.py +
test_scheduler.py).
PR-N3 (#55): retired the HTTP shim cluster (server/conftest.py
+ 6 test files + their subtypes).
PR-N4 (this): retired the SDK conftest stub.
The integration suite at tests/integration/ now contains:
test_inv3_session_determinism_gate.py (PR-E1)
test_coordinator_real.py (PR-N1)
test_generator_real.py (PR-N1)
test_scheduler_real.py (PR-N2)
test_http_shim_real.py (PR-N3)
test_engine_real.py (PR-N3)
test_tokenizer_real.py (PR-N3)
test_streaming_real.py (PR-N3)
test_sdk_real.py (PR-N4)
Linux verification
------------------
PYTHONPATH=.:sdks/python coverage run -m pytest <Linux gate paths>:
649 passed (was 695 on main; -46 net = removed 46 SDK runtime
tests, kept 9 SDK error-mapping tests).
100% coverage on 999 stmts (was 1660 on main; -661 net stmts is
all verifier-dependent modules now integration-only).
Mac M4 evidence (REQUIRED for merge)
------------------------------------
Per ADR 0008 \u00a79: this PR's runtime correctness lives in the
integration suite. Reviewer runs:
bash scripts/review_pr_n4_on_mac.sh
git add results/platform-tests/pr-n4-mac-*
git commit -m 'Mac M4 review evidence for PR-N4'
git push
Stack
-----
PR-N4 is branched off main, independent of PR-N1 (#53) /
PR-N2 (#54) / PR-N3 (#55) at the file level. Conftests in
tests/integration/ added by N1/N2/N3/N4 are file-disjoint from
each other (each adds one fixture) but the file IS shared, so
post-merge the four contributors' fixture defs need to be
reconciled. The recommended merge order:
1. PR-N1 (verifier doubles) — adds conftest with marker hook
2. PR-N2 (engine/tokenizer doubles) — adds real_speculative_engine
3. PR-N3 (HTTP shim doubles) — uses real_speculative_engine
4. PR-N4 (this, SDK doubles) — adds real_grpc_runtime_address
If a different order lands first, the integration conftest
needs a small merge to combine fixtures.
Co-authored-by: FluffyAIcode <FluffyAIcode@users.noreply.github.com>1 parent bec3d7b commit 4e58d3d
8 files changed
Lines changed: 426 additions & 738 deletions
File tree
- .github/workflows
- scripts
- tests
- integration
- sdk/python
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
76 | 91 | | |
77 | 92 | | |
78 | 93 | | |
| |||
81 | 96 | | |
82 | 97 | | |
83 | 98 | | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | 99 | | |
95 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
96 | 106 | | |
97 | 107 | | |
98 | 108 | | |
| |||
| 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 | + | |
Whitespace-only changes.
| 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 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
0 commit comments