Repository navigation
test(crestodian): preserve model input exports in mocks - #103999
Conversation
c79b371 to
1046864
Compare
|
Codex review: needs maintainer review before merge. Reviewed July 10, 2026, 8:14 PM ET / July 11, 2026, 00:14 UTC. Summary PR surface: Tests +2. Total +2 across 2 files. Reproducibility: yes. Current-main CI logs show missing real exports after a Crestodian full mock is loaded, and source inspection identifies both mocks that replace the complete module namespace. Review metrics: none identified. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Next step before merge
Security Review detailsBest possible solution: Land the typed partial mocks after exact-head checks complete, retaining the real module contract while isolating only primary-model resolution in these tests. Do we have a high-confidence way to reproduce the issue? Yes. Current-main CI logs show missing real exports after a Crestodian full mock is loaded, and source inspection identifies both mocks that replace the complete module namespace. Is this the best way to solve the issue? Yes. Preserving the actual module and overriding only the function under test is the narrowest maintainable solution and matches Vitest’s runtime guidance and existing repository patterns. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 5f7a67f18684. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Tests +2. Total +2 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
Land-ready at exact head
No production, configuration, docs, or changelog behavior changes. |
|
Merged via squash.
|
Related: #103996
What Problem This Solves
Resolves a current-
mainCI failure where Crestodian's full mock ofconfig/model-inputleaked into unrelated suites and hid newly added exports. Whole-suite shards then failed every caller oftoAgentModelListLike, even though those callers and tests were otherwise correct.Why This Change Was Made
Both Crestodian mocks now use Vitest's partial-mock pattern: retain every real module export and override only
resolveAgentModelPrimaryValue, which is the behavior those tests intentionally isolate. This removes the brittle export allowlist without changing production code.User Impact
No product behavior changes. CI once again tests model selection, inference onboarding, and subagent model resolution instead of failing during module mock resolution.
Evidence
29131114108and fix(memory): preserve Unicode in QMD search snippets #103996 run29131384934both fail with the same missingtoAgentModelListLikeexport from these mocks.tbx_01kx76v3wggn4091s5shmsdan3: the two Crestodian suites and all three previously failing consumer suites pass together, 78/78 tests across two Vitest shards.check:changed, including core-test typechecking and lint.oxfmt,git diff --check, and fresh Codex autoreview passed; autoreview reported no actionable findings with 0.99 correctness confidence.