Skip to content

Feature/command delay jitter#244

Merged
whotwagner merged 6 commits into
ait-testbed:developmentfrom
thorinaboenke:feature/command_delay_jitter
Jun 11, 2026
Merged

Feature/command delay jitter#244
whotwagner merged 6 commits into
ait-testbed:developmentfrom
thorinaboenke:feature/command_delay_jitter

Conversation

@thorinaboenke

@thorinaboenke thorinaboenke commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Task

#240

Description

schemas/config.py: Added three fields to CommandConfig with safe defaults so all existing playbooks are unaffected:

command_delay_jitter: bool = False
command_delay_jitter_min: float = 0.5
command_delay_jitter_max: float = 2.0

attackmate.py: Refactored the delay logic in _run_commands to compute per-command delay inside the loop. When jitter is off the behavior is identical to before. When on, it computes delay per command. The log message is now per-command (showing the actual delay used)

added unit tests to test/units/test_commanddelay.py

How Has This Been Tested?

new tests in
test/units/test_commanddelay.py

manual testing:
playbook:

commands:
  - type: shell
    cmd: whoami

  - type: shell
    cmd: whoami

  - type: shell
    cmd: whoami

  - type: shell
    cmd: whoami

  - type: shell
    cmd: whoami

config:

cmd_config:
  command_delay: 3
  command_delay_jitter: true
  command_delay_jitter_min: 0.5
  command_delay_jitter_max: 2.0

output:
image

config (testing min 0)

cmd_config:
  command_delay: 3
  command_delay_jitter: true
  command_delay_jitter_min: 0.5
  command_delay_jitter_max: 7
image

config (testing jitter false)

cmd_config:
  command_delay: 3
  command_delay_jitter: false
  command_delay_jitter_min: 0.5
  command_delay_jitter_max: 7
image

Checklist

  • This Pull-Request goes to the development branch.
  • I have successfully run prek locally.
  • I have added tests to cover my changes.
  • I have linked the issue-id to the task-description.
  • I have performed a self-review of my own code.

@thorinaboenke thorinaboenke changed the base branch from main to development June 11, 2026 08:27
@whotwagner whotwagner merged commit 130be53 into ait-testbed:development Jun 11, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants