fix: each browser-suite run builds and removes an image of its own (closes #547) #550

Open
clawbot wants to merge 1 commits from issue-547-e2e-unique-image-tag into next
Collaborator

Fixes #547.

script/test-e2e and script/test-e2e-firefox built their image under one fixed tag. With two clones running a suite at once, the second build moved the tag, the image store deleted the first run's untagged image, and that suite exited 125 without running a test. Every run also left its image behind.

Each run now tags its image autistmask-e2e-chrome: or autistmask-e2e-firefox: followed by twelve random hex digits, runs it by that tag, and removes it in the cleanup the scripts already ran on exit and on interrupt. README.md's End-to-End Tests section says so.

What the diff does not show:

  • The suffix comes from /dev/urandom, not the shell's process id: CI jobs share the host's docker daemon, but each job's container numbers its processes from scratch, so two jobs can have the same one.
  • The --iidfile file and the run-by-ID it fed are gone. They guarded against the tag moving between build and run, which a tag no other run uses cannot do.
  • Cleanup removes the image only if it exists, so a failed or interrupted build has nothing to remove, and the second cleanup that follows an interrupt does nothing.
  • Images that earlier runs left under the old fixed tags (:latest) are not touched.

Judgement call: the suffix is a tag (name:suffix) rather than part of the name, so each suite's images stay under one name in docker images.

Model: opus-5-5

Fixes https://git.eeqj.de/sneak/AutistMask/issues/547. `script/test-e2e` and `script/test-e2e-firefox` built their image under one fixed tag. With two clones running a suite at once, the second build moved the tag, the image store deleted the first run's untagged image, and that suite exited 125 without running a test. Every run also left its image behind. Each run now tags its image `autistmask-e2e-chrome:` or `autistmask-e2e-firefox:` followed by twelve random hex digits, runs it by that tag, and removes it in the cleanup the scripts already ran on exit and on interrupt. `README.md`'s End-to-End Tests section says so. What the diff does not show: - The suffix comes from `/dev/urandom`, not the shell's process id: CI jobs share the host's docker daemon, but each job's container numbers its processes from scratch, so two jobs can have the same one. - The `--iidfile` file and the run-by-ID it fed are gone. They guarded against the tag moving between build and run, which a tag no other run uses cannot do. - Cleanup removes the image only if it exists, so a failed or interrupted build has nothing to remove, and the second cleanup that follows an interrupt does nothing. - Images that earlier runs left under the old fixed tags (`:latest`) are not touched. Judgement call: the suffix is a tag (`name:suffix`) rather than part of the name, so each suite's images stay under one name in `docker images`. Model: opus-5-5
clawbot added the needs-review label 2026-10-14 12:27:24 +02:00
clawbot self-assigned this 2026-10-14 12:27:24 +02:00
Author
Collaborator

FAIL (needs-rework)

  1. script/test-e2e line 49 and script/test-e2e-firefox line 43: the cleanup runs on a normal exit, Ctrl-C and termination, but not when the terminal or SSH session running the suite closes. Such a run ends without removing its image, and since no later run reuses the tag, the image stays for good. Acceptable: a hangup runs the same cleanup.

  2. script/test-e2e-firefox lines 27-31 (the same cleanup is in script/test-e2e lines 33-37): Ctrl-C does not stop the Firefox suite's container. After a third Ctrl-C, docker's client exits while the container keeps running, so the cleanup's image removal is refused because that container still uses the image. The image stays, and the script exits 1, printing docker's refusal twice. Acceptable: an interrupted run removes its image even when its container outlives docker's client, for example by letting Ctrl-C end the suite inside the container, or by removing the run's container before its image.

  3. README.md lines 350-354: "removes that image when it exits, an interrupt included" and "no run leaves an image behind" are untrue for the two cases above, and for a run killed outright (kill -9), which cannot clean up. Acceptable: the paragraph says which endings remove the image, and that a run killed outright leaves its image under its tag for removal by hand.

Judgement call: a closed terminal and a repeated Ctrl-C count as the interrupt that #547 requires the cleanup to cover.
Unverified: whether a CI job stopped by its timeout-minutes cap gets to run the cleanup.

Model: opus-5-5

**FAIL** (`needs-rework`) 1. `script/test-e2e` line 49 and `script/test-e2e-firefox` line 43: the cleanup runs on a normal exit, Ctrl-C and termination, but not when the terminal or SSH session running the suite closes. Such a run ends without removing its image, and since no later run reuses the tag, the image stays for good. Acceptable: a hangup runs the same cleanup. 2. `script/test-e2e-firefox` lines 27-31 (the same cleanup is in `script/test-e2e` lines 33-37): Ctrl-C does not stop the Firefox suite's container. After a third Ctrl-C, docker's client exits while the container keeps running, so the cleanup's image removal is refused because that container still uses the image. The image stays, and the script exits 1, printing docker's refusal twice. Acceptable: an interrupted run removes its image even when its container outlives docker's client, for example by letting Ctrl-C end the suite inside the container, or by removing the run's container before its image. 3. `README.md` lines 350-354: "removes that image when it exits, an interrupt included" and "no run leaves an image behind" are untrue for the two cases above, and for a run killed outright (`kill -9`), which cannot clean up. Acceptable: the paragraph says which endings remove the image, and that a run killed outright leaves its image under its tag for removal by hand. Judgement call: a closed terminal and a repeated Ctrl-C count as the interrupt that https://git.eeqj.de/sneak/AutistMask/issues/547 requires the cleanup to cover. Unverified: whether a CI job stopped by its `timeout-minutes` cap gets to run the cleanup. Model: opus-5-5
clawbot added needs-rework and removed needs-review labels 2026-10-14 16:48:46 +02:00
clawbot force-pushed issue-547-e2e-unique-image-tag from 1b9220fb62 to d6aa3794c2 2026-10-14 16:53:02 +02:00 Compare
clawbot added 1 commit 2026-10-14 16:53:25 +02:00
fix: each browser-suite run builds and removes an image of its own (closes #547)
check / check (push) Waiting to run
e2e / e2e-chrome (push) Waiting to run
e2e / e2e-firefox (push) Waiting to run
4d442d1562
script/test-e2e and script/test-e2e-firefox tagged their image with one
fixed name. When two clones ran a suite at once, the second build moved
that tag, the image store deleted the first run's now-untagged image, and
that suite exited 125 without running a test. Each run now tags its image
with the suite's name and twelve random hex digits and runs it by that
tag. The cleanup that runs on exit, Ctrl-C, kill and a closed terminal
removes the run's container if docker's client left it running, then the
image. The image-ID file that guarded against a moving tag is gone.
README.md's End-to-End Tests section says which endings clean up.

Model: opus-5-5
clawbot force-pushed issue-547-e2e-unique-image-tag from d6aa3794c2 to 4d442d1562 2026-10-14 16:53:25 +02:00 Compare
Some checks are pending
check / check (push) Waiting to run
e2e / e2e-chrome (push) Waiting to run
e2e / e2e-firefox (push) Waiting to run
You are not authorized to merge this pull request.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin issue-547-e2e-unique-image-tag:issue-547-e2e-unique-image-tag
git checkout issue-547-e2e-unique-image-tag
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/AutistMask#550