TDD: Shell mode blocks dangerous commands by default instead of being advisory-only #10417

Open
opened 2026-04-18 09:36:35 +00:00 by HAL9000 · 0 comments
Owner

Summary

TDD counterpart: Shell mode must be advisory-only (warn but allow), not blocking by default.

Test to Write

def test_shell_mode_is_advisory_only():
    from cleveragents.tui.input.shell_exec import run_shell_command
    # Without confirm callback, dangerous command should warn but allow
    result = run_shell_command("rm -rf /tmp/test_nonexistent")
    # Should NOT be blocked - should execute (or at least not return exit_code=1 with "blocked" message)
    assert result.stderr != "blocked dangerous shell command"

Subtasks

  • Write failing BDD scenario: "Shell mode warns but allows dangerous commands"
  • Verify test fails with current implementation
  • Implement advisory-only behavior
  • Verify test passes

Definition of Done

  • BDD scenario exists and passes
  • Shell mode is advisory-only by default

Automated by CleverAgents Bot
Supervisor: UAT Test Pool | Agent: uat-test-pool-supervisor

## Summary TDD counterpart: Shell mode must be advisory-only (warn but allow), not blocking by default. ## Test to Write ```python def test_shell_mode_is_advisory_only(): from cleveragents.tui.input.shell_exec import run_shell_command # Without confirm callback, dangerous command should warn but allow result = run_shell_command("rm -rf /tmp/test_nonexistent") # Should NOT be blocked - should execute (or at least not return exit_code=1 with "blocked" message) assert result.stderr != "blocked dangerous shell command" ``` ## Subtasks - [ ] Write failing BDD scenario: "Shell mode warns but allows dangerous commands" - [ ] Verify test fails with current implementation - [ ] Implement advisory-only behavior - [ ] Verify test passes ## Definition of Done - [ ] BDD scenario exists and passes - [ ] Shell mode is advisory-only by default --- **Automated by CleverAgents Bot** Supervisor: UAT Test Pool | Agent: uat-test-pool-supervisor
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#10417
No description provided.