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): a conversation file transferred to the knowledge base has no owner or visibility #20233
_to_knowledge_base in autobot-backend/conversation_file_transfer.py (PR #20213) writes the knowledge base fact with no owner_id or visibility. It fails closed as admin-only, but it is not owned by the uploader and can be pruned. It will also meet the write-path guard from #20185 when both land.
Acceptance criteria
A transferred fact records its owner and a visibility, with a test.
Checked on main 6b66650 (merge train PR #20245): not delivered. _to_knowledge_base in conversation_file_transfer.py sets no owner_id or visibility. The write-path guard it names (#20185) has now merged, so criterion 2 can be checked once criterion 1 lands. Both stay unticked.
Verified against origin/main after the merge train (PR #20598) landed (#20461 is a member).
AC
Evidence
Transferred fact records owner and visibility, with a test
autobot-backend/conversation_file_transfer.py:63-87_to_knowledge_base sets owner_id and visibility: ScopeLevel.PRIVATE.value, and refuses with no owner. Tests in autobot-backend/api/conversation_files_real_manager_20225_test.py assert (owner_id, visibility) == ("root", "private") and the owner id from a token user_id claim. The owner is the verified transferring principal, not the uploader, because uploaded_by can come from a request body.
#20185 is merged. conversation_file_route_api.py:118-122 runs the transfer in caller_write_scope_for(principal); test_the_transfer_runs_in_a_caller_write_scope asserts the scope has role admin. The PR notes the guard returns admin metadata unchanged, so it changes nothing on this route today.
Not covered by tests: the vector-store where clause and a real (unmocked) add_document. All listed criteria have evidence; closing is a maintainer call.
Closing: both criteria are ticked, with the evidence in the comment above, re-read from main at 655489c (conversation_file_transfer.py:64-86; conversation_files_real_manager_20225_test.py:248,266). The remaining test gap on the vector-store query moves to #20669. Entries transferred before this landed were not looked for; any backfill goes through the review queue (#17038).
Checked against main at merge ae35848 (the merge train, PR #20713; member #20668 (Refs)).
AC
Evidence
A transferred fact records its owner and a visibility, with a test
DELIVERED. autobot-backend/conversation_file_transfer.py_to_knowledge_base sets owner_id and visibility: ScopeLevel.PRIVATE.value, and refuses with no owner. Test: api/conversation_files_real_manager_20225_test.py (test_only_the_owner_reads_the_transferred_fact_through_the_real_search_filter)
It passes the write-path guard from #20185, once that lands
DELIVERED. #20185 is merged; test_the_transfer_runs_in_a_caller_write_scope in the same test file pins the transfer running under knowledge.write_scope. Unchanged by this merge; state stays closed
Activity
mrveiss commentedon Oct 31, 2026
Checked on main 6b66650 (merge train PR #20245): not delivered.
_to_knowledge_baseinconversation_file_transfer.pysets noowner_idorvisibility. The write-path guard it names (#20185) has now merged, so criterion 2 can be checked once criterion 1 lands. Both stay unticked.fix(chat): own a transferred KB fact by the verified caller in the re…
chore(merge): merge origin/main into issue-20233-kb-transfer-owner (#…
github-actions commentedon Nov 2, 2026
Landed via the merge train (#20598, merge
87eae8acf8) via #20461mrveiss commentedon Nov 2, 2026
Verified against
origin/mainafter the merge train (PR #20598) landed (#20461 is a member).autobot-backend/conversation_file_transfer.py:63-87_to_knowledge_basesetsowner_idandvisibility: ScopeLevel.PRIVATE.value, and refuses with no owner. Tests inautobot-backend/api/conversation_files_real_manager_20225_test.pyassert(owner_id, visibility) == ("root", "private")and the owner id from a tokenuser_idclaim. The owner is the verified transferring principal, not the uploader, becauseuploaded_bycan come from a request body.conversation_file_route_api.py:118-122runs the transfer incaller_write_scope_for(principal);test_the_transfer_runs_in_a_caller_write_scopeasserts the scope has role admin. The PR notes the guard returns admin metadata unchanged, so it changes nothing on this route today.Not covered by tests: the vector-store
whereclause and a real (unmocked)add_document. All listed criteria have evidence; closing is a maintainer call.mrveiss commentedon Nov 2, 2026
Closing: both criteria are ticked, with the evidence in the comment above, re-read from
mainat 655489c (conversation_file_transfer.py:64-86;conversation_files_real_manager_20225_test.py:248,266). The remaining test gap on the vector-store query moves to #20669. Entries transferred before this landed were not looked for; any backfill goes through the review queue (#17038).github-actions commentedon Nov 3, 2026
Landed via the merge train (#20713, merge
ae35848bb7) via #20668mrveiss commentedon Nov 3, 2026
Checked against
mainat merge ae35848 (the merge train, PR #20713; member #20668 (Refs)).autobot-backend/conversation_file_transfer.py_to_knowledge_basesetsowner_idandvisibility: ScopeLevel.PRIVATE.value, and refuses with no owner. Test:api/conversation_files_real_manager_20225_test.py(test_only_the_owner_reads_the_transferred_fact_through_the_real_search_filter)test_the_transfer_runs_in_a_caller_write_scopein the same test file pins the transfer running underknowledge.write_scope. Unchanged by this merge; state stays closed