Skip to content

Record image_build's classic-builder dependency as an SDK audit exclusion - #314

Merged
GavinLucas merged 2 commits into
mainfrom
docs/image-build-classic-builder-exclusion
Nov 16, 2026
Merged

GavinLucas merged 2 commits into
mainfrom
docs/image-build-classic-builder-exclusion

Conversation

@GavinLucas

Copy link
Copy Markdown
Collaborator

Summary

Adds an entry to the SDK audit exclusions in architecture/docker-sdk.md for image_build's dependency on the Engine's classic builder.

The monthly docker-py audit reports this as deprecated surface we depend on: the classic builder is still the POST /build default, but moby has listed it as deprecated since v23.0 (no removal version yet, and it remains the only builder for native Windows images). With no entry, each audit rediscovers it.

The entry records the move to BuildKit as deferred rather than impossible:

  • docker-py 7.2.0's BuildApiMixin.build() has no builder version parameter, so the public SDK cannot ask for BuildKit (Support BuildKit docker/docker-py#2230 and Add support for building with buildkit docker/docker-py#3344 are both open).
  • The Engine does not need the SDK's help: POST /build?version=2 with the context as the request-body tarball builds with BuildKit, with no client session and no CLI. Checked against a live daemon at API 1.56: a throwaway FROM scratch image built, reported its ID in a moby.image.id aux message, and was removed.
  • What moving would cost: progress arrives as encoded moby.buildkit.trace messages rather than text, and a daemon advertising builder version 1 still needs the classic path.
  • It names three events that should reopen it: docker-py adding a builder version, the move being scheduled, or an Engine release removing the classic builder.

Test plan

  • uv run pytest -q tests/test_docs.py: 28 passed.
  • uv run ruff check ., uv run ruff format --check ., uv run pyright: all clean.
  • Full uv run pytest -q: 2202 passed, 14 failed. All 14 are in tests/test_claude_plugin.py and tests/test_claude_plugin_release.py, and every failure is caused by an ignored claude-plugin/.venv/ and claude-plugin/uv.lock in the local checkout (the plugin-folder checks reject the .venv interpreter binaries by size, and the lockfile test finds the lockfile). Unrelated to this docs-only change; CI runs on a clean checkout.

Checklist

  • uv run pytest -v, uv run ruff check ., uv run ruff format --check ., and uv run pyright all pass locally (pytest does not: see the test plan)
  • If this adds or changes a tool: n/a, documentation only
  • If this changes project structure, conventions, env vars, or the tool/prompt/resource surface: n/a
  • If this changes a dependency: n/a

…sion

The monthly docker-py audit flags image_build as depending on deprecated
surface: the Engine's classic builder, still the /build default but
deprecated since v23.0 with no removal version.  Without an entry here
each audit rediscovers it.

docker-py 7.2.0's build() has no builder version, so the public SDK cannot
ask for BuildKit.  The Engine does not need it to: POST /build?version=2
with the context as the request-body tarball built with BuildKit against a
live daemon (API 1.56), with no session and no CLI.  The entry therefore
records the move as deferred rather than impossible, with its costs (the
progress stream becomes encoded BuildKit traces, and a daemon advertising
builder 1 still needs the classic path) and the three events that should
reopen it.
@github-actions

Copy link
Copy Markdown

Claude review: changes requested

Scope

The range changes one file: architecture/docker-sdk.md, where it adds one bullet (lines 150-166) to "SDK audit exclusions (deliberate non-candidates)". I read the whole entry against the rest of that file, AGENTS.md, .agents/policy/review-context.md and .agents/policy/architecture.md. I also checked it against the code it describes, image_build in docker_mcp/tools/images.py:48-108, and against MCP_VS_SKILLS.md:454, which says the same thing about the classic builder.

What I checked and confirmed:

  • The docstring pointer is correct. image_build's docstring says "using the daemon's classic builder" and tells callers to prefer buildx_build for BuildKit features (images.py:78-81). The entry's "image_build's docstring points there" is accurate.
  • The version anchor is right. uv.lock pins docker 7.2.0, and pyproject.toml sets docker[ssh]>=7.2.0 as the floor.
  • The entry fits its section and the ladder. The section's rules allow it: deprecated surface "we still depend on" should be flagged, and a deferred move with stated reopen triggers matches the existing context_* entry. Describing the BuildKit move as rung 2, and so as a human decision rather than an agent's, matches the section above it.
  • Style is fine. The new lines are under 120 characters, plain ASCII, British spelling, with two spaces after full stops (DK.10.5).

What I could not check: this sandbox has no network and no installed docker-py, so I took these on trust:

  • the quoted Engine spec text for /build's version=1;
  • moby's deprecation entry;
  • that BuildApiMixin.build() in 7.2.0 has no version parameter;
  • the state of Support BuildKit docker/docker-py#2230 and #3344;
  • the live-daemon behaviour of POST /build?version=2.

The author should make sure the spec quote is verbatim, since review priority 1 is about this kind of claim.

Findings

Every finding is maintainability, about state recorded in prose (ST.1.1, ST.2.1). Nothing is wrong with the code. I am requesting changes because the file's own rule makes this a MUST, and each fix is a wording change.

  1. Maintainability: what was tested, recorded in the doc. Line 158: "checked against a live daemon at API 1.56". This records what was verified on one occasion. It belongs in the commit message, which already says it ("against a live daemon (API 1.56)"). In the doc it reads as a current guarantee and will age.

    • Fix: state the behaviour (POST /build?version=2 with a request-body tarball builds with BuildKit, no session, and reports the image as a moby.image.id aux message). Leave the record of the check to the commit.
  2. Maintainability: the state of upstream issues. Lines 155-156: "open since 2019" and "idle since 2025". docker/docker-py's tracker already answers both, and both become untrue when either issue moves. The issue numbers are useful pointers and the revisit trigger ("when docker-py adds a builder version") is fine.

    • Fix: drop the status words and keep the references.
  3. Maintainability: moby's deprecation status restated. Lines 151-153 say the spec "still makes it the default", that moby's list has "no removal version", and that it "remains the only builder for native Windows images". All three are current state of documents held elsewhere: api/swagger.yaml and moby's deprecation list. "No removal version" will go stale the day moby sets one, and that is exactly one of the entry's revisit triggers.

    • Fix: name where to look (the /build version parameter in the Engine spec, the classic-builder entry in moby's deprecation list) and keep the reasoning: deprecated, still the default, needed for Windows images. That keeps the reason for keeping it without claiming how things stand on a given day.
  4. Maintainability: temporal wording. Line 150 says "kept for now" and line 162 says "buildx_build is the BuildKit path today". These are the "for now"/"today" forms the review rules ask to be flagged.

    • Fix: "kept" or "deferred" says the same without a time stamp. "buildx_build is the BuildKit route, through the CLI" is held true by the code and its docstring.

Not raised

  • "docker-py 7.2.0's BuildApiMixin.build() has no version parameter." The claim is pinned to a version, so it stays true. The neighbouring context_* entry uses the same pattern.
  • The trigger "when the move is scheduled." It is a little circular, but harmless.

Declined

None (no earlier rounds).


full review of b0a5d954b7fc..d2cf5c5adc5f. Run.

The entry restated things other documents hold and that will go stale:
moby's removal-version status, how long the upstream docker-py issues have
been open or idle, which daemon the check ran against, and 'for now' and
'today' wording.  It now names where to look for each instead, keeping
the reasoning.  The live-daemon check stays recorded in the previous
commit's message.
@GavinLucas

Copy link
Copy Markdown
Collaborator Author

Addressed in 6dba899, all four:

  1. Removed the record of the live-daemon check from the entry; the behaviour is stated plainly and the check stays in the first commit's message.
  2. Dropped "open since 2019" and "idle since 2025"; the issue references remain.
  3. The entry now points at the /build version parameter in the Engine spec and the "Legacy builder for Linux images" entry in moby's deprecation list for status and any removal version, instead of restating them.
  4. "kept for now" is now "deferred rather than declined"; "BuildKit path today" is now "BuildKit route".

On the unverified claims: the spec quote was checked verbatim against moby's api/swagger.yaml on master ("1 is the first generation classic (deprecated) builder in the Docker daemon (default)"), and BuildApiMixin.build()'s signature was read from the installed 7.2.0. The entry no longer quotes the spec, so only the parameter list is load-bearing.

@github-actions

Copy link
Copy Markdown

Claude review: approve

Resolved

  1. Live-daemon check recorded in the doc. The "checked against a live daemon at API 1.56" clause is gone. The entry (architecture/docker-sdk.md:150-164) now states the POST /build?version=2 behaviour plainly.
  2. Upstream issue state. "open since 2019" and "idle since 2025" are removed. The issue references (#2230, #3344) stay.
  3. Moby deprecation status restated. The entry no longer says "no removal version", "since v23.0" or "still makes it the default" as current fact. It now points to moby's deprecation list under "Legacy builder for Linux images" for status and any removal version. The spec quote is also gone.
  4. Temporal wording. "kept for now" is now "deferred rather than declined". "BuildKit path today" is now "BuildKit route". I found no "now", "today", "currently" or "for now" left in the entry.

Still open

None.

Declined

None.

New

None. The range changes one file, architecture/docker-sdk.md, and I read the whole rewritten entry.

  • "docker-py 7.2.0's BuildApiMixin.build() has no version parameter" is tied to a version, so it stays true. It is the same pattern as the neighbouring context_* entry.
  • Dropping "a Windows daemon, or one configured that way" from the cost clause loses nothing. The Windows point is still made earlier, in the clause on native Windows images.
  • The entry sits at about 100 characters a line, uses ASCII and two spaces after full stops, and matches the surrounding style.

What I did not check: this sandbox has no network and no installed docker-py. I took on trust the POST /build?version=2 behaviour, the existence of the "Legacy builder for Linux images" heading in moby's list, and the issue numbers. The author reports reading the 7.2.0 signature and the spec text directly. The entry no longer quotes the spec, so the claim that matters is the parameter list.


delta review of d2cf5c5adc5f..6dba8999f15e. Run.

@GavinLucas
GavinLucas merged commit 059207a into main Nov 16, 2026
19 checks passed
@GavinLucas
GavinLucas deleted the docs/image-build-classic-builder-exclusion branch November 16, 2026 12:04
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.

1 participant