Skip to content

Isolate bootstrap payload test from real settings - #684

Closed
Finesssee wants to merge 1 commit into
mainfrom
fix/bootstrap-payload-test-isolation
Closed

Finesssee wants to merge 1 commit into
mainfrom
fix/bootstrap-payload-test-isolation

Conversation

@Finesssee

@Finesssee Finesssee commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

bootstrap_payload_exposes_every_provider_variant called get_bootstrap_state(), which reads the real %APPDATA%\CodexBar\settings.json. A retired provider enabled there made the catalog 79 entries instead of the expected 78. get_bootstrap_state now delegates to a new bootstrap_state_for(Settings) helper (same body, no behavior change), and the test calls it with Settings::default().

Upstream reference

Not applicable (test-only isolation fix in Win-CodexBar).

Ported / Deferred

Nothing deferred. Production behavior is unchanged.

Validation

  • cargo +1.98.0 fmt --all: clean
  • cargo +1.98.0 clippy --workspace --all-targets -- -D warnings: pass
  • cargo +1.98.0 test -p codexbar-desktop-tauri bootstrap: 1 passed (on a machine whose real settings enable a retired provider)
  • cargo +1.98.0 test -p codexbar-desktop-tauri: 462 passed, 0 failed

Affected areas

Tauri shell tests and commands/bridge.rs only.

UI proof

Not applicable.

Summary by CodeRabbit

  • Refactor
    • Bootstrap state continues to reflect the app’s settings, with the state-building process now accepting settings as input.
  • Tests
    • Updated catalog checks to use default settings, with coverage of provider entries and serialized output maintained.

No user-facing behavior changes are noted.

@coderabbitai

coderabbitai Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 1a2daad8-d23b-4cb7-a35c-c0df4be3233a

📥 Commits

Reviewing files that changed from the base of the PR and between b585d48 and 0cc3a38.

📒 Files selected for processing (2)
  • apps/desktop-tauri/src-tauri/src/commands/bridge.rs
  • apps/desktop-tauri/src-tauri/src/commands/tests.rs

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The bootstrap state construction now accepts settings from its caller. The catalog test uses default settings to build its payload.

Changes

Bootstrap state

Layer / File(s) Summary
Pass settings into bootstrap state
apps/desktop-tauri/src-tauri/src/commands/bridge.rs, apps/desktop-tauri/src-tauri/src/commands/tests.rs
get_bootstrap_state passes loaded settings to bootstrap_state_for. The catalog test calls the helper with Settings::default().

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Other

Suggested reviewers: romeroej2

Merge Risk: ⚪ Minimal · up to 0cc3a

Production continues to use loaded settings, while the catalog test uses defaults. No concrete merge-blocking risk is evident.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: isolating the bootstrap payload test from real settings.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Finesssee

Copy link
Copy Markdown
Collaborator Author

Reviewed by Codex gpt-6-luna (xhigh); verified and validated by Claude

Thermo-nuclear review of #684 (bootstrap payload test isolation): no findings. bootstrap_state_for(Settings) keeps production behavior identical, and the catalog it builds depends only on the supplied settings plus static ProviderId metadata, so Settings::default() makes the test independent of installed providers, the real settings.json, env vars and credentials. Nothing to fix, no commit.

Commands run: cargo +1.98.0 test -p codexbar-desktop-tauri bootstrap (1 passed).

This was referenced Sep 30, 2026
This was referenced Oct 2, 2026
@Finesssee

Copy link
Copy Markdown
Collaborator Author

Superseded by #711, which shipped in v0.70.0 via #735. Closing.

@Finesssee Finesssee closed this Oct 3, 2026
junglesub-bot Bot pushed a commit to junglesub/Win-CodexBar that referenced this pull request Oct 4, 2026
junglesub-bot Bot pushed a commit to junglesub/Win-CodexBar that referenced this pull request Oct 4, 2026
…r team quota

build_fetch_context: the release splits the decision into a no-cookie-
domain branch and a cookie-domain match. The cookies-only-enrich branch
(Muse has the dev.meta.ai cookie domain) sits between them, cloning the
token cookie because the release reads it again for account routing. The
Cli-to-Web remap skips both session-only (Hyper) and cookies-only-enrich
providers, and the context keeps the release OpenCode Go auto_prefer_web
rule and optional_details_enabled next to browser_cookie_import.

serve/dashboard/source.rs: the release builds contexts in
provider_fetch_context() and the account loop, so the PR literals stay
out and the release literals (and the CLI fetch_context test literal) get
browser_cookie_import: false.

core/provider.rs keeps the release metric hooks next to
cookies_only_enrich_usage; provider_settings.rs keeps GitKraken and Muse
in the workspace map; commands/tests.rs keeps the nesszer#684 catalog test next
to the Muse context tests; the Muse docs section goes before the API-key
gateway providers. The Muse picker test fixture gets the release
sectionTitle field.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant