Skip to content

test(cli): test_agent_validate_behaviors_json asserts only success on a valid: false result #702

Description

@mocha06

Problem

test_agent_validate_behaviors_json in packages/cli/tests/test_cli_agent_automation_smoke.py asserts only body.get("success") is True. Its fixture is a move_card behavior with destinationPhaseId: "2" on a pipe with no phases, so the validator returns valid: false with one problem:

{'success': True, 'valid': False, 'problems': ['Behavior [0] "x", action [0] (move_card): destinationPhaseId "2" not found in pipe phases.'], 'warnings': [], 'message': 'Found 1 problem(s) in behaviors.'}

The test passes whether the validator reports that problem or not. A regression that drops the phase check does not fail it.

Proposal

Assert the result the fixture produces: valid is false, and problems names destinationPhaseId "2". The alternative is to give the fixture a phase 2 and assert valid is true, which mirrors the MCP twin of this test.

Context

The assert dates from 917d0fa. The review of #701 raised it, and it is out of scope there.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    choreMaintenance: CI, tooling, templates, housekeeping (not a feature)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions