Files
brent.edwards cb28ecf63d test(security): cover safety profile enforcement
Add 20 new Behave BDD scenarios across two feature files to validate
SafetyProfile model constraints and Action-level safety integration:

safety_profile.feature (12 scenarios):
  - Boolean flag toggles (sandbox, checkpoints, unsafe_tools, human_approval)
  - Empty/deny-none skill categories semantics
  - Cost-without-total and total-without-cost partial bounds
  - Type validation (string rejected for numeric field)
  - Negative cost rejection via profile (-5.0)
  - Upper-bound retries acceptance (max_retries_per_step=100)
  - Restrictive full-constraint profile with content assertions

safety_profile_cost_retry.feature (8 scenarios):
  - Valid cost bounds with max_total_cost assertion
  - Cost-per-plan exceeds total rejection
  - Valid/invalid retry counts (0, 50, -1, 101)
  - Zero cost-per-plan acceptance
  - Equal cost-per-plan and total boundary acceptance
  - Missing profile defaults to no constraints

Additional changes:
  - Robot Framework: 2 smoke tests (validation rules, action attachment)
  - ASV benchmarks: safety_profile_tests_bench.py with setup()-based imports
  - Updated docs/development/testing.md with fixture documentation
  - Standardised exception handling to catch only ValidationError (not
    TypeError/ValueError) in step definitions
  - Added isinstance(ValidationError) assertions for error type checking
  - Fixed pre-existing server_mode test failures in cli_core.feature,
    cli_core.robot, server_stubs.robot, and helper_server_stubs.py by
    mocking resolve_server_mode in Behave steps and relaxing Robot
    assertions to accept both 'disabled' and 'stubbed'

ISSUES CLOSED: #333
2026-03-03 20:13:33 +00:00
..