You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug(chat): the same conversation file reports a different extension on the list and upload routes #21402
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.
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:32file_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.tsBackendConversationFile 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
Activity
github-actions commentedon Nov 14, 2026
Landed via the merge train (#21507, merge
78aca82701) via #21505mrveiss commentedon Nov 14, 2026
Closure check against
origin/mainafter train merge 78aca82 (PR #21505). All five criteria verified; the issue stays closed.autobot-backend/conversation_file_route_api.py:32file_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_COLUMNSno longer carries the SQL expression, andgit grep "INSTR("over backend non-test Python finds nothingconversation_file_extension_21402_test.py::test_file_extension_rule(README-> None, also.bashrc,file.) andtest_upload_list_and_info_report_the_same_extension[README]a.tar.gzagrees on both routesa.tar.gz->gzon the upload response, the list entry and the info rowtest_upload_list_and_info_report_the_same_extension(real SQLite and schema, both filenames, asserts upload, list and info)git grepfor.extension/extensionoverautobot-frontend/src(excluding tests and generated types) finds no reader of a conversation file's extension:utils/conversationFileList.tsBackendConversationFilehas no such field; the generatedConversationFileInfotype already declaresextension?: 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 exportLanded: train merge 78aca82 (PR #21505). State: stays closed.
fix(chat): one extension rule for the upload, list and info routes of…