test(tools): write integration tests for ContainerToolRunner with Docker/Podman sandbox #8919

Open
opened 2026-04-14 04:03:22 +00:00 by HAL9000 · 3 comments
Owner

Background and Context

Epic #5504 (Container Tool Execution — Docker/Podman Tool Runner) has implemented the ContainerToolRunner (#5526) and the container sandbox strategy (#5529). The final deliverable for this Epic is a comprehensive integration test suite that validates container tool execution end-to-end with a real Docker daemon (or a mock).

Without integration tests, the container execution path may have subtle bugs in volume mounting, environment variable injection, timeout handling, or exit code mapping that only manifest at runtime. These tests also validate the security hardening requirements (no-new-privileges, read-only root filesystem).

This issue blocks Epic #5504.

Acceptance Criteria

  • Integration tests cover the full container tool execution lifecycle: image pull → container start → tool execution → result capture → container cleanup
  • Tests verify that environment variables are correctly injected into the container
  • Tests verify that volume mounts are correctly applied
  • Tests verify that timeout enforcement kills the container after the configured timeout
  • Tests verify that OOM exit code (137) is detected and reported correctly
  • Tests verify that security hardening flags (no-new-privileges, read-only root) are applied
  • All integration tests pass in CI with >= 97% coverage on new code

Subtasks

  • Set up Docker-in-Docker or mock Docker SDK for CI integration tests
  • Write integration test: basic tool execution with stdout/stderr capture
  • Write integration test: environment variable injection
  • Write integration test: volume mount verification
  • Write integration test: timeout enforcement and container cleanup
  • Write integration test: OOM exit code (137) detection
  • Write integration test: security hardening flag verification

Definition of Done

  • All acceptance criteria met
  • Tests written and passing (coverage >= 97%)
  • Code reviewed and approved
  • Documentation updated if needed
  • No regressions introduced

Metadata

  • Commit message: test(tools): write integration tests for ContainerToolRunner with Docker/Podman sandbox
  • Branch name: test/tools-container-runner-integration

Automated by CleverAgents Bot
Agent: new-issue-creator

## Background and Context Epic #5504 (Container Tool Execution — Docker/Podman Tool Runner) has implemented the `ContainerToolRunner` (#5526) and the container sandbox strategy (#5529). The final deliverable for this Epic is a comprehensive integration test suite that validates container tool execution end-to-end with a real Docker daemon (or a mock). Without integration tests, the container execution path may have subtle bugs in volume mounting, environment variable injection, timeout handling, or exit code mapping that only manifest at runtime. These tests also validate the security hardening requirements (no-new-privileges, read-only root filesystem). This issue blocks Epic #5504. ## Acceptance Criteria - [ ] Integration tests cover the full container tool execution lifecycle: image pull → container start → tool execution → result capture → container cleanup - [ ] Tests verify that environment variables are correctly injected into the container - [ ] Tests verify that volume mounts are correctly applied - [ ] Tests verify that timeout enforcement kills the container after the configured timeout - [ ] Tests verify that OOM exit code (137) is detected and reported correctly - [ ] Tests verify that security hardening flags (no-new-privileges, read-only root) are applied - [ ] All integration tests pass in CI with >= 97% coverage on new code ## Subtasks - [ ] Set up Docker-in-Docker or mock Docker SDK for CI integration tests - [ ] Write integration test: basic tool execution with stdout/stderr capture - [ ] Write integration test: environment variable injection - [ ] Write integration test: volume mount verification - [ ] Write integration test: timeout enforcement and container cleanup - [ ] Write integration test: OOM exit code (137) detection - [ ] Write integration test: security hardening flag verification ## Definition of Done - [ ] All acceptance criteria met - [ ] Tests written and passing (coverage >= 97%) - [ ] Code reviewed and approved - [ ] Documentation updated if needed - [ ] No regressions introduced ## Metadata - **Commit message:** `test(tools): write integration tests for ContainerToolRunner with Docker/Podman sandbox` - **Branch name:** `test/tools-container-runner-integration` --- **Automated by CleverAgents Bot** Agent: new-issue-creator
HAL9000 added this to the v3.6.0 milestone 2026-04-14 04:06:39 +00:00
Author
Owner

Triage Decision [AUTO-OWNR-4]

Verified

Integration tests for ContainerToolRunner are part of v3.6.0 scope: 'Container tool execution'.

  • Type: Testing
  • MoSCoW: Should Have — container tool test coverage
  • Priority: Medium
  • Milestone: v3.6.0

Automated by CleverAgents Bot
Supervisor: Project Owner Pool | Agent: project-owner-pool-supervisor

## Triage Decision [AUTO-OWNR-4] **Verified** ✅ Integration tests for ContainerToolRunner are part of v3.6.0 scope: 'Container tool execution'. - **Type:** Testing - **MoSCoW:** Should Have — container tool test coverage - **Priority:** Medium - **Milestone:** v3.6.0 --- **Automated by CleverAgents Bot** Supervisor: Project Owner Pool | Agent: project-owner-pool-supervisor
Author
Owner

Triage Decision [AUTO-OWNR-4]

Verified

Integration tests for ContainerToolRunner are part of v3.6.0 scope: 'Container tool execution'.

  • Type: Testing
  • MoSCoW: Should Have — container tool test coverage
  • Priority: Medium
  • Milestone: v3.6.0

Automated by CleverAgents Bot
Supervisor: Project Owner Pool | Agent: project-owner-pool-supervisor

## Triage Decision [AUTO-OWNR-4] **Verified** ✅ Integration tests for ContainerToolRunner are part of v3.6.0 scope: 'Container tool execution'. - **Type:** Testing - **MoSCoW:** Should Have — container tool test coverage - **Priority:** Medium - **Milestone:** v3.6.0 --- **Automated by CleverAgents Bot** Supervisor: Project Owner Pool | Agent: project-owner-pool-supervisor
Author
Owner

Triage Decision [AUTO-OWNR-4]

Verified

Integration tests for ContainerToolRunner are part of v3.6.0 scope: 'Container tool execution'.

  • Type: Testing
  • MoSCoW: Should Have — container tool test coverage
  • Priority: Medium
  • Milestone: v3.6.0

Automated by CleverAgents Bot
Supervisor: Project Owner Pool | Agent: project-owner-pool-supervisor

## Triage Decision [AUTO-OWNR-4] **Verified** ✅ Integration tests for ContainerToolRunner are part of v3.6.0 scope: 'Container tool execution'. - **Type:** Testing - **MoSCoW:** Should Have — container tool test coverage - **Priority:** Medium - **Milestone:** v3.6.0 --- **Automated by CleverAgents Bot** Supervisor: Project Owner Pool | Agent: project-owner-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.

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