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
Round 13: Clear EVAL_USE_LITELLM and TB2_CHALLENGES_DIR for full AC-1 hermeticity
Codex Round 12 review flagged two remaining constructor-time env reads
that my R12 "all 4 paths hermetic" claim missed:
Finding #1 (High): McpAtlasBenchmark.__init__ reads EVAL_USE_LITELLM
via os.getenv (mcp_atlas.py:75). A bare McpAtlasBenchmark() test is
not hermetic unless that env var is controlled.
Finding #2 (High): Terminal2Benchmark falls back to DEFAULT_CHALLENGES_DIR
which is derived from os.environ.get("TB2_CHALLENGES_DIR", ...) at
module import time (terminal2.py:23). A bare Terminal2Benchmark() test
depends on ambient env + the checkout-relative default path.
Fixes:
1. Added _clear_mcp_atlas_env(monkeypatch) helper that
monkeypatch.delenv("EVAL_USE_LITELLM", raising=False). Both
test_mcp_atlas_capability_runtime and
test_mcp_atlas_constructor_does_not_mutate_capability now call it
before fresh-importing the adapter.
2. Added _make_tb2_challenges_tree(root) helper (trivial: just mkdir).
Both test_terminal_capability_runtime and
test_terminal_constructor_variance_does_not_mutate_capability now:
- Take tmp_path + monkeypatch fixtures
- monkeypatch.delenv("TB2_CHALLENGES_DIR", raising=False) before import
- Build a temp challenges tree under tmp_path
- Pass challenges_dir= explicitly to Terminal2Benchmark(...) so the
"or DEFAULT_CHALLENGES_DIR" fallback never fires
3. Docstrings updated to cite the Codex R12 findings explicitly.
All 4 AC-1 constructor paths now control every __init__-time external
state read (imports via sys.modules stubs, env vars via
monkeypatch.delenv, filesystem paths via tmp_path + explicit kwargs).
Validation: 116 passed, 0 skipped in 0.65s (unchanged test count, all
fixes internal to 4 tests).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments