Repository navigation
fix(funcs): stop containers using Docker list states - #907
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
stopContainers()never stops a running Docker container because it readsState.Statusfrom the list response. Docker's ContainerList API returnsState: "running"; the nested object belongs to ContainerInspect. Withremove: 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:
AxDockerSessionregressions on unchanged mainfa693cd: 2 failed, 2 passed. After fix: 4 passed.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 andgit diff --check: passed.src/ax/funcsonly).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.Statedefines 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.