You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test(warmup): stop the json contract test from downloading models - #703
warmup-setup-json-contract.test.ts runs runWarmup(['--all', '--json']) without the reranker and embedding mocks that warmup.test.ts has. So the unit test loads the real models and downloads them from the network into /tmp/test-wigolo-warmup when they are not cached. On CI that is every run, and it is the 20s timeout seen on the windows unit job (PR runs on 10-31 and 11-10, "dtype not specified for model" in the test's stderr).
This PR adds the same two mocks as warmup.test.ts. The assertions are unchanged.
Tested with the cache dir removed: on main the file takes 19s and leaves 162MB of models in /tmp/test-wigolo-warmup. On this branch it takes 2s and writes nothing there. All 3 tests pass.
The earlier red ubuntu x64 jobs failed at npm ci on the onnxruntime CUDA download (404). That is fixed on main by #705, and this branch now includes it.
Summary by CodeRabbit
Tests
Updated warmup CLI tests to use mocked model providers, preventing network downloads during test runs.
No actionable comments were generated in the recent review.
Walkthrough
The warmup CLI contract test now mocks the reranker and FastEmbed providers. The mocks provide fixed model identifiers and minimal results, so the test does not download models from the network.
KnockOutEZ/wigolo#675: Reports a timeout in the same test. The cause may be related to loading real models, but the available evidence does not confirm this.
Merge Risk: Minimal · up to 47a0a
This change only stops a warmup contract test from downloading models, making it faster and offline-safe. It does not touch production behavior, and there is no remaining merge risk.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title states the main change: the warmup JSON contract test no longer downloads models. The raw summary confirms the test now mocks the reranker and FastEmbed providers, which prevents network mod…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Full details: Title check
Explanation
The title states the main change: the warmup JSON contract test no longer downloads models. The raw summary confirms the test now mocks the reranker and FastEmbed providers, which prevents network model downloads in the --all test. The title uses the conventional test(scope) prefix and is specific enough for a teammate scanning history.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
File: No configuration file from this repository applied
Commit: Unavailable
Layers: defaults
Review profile: CHILL
Plan: Advanced
Run ID: ab7ffee9-9503-428c-9ef8-dd0eb5255bd0
Commits
Reviewing files that changed from the base of the PR and between 5698c88 and 47a0a86.
Files selected for processing: 1
tests/unit/cli/warmup-setup-json-contract.test.ts
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
warmup-setup-json-contract.test.tsrunsrunWarmup(['--all', '--json'])without the reranker and embedding mocks thatwarmup.test.tshas. So the unit test loads the real models and downloads them from the network into/tmp/test-wigolo-warmupwhen they are not cached. On CI that is every run, and it is the 20s timeout seen on the windows unit job (PR runs on 10-31 and 11-10, "dtype not specified for model" in the test's stderr).This PR adds the same two mocks as
warmup.test.ts. The assertions are unchanged.Tested with the cache dir removed: on main the file takes 19s and leaves 162MB of models in
/tmp/test-wigolo-warmup. On this branch it takes 2s and writes nothing there. All 3 tests pass.The earlier red ubuntu x64 jobs failed at
npm cion the onnxruntime CUDA download (404). That is fixed on main by #705, and this branch now includes it.Summary by CodeRabbit