Skip to content

refactor: rename container domain to docker#256

Merged
retr0h merged 20 commits intomainfrom
refactor/remove-orchestrator-container-dsl
Mar 14, 2026
Merged

refactor: rename container domain to docker#256
retr0h merged 20 commits intomainfrom
refactor/remove-orchestrator-container-dsl

Conversation

@retr0h
Copy link
Collaborator

@retr0h retr0h commented Mar 13, 2026

Summary

  • Renames the container domain to docker across all layers (API,
    provider, agent, job, CLI, SDK, permissions, docs, tests)
  • Restructures CLI as client container docker <op> to support
    future runtimes (LXD, Podman) under the container parent
  • Removes redundant orchestrator container DSL, provider run command,
    and Service/Driver delegation layer
  • Adds 8 new orchestrator Docker DSL methods with 100% test coverage

Test plan

  • go build ./... compiles
  • go test ./... passes (all packages)
  • golangci-lint run reports 0 issues
  • gofumpt/golines formatting clean
  • 100% coverage on pkg/sdk/orchestrator/docker.go
  • Integration tests pass (just go::unit-int)

🤖 Generated with Claude Code

retr0h and others added 12 commits March 13, 2026 12:14
Container operations will be managed through the standard API/CLI/SDK
path using the new container domain endpoints, not through an in-process
DSL that runs osapi inside containers. Remove RuntimeTarget,
DockerTarget, ScopedPlan, ContainerProvider, deploy helpers, provider
run CLI, and provider registry. Rewrite container-targeting example and
docs to use SDK client directly. Update design doc and implementation
plan.

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Design doc for renaming the generic container domain to docker-specific,
with per-runtime domains, CLI nesting under `client container docker`,
API paths at /container/docker, and orchestrator DSL helpers.

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Rename directory internal/api/container to internal/api/docker.
Update OpenAPI spec: paths from /node/{hostname}/container to
/node/{hostname}/container/docker, all schema names Container*
to Docker*, operationIds PostNodeContainer* to
PostNodeContainerDocker*, security scopes container:* to docker:*,
parameter ContainerId to DockerId, tags container_* to docker_*.

Regenerate docker.gen.go from the updated spec, remove old
container.gen.go.

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Rename PermContainer{Read,Write,Execute} constants to
PermDocker{Read,Write,Execute} with docker:* string values.
Update AllPermissions, DefaultRolePermissions, and the
combined OpenAPI spec security scopes.

Co-Authored-By: Claude <noreply@anthropic.com>
Flatten provider/container/runtime/ to provider/docker/, rename all job
operation constants (OperationContainer* to OperationDocker*), data
types (ContainerCreateData to DockerCreateData, etc.), client methods
(ModifyContainerCreate to ModifyDockerCreate, etc.), agent processor
category routing, and API handler method signatures and schema types to
match the new generated OpenAPI types. Update all HTTP test paths from
/node/{hostname}/container to /node/{hostname}/container/docker.

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Rename ContainerSmokeSuite → DockerSmokeSuite and update all CLI
args to use the new `client container docker` command hierarchy.

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Update all documentation to reflect the container→docker rename:
- Permissions: container:read/write/execute → docker:read/write/execute
- CLI commands: client container <op> → client container docker <op>
- SDK calls: c.Container.* → c.Docker.*
- Generated types: gen.Container* → gen.Docker*
- API paths: /node/{hostname}/container/* → /node/{hostname}/container/docker/*
- Job operations: container.*.* → docker.*.*

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Rename processor_container.go → processor_docker.go
- Rename handler_container.go → handler_docker.go
- Rename containerProvider → dockerProvider throughout agent package
- Rename GetContainerHandler → GetDockerHandler in API wiring
- Update all tests to match

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Remove the Service/Driver/Provider split. Client now directly
implements Provider (with Ping merged in). This eliminates the
pure-delegation Service layer and renames NewDriver → New.

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Add closure execution and error path tests for all 8 Docker DSL
methods using httptest servers with proper JSON responses. Coverage
goes from 16.7% to 100% per method.

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions
Copy link
Contributor

Thank you for contributing to this project! 😊🕹️

@codecov
Copy link

codecov bot commented Mar 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #256      +/-   ##
==========================================
- Coverage   99.94%   99.94%   -0.01%     
==========================================
  Files         227      222       -5     
  Lines        9587     9512      -75     
==========================================
- Hits         9582     9507      -75     
  Misses          3        3              
  Partials        2        2              
Files with missing lines Coverage Δ
internal/agent/agent.go 100.00% <100.00%> (ø)
internal/agent/factory.go 100.00% <100.00%> (ø)
internal/agent/processor.go 100.00% <100.00%> (ø)
internal/agent/processor_docker.go 100.00% <100.00%> (ø)
internal/api/docker/container.go 100.00% <ø> (ø)
internal/api/docker/container_create.go 100.00% <100.00%> (ø)
internal/api/docker/container_exec.go 100.00% <100.00%> (ø)
internal/api/docker/container_inspect.go 100.00% <100.00%> (ø)
internal/api/docker/container_list.go 100.00% <100.00%> (ø)
internal/api/docker/container_pull.go 100.00% <100.00%> (ø)
... and 17 more

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c165fd7...257bc2f. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

retr0h and others added 8 commits March 13, 2026 16:46
Add Changed bool to Container, ActionResult, ExecResult, and
PullResult so the agent handler can extract it consistently via
extractChanged(). Start/Stop/Remove now return *ActionResult
instead of bare error, matching the pattern used by DNS, command,
file, and host providers.

Also fix broken Docusaurus link to renamed API doc path.

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Move the 8 Docker CLI operation docs from container/ to
container/docker/ to match the CLI command hierarchy
(client container docker <op>). Add docker.mdx parent page
and simplify container.mdx to a runtime grouping.

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Rename 8 operation doc files from container-*.md to docker-*.md
to match the docker.* operation names. Update links in
orchestrator.md and fix container-ops → docker-ops role name.

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Cleanup (remove) was at the same dependency level as exec and
inspect tasks, causing a race where the container could be deleted
before exec commands ran. Fix by making cleanup depend on all tasks
that need the container.

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Cleanup was skipped because it depended on deliberately-fails
which always errors. That task is independent and shouldn't
block cleanup.

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Add a pre-cleanup task that removes any leftover container from a
previous run before creating a new one. Errors are swallowed since
the container may not exist. This prevents "name already in use"
failures on re-runs.

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
@retr0h retr0h merged commit b2c5185 into main Mar 14, 2026
9 checks passed
@retr0h retr0h deleted the refactor/remove-orchestrator-container-dsl branch March 14, 2026 00:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant