← Back to Pull requests

fix(setup): kernel boot honours rig setup --providers #1817

Closed
unknown closed this pull request without merging on Oct 24, 2026 02:01 UTC
View on GitHub
unknown unknown commented on Oct 23, 2026 06:32 UTC
Author

What a user gets

After rig setup --providers codex, the kernel starts with only Codex seats, even when Claude Code is also signed in. Before this, the choice wasn't saved, so the kernel picked its team from the sign-in check alone. A signed-in but exhausted Claude account then gave the person Claude seats that sat at the usage-limit menu.

The change

  • A new setting, provider.selected: claude, codex or claude,codex. It's empty when no choice was recorded. It's declared in both config stores with the same validator, it shows in the settings browser, and it has a help line and a TUI label.

  • rig setup --providers saves the choice there as a new providers_record step, for the kernel's first boot. A kernel that already exists keeps its seats, and setup says so. It also says when an OPENRIG_PROVIDER_SELECTED in its own environment takes precedence. A dry run says what it would record. Without --providers, nothing is recorded. If the save fails, setup shows a warning with the rig config set command, and readiness is unchanged.

  • Kernel boot treats a provider the person didn't choose as unavailable before it picks the team. If no chosen provider is signed in, the error names the choice and its login command, and says to rerun setup with --providers to change it.

  • The kernel operator's provider step reads rig config get provider.selected before inferring from the kernel's runtimes.
  • Unchanged: with no choice recorded, kernel boot works as before.

    One new stop: with only Codex chosen, Codex signed out and Claude signed in, kernel boot now stops with the named error (auth_blocked) where it used to boot a Claude-only kernel. The same holds the other way for a Claude-only choice. It follows from honouring the choice, and it's called out here for review.

    Cost: source +105/−7 across 8 files (one of them the operator guidance), tests +114/−1 across 6 files (numstat).

    How you verified it

    New tests:

  • setup records claude,codex in a fixed order, records nothing without the flag or on a dry run, and warns when the save fails;

  • kernel boot with Codex chosen and both signed in starts the Codex-only team;

  • an empty choice keeps the current pick, and the default reads the setting;

  • with Codex chosen but signed out, the error names codex login and not Claude's;

  • both stores reject anything but claude, codex, the two together, or empty.
  • Results, in a network-off Linux container at the exact commits:

  • Without the change (main plus the tests): the 12 new or changed tests fail on the missing behaviour, for example expected 'rig.yaml' to be 'rig-codex-only.yaml' and Unknown config key "provider.selected". The control, an empty choice keeping today's pick, passes. CLI 159 of 164, daemon 130 of 137.

  • With the change: CLI 233 of 233 (setup, setup-output, setup-doctor-auth, setup-herdr, config-store-extended, config, config-get-with-source), daemon 159 of 159 (kernel-boot, user-settings-store, user-settings-routes, settings-browser, kernel-role-orientation), TUI 17 of 17 (config-model, presentation-guidance).

  • The full build (every package's tsc) passed in the same run. CI runs the full suite and the first-run reference check on the operator guidance.

  • After review (cd7bb64b, wording plus one assertion on it): CI only, since the executor was in use.
  • Not run: a real kernel boot on a machine with both providers signed in.

    Anything you were unsure about

  • Setup saves --providers both as claude,codex. A hand-set value goes through the same validator in both stores, which also accepts codex,claude.

  • A kernel rig that already exists keeps its team: kernel boot skips a managed kernel, as before. The choice applies when the kernel is next created. Setup's step and the operator's step 5 now say so.
  • One concern per PR; no version bump; no CHANGELOG.md edit

  • Tests added or updated where the change is testable

  • I listed the checks I ran, their results, and any checks I could not run
  • 🤖 Generated with Claude Code

    <!-- This is an auto-generated comment: release notes by coderabbit.ai -->
    <!-- coderabbit-ai-generated:v1 -->

    Summary by CodeRabbit

    New Features
    Setup can save a selected provider choice, and kernel startup uses that choice to determine which providers are available. Existing kernels keep their current provider seats.
    The configuration setting shows the saved provider choice. Leaving it empty preserves the default behavior of using all signed-in providers.
    Dry runs display the provider choice that would be saved without recording it. The OPENRIG_PROVIDER_SELECTED environment variable takes precedence when set.
    If a selected provider is unavailable, the startup message identifies it and provides next steps.
    Bug Fixes
    * Setup continues successfully if saving the provider choice fails, and displays a warning with a recovery command.
    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 638 lines (+478 / -160) across 7 files Reviewer: mvschwarz Review duration: 1169m
    All Vouch review confidence checks passed
    Residual risk 0.22 = Change Risk (0.55) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.55 · 638 lines diff across 7 files
    0.55
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.386
    Shallow Review Depth shallow_review_depth
    0.289
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #1817"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 55.4% (MEDIUM) · Higher = larger blast radius
    55.4%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 21.9% · Safe to merge
    21.9%