Skip to content

fix: reject NaN/Inf --wait so the CLI cannot hang - #3

Merged
hc-ui merged 2 commits into
mainfrom
cursor/reject-nonfinite-wait-b68c
Aug 26, 2026
Merged

fix: reject NaN/Inf --wait so the CLI cannot hang#3
hc-ui merged 2 commits into
mainfrom
cursor/reject-nonfinite-wait-b68c

Conversation

@hc-ui

@hc-ui hc-ui commented Aug 26, 2026

Copy link
Copy Markdown
Owner

Why

argparse type=float accepts nan / inf. The old <= 0 check does not catch nan (nan <= 0 is false), so --wait nan was accepted and --wait inf never timed out.

What

  • Add whoseport.waitarg.require_finite_wait and install it as the --wait type from package init.
  • Tests cover nan / inf / -inf exiting 2.

Tests

PYTHONPATH=src python3 -m pytest -q → 105 passed, 2 skipped (Windows-only).

Does not repeat host:port tokens or docker-proxy.exe advice.

@hc-ui
hc-ui marked this pull request as ready for review August 26, 2026 10:30
@hc-ui
hc-ui merged commit fbe217d into main Aug 26, 2026
12 checks passed
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