UAT: ChangeSetCapture not integrated with container execution path in ToolRunner — file changes inside containers not tracked #6148

Open
opened 2026-04-09 15:34:07 +00:00 by HAL9000 · 0 comments
Owner

Bug Report

Feature Area: Container Tool Execution — ChangeSet Integration
Severity: Non-critical (backlog)
Found by: UAT Testing (container-tool-execution worker)


What Was Tested

Code-level analysis of ToolRunner.execute() and ChangeSetCapture integration against the spec's requirement that all file mutations are tracked in the ChangeSet.

Expected Behavior (from spec)

The spec requires that all tool mutations during plan execution are captured in the ChangeSet for audit trail and rollback purposes. The ChangeSetCapture wraps tool handlers to record ChangeEntry records for every write operation.

For container-routed tools, file changes made inside the container (via sync_results_to_host) should also be captured in the ChangeSet.

Actual Behavior

ToolRunner.execute() has two distinct code paths:

Host path (lines 460-510): Calls spec.handler(inputs) directly. The ChangeSetCapture.wrap_tool() mechanism can wrap these handlers to capture changes.

Container path (lines 397-447): Delegates directly to self._container_executor.execute_tool() without any ChangeSet capture:

# runner.py lines 440-447
try:
    return self._container_executor.execute_tool(
        tool_name,
        inputs,
        timeout_seconds=timeout_seconds,
    )
except Exception as exc:
    ...

There is no ChangeSetCapture wrapping for container-routed tools. File changes made inside containers are not recorded in the ChangeSet, breaking the audit trail and making rollback impossible for container-executed tools.

Code Location

  • src/cleveragents/tool/runner.py lines 397-447 — container execution path, no ChangeSet capture
  • src/cleveragents/tool/builtins/changeset.pyChangeSetCapture.wrap_tool() — only wraps host-side handlers
  • src/cleveragents/application/services/plan_executor.py lines 226-232 — ChangeSetCapture only used for host execution

Impact

Container-executed tools produce no ChangeSet entries. The agents plan diff command will show no changes for container-executed plans. Rollback via agents plan rollback will not restore files modified inside containers.


Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: uat-tester

## Bug Report **Feature Area:** Container Tool Execution — ChangeSet Integration **Severity:** Non-critical (backlog) **Found by:** UAT Testing (container-tool-execution worker) --- ## What Was Tested Code-level analysis of `ToolRunner.execute()` and `ChangeSetCapture` integration against the spec's requirement that all file mutations are tracked in the ChangeSet. ## Expected Behavior (from spec) The spec requires that all tool mutations during plan execution are captured in the ChangeSet for audit trail and rollback purposes. The `ChangeSetCapture` wraps tool handlers to record `ChangeEntry` records for every write operation. For container-routed tools, file changes made inside the container (via `sync_results_to_host`) should also be captured in the ChangeSet. ## Actual Behavior `ToolRunner.execute()` has two distinct code paths: **Host path** (lines 460-510): Calls `spec.handler(inputs)` directly. The `ChangeSetCapture.wrap_tool()` mechanism can wrap these handlers to capture changes. **Container path** (lines 397-447): Delegates directly to `self._container_executor.execute_tool()` **without any ChangeSet capture**: ```python # runner.py lines 440-447 try: return self._container_executor.execute_tool( tool_name, inputs, timeout_seconds=timeout_seconds, ) except Exception as exc: ... ``` There is no `ChangeSetCapture` wrapping for container-routed tools. File changes made inside containers are not recorded in the ChangeSet, breaking the audit trail and making rollback impossible for container-executed tools. ## Code Location - `src/cleveragents/tool/runner.py` lines 397-447 — container execution path, no ChangeSet capture - `src/cleveragents/tool/builtins/changeset.py` — `ChangeSetCapture.wrap_tool()` — only wraps host-side handlers - `src/cleveragents/application/services/plan_executor.py` lines 226-232 — `ChangeSetCapture` only used for host execution ## Impact Container-executed tools produce no ChangeSet entries. The `agents plan diff` command will show no changes for container-executed plans. Rollback via `agents plan rollback` will not restore files modified inside containers. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.6.0 milestone 2026-04-09 21:17:34 +00:00
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#6148
No description provided.