- Command:
. .venv/bin/activate && READINESS_LIVE=1 STRICT_READY=1 READINESS_EXPECT=all_smokes_core python scripts/mvp_check.py - Failure:
tests/smoke_optional/test_agent_proxy_validation_errors.py::test_agent_proxy_headers_precedence - Root symptom: headers recorded by the tool invoker are
{}instead of request overrides ("X-Env": "B", "X-Req": "C").
tests/smoke_optional/test_agent_proxy_headers_and_errors.pyreplaceslitellm/experimental_mcp_client/mini_agent/agent_proxy.HttpToolsInvokerwith_FakeInvokerand never restores it. Because pytest runssmoke_optionaltests in a single process, the override survives into the next test and prevents the header precedence contract from being exercised with the real invoker.- Evidence:
tests/smoke_optional/test_agent_proxy_headers_and_errors.py:43-73constructs_FakeInvokerand assigns it directly toap_mod.HttpToolsInvoker.tests/smoke_optional/test_agent_proxy_validation_errors.py:15-56expectsHttpToolsInvokerto internally pass merged headers to thehttpx.AsyncClient. With the fake still active,recorded["headers"]never updates.
- Change the earlier test to use
monkeypatch.setattr(ap_mod, "HttpToolsInvoker", _FakeInvoker)so pytest restores the original class automatically. Alternatively, capture the original class and reassign it infinally. - Re-run the readiness command above; verify
all_smokes_corenow passes. - Consider adding a regression test that asserts the recorded headers contain overrides after the suite finishes, ensuring future overrides remain scoped.
scripts/mvp_check.py:560-573forces hermetic defaults (echo shim, dummy allowance) unlessND_REAL=1.- Make targets (
Makefile:262-285) only exerciseall_smokes_coreby default, meaning ND-real coverage never executes unless a developer opts in viasmokes-nd-real. - The review plan in
local/docs/01_guides/REVIEW_BUNDLE_PROMPT.mdcalls for reinstating ND-real smokes. Untilsmokes-nd-realruns in CI (with Ollama reachable) the deploy gate lacks variance coverage.
readiness.ymlstill contains duplicatedcode_loop_pythonblocks and legacyall_smokesentries; keeping the config lean will make future lane splits clearer.- The FastAPI shim’s header merge path (
litellm/experimental_mcp_client/mini_agent/agent_proxy.py:170-224) behaves correctly when the genuineHttpToolsInvokeris in place, so no shim change is required once the test isolation is fixed.
- Patch the leaking monkeypatch (see §3) and confirm strict readiness passes.
- Wire
smokes-nd-real(withND_REAL=1) into a deploy job so ND variance is restored without destabilizing PRs. - Deduplicate
readiness.ymlentries and document the lane split inPROJECT_READY.mdfor future reviewers.
Prepared: 28 Sep 2025