Skip to content

Commit 81bdb5b

Browse files
authored
[dashboard] fix: align numeric validation
fix(dashboard): align numeric input validation
1 parent e1c2556 commit 81bdb5b

5 files changed

Lines changed: 57 additions & 13 deletions

File tree

AGENTS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,10 @@ This file defines how coding agents should work in this repository.
333333
refresh/start requests should keep their modest timeout.
334334
- Dashboard stop-result formatting must preserve non-empty backend `message`
335335
fields when no stop outcome lists are populated.
336+
- Dashboard start-form numeric validation must stay aligned with CLI/REST
337+
session creation: accept plain ASCII numeric spellings, reject leading plus
338+
signs and non-ASCII/underscore digit forms, and reserve `-1` for the busy
339+
threshold sentinel.
336340
- Public `interval` values must be finite positive seconds, including fractional seconds, capped by the Python runtime wait limit; reject `NaN`, `Infinity`, and oversized values before creating or mutating session state so keep loops cannot spin, crash, or wedge.
337341
- Keep human VRAM parsing centralized in `src/keep_gpu/utilities/humanized_input.py`; public integer values and digit-only strings mean bytes, public VRAM byte-equivalent values must be no more than 1 PiB, and controllers may convert valid inputs to internal tensor element counts.
338342
- Keep omitted public VRAM defaults aligned and low-power: CLI, Python global controller, Python single-GPU controllers, service, REST, JSON-RPC, and MCP should default to `1GiB` per GPU unless a user explicitly asks for a different reservation.

docs/guides/cli.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,10 @@ The dashboard provides:
153153
- session creation form,
154154
- single-session and stop-all controls.
155155

156+
The start form follows the same numeric token rules as the CLI: use plain ASCII
157+
digits, omit leading plus signs, and use `-1` only for the busy-threshold
158+
unconditional mode.
159+
156160
Telemetry refresh is manual by default so an idle browser tab does not keep
157161
probing GPU backends. Use **Refresh Now** for a one-shot update, or enable
158162
**Auto refresh** for 10-second polling while the tab is visible.

0 commit comments

Comments
 (0)