zara-shell: reject non-numeric runtime limits structurally #107

Closed
opened 2026-09-08 02:02:59 +00:00 by nsaspy · 0 comments
Owner

Problem

CommandPolicy.__post_init__() calls math.isfinite(max_runtime_seconds) before proving the value is numeric. Values such as strings or None therefore leak incidental TypeError instead of the policy boundary's deterministic ValueError.

Slice

  • deterministic RED coverage for non-numeric runtime limits;
  • validate numeric type before finite/positive checks while continuing to reject booleans;
  • preserve execution deadline semantics;
  • exact-head compatibility, registry, plugin and Nix gates before merge.

Dependency-ready correctness slice within #5; explicit cancellation remains a separate Core contract.

## Problem `CommandPolicy.__post_init__()` calls `math.isfinite(max_runtime_seconds)` before proving the value is numeric. Values such as strings or `None` therefore leak incidental `TypeError` instead of the policy boundary's deterministic `ValueError`. ## Slice - deterministic RED coverage for non-numeric runtime limits; - validate numeric type before finite/positive checks while continuing to reject booleans; - preserve execution deadline semantics; - exact-head compatibility, registry, plugin and Nix gates before merge. Dependency-ready correctness slice within #5; explicit cancellation remains a separate Core contract.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nsaspy/zara-plugins#107
No description provided.