rastrillo / aviso Public

Spec deviations: TTL zero, PublicKeyString, unknown JSON fields open

On branch build

Two places the code departs from docs/superpowers/specs/2026-09-07-aviso-web-push-design.md, both found in Codex's review of the plan and both deliberate.

  1. Options.TTL == 0 means 24 hours, not "the push service's default". webpush-go always sends the TTL header, and a literal 0 there means "deliver now or drop", which is the opposite of a sensible zero value. The spec's §3 wording should be read as "24 hours".
  1. Service.PublicKeyString() exists and is not in the spec's §3 API list. The browser module needs the key as a string, the example app serves it, and the tests compare it; an additive accessor rather than a second exported route.
  1. Handlers do not use DisallowUnknownFields. A browser's PushSubscription.toJSON() carries expirationTime, so a strict decoder would refuse every genuine subscription. The 8 KiB cap and per-field validation are the defence, as §4 intends.

If any of these should be reversed, say so here and the code follows.