Skip to content

bug(chat): the same conversation file reports a different extension on the list and upload routes #21402

Closed

Description

@mrveiss

Problem

The same conversation file reports two different extension values depending on the route. The list/info query derives it in SQL from the first dot; the upload response derives it in Python from the last dot.

Filename List / info route Upload response
README (no dot) readme (the whole name) None
a.tar.gz tar.gz gz

Evidence (origin/main)

  • autobot-backend/conversation_file_route_api.py:29 - LOWER(SUBSTR(cf.original_filename, INSTR(cf.original_filename, '.') + 1)) AS extension. INSTR returns 0 when there is no dot, so SUBSTR(name, 1) is the whole name.
  • autobot-backend/conversation_file_route_api.py:64 - filename.rsplit(".", 1)[-1].lower() if "." in filename else None.

Found while landing #20225; recorded there only as a comment.

Acceptance criteria

  • One definition of "extension" is chosen and used by both routes (single helper or single SQL expression, no second copy).
  • A name with no dot reports no extension on both routes.
  • a.tar.gz reports the same value on both routes.
  • A regression test uploads each of the two filenames above and asserts the upload response and the list response agree.
  • Any frontend consumer of extension is checked against the chosen rule.

Activity

  1. added
    needs-ac-evidenceClosed by a merge keyword; awaits an AC evidence table comment (#19520)
    on Nov 14, 2026
  2. github-actions commented on Nov 14, 2026

    @github-actions
    Contributor

    Landed via the merge train (#21507, merge 78aca82701) via #21505

  3. mrveiss commented on Nov 14, 2026

    @mrveiss
    OwnerAuthor

    Closure check against origin/main after train merge 78aca82 (PR #21505). All five criteria verified; the issue stays closed.

    Criterion Evidence on main Ticked
    One definition of "extension", no second copy autobot-backend/conversation_file_route_api.py:32 file_extension (text after the last dot of the basename, lower-cased); with_extension (:43) is applied on upload (:79) and on the info/list rows (:135). FILE_INFO_COLUMNS no longer carries the SQL expression, and git grep "INSTR(" over backend non-test Python finds nothing yes
    No dot reports no extension on both routes conversation_file_extension_21402_test.py::test_file_extension_rule (README -> None, also .bashrc, file.) and test_upload_list_and_info_report_the_same_extension[README] yes
    a.tar.gz agrees on both routes same test, a.tar.gz -> gz on the upload response, the list entry and the info row yes
    Regression test uploads both names and compares upload vs list test_upload_list_and_info_report_the_same_extension (real SQLite and schema, both filenames, asserts upload, list and info) yes
    Frontend consumers checked git grep for .extension / extension over autobot-frontend/src (excluding tests and generated types) finds no reader of a conversation file's extension: utils/conversationFileList.ts BackendConversationFile has no such field; the generated ConversationFileInfo type already declares extension?: string | null, so a null is within the contract. The remaining hits are the filesystem browser (derives its own from the name) and the knowledge export yes

    Landed: train merge 78aca82 (PR #21505). State: stays closed.

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 workingneeds-ac-evidenceClosed by a merge keyword; awaits an AC evidence table comment (#19520)phase:M3.9Chat, Agents, Analytics and Settings screenspriority: medium

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions