Skip to content

Add toolchain status help - #3683

Merged
rossirpaulo merged 1 commit into
canaryfrom
paulo/toolchain-status-help
Jun 4, 2026
Merged

rossirpaulo merged 1 commit into
canaryfrom
paulo/toolchain-status-help

Conversation

@rossirpaulo

@rossirpaulo rossirpaulo commented Jun 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add baml toolchain status as a read-only remote freshness check for the active selector.
  • Keep baml toolchain list local-only and point users to status when they want remote freshness.
  • Improve wrapper-owned help for baml toolchain --help and baml self-update --help.
  • Update baml --version to show wrapper version plus locally resolved toolchain state without making a network call.
  • Add a baml-cli --help note pointing users to baml toolchain --help for wrapper-owned commands.
  • Sync the TASK docs with the new command model.

Validation

  • cargo fmt --manifest-path baml_language/Cargo.toml --package baml --package baml_cli
  • cargo check --manifest-path baml_language/Cargo.toml -p baml -p baml_cli
  • cargo test --manifest-path baml_language/Cargo.toml -p baml
  • cargo build --manifest-path baml_language/Cargo.toml -p baml -p baml_cli
  • git diff --check
  • Smoke-tested baml toolchain --help, baml toolchain list, baml --version, baml-cli --help, and baml toolchain status against a local manifest server.

Summary by CodeRabbit

  • New Features

    • Added baml toolchain status to check remote channel freshness (read-only, no installs/selection changes).
    • Enhanced version and toolchain output to show whether the active toolchain is installed, missing, or corrupt, and to highlight available channel updates.
  • Documentation

    • Clarified baml toolchain list is local-only (no remote checks) and updated install/release/user guides to reflect new commands and behaviors.

@vercel

vercel Bot commented Jun 4, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
beps Ready Ready Preview, Comment Jun 4, 2026 8:20am
new-boundaryml-website Error Error Jun 4, 2026 8:20am
promptfiddle Ready Ready Preview, Comment Jun 4, 2026 8:20am
promptfiddle2 Ready Ready Preview, Comment Jun 4, 2026 8:20am

Request Review

@coderabbitai

coderabbitai Bot commented Jun 4, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 4f3397c5-186c-4916-8213-265ecba42cdf

📥 Commits

Reviewing files that changed from the base of the PR and between b334836 and 66ac8a9.

📒 Files selected for processing (9)
  • TASK/AMENDMENTS.md
  • TASK/COMMANDS.md
  • TASK/TASK.md
  • TASK/USER-PATHS.md
  • TASK/docs/install.md
  • TASK/docs/release-maintainer.md
  • TASK/docs/toolchain-system.md
  • baml_language/crates/baml/src/main.rs
  • baml_language/crates/baml_cli/src/commands.rs
✅ Files skipped from review due to trivial changes (4)
  • TASK/docs/install.md
  • TASK/docs/release-maintainer.md
  • TASK/AMENDMENTS.md
  • TASK/docs/toolchain-system.md
🚧 Files skipped from review as they are similar to previous changes (4)
  • baml_language/crates/baml_cli/src/commands.rs
  • TASK/COMMANDS.md
  • TASK/TASK.md
  • baml_language/crates/baml/src/main.rs

📝 Walkthrough

Walkthrough

The PR adds baml toolchain status for read-only remote freshness checks and refines baml toolchain list as local-only, with documentation updates and CLI implementation across help text, subcommand parsing, version resolution refactoring, and the new status_toolchain() function.

Changes

Toolchain Status Command and List Refinement

Layer / File(s) Summary
Documentation: Toolchain Command Specification
TASK/AMENDMENTS.md, TASK/COMMANDS.md, TASK/TASK.md, TASK/USER-PATHS.md, TASK/docs/install.md, TASK/docs/release-maintainer.md, TASK/docs/toolchain-system.md
TASK documentation and user guides are updated to establish the contract for the two toolchain subcommands: status performs remote freshness checks without installation or state mutation, while list is strictly local and directs users to status for remote info.
CLI Implementation: Status Command and Version Resolution
baml_language/crates/baml/src/main.rs
Adds help text constants, updates the run() dispatcher to handle --version and self-update, extends toolchain() subcommand parser to support status subcommand, refactors version resolution with a new manifest-base-aware helper, and implements status_toolchain() function to report active selector and remote freshness. Updates list_toolchains() to note that remote versions were not checked.
CLI Metadata: Clap Attribute Restructuring
baml_language/crates/baml_cli/src/commands.rs
Refactors the #[command(...)] attribute for RuntimeCli from single-line to multi-line structured form with explicit name, version, about, long_about, and after_help fields.

Sequence Diagram

sequenceDiagram
    participant CLI as run()
    participant TcStatus as status_toolchain()
    participant Local as Local State
    participant Remote as Remote Manifest
    participant Display as Output
    
    CLI->>TcStatus: invoke status (override_url)
    TcStatus->>Local: resolve active selector
    alt is_channel_selector
        TcStatus->>Remote: fetch latest manifest (forced)
        Remote-->>TcStatus: channel pointer + concrete version
        TcStatus->>Local: compare recorded version
        TcStatus->>Display: up-to-date / newer / not-recorded
    else is_exact_selector
        TcStatus->>Local: check if installed
        TcStatus->>Display: installed / not-installed
    end
    TcStatus->>Remote: fetch canary/nightly
    TcStatus->>Display: latest versions + channel guidance
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

  • BoundaryML/baml#3639: Both PRs touch the BAML wrapper CLI implementation—specifically baml_language/crates/baml/src/main.rs where baml toolchain subcommand handling/behavior is implemented/modified.

Poem

🐰 I hopped through docs and CLI delight,
Added status to peek at remote sight,
list stays local, tidy and neat,
No installs by accident — steady and sweet,
A rabbit-approved toolchain check, quick and bright.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. 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 accurately reflects the main addition—the new baml toolchain status command—which is the primary feature across code and documentation changes.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch paulo/toolchain-status-help

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.

@github-actions

github-actions Bot commented Jun 4, 2026 •

Copy link
Copy Markdown

⏭️ Performance benchmarks were skipped

Perf benchmarks (CodSpeed) are opt-in on pull requests — they no longer run on every push. They always run automatically after merge to canary/main.

To run them on this PR, do any of the following, then push a commit (or re-run CI):

  • Add RUN_CODSPEED=1 to the PR description, or
  • Include run-perf or /perf in the PR title or any commit message.

@vercel
vercel Bot temporarily deployed to Preview – beps June 4, 2026 07:39 Inactive
@rossirpaulo rossirpaulo changed the title [codex] Add toolchain status help Add toolchain status help Jun 4, 2026
@rossirpaulo
rossirpaulo marked this pull request as ready for review June 4, 2026 07:42
@vercel
vercel Bot temporarily deployed to Preview – new-boundaryml-website June 4, 2026 07:43 Inactive
@vercel
vercel Bot temporarily deployed to Preview – beps June 4, 2026 07:43 Inactive
@github-actions

github-actions Bot commented Jun 4, 2026 •

Copy link
Copy Markdown

Binary size checks passed

✅ 7 passed

Artifact Platform File Gzip Gated on Baseline Delta Status
✅ baml-cli Linux 🔒 17.7 MB 7.6 MB file 24.1 MB -6.4 MB (-26.4%) OK
✅ packed-program Linux 🔒 12.9 MB 5.5 MB file 15.1 MB -2.2 MB (-14.6%) OK
✅ baml-cli macOS 🔒 13.5 MB 6.6 MB file 18.2 MB -4.7 MB (-25.6%) OK
✅ packed-program macOS 🔒 9.8 MB 4.8 MB file 11.5 MB -1.7 MB (-14.4%) OK
✅ baml-cli Windows 🔒 14.6 MB 6.7 MB file 19.6 MB -5.1 MB (-25.8%) OK
✅ packed-program Windows 🔒 10.4 MB 4.8 MB file 12.2 MB -1.8 MB (-15.0%) OK
✅ bridge_wasm WASM 11.9 MB 🔒 3.4 MB gzip 3.9 MB -504.8 KB (-13.0%) OK

🔒 = the size this artifact is GATED on (ceiling + delta). Binaries gate on file size (installed binary); WASM gates on gzip (download size). The other size is shown for information only.


Generated by cargo size-gate · workflow run

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@baml_language/crates/baml/src/main.rs`:
- Around line 149-154: The current self-update branch uses args.get(1) to only
special-case help but otherwise ignores extra arguments and proceeds to call
self_update(); change this to reject any unexpected trailing args: in the block
that checks args.first() == Some("self-update"), keep the help check using
is_help_arg and printing SELF_UPDATE_HELP, but if args.get(1).is_some() and not
is_help_arg(arg) then print a clear error/usage message and return a non-zero
exit code (do not call self_update()); only call self_update() when there are no
extra args. Reference the existing symbols args.first(), args.get(1),
is_help_arg, SELF_UPDATE_HELP, and self_update().

In `@TASK/USER-PATHS.md`:
- Around line 251-252: Update the Install/Update sections to reflect the
wrapper-only package-manager contract: change any text that says package-manager
installs (e.g., "brew install baml bootstraps a canary toolchain" or similar) to
state that package-manager installs only install the baml wrapper and do not
auto-select or bootstrap a toolchain; add a note that users must run an explicit
selection like `baml toolchain use <version>` to install or switch toolchains,
and ensure the Install/Update table rows match the guidance in TASK/TASK.md and
TASK/docs/install.md; also keep the `baml toolchain status` and `baml toolchain
list` rows as documented (status checks remote channel freshness without
changing selection, list shows installed toolchains without checking remote
metadata).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 9349b5ca-653c-4575-aea2-4bf994c430e8

📥 Commits

Reviewing files that changed from the base of the PR and between a21f5a7 and b334836.

📒 Files selected for processing (9)
  • TASK/AMENDMENTS.md
  • TASK/COMMANDS.md
  • TASK/TASK.md
  • TASK/USER-PATHS.md
  • TASK/docs/install.md
  • TASK/docs/release-maintainer.md
  • TASK/docs/toolchain-system.md
  • baml_language/crates/baml/src/main.rs
  • baml_language/crates/baml_cli/src/commands.rs

Comment thread baml_language/crates/baml/src/main.rs Resolved
Comment thread TASK/USER-PATHS.md Resolved
@vercel
vercel Bot temporarily deployed to Preview – promptfiddle2 June 4, 2026 07:49 Inactive
@rossirpaulo
rossirpaulo force-pushed the paulo/toolchain-status-help branch from b334836 to 66ac8a9 Compare June 4, 2026 08:02
@vercel
vercel Bot temporarily deployed to Preview – new-boundaryml-website June 4, 2026 08:02 Inactive
@vercel
vercel Bot temporarily deployed to Preview – beps June 4, 2026 08:03 Inactive
@vercel
vercel Bot temporarily deployed to Preview – promptfiddle2 June 4, 2026 08:08 Inactive
@rossirpaulo
rossirpaulo added this pull request to the merge queue Jun 4, 2026
Merged via the queue into canary with commit 51eb9c0 Jun 4, 2026
50 of 52 checks passed
@rossirpaulo
rossirpaulo deleted the paulo/toolchain-status-help branch June 4, 2026 08:17
@vercel
vercel Bot temporarily deployed to Preview – promptfiddle June 4, 2026 08:20 Inactive

This branch was previously deployed

4 inactive deployments
Preview – promptfiddle — 66ac8a99 Deployed Jun 4, 2026 by vercel[bot]
Preview – promptfiddle2 — 66ac8a99 Deployed Jun 4, 2026 by vercel[bot]
Preview – beps — 66ac8a99 Deployed Jun 4, 2026 by vercel[bot]
Preview – new-boundaryml-website — 66ac8a99 Deployed Jun 4, 2026 by vercel[bot]
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