Skip to content

Settings validation gaps: negative file_storage quota_bytes, soft task time limit above the hard limit #548

Closed

Description

@antosubash

Found by browser QA of #525. These predate that PR.

  • file_storage.quota_bytes (int | None, modules/file_storage/file_storage/settings.py) has no bound. -1, 0 and 2**63 are all accepted through the editor and the API, and the browse screen then measures usage against a nonsensical total. Fix: Field(default=None, gt=0), keeping None = unmeasured, plus a test. Check that no stored row would stop hydrating; lenient hydration already logs and drops such a row.
  • background_tasks.task_soft_time_limit / task_time_limit: a soft limit of 100 with a hard limit of 50 is accepted, so the soft limit can never fire. Fix: a model validator requiring soft < hard when both are set.
  • Minor: task_reject_on_worker_lost accepts the string "yes" as true through the API (pydantic's lax bool). This is probably acceptable; note it only if a strict bool is wanted.

https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions