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): conversation file routes call manager methods that do not exist #20225
autobot-backend/api/conversation_files.py calls file_manager.upload_file, get_file_info, delete_file and transfer_files. ConversationFileManager (autobot-backend/conversation_file_manager.py:104) defines none of them, has no base class, and no __getattr__; it has add_file, get_session_files, delete_session_files and others. add_file's response also lacks filename, size and uploaded_by, which ConversationFileInfo requires.
Every test mocks the manager, so none exercises this wiring. By reading the code, these routes raise at runtime, for admins too, so chat file upload may never have worked.
Not known
Not run against a live backend; the local install's last update did not finish.
Also
The dedup path logs access with type reference, which the file_access_log CHECK constraint rejects, so the log write fails with a warning on every dedup.
Acceptance criteria
Each route calls a method the manager really has, with the response matching its schema.
A test exercises the upload route against the real ConversationFileManager on real SQLite, with no mock of the manager.
The same is checked for list, download, preview, delete and transfer, or each gap is recorded.
A dedup access log write succeeds.
Host: an upload succeeds on the local install, after a finished update.
Wired on the #20213 branch (not pushed yet). Gaps left, each with file:line on that branch:
autobot-backend/conversation_file_route_api.py:27: the list/info extension SQL returns the whole filename for a name with no dot (it is the SUBSTR after INSTR, which is 0 when there is no dot). The upload response (line 47) returns null for that case, so the two disagree. Pre-existing SQL, moved into one shared constant.
conversation_file_route_api.py:38: the upload route does not pass the multipart content type to the manager, so the stored mime type is guessed from the filename.
conversation_file_transfer.py:49: a transfer to the knowledge base accepts only UTF-8 text files; binary files fail per file with a reason. PDF/Office extraction is wider than this PR.
conversation_file_route_api.py:111: a transfer 'move' soft-deletes the source (the row is kept, the file stays on disk for the cleanup queue); nothing is hard-deleted by the route.
The dedup access log now uses type upload with reference: true in its metadata, because the CHECK on file_access_log has no reference and changing it needs a schema migration, which an agent may not do.
To do after PR #20213 lands, from its review: _shared_target in autobot-backend/conversation_file_transfer.py checks exists() and then calls copyfile, which can race, so open the target with exclusive create. Add tests for an existing-target collision, an absolute path and a symlink on the shared target; today only .. is covered. Low severity, not blocking its landing.
Closure pass, checked against origin/main at c2b5a4fa95. I read the code and the install's logs. I ran no tests and made no requests that change data.
Local install state (read-only observation, 2026-11-15): every component's deployed-commit marker reads c2b5a4fa95, which is current main. The builtin update that produced it finished: its play recap reports failed=0, and the backend service restarted after the sync. The fix (merge 87819661d3) is an ancestor of c2b5a4fa95.
autobot-backend/api/conversation_files_real_manager_20225_test.py is present on main
Host: an upload succeeds on the local install, after a finished update
no
The update finished and the conversation_files router is registered at startup. However, the backend logs since the update show no upload request to /api/conversation-files/.../upload, only GET .../cleanup/status. The install's conversation-file storage directory holds 0 files. No upload has run, and making one needs an authenticated write, which a read-only check cannot do.
Still needed: one chat file upload on the local install at c2b5a4fa95 or later, which should show a stored file and a 2xx upload line in the backend log. The open sub-issues stay as they are. The issue stays open.
State change from PR #21732 (merge df23644): the dedup access log now records a reference access type (#21404, closed) and the upload route forwards the declared content type through one mime rule (#21403, closed); both were gaps recorded from this issue. No criterion here changes: the host criterion still needs host evidence, and the issue stays open.
Host evidence — local install on main @ df23644 (2026-11-17 22:32 Riga)
The running backend files match the deployed tree at df23644 (which includes #21730 and #21732). The backend was restarted after the deployment.
AC
Verdict
Evidence
Host: an upload succeeds on the local install, after a finished update.
PASS (ticked)
POST /api/conversation-files/conversation/<session>/upload with a 25-byte evidence.txt (text/plain) returned 200 with success: true, mime_type: text/plain, extension: txt, uploaded_by: admin. The conversation_files row was stored (file_size 25, quota_owner admin, is_deleted 0). A file_access_log row has access_type 'upload'. The backend logged Stored file: … (25 bytes) and Added file <id> to session <id>: evidence.txt (25 bytes), with no errors in the upload window.
Scope: this upload was made through the API, not the browser UI. The chat-UI path is #20133's host AC, which is still open. The dedup access-log path was not exercised on the host (one upload only). Its AC above is covered by tests, and the CHECK constraint now allows reference on the host (see #21404).
All 5 acceptance criteria are ticked. The code landed in #21730 and #21732 (merge df23644). The host criteria passed on the local install at df23644; see the host-evidence comment above (2026-11-17). check-issue-close-refs.sh 20225: Gate 2 clear.
Activity
mrveiss commentedon Oct 31, 2026
Wired on the #20213 branch (not pushed yet). Gaps left, each with file:line on that branch:
autobot-backend/conversation_file_route_api.py:27: the list/infoextensionSQL returns the whole filename for a name with no dot (it is the SUBSTR after INSTR, which is 0 when there is no dot). The upload response (line 47) returns null for that case, so the two disagree. Pre-existing SQL, moved into one shared constant.conversation_file_route_api.py:38: the upload route does not pass the multipart content type to the manager, so the stored mime type is guessed from the filename.conversation_file_transfer.py:49: a transfer to the knowledge base accepts only UTF-8 text files; binary files fail per file with a reason. PDF/Office extraction is wider than this PR.conversation_file_route_api.py:111: a transfer 'move' soft-deletes the source (the row is kept, the file stays on disk for the cleanup queue); nothing is hard-deleted by the route.uploadwithreference: truein its metadata, because the CHECK onfile_access_loghas noreferenceand changing it needs a schema migration, which an agent may not do.fix(chat): the conversation file routes call methods the manager real…
mrveiss commentedon Oct 31, 2026
To do after PR #20213 lands, from its review:
_shared_targetinautobot-backend/conversation_file_transfer.pychecksexists()and then callscopyfile, which can race, so open the target with exclusive create. Add tests for an existing-target collision, an absolute path and a symlink on thesharedtarget; today only..is covered. Low severity, not blocking its landing.chore(merge): merge origin/main into issue-20133-own-conversation-upl…
fix(chat): dedupe re-uploads, keep shared files on delete, and write …
fix(chat): re-pin the reach floors tree growth moved (#20225)
fix(train): the write chokepoint guard classifies the conversation fi…
3 remaining items
mrveiss commentedon Nov 2, 2026
Checked against origin/main 87eae8a, by reading the code and tests; the tests were not rerun.
ConversationFileManager(ConversationFileRouteApi)atconversation_file_manager.py:52;conversation_file_route_api.pydefinesupload_file,get_file_info,delete_file,transfer_files;list_filesatconversation_file_manager.py:864.api/conversation_files_real_manager_20225_test.py::test_upload_stores_the_file_on_disk_and_in_the_db_with_a_valid_responseconversation_file_manager.py:685;test_a_duplicate_upload_in_the_same_session_dedups_and_its_access_log_is_writtenStays open for the host check.
github-actions commentedon Nov 13, 2026
Landed via the merge train (#21454, merge
87819661d3) via #21401mrveiss commentedon Nov 13, 2026
Landed with merge train #21454 (8781966), member PR #21401. Checked against origin/main at 8781966, by reading code; tests were not run here.
PR #21401 touches the file panel and preview only, so it does not move any criterion here. Re-checked on main:
autobot-backend/conversation_file_manager.py:56ConversationFileManager(ConversationFileRouteApi);conversation_file_route_api.pydefinesupload_file(:40),get_file_info(:106),delete_file(:137),transfer_files(:160)api/conversation_files_real_manager_20225_test.pyreferencetypeStill open: the host criterion; open sub-issues #20487, #21402, #21403, #21404. The issue stays open.
mrveiss commentedon Nov 15, 2026
Closure pass, checked against
origin/mainatc2b5a4fa95. I read the code and the install's logs. I ran no tests and made no requests that change data.Local install state (read-only observation, 2026-11-15): every component's deployed-commit marker reads
c2b5a4fa95, which is currentmain. The builtin update that produced it finished: its play recap reportsfailed=0, and the backend service restarted after the sync. The fix (merge87819661d3) is an ancestor ofc2b5a4fa95.autobot-backend/conversation_file_manager.py:56class ConversationFileManager(ConversationFileRouteApi);conversation_file_route_api.pyupload_file:55,get_file_info:120,delete_file:151,transfer_files:174autobot-backend/api/conversation_files_real_manager_20225_test.pyis present on mainconversation_filesrouter is registered at startup. However, the backend logs since the update show no upload request to/api/conversation-files/.../upload, onlyGET .../cleanup/status. The install's conversation-file storage directory holds 0 files. No upload has run, and making one needs an authenticated write, which a read-only check cannot do.Still needed: one chat file upload on the local install at
c2b5a4fa95or later, which should show a stored file and a 2xx upload line in the backend log. The open sub-issues stay as they are. The issue stays open.mrveiss commentedon Nov 17, 2026
State change from PR #21732 (merge df23644): the dedup access log now records a
referenceaccess type (#21404, closed) and the upload route forwards the declared content type through one mime rule (#21403, closed); both were gaps recorded from this issue. No criterion here changes: the host criterion still needs host evidence, and the issue stays open.github-actions commentedon Nov 17, 2026
Landed in #21732, merge
df23644addmrveiss commentedon Nov 17, 2026
Host evidence — local install on
main@ df23644 (2026-11-17 22:32 Riga)The running backend files match the deployed tree at df23644 (which includes #21730 and #21732). The backend was restarted after the deployment.
POST /api/conversation-files/conversation/<session>/uploadwith a 25-byteevidence.txt(text/plain) returned 200 withsuccess: true,mime_type: text/plain,extension: txt,uploaded_by: admin. Theconversation_filesrow was stored (file_size 25,quota_owner admin,is_deleted 0). Afile_access_logrow hasaccess_type 'upload'. The backend loggedStored file: … (25 bytes)andAdded file <id> to session <id>: evidence.txt (25 bytes), with no errors in the upload window.Scope: this upload was made through the API, not the browser UI. The chat-UI path is #20133's host AC, which is still open. The dedup access-log path was not exercised on the host (one upload only). Its AC above is covered by tests, and the CHECK constraint now allows
referenceon the host (see #21404).Not closing: left for the maintainer.
mrveiss commentedon Nov 20, 2026
All 5 acceptance criteria are ticked. The code landed in #21730 and #21732 (merge df23644). The host criteria passed on the local install at df23644; see the host-evidence comment above (2026-11-17).
check-issue-close-refs.sh 20225: Gate 2 clear.