Skip to content

feat: add beta label to CLI output#324

Merged
konstantinoscs merged 1 commit into
developfrom
feature/tow-2343-add-beta-label-to-cli
Jul 14, 2026
Merged

feat: add beta label to CLI output#324
konstantinoscs merged 1 commit into
developfrom
feature/tow-2343-add-beta-label-to-cli

Conversation

@konstantinoscs

@konstantinoscs konstantinoscs commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Adding a resuable "beta feature" component that prints a beta label/warning when a beta feature is used.
Also, using the above mechanism for the Storage product commands ahead of the Preview/Beta launch.

e.g.
image

Summary by CodeRabbit

  • New Features

    • Added beta labeling and one-time notifications for Storage catalog functionality.
    • Storage-related CLI help now clearly identifies beta status and may include documentation links.
    • Beta notices appear only in suitable interactive terminal contexts and are shown once per feature.
  • Bug Fixes

    • Prevented duplicate beta notices, including during concurrent CLI usage.
  • Tests

    • Added coverage for notice formatting, validation, concurrency, persistence errors, and CLI help output.

@konstantinoscs
konstantinoscs changed the base branch from main to develop July 11, 2026 16:07
@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown

Review Change Stack

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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 53dfebdd-8b00-42cf-a472-a6cebc5f536f

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
📝 Walkthrough

Walkthrough

Adds atomic filesystem-backed notice claiming in the config crate and introduces Storage beta messaging in catalog command help and runtime operations.

Changes

Storage beta notice

Layer / File(s) Summary
Atomic notice persistence
crates/config/Cargo.toml, crates/config/src/{lib.rs,session.rs}
Adds validated, atomic per-notice claims using sentinel files, with tests for repeated, concurrent, independent, invalid, and failing claims.
Beta notice definition and emission
crates/tower-cmd/src/{beta.rs,output.rs,lib.rs}
Defines Storage beta metadata, formats notices, gates emission to interactive normal output, persists claims, and writes first-time notices to stderr.
Catalog command integration
crates/tower-cmd/src/catalogs.rs
Adds Storage beta markers to help text and triggers one-time notices for applicable list, credentials, and show operations, with CLI coverage.

Estimated code review effort: 3 (Moderate) | ~30 minutes

Sequence Diagram(s)

sequenceDiagram
  participant CatalogCommand
  participant BetaNotice
  participant ConfigSession
  participant Stderr
  CatalogCommand->>BetaNotice: notify_once(STORAGE)
  BetaNotice->>BetaNotice: check output mode and terminals
  BetaNotice->>ConfigSession: claim_notice("storage")
  ConfigSession-->>BetaNotice: claimed or already claimed
  BetaNotice->>Stderr: write first-time beta notice
Loading

Possibly related PRs

  • tower/tower-cli#241: Introduced the catalog command flows that this change extends with Storage beta notifications.

Suggested reviewers: sammuti, jo-sm, socksy

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.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
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding beta labeling to CLI output.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/tow-2343-add-beta-label-to-cli

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

@tower tower deleted a comment from github-actions Bot Jul 11, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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 `@crates/tower-cmd/src/beta.rs`:
- Around line 28-34: Update the expected string in the
notice_omits_docs_sentence_without_a_url test to include the full
STORAGE.qualification text, including “its API contract and”, while preserving
the existing notice prefix and no-docs-sentence behavior.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d746f76d-f870-4b16-965d-fe75c3757993

📥 Commits

Reviewing files that changed from the base of the PR and between 8dd7b04 and e04b9d2.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (7)
  • crates/config/Cargo.toml
  • crates/config/src/lib.rs
  • crates/config/src/session.rs
  • crates/tower-cmd/src/beta.rs
  • crates/tower-cmd/src/catalogs.rs
  • crates/tower-cmd/src/lib.rs
  • crates/tower-cmd/src/output.rs

Comment thread crates/tower-cmd/src/beta.rs
@konstantinoscs
konstantinoscs force-pushed the feature/tow-2343-add-beta-label-to-cli branch 2 times, most recently from eb1144d to fb8a0bd Compare July 11, 2026 16:27
Comment thread crates/tower-cmd/src/beta.rs Outdated
Comment thread crates/tower-cmd/src/beta.rs
@konstantinoscs
konstantinoscs force-pushed the feature/tow-2343-add-beta-label-to-cli branch from fb8a0bd to b3f89d2 Compare July 14, 2026 09:44
@konstantinoscs
konstantinoscs merged commit 24b6f14 into develop Jul 14, 2026
29 checks passed
@konstantinoscs
konstantinoscs deleted the feature/tow-2343-add-beta-label-to-cli branch July 14, 2026 10:17
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.

2 participants