Skip to content

fix: validate compact config log retention range#290

Open
SlaVKsVolks wants to merge 1 commit into
CortexLM:mainfrom
SlaVKsVolks:codex/compact-log-retention-range
Open

fix: validate compact config log retention range#290
SlaVKsVolks wants to merge 1 commit into
CortexLM:mainfrom
SlaVKsVolks:codex/compact-log-retention-range

Conversation

@SlaVKsVolks
Copy link
Copy Markdown

Fixes PlatformNetwork/bounty-challenge#53235.

Changes:

  • Documents the accepted compact config log retention range as 1-3650 days.
  • Adds clap validation so zero and out-of-range values are rejected before config handling.
  • Adds parser tests for the upper bound and zero rejection.

Verification:

  • rustfmt --edition 2024 --check src/cortex-cli/src/compact_cmd.rs
  • cargo check -p cortex-cli
  • git diff --check

Note: targeted cargo test for compact_cmd currently fails before reaching these tests because src/cortex-cli/src/agent_cmd/tests.rs imports private read_file_with_encoding on origin/main.

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.

[CLI][v0.0.7] cortex compact config --log-retention-days has no documented or error-time valid range

1 participant