zara-shell: reject boolean command runtime limits #119

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

Problem

CommandPolicy.__post_init__() uses math.isfinite() for max_runtime_seconds but does not reject booleans. In Python, True is numeric, so max_runtime_seconds=True is accepted as a one-second execution policy even though boolean configuration is malformed.

Required behavior

  • boolean runtime limits fail closed with ValueError;
  • finite positive int/float limits retain current behavior;
  • deterministic domain test proves rejection;
  • full compatibility/registry/plugin/Nix package gates stay green.

Advances #5 without touching Core cancellation semantics.

## Problem `CommandPolicy.__post_init__()` uses `math.isfinite()` for `max_runtime_seconds` but does not reject booleans. In Python, `True` is numeric, so `max_runtime_seconds=True` is accepted as a one-second execution policy even though boolean configuration is malformed. ## Required behavior - boolean runtime limits fail closed with `ValueError`; - finite positive int/float limits retain current behavior; - deterministic domain test proves rejection; - full compatibility/registry/plugin/Nix package gates stay green. Advances #5 without touching Core cancellation semantics.
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#119
No description provided.