KeiSeiKit-1.0/_primitives/_rust/kei-cortex/tests
Parfii-bot 95ccf56988 fix(kei-cortex/test): serial_test on env-mutating openai tests + wiremock warm-up
Previous wiremock conversion fixed the listener-lifecycle race but
left the underlying problem unsolved: `ensure_env()` mutates the
process-global ANTHROPIC_ENDPOINT, and parallel `cargo test` threads
race on that write. Manifested as 502 / "error sending request for
url …" on the first concurrent test pair under both macOS and Linux.

Annotate every #[tokio::test] in openai_loop_wiring.rs +
openai_compat.rs with `#[serial_test::serial]` — these are the only
tests that touch ANTHROPIC_ENDPOINT via shared_mock_anthropic.
serial_test enforces process-wide ordering so the env mutation +
HTTP request pair is atomic per test. All other tests stay parallel.

Stress: 5 parallel `cargo test` runs all green.
2026-05-12 22:26:42 +08:00
..
common fix(kei-cortex/test): serial_test on env-mutating openai tests + wiremock warm-up 2026-05-12 22:26:42 +08:00
auth_tests.rs KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
http_tests.rs KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
ledger_tests.rs KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
memory_nudge_smoke.rs KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
openai_compat.rs fix(kei-cortex/test): serial_test on env-mutating openai tests + wiremock warm-up 2026-05-12 22:26:42 +08:00
openai_loop_wiring.rs fix(kei-cortex/test): serial_test on env-mutating openai tests + wiremock warm-up 2026-05-12 22:26:42 +08:00
token_tracking.rs KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00