Add make publish: build the image on the Docker host and push it to the registry #214

Merged
clawbot merged 2 commits from publish-image into next 2026-11-09 02:03:40 +01:00
Owner

script/publish runs script/docker with DOCKER_HOST set to the Docker
host (ssh://root@fsn1app1 unless set) and pushes the image to
git.eeqj.de/sneak/smallwebwaf under four tags: the UTC date as
YYYY-MM-DD, the short commit hash, the branch name and latest. It
refuses a working tree with uncommitted changes, since the hash tag
names a commit.

there are also other changes that do not affect the code's function - my 'fmt' seems to have worked differently, and some feedback comments added

The FIXME comments moved to #227, #228 and #229.

Model: opus-5-5

script/publish runs script/docker with DOCKER_HOST set to the Docker host (ssh://root@fsn1app1 unless set) and pushes the image to git.eeqj.de/sneak/smallwebwaf under four tags: the UTC date as YYYY-MM-DD, the short commit hash, the branch name and latest. It refuses a working tree with uncommitted changes, since the hash tag names a commit. there are also other changes that do not affect the code's function - my 'fmt' seems to have worked differently, and some feedback comments added The FIXME comments moved to https://git.eeqj.de/sneak/smallwebwaf/issues/227, https://git.eeqj.de/sneak/smallwebwaf/issues/228 and https://git.eeqj.de/sneak/smallwebwaf/issues/229. Model: opus-5-5
Collaborator

Picked up for smallwebwaf's manager: an independent review of this PR into next, then a merge on a pass. That includes your formatting changes and the FIXME comments, which become their own issues. It starts at the next manager run: on your word, or when the worker accounts reset (claude2 at 23:00 UTC on 8 November).

Model: opus-5-5

Picked up for smallwebwaf's manager: an independent review of this PR into `next`, then a merge on a pass. That includes your formatting changes and the FIXME comments, which become their own issues. It starts at the next manager run: on your word, or when the worker accounts reset (claude2 at 23:00 UTC on 8 November). Model: opus-5-5
clawbot self-assigned this 2026-11-07 03:36:40 +01:00
Collaborator

For the reworker (rebase only; the independent review follows). publish-image conflicts with next in Makefile, internal/config/config.go, internal/lookup/file.go and internal/requestlog/requestlog.go.

  1. Rebase onto current next, keeping sneak as author of both commits. next renamed the daemon (#218): keep next's identifiers.
  2. Remove every FIXME comment. The vendored linter config enables godox, which refuses them, and it is not changed in a product repo. Each one is carried verbatim on #227, #228 or #229.
  3. A hunk that only reformats and conflicts takes next's text as is: the repo adopts golines -m 77 separately (sneak/prompts#160). Formatting hunks that apply cleanly stay.
  4. script/publish and its Makefile target change only as the rebase requires.
  5. Append to the PR body one line saying the FIXME comments moved to those three issues, then Model: opus-5-5.

Edit by hand, no scripted edits. make fmt, then flock -w 1800 /srv/code/tmp/.gate-smallwebwaf.lock make check; a flock timeout also exits 1, so read the output. git push --force-with-lease, label needs-review, reply one line per point. Change nothing else.

Model: opus-5-5

**For the reworker** (rebase only; the independent review follows). `publish-image` conflicts with `next` in `Makefile`, `internal/config/config.go`, `internal/lookup/file.go` and `internal/requestlog/requestlog.go`. 1. Rebase onto current `next`, keeping sneak as author of both commits. `next` renamed the daemon (https://git.eeqj.de/sneak/smallwebwaf/issues/218): keep `next`'s identifiers. 2. Remove every FIXME comment. The vendored linter config enables `godox`, which refuses them, and it is not changed in a product repo. Each one is carried verbatim on https://git.eeqj.de/sneak/smallwebwaf/issues/227, https://git.eeqj.de/sneak/smallwebwaf/issues/228 or https://git.eeqj.de/sneak/smallwebwaf/issues/229. 3. A hunk that only reformats and conflicts takes `next`'s text as is: the repo adopts `golines -m 77` separately (https://git.eeqj.de/sneak/prompts/issues/160). Formatting hunks that apply cleanly stay. 4. `script/publish` and its `Makefile` target change only as the rebase requires. 5. Append to the PR body one line saying the FIXME comments moved to those three issues, then `Model: opus-5-5`. Edit by hand, no scripted edits. `make fmt`, then `flock -w 1800 /srv/code/tmp/.gate-smallwebwaf.lock make check`; a `flock` timeout also exits 1, so read the output. `git push --force-with-lease`, label `needs-review`, reply one line per point. Change nothing else. Model: opus-5-5
clawbot added the needs-rebase label 2026-11-09 00:16:25 +01:00
clawbot force-pushed publish-image from 8249a1110c to bf20762f6f 2026-11-09 01:09:36 +01:00 Compare
clawbot added needs-review and removed needs-rebase labels 2026-11-09 01:09:48 +01:00
Collaborator
  1. Rebased onto next with sneak as author of both commits and next's identifiers kept.
  2. All eight FIXME comments are gone, with the blank lines that set them apart, so each doc comment stays on its constant.
  3. Conflicting formatting hunks take next's text and clean ones stay, except one in internal/config/config.go: it moved a //nolint:gosec off the os.ReadFile line, which the linter refuses, so that line is next's too.
  4. script/publish is unchanged; the Makefile conflict resolved by dropping gitea-requests and gitea-setup, which next removed.
  5. PR body has the line and Model: opus-5-5.

Disclosure: both commit messages are left as sneak wrote them, so the second still says "feedback comments" and neither has a Model: line.

Model: opus-5-5

1. Rebased onto `next` with sneak as author of both commits and `next`'s identifiers kept. 2. All eight FIXME comments are gone, with the blank lines that set them apart, so each doc comment stays on its constant. 3. Conflicting formatting hunks take `next`'s text and clean ones stay, except one in `internal/config/config.go`: it moved a `//nolint:gosec` off the `os.ReadFile` line, which the linter refuses, so that line is `next`'s too. 4. `script/publish` is unchanged; the `Makefile` conflict resolved by dropping `gitea-requests` and `gitea-setup`, which `next` removed. 5. PR body has the line and `Model: opus-5-5`. Disclosure: both commit messages are left as sneak wrote them, so the second still says "feedback comments" and neither has a `Model:` line. Model: opus-5-5
Collaborator

For the reviewer. No issue stands behind this PR. The bar is its body, REPO_POLICIES.md and the entrypoint conventions in script/:

  • script/publish does what the body says, in POSIX sh, and fails loudly on a dirty tree, a detached HEAD or a failed build or push.
  • The Makefile target and the README.md text match it.
  • The formatting hunks in internal/config/config.go, internal/lookup/file.go and internal/requestlog/requestlog.go change no code.

Out of scope: sneak's FIXME comments, removed per #214 (comment) and tracked on their own issues, and the two commit messages, since the landing commit is written at merge.

Model: opus-5-5

**For the reviewer.** No issue stands behind this PR. The bar is its body, `REPO_POLICIES.md` and the entrypoint conventions in `script/`: - `script/publish` does what the body says, in POSIX sh, and fails loudly on a dirty tree, a detached HEAD or a failed build or push. - The `Makefile` target and the `README.md` text match it. - The formatting hunks in `internal/config/config.go`, `internal/lookup/file.go` and `internal/requestlog/requestlog.go` change no code. Out of scope: sneak's FIXME comments, removed per https://git.eeqj.de/sneak/smallwebwaf/pulls/214#issuecomment-170825 and tracked on their own issues, and the two commit messages, since the landing commit is written at merge. Model: opus-5-5
Collaborator

FAIL (needs-rework).

  1. script/publish line 23: if [ -n "$(git status --porcelain)" ] ignores a failing git status. The substitution comes back empty, the test is false, and the script builds and pushes a tree it could not inspect, for example with a corrupt .git/index. The comment in script/docker and REPO_POLICIES.md both warn against a command substitution inside an argument. Assign the output to a variable on its own line, so set -e stops the script, then test the variable.

  2. README.md line 71: "No image is published." is false. The registry already holds git.eeqj.de/sneak/smallwebwaf, and this PR adds make publish, which pushes it. Replace it with a short true sentence saying the image is published there and can also be built from a clone.

  3. README.md lines 668-671: this sentence is 37 words and chains the tags with commas where a bulleted list belongs:

    script/publish: runs script/docker on the Docker host DOCKER_HOST (ssh://root@fsn1app1 unless set) and pushes the image to PUBLISH_IMAGE (git.eeqj.de/sneak/smallwebwaf unless set) under four tags: the UTC date as YYYY-MM-DD, the short commit hash, the branch name and latest.

    It is also inaccurate: script/docker runs on the local machine and only its build happens on the Docker host. Split it into short sentences, say the build happens on the Docker host, and put the four tags in a nested bulleted list.

Disclosures:

  • Unverified: a real build on the remote Docker host and a real push.
  • Judgement call: neither commit has a Model: line. Not a finding, because sneak wrote them and they are squashed; the landing commit needs one.

Model: opus-5-5

FAIL (`needs-rework`). 1. `script/publish` line 23: `if [ -n "$(git status --porcelain)" ]` ignores a failing `git status`. The substitution comes back empty, the test is false, and the script builds and pushes a tree it could not inspect, for example with a corrupt `.git/index`. The comment in `script/docker` and `REPO_POLICIES.md` both warn against a command substitution inside an argument. Assign the output to a variable on its own line, so `set -e` stops the script, then test the variable. 2. `README.md` line 71: "No image is published." is false. The registry already holds `git.eeqj.de/sneak/smallwebwaf`, and this PR adds `make publish`, which pushes it. Replace it with a short true sentence saying the image is published there and can also be built from a clone. 3. `README.md` lines 668-671: this sentence is 37 words and chains the tags with commas where a bulleted list belongs: > `script/publish`: runs `script/docker` on the Docker host `DOCKER_HOST` (`ssh://root@fsn1app1` unless set) and pushes the image to `PUBLISH_IMAGE` (`git.eeqj.de/sneak/smallwebwaf` unless set) under four tags: the UTC date as `YYYY-MM-DD`, the short commit hash, the branch name and `latest`. It is also inaccurate: `script/docker` runs on the local machine and only its build happens on the Docker host. Split it into short sentences, say the build happens on the Docker host, and put the four tags in a nested bulleted list. Disclosures: - Unverified: a real build on the remote Docker host and a real push. - Judgement call: neither commit has a `Model:` line. Not a finding, because sneak wrote them and they are squashed; the landing commit needs one. Model: opus-5-5
Collaborator

For the reworker. Fix the three findings of #214 (comment) as they say, and change nothing else. Rebase onto current next. make fmt, then flock -w 1800 /srv/code/tmp/.gate-smallwebwaf.lock make check; a flock timeout also exits 1, so read the output. git push --force-with-lease, label needs-review, reply one line per finding.

For the next reviewer: the three findings and make check on the head.

Model: opus-5-5

**For the reworker.** Fix the three findings of https://git.eeqj.de/sneak/smallwebwaf/pulls/214#issuecomment-170957 as they say, and change nothing else. Rebase onto current `next`. `make fmt`, then `flock -w 1800 /srv/code/tmp/.gate-smallwebwaf.lock make check`; a `flock` timeout also exits 1, so read the output. `git push --force-with-lease`, label `needs-review`, reply one line per finding. **For the next reviewer:** the three findings and `make check` on the head. Model: opus-5-5
clawbot added needs-rework and removed needs-review labels 2026-11-09 01:28:18 +01:00
clawbot added 2 commits 2026-11-09 01:30:11 +01:00
script/publish runs script/docker with DOCKER_HOST set to the Docker
host (ssh://root@fsn1app1 unless set) and pushes the image to
git.eeqj.de/sneak/smallwebwaf under four tags: the UTC date as
YYYY-MM-DD, the short commit hash, the branch name and latest. It
refuses a working tree with uncommitted changes, since the hash tag
names a commit.
fmt and feedback comments, no code changes
check / check (push) Successful in 4m12s
b7059bfac8
clawbot force-pushed publish-image from bf20762f6f to b7059bfac8 2026-11-09 01:30:11 +01:00 Compare
clawbot added needs-review and removed needs-rework labels 2026-11-09 01:32:34 +01:00
Collaborator
  1. Fixed: script/publish assigns changes on its own line, then tests it.
  2. Fixed: README.md now says the image is published there and can also be built from a clone.
  3. Fixed: short sentences, the build placed on the Docker host, the four tags as a nested list.

Judgement call: the fixes are folded into sneak's first commit to keep the PR at two commits, so its message is unchanged and still has no Model: line.

Model: opus-5-5

1. Fixed: `script/publish` assigns `changes` on its own line, then tests it. 2. Fixed: `README.md` now says the image is published there and can also be built from a clone. 3. Fixed: short sentences, the build placed on the Docker host, the four tags as a nested list. Judgement call: the fixes are folded into sneak's first commit to keep the PR at two commits, so its message is unchanged and still has no `Model:` line. Model: opus-5-5
Collaborator

PASS: make publish and the formatting changes can merge into next.

Disclosures:

  • Judgement call: neither commit has a Model: line. sneak wrote both messages and the PR is squashed, so the landing commit needs one.
  • Judgement call: the default Docker host in script/publish and README.md is a real host name, which cuts against the policy that docs use invented data; sneak chose it in his own commit.
  • Unverified: a real build on the Docker host and a real push from this head.

Model: opus-5-5

PASS: `make publish` and the formatting changes can merge into `next`. Disclosures: - Judgement call: neither commit has a `Model:` line. sneak wrote both messages and the PR is squashed, so the landing commit needs one. - Judgement call: the default Docker host in `script/publish` and `README.md` is a real host name, which cuts against the policy that docs use invented data; sneak chose it in his own commit. - Unverified: a real build on the Docker host and a real push from this head. Model: opus-5-5
clawbot merged commit f6435b1a73 into next 2026-11-09 02:03:40 +01:00
clawbot deleted branch publish-image 2026-11-09 02:03:40 +01:00
Sign in to join this conversation.