Files
Strata/tests/split
Niko1221 018f0d659c serve: the budget's passes hand the engine the caller's own sampler; the hold is classified for the split engine
Two red tests that round 18's full py-serve / py-tests run found on this branch, both from be101072b (P2):

1. serve/test_reasoning_loop_recovery.py::test_frozen_cohort_sampler_is_unchanged_during_recovery asserts that the engine is handed the caller's own sampling object on every pass. P2 made every pass hand it a copy (pass_sampling = {k: v ... if k != HOLD_KEY}). Now the engine gets `sampling` itself when this pass adds no hold and `sampling` carries no HOLD_KEY; a copy is made only when the pass adds the hold or has to strip a key the caller's dict carries. The old test is untouched. New tests beside the hold tests (serve/test_thinking_hold.py, SamplerObject): no hold -> the engine receives the same object on every pass (with a budget, and with a --batch engine that does not say holdb) and the caller's dict is not mutated; a hold added -> the first pass gets a copy with the key, the answer pass none, the caller's dict has no HOLD_KEY and is not mutated; a HOLD_KEY in the caller's dict is stripped from a copy and left in the caller's dict. The failure was shown first on 77c344bdd and b92075d92 (one-test runs through ltest on p2006) and not on 9bef5255d.

2. tests/split/test_split_gen_keys.py::test_every_key_the_server_can_send_is_classified: `hold` was a GEN key the server sends that nobody classified for the split engine. It is now in OTHER_ENGINES with the reason: the server sends it only to an engine whose READY line says "hold" (a --batch engine: also "holdb"); generate.cpp prints "READY <ctx> stop hold holdb" and the split engine (src/split/tools/sfnx.cpp) prints "READY <ctx> stop", so it is never sent the key. Sent to it anyway, parse_gen ends the request with "GEN: unknown key hold" (an error in the middle of a reply), so the server also keeps the hold from an engine it knows to be a split engine by name (StrataEngine.split_engine), whatever its READY said (a new test in test_thinking_hold.py). A new test in test_split_gen_keys.py reads the READY literals of both engines and the parser's key list; server_keys() also collects P2b's per-leg hold (`keys0 + f" hold=`).

Lane AGENT-TURN.
2026-11-11 22:09:27 +01:00
..