Skip to content

Bug_196_EVALUATE: CHAT-BOUNDARY-013 — Both required fields None crash agent before any task is dispatched #417

@steadhac

Description

@steadhac

Component: finbot/agents/chat.py → VendorChatAssistant._call_start_workflow (line 229)

Root cause:

Same as CHAT-BOUNDARY-012. When both description=None and vendor_id=None are passed,
description[:100] on line 229 crashes first. The crash masks the vendor_id=None gap
(TICKET 9) — neither field is validated before the exception is raised.

Steps to reproduce:

  1. Call _call_start_workflow(None, vendor_id=None).

Expected: {"error": "description and vendor_id are required"}
Actual: TypeError: 'NoneType' object is not subscriptable

How to execute:

pytest tests/unit/agents/test_chat_assistant.py::TestBoundaryAndTypeValues::test_chat_boundary_013_both_required_fields_none_crashes -v

Proposed fix: Same unified guard as TICKET 10 — check both fields at the top of
the method before any other logic runs.

Impact: The most degenerate possible LLM tool call — all required fields absent —
produces an unhandled crash rather than a recoverable error. Resolving TICKETS 9, 10,
and 11 together with a single early-return guard covers all combinations.

Acceptance criteria:

  • test_chat_boundary_013_both_required_fields_none_crashes updated to assert error JSON
  • Single guard at method entry handles description is None OR vendor_id is None

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions