mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-10 18:45:53 +00:00
7f38a3d8bf
CommandPolicy gains a VerifyWindow (Go duration) bounded to [(0,], 15m] with a 2m default. NormalizeVerifyWindow and the policy Normalize() method enforce the bounds; DefaultPolicy() populates the default. JSON marshaling now goes through a shadow struct so the wire form serializes as a duration string (e.g. "2m0s") rather than the raw nanosecond integer. Tests cover the default, the bounds (clamp to max, fall through to default for zero/negative), the JSON roundtrip, the unmarshal-applies- bounds contract, and rejection of unparseable duration strings.