Skip to content

web: guard against poisoned stream_policy rows in /sessions #278

Description

@CrazyWillBear

When listing sessions in the /sessions route, if any row has a malformed stream_policy value in the database, StreamPolicy.from_dict() raises ValueError, which breaks the entire sidebar (the route 500s, client fallback collapses the buffer list).

Currently all write paths validate (session_tools and #265's /policy both 400 via from_dict), so this needs a hand-edited DB — but open blocker #275 already flags the identical hazard at dispatch.py:149.

Fix: add per-row fallback + log in the sessions route (line ~119-120), matching the per-row fallback pattern from #275.

See also: app.py:116

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    review-fixFollow-up fix from a round reviewtier:standardcomplexity tier: standard

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions