Found in review of #15: CI trusts the registry's own checksum for gc; cache warnings; no curl timeout #61

Merged
city-root merged 1 commit from worker/gascitypacks-bo9 into main 2026-11-12 17:25:25 +00:00
Contributor

Fixes the three findings of gascitypacks-bo9 (found in review of #15) in .forgejo/workflows/test.yaml:

  1. Checksum. The expected SHA-256 of the pinned gc is kept beside GC_SHA, one per architecture (GC_SHA256_AMD64, GC_SHA256_ARM64), and the download runs only if it matches. The .sha256 file from the registry is no longer fetched. A mismatch falls back to building gc at GC_SHA, as an unpublished pin does. I downloaded both binaries and hashed them myself, and the values match what the registry publishes.
  2. Cache warnings. cache: false on setup-go in both jobs that use it (lint and scripts); cache-dependency-path goes with it.
  3. Timeout. curl --max-time 180; the binaries are 133 and 145 MB and took about 10 seconds to fetch from the Mac.

Changelog note: .changelog/ci-gc-checksum-pinned.md. No new shell logic: the step's existing case and if change in place.

Verified: the YAML parses; the download-and-check logic, run against the real registry, accepts the right sum and falls back on a wrong one; gc lint . passes; the changelog v2 checker passes with -base main.

Not done: gascity-root's test / config step has the same shape (the bead says so) and is in another repository. Changing GC_SHA now means changing the two checksums with it, which the workflow's comment says.

Bead: gascitypacks-bo9

Fixes the three findings of gascitypacks-bo9 (found in review of #15) in `.forgejo/workflows/test.yaml`: 1. **Checksum.** The expected SHA-256 of the pinned gc is kept beside `GC_SHA`, one per architecture (`GC_SHA256_AMD64`, `GC_SHA256_ARM64`), and the download runs only if it matches. The `.sha256` file from the registry is no longer fetched. A mismatch falls back to building gc at `GC_SHA`, as an unpublished pin does. I downloaded both binaries and hashed them myself, and the values match what the registry publishes. 2. **Cache warnings.** `cache: false` on `setup-go` in both jobs that use it (`lint` and `scripts`); `cache-dependency-path` goes with it. 3. **Timeout.** `curl --max-time 180`; the binaries are 133 and 145 MB and took about 10 seconds to fetch from the Mac. Changelog note: `.changelog/ci-gc-checksum-pinned.md`. No new shell logic: the step's existing `case` and `if` change in place. Verified: the YAML parses; the download-and-check logic, run against the real registry, accepts the right sum and falls back on a wrong one; `gc lint .` passes; the changelog v2 checker passes with `-base main`. Not done: gascity-root's `test / config` step has the same shape (the bead says so) and is in another repository. Changing `GC_SHA` now means changing the two checksums with it, which the workflow's comment says. Bead: gascitypacks-bo9
ci: check the downloaded gc against a SHA-256 kept in the workflow (gascitypacks-bo9)
All checks were successful
test / changelog (pull_request) Successful in 5s
test / lint (pull_request) Successful in 19s
test / scripts (pull_request) Successful in 38s
f46989d0e5
Found in review of #15, which made CI download gc from the package registry. The expected checksum came from the same registry as the binary, so CI ran whatever sat under the pin's name. test.yaml now keeps the SHA-256 of the pinned gc beside GC_SHA, one per architecture, and sha256sum checks the download against that; the .sha256 file is no longer fetched. A mismatch falls back to the build at GC_SHA, as an unpublished pin does.

curl gets --max-time 180 (the binaries are 133 and 145 MB and took about 10 seconds here), so a stalled registry falls back to the build instead of holding the job to the runner's timeout.

setup-go sets cache: false in both jobs that use it: the runner's cache service answers 500 on every save, and cache-dependency-path has no use without a cache.

The checksums are those of the published binaries, which I downloaded and hashed myself. Validation: the YAML parses; the download-and-check logic run on the Mac against the real registry accepts the right sum and falls back on a wrong one; gc lint . passes. gascity-root's test / config step has the same shape and is not touched here.

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

Review of f46989d0e5 for gascitypacks-bo9. Checks of the head: success.

Verdict

fail

Findings

  • [blocking] .forgejo/workflows/test.yaml:24-38 and :74-78: the branch does not merge into the current main; the forge says not_mergeable, and a local merge of the head into origin/main (be97be3) conflicts in both setup-go blocks. Since this branch was cut, #78 moved the Go module to the repository root, so main now has go-version-file: go.mod with cache-dependency-path: go.mod, and the comment above the gc step says "the packs' tools' tests need it". Rebase onto main and resolve each block as go-version-file: go.mod plus cache: false (drop cache-dependency-path). Keep main's wording "the packs' tools' tests" in the new comment instead of "the forgejo pack's tests". forgejo/go.mod no longer exists on main, so keeping this branch's side would break both jobs.
  • [minor] .changelog/ci-gc-checksum-pinned.md:3: no changes needed. Check the fragment again after the rebase: the changelog check judges it against the new base.

Everything else is correct. Once rebased, the change does what the bead asks:

  1. The expected SHA-256 is kept in the workflow, one per architecture, and the registry's .sha256 is no longer fetched.
  2. cache: false is set in lint and scripts.
  3. curl --max-time 180 is added.

A mismatch, a timeout or an unpublished pin all fall through to the existing go install at GC_SHA. An empty $sum fails sha256sum -c and falls back the same way.

Verified

  • Read the work bead (description and the Operator's note), the PR description, the whole diff (2 files, +22/-7), and main's README. Main has no REVIEW.md, AGENTS.md or CLAUDE.md.
  • Merged the head into origin/main at be97be3: CONFLICT in .forgejo/workflows/test.yaml, in two hunks, both setup-go with: blocks (go.mod on main against forgejo/go.mod plus cache: false here). Aborted the merge.
  • GC_SHA is unchanged on main (6bd609f5…). The two pinned sums are the ones the registry publishes for it: fetched gc-linux-amd64.sha256 (fb534fad…6541) and gc-linux-arm64.sha256 (06df6435…3bb9) and compared them. The PR description says the author also hashed the binaries themselves.
  • The head's CI, run 168 (lint, scripts, changelog), all passed. The lint log shows gc-linux-amd64: OK from the new sha256sum -c -, the download used with no go install fallback, and then gc lint: 2 pack(s) ok. The lint and scripts logs show no cache-save warning from setup-go.
  • Did not run go vet, go test or the shell tests locally. The diff changes no Go and no test code, and there is no clean merge result to run them on.
Review of f46989d0e5a2de6069c31300811988353dfabfe4 for gascitypacks-bo9. Checks of the head: success. ### Verdict fail ### Findings - [blocking] .forgejo/workflows/test.yaml:24-38 and :74-78: the branch does not merge into the current `main`; the forge says `not_mergeable`, and a local merge of the head into `origin/main` (be97be3) conflicts in both `setup-go` blocks. Since this branch was cut, #78 moved the Go module to the repository root, so `main` now has `go-version-file: go.mod` with `cache-dependency-path: go.mod`, and the comment above the `gc` step says "the packs' tools' tests need it". Rebase onto `main` and resolve each block as `go-version-file: go.mod` plus `cache: false` (drop `cache-dependency-path`). Keep main's wording "the packs' tools' tests" in the new comment instead of "the forgejo pack's tests". `forgejo/go.mod` no longer exists on main, so keeping this branch's side would break both jobs. - [minor] .changelog/ci-gc-checksum-pinned.md:3: no changes needed. Check the fragment again after the rebase: the changelog check judges it against the new base. Everything else is correct. Once rebased, the change does what the bead asks: 1. The expected SHA-256 is kept in the workflow, one per architecture, and the registry's `.sha256` is no longer fetched. 2. `cache: false` is set in `lint` and `scripts`. 3. `curl --max-time 180` is added. A mismatch, a timeout or an unpublished pin all fall through to the existing `go install` at `GC_SHA`. An empty `$sum` fails `sha256sum -c` and falls back the same way. ### Verified - Read the work bead (description and the Operator's note), the PR description, the whole diff (2 files, +22/-7), and main's README. Main has no REVIEW.md, AGENTS.md or CLAUDE.md. - Merged the head into `origin/main` at be97be3: CONFLICT in `.forgejo/workflows/test.yaml`, in two hunks, both `setup-go` `with:` blocks (`go.mod` on main against `forgejo/go.mod` plus `cache: false` here). Aborted the merge. - `GC_SHA` is unchanged on main (6bd609f5…). The two pinned sums are the ones the registry publishes for it: fetched `gc-linux-amd64.sha256` (fb534fad…6541) and `gc-linux-arm64.sha256` (06df6435…3bb9) and compared them. The PR description says the author also hashed the binaries themselves. - The head's CI, run 168 (lint, scripts, changelog), all passed. The lint log shows `gc-linux-amd64: OK` from the new `sha256sum -c -`, the download used with no `go install` fallback, and then `gc lint: 2 pack(s) ok`. The lint and scripts logs show no cache-save warning from setup-go. - Did not run `go vet`, `go test` or the shell tests locally. The diff changes no Go and no test code, and there is no clean merge result to run them on.
mikluko force-pushed worker/gascitypacks-bo9 from f46989d0e5
All checks were successful
test / changelog (pull_request) Successful in 5s
test / lint (pull_request) Successful in 19s
test / scripts (pull_request) Successful in 38s
to 0524a1c52a
All checks were successful
test / changelog (pull_request) Successful in 5s
test / lint (pull_request) Successful in 27s
test / scripts (pull_request) Successful in 41s
2026-11-12 15:32:01 +00:00
Compare
city-root-review left a comment

Review of 0524a1c52a for gascitypacks-bo9. Checks of the head: success.

Verdict

pass

Findings

None that block, and no minor ones.

The blocking finding of round 1 (review 263, on f46989d) is resolved. The branch is now one commit on top of main at 0e49d7c. Both setup-go blocks keep main's go-version-file: go.mod, add cache: false and drop cache-dependency-path. The new comment keeps main's wording, "the packs' tools' tests need it".

The change does what the bead asks, and nothing else:

  1. test.yaml:14-15 keeps the expected SHA-256 per architecture beside GC_SHA, and :43 checks the download against it with echo "$sum $file" | sha256sum -c -. The registry's .sha256 is no longer fetched.
  2. cache: false is set in lint (:28) and scripts (:78), the only two jobs that use setup-go.
  3. curl --max-time 180 (:43).

A mismatch, a timeout or an unpublished pin leaves downloaded unset, so the existing go install at GC_SHA runs (:52). The gascity-root test / config step the bead mentions is in another repository, and the PR description says it is left out.

Verified

  • Read the work bead (description, the Operator's note and the round-1 note), the PR description, round 1's review, and the whole diff (2 files, +22/-7). Main has no REVIEW.md, AGENTS.md or CLAUDE.md, and its README says nothing about the checksum. docs/shell.md:65 still describes the step correctly.
  • Merged the head into origin/main (0e49d7c): clean, no conflict. The forge says mergeable.
  • On the merged tree, with the city's variables removed: go vet ./... and go test ./... pass (both packages ok), and test.yaml parses as YAML.
  • GC_SHA is unchanged on main (6bd609f5…). The two pinned sums are the ones the registry publishes for it: I fetched gc-linux-amd64.sha256 (fb534fad…6541) and gc-linux-arm64.sha256 (06df6435…3bb9) and compared them.
  • The head's CI run (#208: lint, scripts, changelog) passed. The lint log shows gc-linux-amd64: OK from the new check, then gc lint: 2 pack(s) ok, with no go install fallback. The Post setup-go steps of lint and scripts succeed with no cache-save warning. The changelog job (v2 checker) passes with the fragment .changelog/ci-gc-checksum-pinned.md, which is a ### Fixed entry.
  • Did not run the shell tests locally. The diff changes no test and no script, and CI ran them all on this head.
Review of 0524a1c52a92872644769622d4b7fe6f4a9f524f for gascitypacks-bo9. Checks of the head: success. ### Verdict pass ### Findings None that block, and no minor ones. The blocking finding of round 1 (review 263, on f46989d) is resolved. The branch is now one commit on top of `main` at 0e49d7c. Both `setup-go` blocks keep main's `go-version-file: go.mod`, add `cache: false` and drop `cache-dependency-path`. The new comment keeps main's wording, "the packs' tools' tests need it". The change does what the bead asks, and nothing else: 1. `test.yaml:14-15` keeps the expected SHA-256 per architecture beside `GC_SHA`, and `:43` checks the download against it with `echo "$sum $file" | sha256sum -c -`. The registry's `.sha256` is no longer fetched. 2. `cache: false` is set in `lint` (`:28`) and `scripts` (`:78`), the only two jobs that use `setup-go`. 3. `curl --max-time 180` (`:43`). A mismatch, a timeout or an unpublished pin leaves `downloaded` unset, so the existing `go install` at `GC_SHA` runs (`:52`). The gascity-root `test / config` step the bead mentions is in another repository, and the PR description says it is left out. ### Verified - Read the work bead (description, the Operator's note and the round-1 note), the PR description, round 1's review, and the whole diff (2 files, +22/-7). Main has no REVIEW.md, AGENTS.md or CLAUDE.md, and its README says nothing about the checksum. `docs/shell.md:65` still describes the step correctly. - Merged the head into `origin/main` (0e49d7c): clean, no conflict. The forge says `mergeable`. - On the merged tree, with the city's variables removed: `go vet ./...` and `go test ./...` pass (both packages ok), and `test.yaml` parses as YAML. - `GC_SHA` is unchanged on main (6bd609f5…). The two pinned sums are the ones the registry publishes for it: I fetched `gc-linux-amd64.sha256` (fb534fad…6541) and `gc-linux-arm64.sha256` (06df6435…3bb9) and compared them. - The head's CI run (#208: lint, scripts, changelog) passed. The lint log shows `gc-linux-amd64: OK` from the new check, then `gc lint: 2 pack(s) ok`, with no `go install` fallback. The Post setup-go steps of `lint` and `scripts` succeed with no cache-save warning. The changelog job (v2 checker) passes with the fragment `.changelog/ci-gc-checksum-pinned.md`, which is a `### Fixed` entry. - Did not run the shell tests locally. The diff changes no test and no script, and CI ran them all on this head.
Commenting is not possible because the repository is archived.
No reviewers
No labels
No milestone
No project
No assignees
3 participants
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/gascitypacks!61
No description provided.