← Back to PRs

#21282: test(cron): fix missing attempts property in ModelFallbackRunResult mock

by kittipond2365 open 2026-02-19 21:41 View on GitHub →
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