UAT: devcontainer-instance sandbox strategy is NONE but ADR-043 specifies snapshot — container isolation not enforced at sandbox layer #4896

Open
opened 2026-04-08 20:17:06 +00:00 by HAL9000 · 2 comments
Owner

Bug Report

Feature Area: Devcontainer Integration — Sandbox Strategy
ADR Reference: ADR-043 §devcontainer-instance Resource Type (Sandbox strategy: snapshot inherited)
Severity: Medium (spec deviation; sandbox isolation semantics incorrect)


What Was Tested

ADR-043 specifies that devcontainer-instance inherits from container-instance and uses the snapshot sandbox strategy (inherited from container-instance).

Expected Behavior (from ADR-043)

| Sandbox strategy | snapshot (inherited) |

The devcontainer-instance resource type should use SandboxStrategy.SNAPSHOT for container-level checkpointing and rollback.

Actual Behavior

DevcontainerHandler explicitly overrides the sandbox strategy to SandboxStrategy.NONE:

# src/cleveragents/resource/handlers/devcontainer.py:155
_default_strategy = SandboxStrategy.NONE

The code comment explains this is a workaround:

F22/F25 fix: SNAPSHOT raises NotImplementedError in SandboxFactory. The container IS the sandbox for devcontainer-instance, so NONE is semantically correct until a dedicated container-snapshot strategy is implemented.

This is also documented in docs/reference/devcontainer_resources.md:

Sandbox strategy (F22/F25): Specification uses container_snapshot; SandboxFactory does not yet implement snapshot. Handler now uses SandboxStrategy.NONE — the container itself provides isolation.

Code Locations

  • Handler override: src/cleveragents/resource/handlers/devcontainer.py:155
  • Registry definition: src/cleveragents/application/services/_resource_registry_data.py:253"sandbox_strategy": "snapshot" (correctly set in registry but overridden in handler)
  • Known limitation: docs/reference/devcontainer_resources.md:251

Impact

  • Container-level checkpoints (environment state, installed packages, running processes) cannot be created or restored as specified in ADR-043 §Checkpoint Behavior.
  • The ADR-043 compliance test "Sandbox coordination tests: Bind-mounted devcontainer files have transparent coherence; volume-mounted files have independent coherence" cannot be fully validated.
  • Rollback of devcontainer state (e.g., after a failed plan execution that installed packages) is not possible.

Fix Required

Implement SandboxStrategy.SNAPSHOT in SandboxFactory for container resources. Once implemented, remove the _default_strategy = SandboxStrategy.NONE override in DevcontainerHandler and allow it to inherit snapshot from the registry definition. The implementation should use docker commit or equivalent for container state snapshots.


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

## Bug Report **Feature Area:** Devcontainer Integration — Sandbox Strategy **ADR Reference:** ADR-043 §`devcontainer-instance` Resource Type (Sandbox strategy: `snapshot` inherited) **Severity:** Medium (spec deviation; sandbox isolation semantics incorrect) --- ## What Was Tested ADR-043 specifies that `devcontainer-instance` inherits from `container-instance` and uses the `snapshot` sandbox strategy (inherited from `container-instance`). ## Expected Behavior (from ADR-043) > | **Sandbox strategy** | `snapshot` (inherited) | The `devcontainer-instance` resource type should use `SandboxStrategy.SNAPSHOT` for container-level checkpointing and rollback. ## Actual Behavior `DevcontainerHandler` explicitly overrides the sandbox strategy to `SandboxStrategy.NONE`: ```python # src/cleveragents/resource/handlers/devcontainer.py:155 _default_strategy = SandboxStrategy.NONE ``` The code comment explains this is a workaround: > F22/F25 fix: SNAPSHOT raises NotImplementedError in SandboxFactory. The container IS the sandbox for devcontainer-instance, so NONE is semantically correct until a dedicated container-snapshot strategy is implemented. This is also documented in `docs/reference/devcontainer_resources.md`: > **Sandbox strategy (F22/F25):** Specification uses `container_snapshot`; `SandboxFactory` does not yet implement `snapshot`. Handler now uses `SandboxStrategy.NONE` — the container itself provides isolation. ## Code Locations - Handler override: `src/cleveragents/resource/handlers/devcontainer.py:155` - Registry definition: `src/cleveragents/application/services/_resource_registry_data.py:253` — `"sandbox_strategy": "snapshot"` (correctly set in registry but overridden in handler) - Known limitation: `docs/reference/devcontainer_resources.md:251` ## Impact - Container-level checkpoints (environment state, installed packages, running processes) cannot be created or restored as specified in ADR-043 §Checkpoint Behavior. - The ADR-043 compliance test "Sandbox coordination tests: Bind-mounted devcontainer files have `transparent` coherence; volume-mounted files have `independent` coherence" cannot be fully validated. - Rollback of devcontainer state (e.g., after a failed plan execution that installed packages) is not possible. ## Fix Required Implement `SandboxStrategy.SNAPSHOT` in `SandboxFactory` for container resources. Once implemented, remove the `_default_strategy = SandboxStrategy.NONE` override in `DevcontainerHandler` and allow it to inherit `snapshot` from the registry definition. The implementation should use `docker commit` or equivalent for container state snapshots. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
freemo added this to the v3.5.0 milestone 2026-04-08 23:41:02 +00:00
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Medium — devcontainer-instance sandbox strategy is NONE but ADR-043 specifies snapshot
  • Milestone: v3.5.0 — Container sandbox strategy is M6 scope
  • Story Points: 3 — M — Aligning sandbox strategy with ADR-043
  • MoSCoW: Should Have — Spec alignment is important for correctness
  • Parent Epic: #360 (Autonomy Hardening + Stubs M6)

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

Issue triaged by project owner: - **State**: Verified - **Priority**: Medium — devcontainer-instance sandbox strategy is NONE but ADR-043 specifies `snapshot` - **Milestone**: v3.5.0 — Container sandbox strategy is M6 scope - **Story Points**: 3 — M — Aligning sandbox strategy with ADR-043 - **MoSCoW**: Should Have — Spec alignment is important for correctness - **Parent Epic**: #360 (Autonomy Hardening + Stubs M6) --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: High — devcontainer-instance sandbox strategy is NONE but ADR-043 specifies snapshot; container isolation not enforced
  • Milestone: v3.5.0 (Autonomy Hardening — devcontainer integration)
  • Story Points: 5 — L — Implementing snapshot-based sandbox strategy for devcontainer requires significant work
  • MoSCoW: Must Have — Container isolation via snapshot sandbox is a security requirement per ADR-043
  • Parent Epic: #4944 (Autonomy Hardening Legendary)

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

Issue triaged by project owner: - **State**: Verified - **Priority**: High — `devcontainer-instance` sandbox strategy is `NONE` but ADR-043 specifies `snapshot`; container isolation not enforced - **Milestone**: v3.5.0 (Autonomy Hardening — devcontainer integration) - **Story Points**: 5 — L — Implementing snapshot-based sandbox strategy for devcontainer requires significant work - **MoSCoW**: Must Have — Container isolation via snapshot sandbox is a security requirement per ADR-043 - **Parent Epic**: #4944 (Autonomy Hardening Legendary) --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
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#4896
No description provided.