Skip to content

fix(chat): conversation-file quota hardening: env ranges, dedupe-aware check, test default #20722

Closed

Description

@mrveiss

Problem

Found in review on the merge train (PR #20713), on the conversation-file quota:

  1. env() applies the registered type but never the registered range, for every variable. A negative AUTOBOT_CONVERSATION_FILE_USER_QUOTA_BYTES would refuse every upload.
  2. The pre-read quota check refuses a re-upload of identical bytes that add_file would deduplicate without storing anything.
  3. conversation_files_upload_limits_20217_test.py:75 compares the runtime value to the default, so it fails when the variable is set.

Acceptance criteria

  • env() enforces each registered range, falling back with a warning. Fixed once for all variables, with a test.
  • A same-session re-upload of identical bytes isn't refused by the pre-read check. Tested.
  • The test compares only the registered default.

Activity

  1. added
    bugSomething isn't working
    phase:M3.9Chat, Agents, Analytics and Settings screens
    on Nov 3, 2026
  2. mrveiss commented on Nov 11, 2026

    @mrveiss
    OwnerAuthor

    All acceptance criteria delivered by #21273, landed via #21326 (merge commit 6cd72da).

    AC (verbatim) Evidence on main
    env() enforces each registered range, falling back with a warning. Fixed once for all variables, with a test. autobot_shared/env_registry.py:53-55 calls within_range (autobot_shared/env_utils.py:145, warns, returns False -> fallback); test autobot_shared/env_range_enforcement_20722_test.py:29 test_out_of_range_falls_back_with_warning
    A same-session re-upload of identical bytes isn't refused by the pre-read check. Tested. autobot-backend/api/conversation_file_upload.py:44-62 (would_deduplicate, autobot-backend/conversation_file_route_api.py:96); test autobot-backend/api/conversation_files_upload_limits_20217_test.py:79
    The test compares only the registered default. autobot-backend/api/conversation_files_upload_limits_20217_test.py:72-76 asserts REGISTRY[...].default == 1 << 30

    No forward-tracking references to #20722 found on main.

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

    backendbugSomething isn't workingphase:M3.9Chat, Agents, Analytics and Settings screens

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions