#21282: test(cron): fix missing attempts property in ModelFallbackRunResult mock
size: M
## Summary
Fixes TypeScript compilation error in `run.cron-model-override.test.ts` (Run 22201125149).
## Problem
The `makeSuccessfulRunResult` mock helper was missing the required `attempts` property from the `ModelFallbackRunResult<unknown>` type, causing:
```
error TS2741: Property 'attempts' is missing in type '{ result: {...}; provider: string; model: string; }'
but required in type 'ModelFallbackRunResult<unknown>'.
```
## Fix
Added `attempts: []` to the mock return value, matching the `FallbackAttempt[]` type requirement.
## Testing
- [x] `pnpm check` passes locally
- [x] TypeScript compilation succeeds for the affected test file
---
**Auto-fix triggered by:** tofu-autofix-monitor (Run 22201125149)
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
This PR adds the missing `attempts` property to the `makeSuccessfulRunResult` test helper function, fixing a TypeScript compilation error. The `ModelFallbackRunResult<T>` type requires an `attempts` array of type `FallbackAttempt[]`, and the mock was previously incomplete. The fix correctly adds `attempts: []` to match the type signature, allowing the test file to compile successfully.
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge with no risk
- Single-line fix that adds a required property to a test mock helper, resolving a TypeScript compilation error. The change is minimal, well-tested, and necessary for type compliance.
- No files require special attention
<sub>Last reviewed commit: 4942d96</sub>
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#21027: fix(tests): resolve TypeScript type errors in CLI test files
by kittipond2365 · 2026-02-19
72.9%
#17393: fix(ci): resolve TS2742 type error blocking all PRs
by miloudbelarebia · 2026-02-15
70.3%
#23594: test(tui): fix mock typing in command handler tests
by Sashamine · 2026-02-22
70.0%
#16479: fix(test): annotate vitest mock return types to resolve TS2742 port...
by colddonkey · 2026-02-14
68.7%
#21190: test(cron-cli): assert cron.update patch schedule.staggerMs on edit
by ethvilet · 2026-02-19
68.0%
#23772: fix(ci): unblock repo-wide check gate type regressions
by SmithLabsLLC · 2026-02-22
68.0%
#13626: fix(model): propagate provider model properties in fallback resolution
by mcaxtr · 2026-02-10
67.3%
#12982: fix(cron): prevent status/list from advancing overdue job nextRunAtMs
by hclsys · 2026-02-10
66.7%
#16838: fix: include configured fallbacks in model allowlist
by taw0002 · 2026-02-15
66.7%
#11349: fix(agents): do not filter fallback models by models allowlist
by liuxiaopai-ai · 2026-02-07
66.6%