zara-comms: require exact integer attachment size metadata #67

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

Problem

CommsDomain.normalize_message currently uses int(item["size"]). Provider values such as True, "50", or 1.5 can therefore be silently coerced into attachment byte sizes.

Required behavior

  • attachment size must be an exact integer, excluding booleans
  • malformed numeric strings/floats/booleans fail structurally instead of being coerced
  • existing non-negative / 100 MiB bound remains enforced
  • deterministic regressions
  • full registry/install/Nix gate remains green

No Zara Core changes.

## Problem `CommsDomain.normalize_message` currently uses `int(item["size"])`. Provider values such as `True`, `"50"`, or `1.5` can therefore be silently coerced into attachment byte sizes. ## Required behavior - attachment `size` must be an exact integer, excluding booleans - malformed numeric strings/floats/booleans fail structurally instead of being coerced - existing non-negative / 100 MiB bound remains enforced - deterministic regressions - full registry/install/Nix gate remains green No Zara Core changes.
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#67
No description provided.