Skip to content

Bound Docker snapshot chain depth (auto-flatten) #16870

Open

Description

@mrveiss

Problem

DockerBackend.restore() starts a new container directly from a snapshot's committed image with no chain-depth bookkeeping. A repeated restore→modify→snapshot cycle on the same lineage keeps committing a new image layer on top of the last snapshot indefinitely — nothing bounds growth.

Location

  • autobot-backend/services/execution/docker_backend.py — snapshot() (~391-458), restore() (~460-510).

Impact

Low urgency: only matters once a lineage is restored+re-snapshotted many times. Investigate via _snapshot_index whether that pattern actually occurs before building flatten machinery.

Discovered During

Research comparison — docs/research/sandboxed-agent-vm-orchestration.md (adoption item 3).

Acceptance Criteria

  • _snapshot_index data checked for real chain depth in practice
  • If chains are forming: an auto-flatten step (export + rebuild) added above a configurable depth threshold
  • If chains are not forming: issue closed as not-needed with the measurement cited

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions