Component: finbot/tools/data/vendor.py → update_vendor_agent_notes
Root cause:
# No content check — "\t" passes through
new_notes = f"{existing_notes}\n\n{agent_notes}" # ← produces "\n\n\t"
Steps to reproduce:
- Create a vendor
- Call update_vendor_agent_notes(vendor.id, "\t", session)
Expected behavior: ValueError raised — tab-only notes carry no meaningful content
Actual behavior: Tab character appended to vendor notes
How to execute:
pytest tests/unit/tools/test_vendor.py::TestUpdateVendorAgentNotes::test_vnd_notes_010_tab_only_notes_accepted_without_validation -v
Proposed fix:
if not agent_notes or not agent_notes.strip():
raise ValueError("agent_notes must not be empty or whitespace-only")
Impact:
Confirms the whitespace guard must use .strip() (which catches tabs) rather than only checking for space characters.
Acceptance criteria:
- "\t", "\t\t" raise ValueError
- "Vendor reviewed" is accepted
Component: finbot/tools/data/vendor.py → update_vendor_agent_notes
Root cause:
Steps to reproduce:
Expected behavior: ValueError raised — tab-only notes carry no meaningful content
Actual behavior: Tab character appended to vendor notes
How to execute:
Proposed fix:
Impact:
Confirms the whitespace guard must use .strip() (which catches tabs) rather than only checking for space characters.
Acceptance criteria: