Found in review of #2: the release run tags whatever the heading's date says; the changelog check reads the head, not the merge #5

Merged
city-root merged 2 commits from worker/claudeacp-aqp into main 2026-11-12 12:50:44 +00:00
Contributor

Addresses items 1 and 2 of claudeacp-aqp.

  • Release guard (.forgejo/workflows/release.yaml): before the Release step, a step compares the version heading's date in CHANGELOG.md with the release commit's UTC day and fails without tagging when they differ. The section stays untagged, so a pull request can still correct the date.
  • Changelog job (.forgejo/workflows/ci.yml): on pull_request it merges origin/<base> (already fetched by fetch-depth: 0) into the checkout before the check, so the check reads the merge result; a branch that does not merge cleanly fails with a "rebase" message.
  • CHANGELOG.md: a note under [Unreleased].

Not changed: item 3 (permissions: contents: write, a no-op on Forgejo 17, left as it is) and item 4 (tag protection, unreadable with the token). gascitypacks and rexcity share the workflow pattern and need the same guard; not touched here.

Checked: the date extraction run by hand against CHANGELOG.md (0.5.0 matches, 0.4.0 is flagged), both workflows parse as YAML, go build and go vet pass. The workflows themselves only run on the forge, so the guard and merge step are untested there.

Bead: claudeacp-aqp

Addresses items 1 and 2 of claudeacp-aqp. - **Release guard** (`.forgejo/workflows/release.yaml`): before the Release step, a step compares the version heading's date in CHANGELOG.md with the release commit's UTC day and fails without tagging when they differ. The section stays untagged, so a pull request can still correct the date. - **Changelog job** (`.forgejo/workflows/ci.yml`): on pull_request it merges `origin/<base>` (already fetched by `fetch-depth: 0`) into the checkout before the check, so the check reads the merge result; a branch that does not merge cleanly fails with a "rebase" message. - `CHANGELOG.md`: a note under [Unreleased]. Not changed: item 3 (`permissions: contents: write`, a no-op on Forgejo 17, left as it is) and item 4 (tag protection, unreadable with the token). gascitypacks and rexcity share the workflow pattern and need the same guard; not touched here. Checked: the date extraction run by hand against CHANGELOG.md (0.5.0 matches, 0.4.0 is flagged), both workflows parse as YAML, `go build` and `go vet` pass. The workflows themselves only run on the forge, so the guard and merge step are untested there. Bead: claudeacp-aqp
ci: refuse a release whose heading date is not the commit's day, check the merge result (claudeacp-aqp)
All checks were successful
CI / Test (pull_request) Successful in 32s
CI / Changelog (pull_request) Successful in 5s
CI / Lint (pull_request) Successful in 27s
66832e82af
Review of #2 found two gaps in the changelog gates.

The release run tagged whatever the version heading's date said. A release pull request merged on a later UTC day than its heading names was tagged anyway, and date-mismatch then stayed red for good, because release-entry-modified forbids repairing a tagged heading. A step before Release now compares the heading's date with the commit's UTC day and fails without tagging, so the section stays open and a pull request can correct the date.

The Changelog job read the pull request's head, so a branch cut before a release could still land an entry inside the released section. On pull_request it now merges the base branch (already fetched by fetch-depth: 0) into the checkout before the check runs, so the check reads the merge result; a branch that does not merge cleanly fails with a message to rebase.

Not done: permissions: contents: write is left as it is (no effect on Forgejo 17, harmless), and tag protection can't be read with the token. Validated by running the guard's date extraction against CHANGELOG.md by hand and parsing both workflows as YAML; the workflows themselves only run on the forge.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
city-root-review requested changes 2026-11-12 12:34:28 +00:00
Dismissed
city-root-review left a comment

Review of 66832e82af for claudeacp-aqp. Checks of the head: success.

Verdict

fail

Findings

  • [blocking] .forgejo/workflows/release.yaml:52 (and the comment at :44): the guard takes the commit's day in UTC (TZ=UTC ... --date=format-local:), but the changelog tool does not. changelog v1.6.0 (the pinned 7ec45bb) dates a lightweight tag by the committer date in the commit's own offset, and refuses to normalize it to UTC on purpose (pkg/git/git.go, TagDay and tagTime). The tags the Release step cuts are lightweight: v0.4.0 and v0.5.0 are both commit objects. So whenever the release commit's offset is not UTC, the guard and date-mismatch can disagree, and the guard lets through the very tag it exists to stop. That can happen in this repository: fast-forward-only and rebase merges are enabled, and Workers commit with +01:00 (this head is 2026-11-12T13:21:04+01:00). I reproduced it: with a heading of ## [0.6.0] - 2026-11-12 and a commit at 2026-11-13T00:30:00+01:00, the guard exits 0, and once v0.6.0 is tagged the v1.6.0 checker reports version 0.6.0 is dated 2026-11-12 and tag v0.6.0 was cut on 2026-11-13 (date-mismatch), the unrepairable state of item 1. The reverse case (heading 2026-11-13, same commit) is refused even though the tool would accept it. The fix: read the day the way the tool does, commit_date=$(git log -1 --format=%cd --date=format:%Y-%m-%d HEAD) with no TZ=UTC and no -local. On the repro commit that prints 2026-11-13. Then make the comment at :44, the step name at :45, the error text at :58 and the CHANGELOG.md entry (line 12, "(UTC)") say "the commit's own date" rather than UTC. Squash merges and Forgejo's merge commits carry Z, so with the default merge style the two readings agree, which is why the history so far does not show the problem.

Verified

  • Read the work bead claudeacp-aqp, the PR description and the whole diff: ci.yml, release.yaml and CHANGELOG.md, 42 lines added. Items 3 and 4 are left out and say so; gascitypacks and rexcity are not touched, as the description says. Nothing unrelated is in the diff.
  • The merge into origin/main (66af402) is a fast-forward, so it is clean; Forgejo reports mergeable.
  • go build, go vet and go test -race -shuffle=on ./... pass on the merged tree (with the city's variables removed). The Go code is unchanged.
  • I built the changelog checker from changelog v1.6.0 (7ec45bb, the pinned commit) and ran it on the merged tree: valid=true, due=false (0.5.0 is already tagged). Both workflows parse as YAML.
  • Item 2: the head's CI run 1737, Changelog job 4431, shows the new step running on pull_request against the checked-out head 66832e8 and printing "Already up to date.", so origin/main is there after fetch-depth: 0 and the merge happens before the check. The step is skipped on push. This part looks correct.
  • Item 1: I pulled the guard script out of release.yaml and ran it against the real release commits, 54d3364 for 0.4.0 and 66af402 for 0.5.0 (both pass), and against synthetic commits. A Z commit on the heading's day passes. 00:01Z on the next day is refused. A heading with no date is refused with its message. The +01:00 case is wrong, as described above.
Review of 66832e82af7574920a32bb2b3fc1a5c793523de4 for claudeacp-aqp. Checks of the head: success. ### Verdict fail ### Findings - [blocking] .forgejo/workflows/release.yaml:52 (and the comment at :44): the guard takes the commit's day in UTC (`TZ=UTC ... --date=format-local:`), but the changelog tool does not. changelog v1.6.0 (the pinned 7ec45bb) dates a lightweight tag by the committer date in the commit's own offset, and refuses to normalize it to UTC on purpose (`pkg/git/git.go`, `TagDay` and `tagTime`). The tags the Release step cuts are lightweight: v0.4.0 and v0.5.0 are both `commit` objects. So whenever the release commit's offset is not UTC, the guard and date-mismatch can disagree, and the guard lets through the very tag it exists to stop. That can happen in this repository: fast-forward-only and rebase merges are enabled, and Workers commit with +01:00 (this head is `2026-11-12T13:21:04+01:00`). I reproduced it: with a heading of `## [0.6.0] - 2026-11-12` and a commit at `2026-11-13T00:30:00+01:00`, the guard exits 0, and once `v0.6.0` is tagged the v1.6.0 checker reports `version 0.6.0 is dated 2026-11-12 and tag v0.6.0 was cut on 2026-11-13 (date-mismatch)`, the unrepairable state of item 1. The reverse case (heading 2026-11-13, same commit) is refused even though the tool would accept it. The fix: read the day the way the tool does, `commit_date=$(git log -1 --format=%cd --date=format:%Y-%m-%d HEAD)` with no `TZ=UTC` and no `-local`. On the repro commit that prints 2026-11-13. Then make the comment at :44, the step name at :45, the error text at :58 and the CHANGELOG.md entry (line 12, "(UTC)") say "the commit's own date" rather than UTC. Squash merges and Forgejo's merge commits carry `Z`, so with the default merge style the two readings agree, which is why the history so far does not show the problem. ### Verified - Read the work bead claudeacp-aqp, the PR description and the whole diff: ci.yml, release.yaml and CHANGELOG.md, 42 lines added. Items 3 and 4 are left out and say so; gascitypacks and rexcity are not touched, as the description says. Nothing unrelated is in the diff. - The merge into origin/main (66af402) is a fast-forward, so it is clean; Forgejo reports `mergeable`. - go build, go vet and `go test -race -shuffle=on ./...` pass on the merged tree (with the city's variables removed). The Go code is unchanged. - I built the changelog checker from changelog v1.6.0 (7ec45bb, the pinned commit) and ran it on the merged tree: valid=true, due=false (0.5.0 is already tagged). Both workflows parse as YAML. - Item 2: the head's CI run 1737, Changelog job 4431, shows the new step running on pull_request against the checked-out head 66832e8 and printing "Already up to date.", so origin/main is there after `fetch-depth: 0` and the merge happens before the check. The step is skipped on push. This part looks correct. - Item 1: I pulled the guard script out of release.yaml and ran it against the real release commits, 54d3364 for 0.4.0 and 66af402 for 0.5.0 (both pass), and against synthetic commits. A Z commit on the heading's day passes. 00:01Z on the next day is refused. A heading with no date is refused with its message. The +01:00 case is wrong, as described above.
ci: date the release guard by the commit's own date, not UTC (claudeacp-aqp)
All checks were successful
CI / Changelog (pull_request) Successful in 9s
CI / Lint (pull_request) Successful in 30s
CI / Test (pull_request) Successful in 37s
f3ff28d9d7
Review round 1 of claudeacp#5: the guard read the commit's day in UTC, but the changelog tool dates a lightweight tag by the committer date in the commit's own offset and does not normalize it. The tags the Release step cuts are lightweight, so a release commit carrying +01:00 (fast-forward and rebase merges keep the Worker's offset) could pass the guard and still trip date-mismatch, or be refused although the tool would accept it.

The guard now reads `git log -1 --format=%cd --date=format:%Y-%m-%d HEAD`, with no TZ=UTC and no -local. The workflow comment, step name, error text and the CHANGELOG.md entry say "the commit's own date" instead of UTC.

Validation: on a commit dated 2026-11-13T00:30:00+01:00 the command prints 2026-11-13, as the reviewer's repro expects; release.yaml still parses as YAML.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
city-root-review requested changes 2026-11-12 12:42:37 +00:00
Dismissed
city-root-review left a comment

Review of f3ff28d9d7 for claudeacp-aqp. Checks of the head: success.

Verdict

fail

Findings

  • [blocking] CHANGELOG.md:12: the branch does not merge into main. main moved to 91639f5 (#6, "Send status in_progress when a tool's execution starts") after this branch was cut from 66af402, and #6 added its own entry at the same place under [Unreleased] / ### Changed. Forgejo reports the PR not_mergeable, and git merge of f3ff28d into origin/main stops with a content conflict in CHANGELOG.md. The fix: rebase onto origin/main (91639f5) and keep both bullets under the one ### Changed heading, #6's first and this one after it. Nothing else conflicts: ci.yml and release.yaml merge cleanly.

The round-1 finding (review 210, the guard dating the commit in UTC) is fixed, and nothing else blocks. Once rebased, the change is ready to approve.

Verified

  • Read the work bead claudeacp-aqp (with the round-1 note), the PR description, my round-1 review and the whole diff against the merge base 66af402: ci.yml (+16), release.yaml (+23) and CHANGELOG.md (+4). Items 3 and 4 are left out and the description says so. Nothing unrelated is in the diff.
  • Round-1 fix: the guard now reads git log -1 --format=%cd --date=format:%Y-%m-%d HEAD, with no TZ=UTC and no -local, so it is the committer date in the commit's own offset. That is the date changelog v1.6.0 uses for a lightweight tag (pkg/git/git.go, TagDay/tagTime: Committer.When formatted in its own zone, by design). The comment, the step name, the error text and the CHANGELOG entry no longer say UTC.
  • Pulled the guard out of release.yaml at f3ff28d and ran it on synthetic commits, with the city's variables removed. The heading 2026-11-13 with a commit at 2026-11-13T00:30+01:00 passes. The heading 2026-11-12 with that same commit is refused, which is round 1's repro. The heading 2026-11-12 passes with a commit at 23:59Z and is refused at 2026-11-13T00:01Z. It also passes with a commit at 2026-11-12T23:30-07:00.
  • Merged the head into origin/main (91639f5) in a clone: CHANGELOG.md conflicts, as described above. With the conflict resolved locally by keeping both bullets (for testing only), go build, go vet and go test -race -shuffle=on ./... pass on the merged tree. The Go code is unchanged by this PR. The changelog checker built from changelog v1.6.0 returns valid=true and due=false on that tree. Both workflows parse as YAML. golangci-lint and govulncheck were not run (they need the network, and this PR touches no Go code).
  • The head's checks: success.
Review of f3ff28d9d7078cbe23f3d6ba2d4a1b613536315d for claudeacp-aqp. Checks of the head: success. ### Verdict fail ### Findings - [blocking] CHANGELOG.md:12: the branch does not merge into main. main moved to 91639f5 (#6, "Send status in_progress when a tool's execution starts") after this branch was cut from 66af402, and #6 added its own entry at the same place under `[Unreleased]` / `### Changed`. Forgejo reports the PR `not_mergeable`, and `git merge` of f3ff28d into origin/main stops with a content conflict in CHANGELOG.md. The fix: rebase onto origin/main (91639f5) and keep both bullets under the one `### Changed` heading, #6's first and this one after it. Nothing else conflicts: ci.yml and release.yaml merge cleanly. The round-1 finding (review 210, the guard dating the commit in UTC) is fixed, and nothing else blocks. Once rebased, the change is ready to approve. ### Verified - Read the work bead claudeacp-aqp (with the round-1 note), the PR description, my round-1 review and the whole diff against the merge base 66af402: ci.yml (+16), release.yaml (+23) and CHANGELOG.md (+4). Items 3 and 4 are left out and the description says so. Nothing unrelated is in the diff. - Round-1 fix: the guard now reads `git log -1 --format=%cd --date=format:%Y-%m-%d HEAD`, with no `TZ=UTC` and no `-local`, so it is the committer date in the commit's own offset. That is the date changelog v1.6.0 uses for a lightweight tag (`pkg/git/git.go`, `TagDay`/`tagTime`: `Committer.When` formatted in its own zone, by design). The comment, the step name, the error text and the CHANGELOG entry no longer say UTC. - Pulled the guard out of release.yaml at f3ff28d and ran it on synthetic commits, with the city's variables removed. The heading 2026-11-13 with a commit at 2026-11-13T00:30+01:00 passes. The heading 2026-11-12 with that same commit is refused, which is round 1's repro. The heading 2026-11-12 passes with a commit at 23:59Z and is refused at 2026-11-13T00:01Z. It also passes with a commit at 2026-11-12T23:30-07:00. - Merged the head into origin/main (91639f5) in a clone: CHANGELOG.md conflicts, as described above. With the conflict resolved locally by keeping both bullets (for testing only), `go build`, `go vet` and `go test -race -shuffle=on ./...` pass on the merged tree. The Go code is unchanged by this PR. The changelog checker built from changelog v1.6.0 returns valid=true and due=false on that tree. Both workflows parse as YAML. golangci-lint and govulncheck were not run (they need the network, and this PR touches no Go code). - The head's checks: success.
mikluko force-pushed worker/claudeacp-aqp from f3ff28d9d7
All checks were successful
CI / Changelog (pull_request) Successful in 9s
CI / Lint (pull_request) Successful in 30s
CI / Test (pull_request) Successful in 37s
to acdadfa49a
All checks were successful
CI / Changelog (pull_request) Successful in 4s
CI / Lint (pull_request) Successful in 30s
CI / Test (pull_request) Successful in 34s
2026-11-12 12:44:48 +00:00
Compare
city-root-review left a comment

Review of acdadfa49a for claudeacp-aqp. Checks of the head: success.

Verdict

pass

Findings

None. The round-2 finding (review 214, the conflict in CHANGELOG.md with #6) is fixed. The branch is now e4552f6 and acdadfa on top of origin/main (91639f5). Both bullets sit under the one ### Changed heading of [Unreleased], #6's first and this one after it.

Verified

  • Read the work bead claudeacp-aqp with both round notes, the PR description, my reviews 210 and 214, and the whole diff against origin/main: ci.yml (+16), release.yaml (+23) and CHANGELOG.md (+1). It does items 1 and 2. Items 3 and 4 are left out, and the description says so. Nothing unrelated is in the diff.
  • The workflows at acdadfa are byte-identical to f3ff28d, the head review 214 found ready apart from the rebase. So the round-1 fix still stands: the guard reads the committer date in the commit's own offset (git log -1 --format=%cd --date=format:%Y-%m-%d), as changelog v1.6.0 dates a lightweight tag.
  • Merged the head into origin/main in a clone. It is a fast-forward, so the merge is clean, and Forgejo reports mergeable.
  • On the merged tree, with the city's variables removed: go build ./..., go vet ./... and go test -race -shuffle=on ./... all pass. The Go code is unchanged.
  • Built the changelog checker from changelog v1.6.0 (7ec45bb, the pinned commit) and ran it on the merged tree: valid=true, due=false (0.5.0 is already tagged). Both workflows parse as YAML.
  • Pulled the guard script out of release.yaml at acdadfa and ran it on the 0.5.0 release commit 66af402. VERSION=0.5.0 passes. VERSION=0.4.0 (heading 2026-11-11) is refused with its message.
  • Not run: golangci-lint and govulncheck. They need the network, and this PR touches no Go code.
Review of acdadfa49a23af06075000acc2cd2f007861411b for claudeacp-aqp. Checks of the head: success. ### Verdict pass ### Findings None. The round-2 finding (review 214, the conflict in CHANGELOG.md with #6) is fixed. The branch is now e4552f6 and acdadfa on top of origin/main (91639f5). Both bullets sit under the one `### Changed` heading of `[Unreleased]`, #6's first and this one after it. ### Verified - Read the work bead claudeacp-aqp with both round notes, the PR description, my reviews 210 and 214, and the whole diff against origin/main: ci.yml (+16), release.yaml (+23) and CHANGELOG.md (+1). It does items 1 and 2. Items 3 and 4 are left out, and the description says so. Nothing unrelated is in the diff. - The workflows at acdadfa are byte-identical to f3ff28d, the head review 214 found ready apart from the rebase. So the round-1 fix still stands: the guard reads the committer date in the commit's own offset (`git log -1 --format=%cd --date=format:%Y-%m-%d`), as changelog v1.6.0 dates a lightweight tag. - Merged the head into origin/main in a clone. It is a fast-forward, so the merge is clean, and Forgejo reports `mergeable`. - On the merged tree, with the city's variables removed: `go build ./...`, `go vet ./...` and `go test -race -shuffle=on ./...` all pass. The Go code is unchanged. - Built the changelog checker from changelog v1.6.0 (7ec45bb, the pinned commit) and ran it on the merged tree: valid=true, due=false (0.5.0 is already tagged). Both workflows parse as YAML. - Pulled the guard script out of release.yaml at acdadfa and ran it on the 0.5.0 release commit 66af402. VERSION=0.5.0 passes. VERSION=0.4.0 (heading 2026-11-11) is refused with its message. - Not run: golangci-lint and govulncheck. They need the network, and this PR touches no Go code.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
mikluko/claudeacp!5
No description provided.