Private
Public Access
feat(directives): scavenge sweep 3/5 (docs/reports/2026-06-08): 6 directives
Lifted: - test_instantiation_not_mock_away: tests must exercise actual instantiation, not mock away the constructor (caught the MiniMax 401 regression) - preserve_prior_versions_of_review_docs: when iterating on a review, preserve prior versions as separate files (v2/v2.1/v2.2/v2.3) - neutral_language_for_doc_drift: doc-drift fixes use 'predates/stale/ outdated', not 'fictional' (value judgment, not technical description) - preserve_before_compact_archive: at 80%+ context, write a comprehensive session-synthesis archive before compaction - user_corrections_log_in_state_toml: per-track state.toml has a user_corrections_log section for any reviewed-by-user track - surface_dirty_state_in_test_runner: when subprocess is dead/degraded, print a clear [BATCH-WARN] rather than silent timeout
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
# test_instantiation_not_mock_away
|
||||
|
||||
## v1
|
||||
|
||||
**Why this iteration:** Lifted from `docs/reports/2026-06-08/TEST_REGRESSION_ANALYSIS_MINIMAX_OPENAI_20260613.md` §"Why the Tests Missed the Regressions". The MiniMax / OpenAI-compatible shim regressions (401 from mismatched base URLs, NameError on missing module, type mismatches on the new Result wrapper) all hid behind `with patch("src.ai_client._ensure_minimax_client", return_value=MagicMock())`. Patching out the entire initialization function means the test never executes the actual code that constructs the client, looks up the base URL, or validates the API key. The fix per the report: invoke `_ensure_minimax_client()` directly and assert on the exact arguments to `openai.OpenAI()`.
|
||||
**Source:** `docs/reports/2026-06-08/TEST_REGRESSION_ANALYSIS_MINIMAX_OPENAI_20260613.md:14-25` + §"Test Hardening Steps Taken" items 1-2
|
||||
|
||||
---
|
||||
**Lifted:** 2026-07-03 (scavenge sweep batch 3/5: docs/reports/2026-06-08)
|
||||
@@ -0,0 +1 @@
|
||||
# Tests must exercise the actual instantiation code paths instead of mocking the constructors away
|
||||
Reference in New Issue
Block a user