zara-shell: fail closed on non-string stdin payloads #140

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

Follow-up to #5.

ShellRunner.run() currently calls stdin.encode() before validating the payload type. Non-string structured-tool input can therefore escape the plugin error contract as an AttributeError instead of failing closed as ShellError before process creation.

Acceptance:

  • deterministic RED proves bytes/None/non-string stdin are rejected before execution;
  • rejection is a useful ShellError and no process is spawned;
  • valid string stdin behavior and byte bounds remain unchanged;
  • zara-shell tests, registry validator, compatibility gates, packages, and nix flake check stay green.
Follow-up to #5. `ShellRunner.run()` currently calls `stdin.encode()` before validating the payload type. Non-string structured-tool input can therefore escape the plugin error contract as an `AttributeError` instead of failing closed as `ShellError` before process creation. Acceptance: - deterministic RED proves bytes/None/non-string stdin are rejected before execution; - rejection is a useful `ShellError` and no process is spawned; - valid string stdin behavior and byte bounds remain unchanged; - zara-shell tests, registry validator, compatibility gates, packages, and `nix flake check` stay green.
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#140
No description provided.