Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe bootstrap command now passes loaded settings to the state-building helper. Tests use explicit settings and check provider catalog IDs and deprecated-provider entries. ChangesBootstrap State Settings
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~8 minutes Change: Other Suggested reviewers: Merge Risk: ⚪ Minimal · up to The extraction preserves production bootstrap behavior while removing machine settings from the catalog tests. This change is mergeable after normal checks. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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. Comment |
Summary
Follow-up to #684.
bootstrap_payload_exposes_every_provider_variantcalledget_bootstrap_state(), which reads the real%APPDATA%\CodexBar\settings.jsonthroughSettings::load(). On a machine where a retired provider is still enabled, the catalog had 79 entries instead of 78 and the test failed.This branch starts from
origin/mainand:get_bootstrap_statedelegates tobootstrap_state_for(Settings), same body, no behavior change; the existing test calls it withSettings::default()), cherry-picked from0cc3a38b;bootstrap_catalog_depends_only_on_supplied_settings, which pins the case that broke: with a deprecated provider (kimi-k2) enabled in the supplied settings, the catalog lists it exactly once (active count + 1), a deprecated provider that is not enabled (crossmodel) stays hidden, and building the payload twice from the same settings yields the same catalog.Neither test reads
%APPDATA%, the registry or the keyring, so the result no longer depends on the developer's installed state.Refs #684 (this PR can replace it; #684 itself is left untouched).
Upstream reference
Not applicable (test-only isolation fix in Win-CodexBar).
Ported / Deferred
Nothing deferred. Production behavior is unchanged.
Validation
Run in an isolated worktree with
CARGO_TARGET_DIR=W:\cargo-target\worker:cargo +1.98.0 fmt --all --check: cleancargo +1.98.0 clippy --workspace --all-targets -- -D warnings: passcargo +1.98.0 test -p codexbar-desktop-tauri bootstrap: 2 passedcargo +1.98.0 test -p codexbar-desktop-tauri: 463 passed, 0 failedcargo +1.98.0 test -p codexbar: 2160 passed, 0 failed, 1 ignoredAffected areas
apps/desktop-tauri/src-tauri/src/commands/bridge.rs(helper extraction) andcommands/tests.rs.UI proof
Not applicable (no UI change).
Summary by CodeRabbit