Skip to content

Release v0.3.50#212

Open
bradhe wants to merge 5 commits intomainfrom
develop
Open

Release v0.3.50#212
bradhe wants to merge 5 commits intomainfrom
develop

Conversation

@bradhe
Copy link
Contributor

@bradhe bradhe commented Feb 26, 2026

  • Support for hidden parameters
  • Fix updating schedules
  • Fix ctrl+c bug
  • Avoid panics when piping to broken pipe
  • Bump version to v0.3.50

Summary by CodeRabbit

  • New Features

    • Added support for marking parameters as hidden; hidden parameter values are automatically masked in schedule list outputs.
    • Schedule delete and update commands now require explicit schedule ID as an argument.
  • Improvements

    • Enhanced parameter parsing to reject invalid input when no key=value pairs are provided.
    • Improved CLI signal handling for consistent Ctrl+C behavior across platforms.
  • Tests

    • Added comprehensive test coverage for CLI signal handling and schedule argument parsing.

@coderabbitai
Copy link

coderabbitai bot commented Feb 26, 2026

📝 Walkthrough

Walkthrough

The PR bumps package version to 0.3.50 and introduces a hidden: bool field to Parameter and RunParameter structs across config and API models. It masks hidden parameter values in schedule list responses, refactors schedule command argument parsing to require schedule IDs, improves I/O handling with centralized stdout/stderr wrappers, and adds SIGINT signal handling to the Python CLI.

Changes

Cohort / File(s) Summary
Version Bumps
Cargo.toml, pyproject.toml
Updated workspace and project versions from 0.3.49 to 0.3.50.
Hidden Parameter Field Addition
crates/config/src/towerfile.rs, crates/tower-api/src/models/parameter.rs, crates/tower-api/src/models/run_parameter.rs
Added hidden: bool field with serde defaults to Parameter and RunParameter structs; updated constructors to initialize hidden: false; added tests for parsing and defaulting behavior.
Schedule Command Refactoring
crates/tower-cmd/src/schedules.rs
Added required schedule_id arguments to delete and update subcommands; removed allow_external_subcommands; refactored parse_parameters to return None when no valid parameters exist; added comprehensive test module for argument and parameter parsing validation.
API Parameter Construction Updates
crates/tower-cmd/src/api.rs
Extended RunParameter construction to include hidden: false; expanded CreateScheduleParams and UpdateScheduleParams with optional fields (schema, environment, app_version).
Parameter Masking Logic
crates/tower-cmd/src/mcp.rs
Added logic to mask values of hidden parameters to [hidden] in tower_schedules_list response before returning.
I/O Handling Improvements
crates/tower-cmd/src/output.rs
Introduced centralized write_to_stdout and write_to_stderr helpers with broken pipe error handling; refactored existing I/O calls to use new wrappers.
Python CLI Signal Handling
src/tower/cli.py, tests/tower/test_cli.py
Added SIGINT signal handler initialization in main() before CLI invocation; added unit test verifying signal handler restoration and CLI delegation.
Formatting
crates/tower/src/lib.rs
Minor formatting adjustments to error handling and file operations with no behavioral changes.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • jo-sm
  • sammuti
  • codingcyclist
  • socksy

Poem

🐰 Hidden flags tucked neat and small,
Secrets masked behind a wall,
Signals caught, no more surprise,
Version bumped before our eyes! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Release v0.3.50' accurately reflects the primary change in the PR—a version bump from 0.3.49 to 0.3.50 across all configuration files, with supporting feature additions and bug fixes.
Docstring Coverage ✅ Passed Docstring coverage is 80.77% which is sufficient. The required threshold is 80.00%.

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

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch develop

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

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR releases version 0.3.50 of the Tower CLI, implementing several bug fixes and a new hidden parameters feature. The changes improve the CLI's robustness when handling signals and broken pipes, fix issues with schedule command argument parsing, and add support for marking parameters as hidden to prevent their values from being displayed in schedule listings.

Changes:

  • Added hidden parameter support across API models, towerfile configuration, and MCP tools
  • Fixed schedule update/delete commands by replacing external subcommand pattern with explicit positional arguments
  • Restored default SIGINT behavior in Python CLI entrypoint to fix ctrl+c handling
  • Added graceful broken pipe handling to prevent panics when piping CLI output

Reviewed changes

Copilot reviewed 12 out of 14 changed files in this pull request and generated no comments.

Show a summary per file
File Description
uv.lock Version bump to 0.3.50
pyproject.toml Version bump to 0.3.50
Cargo.toml Version bump to 0.3.50
Cargo.lock Version bump to 0.3.50 for all workspace crates
src/tower/cli.py Added SIGINT signal handler to restore default behavior
tests/tower/test_cli.py Added test coverage for SIGINT signal handling
crates/tower/src/lib.rs Code formatting improvements for method chains
crates/tower-cmd/src/schedules.rs Fixed update/delete commands to use positional args, improved parse_parameters, added comprehensive tests
crates/tower-cmd/src/output.rs Added write_to_stdout/stderr helpers with broken pipe handling
crates/tower-cmd/src/mcp.rs Added masking of hidden parameter values in schedule listings
crates/tower-cmd/src/api.rs Added hidden field to RunParameter creation, explicitly set update_schedule fields
crates/tower-api/src/models/run_parameter.rs Added hidden field with serde default
crates/tower-api/src/models/parameter.rs Added hidden field with serde default
crates/config/src/towerfile.rs Added hidden field to Parameter struct with tests

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (3)
crates/config/src/towerfile.rs (1)

122-130: Consider adding a hidden parameter to add_parameter() for API completeness.

Currently, add_parameter() always sets hidden: false. If programmatic creation of hidden parameters is needed in the future, this method would need modification.

💡 Optional enhancement
-    pub fn add_parameter(&mut self, name: String, description: String, default: String) {
+    pub fn add_parameter(&mut self, name: String, description: String, default: String, hidden: bool) {
         self.parameters.push(Parameter {
             name,
             description,
             default,
-            hidden: false,
+            hidden,
         });
     }

This would require updating callers to pass false for the new parameter.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@crates/config/src/towerfile.rs` around lines 122 - 130, Update the
add_parameter method to accept a hidden: bool argument and use it when
constructing the Parameter so callers can create hidden parameters; specifically
change the signature of add_parameter (currently pub fn add_parameter(&mut self,
name: String, description: String, default: String)) to include hidden: bool and
set Parameter { name, description, default, hidden } accordingly, then update
all callers to pass false where they previously relied on the default non-hidden
behavior.
crates/tower-cmd/src/api.rs (2)

881-886: Same suggestion applies here.

Consider using RunParameter::new(key, value) for consistency.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@crates/tower-cmd/src/api.rs` around lines 881 - 886, Replace the inline
construction of RunParameter in the iterator map with the canonical constructor:
change the closure that currently returns RunParameter { name: key, value,
hidden: false } to call RunParameter::new(key, value) so the mapping uses the
struct's constructor for consistency with other call sites (refer to
RunParameter::new and the map producing RunParameter instances).

843-848: Consider using RunParameter::new() constructor.

The struct literal works, but using the constructor would be more maintainable if the struct evolves (fewer places to update).

♻️ Suggested refactor
     let run_parameters = parameters.map(|params| {
         params
             .into_iter()
-            .map(|(key, value)| RunParameter {
-                name: key,
-                value,
-                hidden: false,
-            })
+            .map(|(key, value)| RunParameter::new(key, value))
             .collect()
     });
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@crates/tower-cmd/src/api.rs` around lines 843 - 848, Replace the inline
struct literal used in the map with the RunParameter constructor to centralize
construction logic: in the closure mapping (where RunParameter { name: key,
value, hidden: false } is created) call RunParameter::new(key, value) (or
RunParameter::new(key, value, false) if the constructor requires an explicit
hidden flag) so future field changes only need updates in the RunParameter::new
implementation.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@crates/config/src/towerfile.rs`:
- Around line 122-130: Update the add_parameter method to accept a hidden: bool
argument and use it when constructing the Parameter so callers can create hidden
parameters; specifically change the signature of add_parameter (currently pub fn
add_parameter(&mut self, name: String, description: String, default: String)) to
include hidden: bool and set Parameter { name, description, default, hidden }
accordingly, then update all callers to pass false where they previously relied
on the default non-hidden behavior.

In `@crates/tower-cmd/src/api.rs`:
- Around line 881-886: Replace the inline construction of RunParameter in the
iterator map with the canonical constructor: change the closure that currently
returns RunParameter { name: key, value, hidden: false } to call
RunParameter::new(key, value) so the mapping uses the struct's constructor for
consistency with other call sites (refer to RunParameter::new and the map
producing RunParameter instances).
- Around line 843-848: Replace the inline struct literal used in the map with
the RunParameter constructor to centralize construction logic: in the closure
mapping (where RunParameter { name: key, value, hidden: false } is created) call
RunParameter::new(key, value) (or RunParameter::new(key, value, false) if the
constructor requires an explicit hidden flag) so future field changes only need
updates in the RunParameter::new implementation.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 27235ce and 198783e.

⛔ Files ignored due to path filters (2)
  • Cargo.lock is excluded by !**/*.lock
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (12)
  • Cargo.toml
  • crates/config/src/towerfile.rs
  • crates/tower-api/src/models/parameter.rs
  • crates/tower-api/src/models/run_parameter.rs
  • crates/tower-cmd/src/api.rs
  • crates/tower-cmd/src/mcp.rs
  • crates/tower-cmd/src/output.rs
  • crates/tower-cmd/src/schedules.rs
  • crates/tower/src/lib.rs
  • pyproject.toml
  • src/tower/cli.py
  • tests/tower/test_cli.py

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.

3 participants