Skip to content

feat: validate bounds for --llm-rate, --cull-keep, --image-long-side#3

Merged
rasros merged 1 commit into
mainfrom
feat/validate-cli-bounds
Jul 10, 2026
Merged

feat: validate bounds for --llm-rate, --cull-keep, --image-long-side#3
rasros merged 1 commit into
mainfrom
feat/validate-cli-bounds

Conversation

@rasros

@rasros rasros commented Jul 10, 2026

Copy link
Copy Markdown
Owner

What

Adds range validation for three numeric CLI flags that previously accepted nonsensical values and silently produced degenerate behavior.

  • --llm-rate must be in [0.0, 1.0] (it's a probability). Out-of-range explicit values now error instead of being passed through.
  • --cull-keep must be in (0.0, 1.0]. 0 kept no beams eligible for expansion (stalling beam search); > 1.0 was meaningless.
  • --image-long-side must be > 0. The old check only rejected negatives, so 0 slipped through into a degenerate downscale. The message is now specific instead of the generic "Configuration values cannot be negative".

Tests

Added parametrized cases for each bound (in/out of range) in test_cli.py. Full suite: 356 passed.

@rasros rasros merged commit a13bc04 into main Jul 10, 2026
1 check passed
@rasros rasros deleted the feat/validate-cli-bounds branch July 10, 2026 11:27
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