Skip to content

fix(setup): auto-detect nightly channel from .dev install version#381

Merged
jinhongkuan merged 1 commit into
devfrom
fix/setup-wizard-nightly-channel-autodetect
May 16, 2026
Merged

fix(setup): auto-detect nightly channel from .dev install version#381
jinhongkuan merged 1 commit into
devfrom
fix/setup-wizard-nightly-channel-autodetect

Conversation

@jinhongkuan

Copy link
Copy Markdown
Contributor

Summary

  • Wizard now writes channel: nightly when the running build carries a PEP 440 .devN segment (pipx install --pip-args=--pre bicameral-mcp / uv tool install --prerelease=allow), channel: stable otherwise.
  • run_config_wizard preserves the existing channel field on rewrite so re-running bicameral-mcp config no longer drops it.
  • Without this, nightly users were stranded: bicameral.update compared their CalVer install against PyPI's info.version (which hides .devN), saw them as already-ahead, and silently never offered an upgrade.

Linked issues

None — direct fix surfaced in a pilot conversation.

Plan / Audit / Seal

Plan: trivial; risk:L1. Single-function behavior change + new tests, no API surface change (new param is keyword-only with a default that preserves prior callers).

Test plan

  • pytest tests/test_setup_wizard_channel_autodetect.py tests/test_preflight_attribution_redaction.py -q (14/14)
  • pytest tests/test_setup_wizard*.py -q (51/51)
  • ruff check setup_wizard.py tests/test_setup_wizard_channel_autodetect.py (clean)

🤖 Generated with Claude Code

A user who runs `pipx install --pip-args=--pre bicameral-mcp` (or the uv
prerelease equivalent) lands on a CalVer .devN build, but the wizard
hardcoded `channel: stable` into `.bicameral/config.yaml`. `bicameral.update`
then queried PyPI's `info.version` — which hides .devN by design — and
silently never offered an upgrade, stranding nightly users on whatever build
they happened to --pre install.

Wizard now reads the running package version (importlib.metadata, with a
pyproject.toml fallback for source checkouts) and writes
`channel: nightly` when a `.dev` segment is present, `channel: stable`
otherwise. `run_config_wizard` preserves the existing channel on rewrite
so re-running `bicameral-mcp config` no longer drops the field.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@jinhongkuan jinhongkuan added the flow:feature Standard feature/fix PR targeting BicameralAI/dev (the default flow) label May 16, 2026
@coderabbitai

coderabbitai Bot commented May 16, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8d118cb4-1ed4-4457-b56b-a5b011380404

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/setup-wizard-nightly-channel-autodetect

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 and usage tips.

@jinhongkuan jinhongkuan merged commit 772ff88 into dev May 16, 2026
9 checks passed
@jinhongkuan jinhongkuan deleted the fix/setup-wizard-nightly-channel-autodetect branch May 16, 2026 02:44
Knapp-Kevin pushed a commit to Knapp-Kevin/bicameral-mcp that referenced this pull request May 21, 2026
Surfaces the setup-wizard nightly-channel auto-detect fix (PR BicameralAI#381) to
design partners. Without it, anyone who installed via
`pipx install --pip-args=--pre bicameral-mcp` ran `bicameral-mcp setup`
into a config hardcoded to `channel: stable`, so `bicameral.update`
silently never offered the nightly upgrade path.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

flow:feature Standard feature/fix PR targeting BicameralAI/dev (the default flow)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant