Repository navigation
refactor(tests): remove duplicate Mistral cache-cost test - #143172
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 9, 2026, 10:34 AM ET / 14:34 UTC. ClawSweeper reviewWhat this changesRemoves a redundant Mistral cached-token cost test while retaining the model pricing and catalog checks. Merge readiness✅ Ready for maintainer review Keep open as a sound, maintainer-requested cleanup. The retained pricing assertion subsumes the removed case, and shared tests exercise real cost arithmetic. No actionable defect was found; the cleanup is still absent from current main. Priority: P3 Review scores
Verification
How this fits togetherThe Mistral plugin supplies model definitions and prices to OpenClaw. Its tests verify those prices, while shared usage-cost tests verify conversion of token counts into estimated costs. flowchart LR
A[Mistral catalog metadata] --> B[Model definition builder]
B --> C[Retained pricing assertions]
B --> D[Model prices]
E[Token usage] --> F[Shared cost calculator]
D --> F
F --> G[Estimated usage cost]
F --> H[Shared arithmetic tests]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests -9. Total -9 across 1 file. View PR surface stats
Review metricsNone. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep exact provider-price contracts in the Mistral tests and arithmetic coverage at the shared calculator boundary. Do we have a high-confidence way to reproduce the issue? Not applicable: this removes redundant test coverage rather than fixing a runtime defect; source inspection establishes the overlap. Is this the best way to solve the issue? Yes. Removing the test-local calculation preserves the stricter model-price assertion and the shared calculator's behavioral coverage. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 5cc68a7a345b. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
…er-ownership-20260909 * origin/main: (147 commits) fix(cli): reject blank account selectors before command startup (#143088) fix(update): repair young runs after recorded drivers exit (#143136) test(telegram): close model callback fixture connections (#143197) improve(test): reduce Telegram policy fixture startup overhead (#143192) test(ci): stabilize systemd manager shim timing (#143134) fix(test): retire chat preview Escape listeners during teardown (#143191) test(memory-wiki): share visibility test callbacks (#143181) fix(ci): accept native iOS keychain filenames (#142968) fix(ci): show publication observations in FRV status (#143171) fix(github): point the stuck-FAQ auto-response at a live anchor (#143194) docs: correct verified accuracy defects in CLI, tools, and automation pages (#143179) refactor(tests): remove duplicate Mistral cache-cost test (#143172) fix(doctor): complete canonical model-reference migration (#142284) fix(ci): reject stale and empty timing sample cohorts (#143182) fix(ui): remove first-reply confetti from chat (#143167) docs: split help/faq into 13 topic pages (#143150) refactor(docs): require caller-owned route indexes (#143164) fix(android): distinguish connection status from chat readiness (#143128) refactor: share agent-turn execution test defaults (#143166) fix(cli): print immutable-config refusals without crash framing (#143140) ...
Related: #139428
Additional instructions
MUST: Keep Allow edits from maintainers enabled for this PR so maintainers
can help update the branch when needed.
What Problem This Solves
This maintainer-requested test cleanup removes a redundant Mistral cache-cost
arithmetic case. It repeats pricing already checked through the actual model
builder and arithmetic covered by the shared usage-cost tests.
Why This Change Was Made
Remove only the cached-token arithmetic case and its separator. Retain the model
builder's full pricing contract, including
cacheRead: 0.05, the catalog ratiotest, the curated catalog test, and every import and helper.
The shared calculator tests retain ten-decimal cached-token bucket and tier
assertions, including the one-hour cache-write subset. The default-precision
flat-cost case is not the basis for this removal.
User Impact
No runtime or user-visible behavior changes. One test case and nine lines are
removed; production code, pricing, timeouts, and workflows are unchanged.
Evidence
through the normal Vitest wrapper: 3 Mistral tests plus 24 cost tests, 27 actual
passes and no skips.
git diff --checkpassed.and one successful normal retry of the final lint step. The initial aggregate
command failed when its declaration-input guard detected a changed input; that
original failure is preserved, not relabeled as a passing command.
command with exit 0. A separate evidence collector's missing-banner assertion
was reconciled from the wrapper and CLI execution/exit propagation; it was not
another lint failure. The original input-change cause remains unresolved.
This is focused local proof, not a full-suite or live-provider claim. Exact-head
hosted CI remains a separate landing requirement.