Skip to content

fix(funcs): stop containers using Docker list states - #907

Merged
dosco merged 1 commit into
ax-llm:mainfrom
Elon-Jiang:fix/docker-summary-state
Nov 18, 2026
Merged

dosco merged 1 commit into
ax-llm:mainfrom
Elon-Jiang:fix/docker-summary-state

Conversation

@Elon-Jiang

Copy link
Copy Markdown
Contributor

stopContainers() never stops a running Docker container because it reads State.Status from the list response. Docker's ContainerList API returns State: "running"; the nested object belongs to ContainerInspect. With remove: true, the subsequent deletion then fails because the container is still running.

Compare the list's string state, correct the exported list-entry type, and keep a separate private inspect-response type so command execution retains its object-shaped state handling. No request or public method signatures change.

Validation:

  • Public AxDockerSession regressions on unchanged main fa693cd: 2 failed, 2 passed. After fix: 4 passed.
  • Complete npm run test --workspace=@ax-llm/ax: 4231 passed, 4 skipped; package type checks, type tests, format and lint complete successfully.
  • npm run build --workspace=@ax-llm/ax, changed-file Biome/cspell and git diff --check: passed.
  • Package lint has 100 existing warnings; complete structured diagnostics match an exact-baseline worktree, with zero new warnings/errors.
  • AxIR backlog check: No portable TypeScript paths changed (src/ax/funcs only).

The regression uses the real exported session and native fetch against a local HTTP Docker-API fixture. It covers selected-tag stop, stop-before-delete, unmatched-tag preservation and object-shaped inspect/command execution. The fixture replaces the daemon; no real Docker engine or container was modified. The official v1.51 specification's ContainerSummary.State defines the string enum used by the fixture.

Current open PR files, behavior/symbol searches and complete file history found no competing fix. AI assistance: OpenAI Codex prepared the patch and ran validation.

@dosco
dosco merged commit 57171e6 into ax-llm:main Nov 18, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants