docs(readme): the AX coordinator commands build with docker compose only (item 5b)

Decision (the ninth session's menu of 2026-11-27, question 8, "README.md's copy of
the base pin"; .kiro/handover.md, not tracked, lines 1338-1339 and 1439-1445). The
maintainer's answer: "Drop the two lines". As offered: "README.md says `docker compose
build` only; one docs commit." Not chosen: "Guard it with a test" (the session's
recommendation); "Leave it".

The fault: the two build commands of the section "Engine traces on kube-ax", one
docker buildx build and one docker build, carried the base tag and digest by hand in
two --build-arg pairs, and no test read them. When plane/task-base.digest changes,
both builds still succeed on the old base until that base is deleted from GHCR. The
copy in docker-compose.yml is guarded (tests/test_task_images.py:51-59,
test_compose_builds_from_the_pinned_base).

What changed (README.md:440-458, which are lines 440-463 on efa311a; one file, 12
insertions, 17 deletions):
- The two build commands are gone, with the lines that served them alone: TASK_TAG,
  the metadata file that gave TASK_IMAGE its digest, and the printf of it.
- The block builds with `OUSAST_VERSION=engine-ax docker compose build` and sets
  TASK_IMAGE to the reference the Engine image workflow printed.
- The lead-in and the paragraph after the block say what the block does now. The
  sentence "The Engine image workflow also builds/pushes both images and prints each
  digest; CI needs the changes published before dispatch" stands as it was.

The session's readings of the decision, open to correction:
1. OUSAST_VERSION=engine-ax stands before the command so that the image keeps the tag
   the two trace commands below name (--docker-image openultrasast:engine-ax,
   README.md:469 and :479) and does not overwrite openultrasast:dev, the image the
   wrapper uses (ops/shell/ousast.sh:64) and the default of --docker-image
   (benchmarks/learn/engine_trace.py:890). The block still says docker compose build
   alone.
2. TASK_IMAGE now comes from the Engine image workflow. The dropped buildx command was
   the README's only local build of the task image. The workflow's engine job builds
   plane/Dockerfile.engine-task, target engine, pushes ghcr.io/<owner>/ousast-engine-task
   at sha-<7> and main, and writes image@digest to its log and to its step summary
   (.github/workflows/engine-image.yml:104-151). AX takes --image by digest only
   (engine_trace.py:915-916).
3. The README no longer documents a build of the task image from uncommitted code. The
   last sentence of the paragraph says what a reader now gets: the Docker lane runs the
   local image, committed or not; the AX lanes run the task image of the revision the
   workflow built.
4. The paragraph that opens the section (README.md:412-413, "Rebuild it after code
   changes and pass its digest with --image") is left as it is: the rebuild is the
   workflow's, and the sentence does not say who builds.
5. When the workflow runs is not restated here; the sentence points at the rebuild
   policy (ops/ax/README.md:296-319).

Measured (files under /tmp/opencode; all but the gate files start with their
command; the gates were run as `bash /tmp/opencode/s10_gates.sh c9`):
- The image compose names: `OUSAST_VERSION=engine-ax docker compose config --images`
  prints openultrasast:engine-ax; without the variable, openultrasast:dev
  (s10_c9_compose_images.out). Only the lines that start with openultrasast: were
  printed. No image was built.
- The block parses: `sed -n '444,449p' README.md | bash -n` exits 0
  (s10_c9_block.out).
- Before and after: a grep for six markers (build-arg, TASK_BASE_TAG,
  TASK_BASE_DIGEST, docker build, TASK_TAG, metadata-file) over README.md gives 10
  lines on efa311a and 0 on this tree (s10_c9_before_after.out).
- Tests: tests/test_removed_plane_references.py (it reads README.md:49-50),
  tests/test_docs_site.py and tests/test_task_images.py::test_compose_builds_from_the_pinned_base
  give 9 passed, exit 0 (s10_c9_tests.out).
- The root README.md is not a page of the docs site: mkdocs.yml's nav names no
  README, and docs/ includes ops/README.md and ops/ax/README.md only
  (s10_c9_site.out). The strict site build that tests/test_docs_site.py runs
  passed, and it does not read the root README.
- Gates, mypy, compileall, ruff format and ruff check: ten zeros
  (s10_c9_exits.txt); the three gate outputs equal the baseline.

By reading, not measured:
- docker compose build builds the service ousast from the root Dockerfile with the
  defaults of docker-compose.yml:13-20, which the test cited above keeps equal to
  plane/task-base.digest.
- The workflow's paths filter (engine-image.yml:7-10) and the policy it implements
  are taken from the two files; no run of the workflow was watched.

Found and not fixed, for the maintainer:
- The dropped buildx command named no --target, so since c6e87a8 (2026-10-04) it built
  the last stage of plane/Dockerfile.engine-task, which is replay, not the engine
  stage the workflow publishes (engine-image.yml:130; the stage list on this tree is
  in s10_c9_byreading.out). By reading; that image was never built here.
- ops/ax/README.md:321-322 still says how a local task build passes the two build
  args, without a command. A local build whose args are read from
  plane/task-base.digest would give back the local task build without a by-hand copy;
  it was not offered and is not written.

Not checked:
- No image was built and nothing was dispatched to AX; the Engine image workflow was
  not run.
- The whole test suite.
- Whether the checkout's .env names OUSAST_VERSION: not read. The measurement above
  was made with the variable set in the command line, which compose takes first.

- Review: two rounds by a reviewer subagent, read-only; it ran no docker build or run.
  Round one approved the change: the diff is README.md alone, 12 insertions and 17
  deletions in 440-458; the three test selections re-run (9 passed); the compose
  measurement repeated (openultrasast:engine-ax); the three gate outputs equal to the
  baseline by cmp, the gates not re-run; every citation read. It conditioned the commit
  on three statements of this message, met: which evidence files carry their command,
  the first changed line (440), and that the strict site build did run, inside
  tests/test_docs_site.py. Round two read the corrected message line by line and found
  the three conditions met; it re-ran the three tests (9 passed), and a strict site
  build to a scratch directory holds neither the section's heading nor its new last
  sentence. Not carried: its remark that the block could say the coordinator and the
  task image have to be one revision, which was not measured here.
This commit is contained in:
Marius Ciepluch
2026-11-27 20:16:35 +01:00
parent efa311a112
commit e231b78e04
+12 -17
View File
@@ -437,30 +437,25 @@ available VM image; Docker never pulls it implicitly. A STOP file prevents new
launches; interrupted fallback queues are recovered on resume. launches; interrupted fallback queues are recovered on resume.
Coordinator commands, from this worktree (the AX binary and kubeconfig remain Coordinator commands, from this worktree (the AX binary and kubeconfig remain
configurable). Build/push the actual uncommitted tree and read its digest: configurable). Build the image of the Docker lane, then set `TASK_IMAGE` to the
`ousast-engine-task` reference the Engine image workflow printed:
```bash ```bash
cd /home/mc/Source/OpenUltraSAST/.claude/worktrees/engine-ax cd /home/mc/Source/OpenUltraSAST/.claude/worktrees/engine-ax
export PATH=/home/mc/Source/OpenUltraSAST/.venv/bin:$PATH export PATH=/home/mc/Source/OpenUltraSAST/.venv/bin:$PATH
export PYTHONPATH="$PWD/src" export PYTHONPATH="$PWD/src"
TASK_TAG="ghcr.io/norandom/ousast-engine-task:sha-$(git rev-parse --short=7 HEAD)" OUSAST_VERSION=engine-ax docker compose build
docker buildx build --platform linux/amd64 -f plane/Dockerfile.engine-task \ # The ousast-engine-task reference the Engine image workflow printed, in its log and its summary:
--build-arg TASK_BASE_TAG=base-b696c08 \ export TASK_IMAGE="ghcr.io/norandom/ousast-engine-task@sha256:<digest>"
--build-arg TASK_BASE_DIGEST=sha256:0f374138fcb49fef41609d323cc80b6c2324b1e798d3a2aee5c8038b8c7ac3aa \
-t "$TASK_TAG" -t ghcr.io/norandom/ousast-engine-task:main \
--push --metadata-file /tmp/ousast-engine-task-build.json .
export TASK_IMAGE="ghcr.io/norandom/ousast-engine-task@$(python -c 'import json; print(json.load(open("/tmp/ousast-engine-task-build.json"))["containerimage.digest"])')"
printf '%s\n' "$TASK_IMAGE"
docker build -f Dockerfile \
--build-arg TASK_BASE_TAG=base-b696c08 \
--build-arg TASK_BASE_DIGEST=sha256:0f374138fcb49fef41609d323cc80b6c2324b1e798d3a2aee5c8038b8c7ac3aa \
-t openultrasast:engine-ax .
``` ```
The Engine image workflow also builds/pushes both images and prints each digest; `docker compose build` takes the base from the defaults in `docker-compose.yml`,
CI needs the changes published before dispatch. The local build above includes which a test keeps equal to `plane/task-base.digest`; `OUSAST_VERSION` sets the tag
uncommitted changes without publishing a git commit. Both builds take the base from of the image, here `openultrasast:engine-ax`. The Engine image workflow also
`plane/task-base.digest`; when that pin changes, change the two `--build-arg` pairs with it. builds/pushes both images and prints each digest; CI needs the changes published
before dispatch. When the workflow runs is the rebuild policy in
[ops/ax/README.md](ops/ax/README.md). The Docker lane runs the local image,
committed or not; the AX lanes run the task image of the revision the workflow built.
With `KUBECONFIG` pointing to the operator's kube-ax config and store settings in With `KUBECONFIG` pointing to the operator's kube-ax config and store settings in
`.env`, run a one-pin smoke using the default experiment units and local example `.env`, run a one-pin smoke using the default experiment units and local example