Skip to content

test: Fix remaining Docker references and validate LXC migration - #66

Merged
sebyx07 merged 3 commits into
mainfrom
test-lxc-migration
Feb 15, 2026
Merged

sebyx07 merged 3 commits into
mainfrom
test-lxc-migration

Conversation

@sebyx07

@sebyx07 sebyx07 commented Feb 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This PR completes the LXC migration by fixing all remaining Docker references in comments and documentation, and validates that the full test suite passes.

Changes Made

Configuration Updates

  • Changed default sandbox type from BACKEND_TYPES.DOCKER to BACKEND_TYPES.INCUS in orchestrator
  • Updated ProjectInitializer default sandbox to 'incus' with 'ai-army-base' image instead of 'docker' with 'node:22-slim'

Documentation Updates

  • Replaced "Docker container" references with "container" in:
    • bot-manager.js - lifecycle management comments
    • tool-executor.js - tool execution comments
    • bash-tool.js - JSDoc parameters
    • file-tools.js - JSDoc parameters
    • tool-registry.js - JSDoc parameters
  • Updated "Docker image" to "container image" in:
    • bot-router.js - config update documentation
    • worker-router.js - API endpoint documentation
    • WorkerCommand.js - CLI command documentation
  • Fixed fallback messaging from "Docker management" to "container management" in orchestrator

Architecture Notes

  • Updated AGENT.md and README comments in ProjectInitializer to reflect container-based architecture
  • Changed test integration comment from "With Docker/DB" to "With containers/DB"

Test Results

✅ All tests pass:

  • Lint: ✓ ESLint + Prettier
  • Unit tests: 5599/5599 passing
  • Integration tests: 618/618 passing
  • E2E tests: 0 (skipped - no PostgreSQL in dev)
  • Config validation: ✓ npx ai-army validate passes

Validation Checklist

✅ No dangling imports of deleted modules (DockerManager, DockerBackend)
✅ No dockerode in package-lock.json
✅ grep -r "docker" src/ shows only legitimate references:

  • docker-compose.yml for master setup
  • dockerAccess config field for Docker-in-LXC support
  • Comparison comments explaining LXC vs Docker
  • docker-internal hostname checks for local DB
  • Health router comment about probe types (Docker, Kubernetes, ALB)

Backwards Compatibility

⚠️ No backwards compatibility - As specified in the plan, all Docker backward compat has been removed. Workers must use LXC (Incus backend).

Related Issues

Completes task #19 from .claude-task-master/plan.md - Run full test suite and fix any broken tests.

🤖 Generated with Claude Task Master

Greptile Overview

Greptile Summary

This PR completes the Docker-to-LXC (Incus) migration by updating remaining Docker references in comments and documentation across 10 files, and fixes two substantive code issues:

  • Bug fix in orchestrator.js: The default sandbox type fallback previously referenced BACKEND_TYPES.DOCKER, which resolved to undefined since the Docker backend was already removed. Now correctly falls back to BACKEND_TYPES.INCUS.
  • Config fix in ProjectInitializer.js: Updated the init template to use type: 'incus' with incusImage: 'ai-army-base' instead of the removed type: 'docker' with image: 'node:22-slim'.
  • Comment cleanup: Replaced "Docker container" → "container" and "Docker image" → "container image" across JSDoc and inline comments in bot-manager, tool-executor, bash-tool, file-tools, tool-registry, bot-router, worker-router, and WorkerCommand.

Confidence Score: 5/5

  • This PR is safe to merge — it fixes a real bug (undefined fallback) and updates stale documentation references.
  • 8 of 10 files contain only comment/JSDoc changes with zero logic impact. The two substantive changes (orchestrator default fallback and ProjectInitializer template) are both clear correctness fixes — the previous code referenced a removed Docker backend type. The PR author reports all tests pass (5599 unit + 618 integration).
  • No files require special attention. All changes are straightforward and correct.

Important Files Changed

Filename Overview
src/core/orchestrator.js Fixed default sandbox type from BACKEND_TYPES.DOCKER (undefined since Docker was removed) to BACKEND_TYPES.INCUS. Updated fallback log messages from "Docker management" to "container management".
src/cli/ProjectInitializer.js Updated default sandbox config template from docker/node:22-slim to incus/ai-army-base with correct incusImage field. Updated AGENT.md template comments to reference containers instead of Docker.
src/core/bot-manager.js Comment-only changes replacing "Docker container" with "container" in JSDoc and inline comments. No logic changes.
src/api/routers/bot-router.js Comment-only change: updated "Docker image" to "Container image" in PATCH /api/bots/:id/config JSDoc.
src/api/routers/worker-router.js Comment-only change: updated "Docker image" to "container image" in PUT /api/v1/workers/:id/image JSDoc.
src/cli/WorkerCommand.js Comment-only changes: updated two JSDoc @PARAM descriptions from "Docker image" to "container image".
src/execution/tool-executor.js Comment-only change: updated class JSDoc from "Docker containers" to "containers".
src/tools/bash-tool.js Comment-only changes: updated JSDoc from "Docker container" to "container" in two places.
src/tools/file-tools.js Comment-only changes: updated JSDoc from "Docker container" to "container" across readFile, writeFile, glob, and grep tool factories (8 replacements).
src/tools/tool-registry.js Comment-only change: updated JSDoc from "Docker container access" to "container access".

Flowchart

flowchart TD
    A[Project Init / Config Load] -->|sandbox.type| B{Sandbox Type?}
    B -->|"'incus' (default)"| C[BACKEND_TYPES.INCUS]
    B -->|"'just-bash'"| D[BACKEND_TYPES.JUST_BASH]
    C --> E[IncusBackend]
    E -->|reads incusImage| F[Create LXC Container]
    D --> G[JustBashBackend]

    style C fill:#90EE90
    style E fill:#90EE90
    style F fill:#90EE90
Loading

Last reviewed commit: 6d3d3fd

Updated comments and documentation to reflect LXC-based architecture:
- Changed default sandbox type from BACKEND_TYPES.DOCKER to BACKEND_TYPES.INCUS in orchestrator
- Updated ProjectInitializer default sandbox to 'incus' with 'ai-army-base' image
- Replaced "Docker container" references with "container" in bot-manager, tool-executor, bash-tool, file-tools, tool-registry
- Updated "Docker image" to "container image" in API routers and CLI commands
- Fixed fallback messaging from "Docker management" to "container management"

All tests pass:
- Lint: ✓
- Unit tests: 5599/5599 passing
- Integration tests: 618/618 passing
- E2E tests: 0 (skipped - no PostgreSQL)
- Config validation: ✓

Remaining Docker references are legitimate:
- docker-compose.yml for master setup
- dockerAccess config field for Docker-in-LXC support
- Comparison comments explaining LXC vs Docker
- docker-internal hostname checks for local DB

Co-Authored-By: Claude <noreply@anthropic.com>
@sebyx07 sebyx07 added the claudetm Claude Task Master managed PRs label Feb 15, 2026

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

10 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Comment thread src/cli/ProjectInitializer.js Outdated
- The SandboxConfigSchema expects `incusImage` not `image`
- The IncusBackend reads `botConfig.sandbox?.incusImage`
- Fixes field name mismatch in init template config

Co-Authored-By: Claude <noreply@anthropic.com>

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

10 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Comment thread src/cli/WorkerCommand.js Outdated
- Capitalize "container" to "Container" in options.image JSDoc
  on line 369 to match the style used on line 259

Co-Authored-By: Claude <noreply@anthropic.com>
@sebyx07
sebyx07 merged commit 036c308 into main Feb 15, 2026
7 checks passed
@sebyx07
sebyx07 deleted the test-lxc-migration branch February 15, 2026 04:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

claudetm Claude Task Master managed PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant