Parses a string-keyed URL params map into a keyword list ready for
Threadline.Query.validate_timeline_filters!/1.
Used by both Threadline.OperatorSurface.Live.TimelineLive (LV-side) and
Threadline.OperatorSurface.Controllers.ExportController (HTTP-side) so
the two surfaces share one parser — guaranteeing the EXPO-05 byte-equality
parity test holds for every input edge case (RESEARCH §"Pitfall 3").
Allowed URL keys
from, to, table, actor_kind, actor_id, correlation_idMapping to filter keys:
from/to— ISO-8601 datetime-local (16-char formYYYY-MM-DDTHH:MMis padded to:00Z; 19-char formYYYY-MM-DDTHH:MM:SSis padded toZ).table— passed through verbatim.actor_kind+actor_id— collapsed to a singleactor_ref: %Threadline.Semantics.ActorRef{}keyword.actor_kind=anonymousstripsactor_id. Other kinds require both fields.correlation_id— passed through verbatim.
Atom safety
actor_kind is converted to an atom via String.to_existing_atom/1 — never
via the unsafe variant that creates fresh atoms from arbitrary strings. The
atom table (16 MiB default) is shared process-wide; unfiltered HTTP input
could otherwise be used to fill it (RESEARCH §"Pitfall 11").
Summary
Functions
Returns a string-keyed %{key => value} map suitable for re-rendering the
filter form on URL paste. Mirrors the actor_kind=anonymous strip-id
normalization so the form echoes the canonical (post-strip) URL.
Parses a string-keyed map of URL params into either a validated keyword list
ready for Threadline.Query.validate_timeline_filters!/1 (success) or an
{:error, message} tuple (failure — invalid datetime, unknown actor kind,
or missing actor id).
Functions
Returns a string-keyed %{key => value} map suitable for re-rendering the
filter form on URL paste. Mirrors the actor_kind=anonymous strip-id
normalization so the form echoes the canonical (post-strip) URL.
Parses a string-keyed map of URL params into either a validated keyword list
ready for Threadline.Query.validate_timeline_filters!/1 (success) or an
{:error, message} tuple (failure — invalid datetime, unknown actor kind,
or missing actor id).
Returns {:ok, []} for an empty input map (no filters supplied).