You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test: harden the suite against tests that cannot fail
A mutation audit of all 120 tests this branch adds — each one probed by
breaking the source it covers and re-running — found fifteen that passed
against the very regression they named. Every fix below was verified by
re-running the mutation that exposed it.
One defect shape dominated: an assertion loose enough to admit the broken
value. `pytest.raises(BaseException)` also catches the TimeoutError from a
hang. `all(size <= 101)` is satisfied by the -1 that an unbounded read()
records. `pytest.raises(RequestError)` accepts every JSON-RPC error,
including the -32603 that one of these tests exists specifically to rule
out. `assert not any(...)` is satisfied by a handler that never ran.
Four tests hung rather than failed. A busy-turn regression wedged the
suite indefinitely; two subprocess prompts did the same; a slash command
that stopped reaching the host loop blocked forever. There is no
pytest-timeout plugin, so each of those stalls CI instead of reporting —
and a hung job reads as "still running", not "broken". All four are now
bounded and fail in seconds.
Coverage gaps closed: the protection guard had no negative control, so
deleting its opt-in — which turns a warning into a hard error for every
ordinary skill — left all 23 tests green. The tool_call_timeout regression
covered the new factory but not create_from_server, where the bug actually
lived. Transport validation, header copying, the legacy TOML guard, the
env-override branch, registry sorting, duplicate rejection and
case-insensitive lookup had no coverage at all.
Adapters are now closed by an autouse fixture. Forty-five were built and
thirty-eight closed, every close a last statement, so a failing assertion
abandoned the pump task, agent and SQLite handle on the shared loop — one
failure was observed cascading into unrelated failures later.
Rebased onto main, which had moved 48 commits. RELEASING.md took main's
rewritten text with the ACP facts re-applied, and picked up two package
counts main still had at four; make_release.py kept both smoke checks.
Signed-off-by: Paul Furgale <pfurgale@nvidia.com>
0 commit comments