Commit 12b6625
test(v4_live): move write lifecycle probes to integration_live_write via CLI
Addresses Codex review finding #2 on #179: write-mutating tests were
inheriting the v4_live_read file-level marker, breaking the trust
boundary between read-only and write test suites.
- Removes test_v4_live_wordstat_lifecycle_contract_opt_in_write and
test_v4_live_forecast_lifecycle_contract_opt_in_write from
tests/test_v4_live_contracts.py (which is correctly marked v4_live_read).
- Adds test_live_draft_v4wordstat_lifecycle and
test_live_draft_v4forecast_lifecycle to tests/test_integration_live_write.py
under the integration_live_write marker.
- Rewrites them to use the CLI (via _invoke_live / CliRunner) instead of
native call_v4, matching the convention of every other live-write test
in that file.
- Drops in-test YANDEX_DIRECT_LIVE_WRITE checks — the file-level skipif
already enforces the env gate.
Verified:
pytest --collect-only -m v4_live_read tests/test_v4_live_contracts.py
→ 9 read-only tests (no lifecycle probes).
pytest --collect-only -m integration_live_write
tests/test_integration_live_write.py
→ both v4 lifecycle tests included.
env -u YANDEX_DIRECT_LIVE_WRITE pytest <…lifecycle…>
→ SKIPPED via file-level skipif.
Codex review finding #1 (bare `pytest` hits live API when profile is
active) is intentionally deferred: project decision is that v4 live
read tests should run whenever a profile is available.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>1 parent de194ac commit 12b6625
2 files changed
Lines changed: 87 additions & 70 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
423 | 423 | | |
424 | 424 | | |
425 | 425 | | |
426 | | - | |
427 | | - | |
428 | | - | |
| 426 | + | |
429 | 427 | | |
430 | 428 | | |
431 | 429 | | |
| |||
441 | 439 | | |
442 | 440 | | |
443 | 441 | | |
444 | | - | |
445 | | - | |
446 | | - | |
| 442 | + | |
447 | 443 | | |
448 | 444 | | |
449 | 445 | | |
| |||
463 | 459 | | |
464 | 460 | | |
465 | 461 | | |
466 | | - | |
467 | | - | |
468 | | - | |
| 462 | + | |
469 | 463 | | |
470 | 464 | | |
471 | 465 | | |
| |||
612 | 606 | | |
613 | 607 | | |
614 | 608 | | |
615 | | - | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
616 | 615 | | |
617 | 616 | | |
618 | 617 | | |
| |||
1251 | 1250 | | |
1252 | 1251 | | |
1253 | 1252 | | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | 206 | | |
267 | 207 | | |
268 | 208 | | |
| |||
0 commit comments