NeskireDK 77eee92465 Add specs for the ArikTube settings store
Covers the parts that are dangerous to get wrong and cheap to test,
which is why the validators and the origin matcher are pure functions:

- override precedence: no row keeps the environment value, a row wins,
  a stored empty list is an override rather than absence;
- decoding: a row that is not JSON, not a list, or holds a malformed
  playlist ID or a CIDR proxy is reported and ignored instead of raised,
  so it can never stop the instance from booting;
- validators: CIDR ranges, a host name where an IP belongs, header auth
  enabled with no trusted proxy, and origins carrying a path, query,
  fragment or credentials;
- origin matching: the near misses, "…ariksen.dk.evil.com",
  "…ariksen.dk@evil.com", the origin hidden in a path or query, another
  scheme, another port, a subdomain;
- the gating of both waivers: header auth off, empty list, no assertion,
  an assertion for somebody else.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 06:43:32 +02:00
..