Skip to content

fix: validate logs level filter#233

Open
Bortlesboat wants to merge 1 commit into
CortexLM:mainfrom
Bortlesboat:fix/log-level-validation
Open

fix: validate logs level filter#233
Bortlesboat wants to merge 1 commit into
CortexLM:mainfrom
Bortlesboat:fix/log-level-validation

Conversation

@Bortlesboat
Copy link
Copy Markdown

Summary

  • Validates cortex logs --level against the supported log levels: error, warn, info, debug, and trace.
  • Normalizes accepted levels to lowercase so mixed-case valid input still uses the existing filtering path.
  • Adds a focused integration regression test for valid and invalid log-level parsing.

Context

This addresses the validated Platform Bounty Challenge report:

Verification

  • RED: cargo test -p cortex-cli --test logs_level failed because --level rr was accepted.
  • GREEN: cargo test -p cortex-cli --test logs_level passed (2 passed).
  • cargo check -p cortex-cli
  • cargo fmt --check --package cortex-cli
  • git diff --check

Note: the full cortex-cli lib-test target is currently blocked on main by an unrelated private import in src/cortex-cli/src/agent_cmd/tests.rs; this PR keeps the regression in an integration test so it can run independently.

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

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