apply and upgrade orders race on the city repository's refs when they fire together #27

Merged
city-root merged 2 commits from worker/gascitypacks-jmz into main 2026-11-12 20:09:17 +00:00
Contributor

The apply and upgrade orders no longer fail when they fire together (gascitypacks-jmz). Rework of the first head: this description describes head 7a1a870, which moves the fetch's logic into the roles Go tool as docs/shell.md asks.

The defect. Both orders fetch origin/main into the city repository. When they fire in the same second and main has moved, git lets only one of the two fetches update refs/remotes/origin/main; the other fails with "cannot lock ref", or "Unable to create … .lock: File exists" while the first still holds the lock, and the Operator is mailed.

The change.

  • roles git fetch <repo> <branch> (roles/assets/roles/fetch.go) runs git fetch origin <branch> and runs it again when the failure says one of those two things: up to five tries, 0.2 to 0.6 s apart at random, so two fetches that collided do not collide again on the same beat. By then the ref is where the first fetch put it.
  • Any other failure fails at once with git's output on stderr and exit 1; a lock still lost after the fifth try fails too (a stale .lock left by a killed process is that case). The orders still report either to the Operator.
  • roles/assets/scripts/apply.sh and upgrade.sh call it in one line each; roles/assets/roles/main.go wires the command and its usage.
  • docs/shell.md item 3 changed to match: upgrade in Go no longer takes a lock of gcx for jmz, since both orders already fetch through this command.
  • README ("The two orders fetch through one command") and the fragment .changelog/fetch-ref-lock-retry.md (Fixed) say the same.
  • upgrade now needs go on the supervisor's PATH, as apply already did; upgrade.sh checks for it, and tests/upgrade.sh was adjusted.

Why retry rather than serialize. A lock shared by two scripts needs a rule for a stale lock left by a run killed outright. A retry needs none, and it also covers a fetch the user or a Worker runs in the city directory, which no lock of the orders could.

Checks (on this head, rebased on main b479852, city variables removed): go vet ./..., go test -race ./..., gc lint ., tests/apply.sh, tests/upgrade.sh, and changelog -base main (v2) pass.

Tests (roles/assets/roles/fetch_test.go). A real city and origin are made to collide every time: a wrapper of git-upload-pack holds each fetch until two have arrived, and a reference-transaction hook keeps the ref lock for 0.3 s.

  • TestTwoPlainFetchesCollideOnTheRef shows the defect with plain git, so the others are known to test something.
  • TestTwoFetchesTogetherBothSucceed and TestGitFetchCommandTwiceTogether run two fetches at once, through fetchOrigin and through the command as the orders run it, with origin ahead: both succeed and the ref ends at origin's tip.
  • Unit tests cover the retry, its pause bounds, the existing-.lock case, a failure that is not a lost lock (no retry), and a lock held through all five tries (fails).

Undone and seen to fail: with the retry condition in fetchOrigin replaced by "never retry", five tests fail (TestTwoFetchesTogetherBothSucceed, TestGitFetchCommandTwiceTogether, TestFetchWithTheRefLockHeldFailsAfterTheLastTry, TestFetchRetriesALostLockAfterAShortPause, TestFetchRetriesAnExistingLockFileToo); restored, they pass. Two test changes below could not be seen failing:

Review round 1 (review 355 of eea6e5a).

  • Blocking, this description: rewritten for this head.
  • TestTwoPlainFetchesCollideOnTheRef now runs git in the environment of the other tests (isolatedGit: no global or system configuration). I could not make the old form fail: with a global core.hooksPath pointing nowhere and the isolation removed, the test still passed here (git 2.56.1), so the collision does not depend on the hook in that test. The change is for consistency.
  • The recording pause now sleeps the duration it was asked for instead of 10 ms, so the concurrent tests' five tries fall into the window production has. It is margin, not a behaviour a test can fail on; the tests pass with it (go test -race, 12 s).

gascitypacks-jmz

The `apply` and `upgrade` orders no longer fail when they fire together (gascitypacks-jmz). Rework of the first head: this description describes head 7a1a870, which moves the fetch's logic into the roles Go tool as `docs/shell.md` asks. **The defect.** Both orders fetch `origin/main` into the city repository. When they fire in the same second and main has moved, git lets only one of the two fetches update `refs/remotes/origin/main`; the other fails with "cannot lock ref", or "Unable to create … .lock: File exists" while the first still holds the lock, and the Operator is mailed. **The change.** - `roles git fetch <repo> <branch>` (`roles/assets/roles/fetch.go`) runs `git fetch origin <branch>` and runs it again when the failure says one of those two things: up to five tries, 0.2 to 0.6 s apart at random, so two fetches that collided do not collide again on the same beat. By then the ref is where the first fetch put it. - Any other failure fails at once with git's output on stderr and exit 1; a lock still lost after the fifth try fails too (a stale `.lock` left by a killed process is that case). The orders still report either to the Operator. - `roles/assets/scripts/apply.sh` and `upgrade.sh` call it in one line each; `roles/assets/roles/main.go` wires the command and its usage. - `docs/shell.md` item 3 changed to match: `upgrade` in Go no longer takes a lock of `gcx` for `jmz`, since both orders already fetch through this command. - README ("The two orders fetch through one command") and the fragment `.changelog/fetch-ref-lock-retry.md` (Fixed) say the same. - `upgrade` now needs `go` on the supervisor's `PATH`, as `apply` already did; `upgrade.sh` checks for it, and `tests/upgrade.sh` was adjusted. **Why retry rather than serialize.** A lock shared by two scripts needs a rule for a stale lock left by a run killed outright. A retry needs none, and it also covers a fetch the user or a Worker runs in the city directory, which no lock of the orders could. **Checks** (on this head, rebased on main b479852, city variables removed): `go vet ./...`, `go test -race ./...`, `gc lint .`, `tests/apply.sh`, `tests/upgrade.sh`, and `changelog -base main` (v2) pass. **Tests** (`roles/assets/roles/fetch_test.go`). A real city and origin are made to collide every time: a wrapper of `git-upload-pack` holds each fetch until two have arrived, and a `reference-transaction` hook keeps the ref lock for 0.3 s. - `TestTwoPlainFetchesCollideOnTheRef` shows the defect with plain git, so the others are known to test something. - `TestTwoFetchesTogetherBothSucceed` and `TestGitFetchCommandTwiceTogether` run two fetches at once, through `fetchOrigin` and through the command as the orders run it, with origin ahead: both succeed and the ref ends at origin's tip. - Unit tests cover the retry, its pause bounds, the existing-`.lock` case, a failure that is not a lost lock (no retry), and a lock held through all five tries (fails). Undone and seen to fail: with the retry condition in `fetchOrigin` replaced by "never retry", five tests fail (`TestTwoFetchesTogetherBothSucceed`, `TestGitFetchCommandTwiceTogether`, `TestFetchWithTheRefLockHeldFailsAfterTheLastTry`, `TestFetchRetriesALostLockAfterAShortPause`, `TestFetchRetriesAnExistingLockFileToo`); restored, they pass. Two test changes below could not be seen failing: **Review round 1 (review 355 of eea6e5a).** - Blocking, this description: rewritten for this head. - `TestTwoPlainFetchesCollideOnTheRef` now runs git in the environment of the other tests (`isolatedGit`: no global or system configuration). I could not make the old form fail: with a global `core.hooksPath` pointing nowhere and the isolation removed, the test still passed here (git 2.56.1), so the collision does not depend on the hook in that test. The change is for consistency. - The recording pause now sleeps the duration it was asked for instead of 10 ms, so the concurrent tests' five tries fall into the window production has. It is margin, not a behaviour a test can fail on; the tests pass with it (`go test -race`, 12 s). --- gascitypacks-jmz
The apply and upgrade orders both run git fetch origin main in the city
repository, and they fire together regularly (about every 5.5 and 10.5
minutes). When origin/main has moved, git lets only one of two concurrent
fetches update refs/remotes/origin/main; the other fails with "cannot lock
ref ... is at X but expected Y" even though the winner did what it wanted.
On 2026-11-11 that cost apply a run right after a merge, and mailed the
Operator.

Both scripts now fetch through fetch_origin (roles/assets/scripts/fetch-origin.sh),
which runs the fetch again, up to five times 0.2 to 0.6 seconds apart, when it
failed on a lost ref lock. By then the ref is where the winner put it and the
fetch has nothing left to do. Any other failure, and a lock still lost after
the last try, is returned as before, so the order still reports it and mails
the Operator.

Retry was chosen over serializing the two orders: a lock shared across two
scripts needs a stale-lock rule for a run killed outright, with no flock on the
Mac, and retrying also covers a fetch the user or a Worker runs in the city
directory.

Validation: tests/fetch-race.sh gates both fetches on a wrapper of
git-upload-pack and slows the ref update with a reference-transaction hook, so
the collision happens every run. It fails against the previous scripts (apply
exits 1 with "cannot lock ref" in all three rounds) and passes with the change,
under bash 3.2 as well; it also checks that a missing origin and a lock that
stays held still fail and mail the Operator once. tests/upgrade.sh, gc lint .
and the v1 changelog check pass. The test is added to the scripts job.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
chore: make shellcheck follow fetch-origin.sh (gascitypacks-jmz)
All checks were successful
test / changelog (pull_request) Successful in 5s
test / lint (pull_request) Successful in 14s
test / scripts (pull_request) Successful in 56s
b7143e5173
Self-review touch-up: shellcheck -x -P SCRIPTDIR now follows the sourced
fetch-origin.sh, so it no longer reports fetch_out as unassigned in apply.sh
and upgrade.sh, and fetch-origin.sh names its shell. Directives only; no
behaviour change.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
city-root force-pushed worker/gascitypacks-jmz from b7143e5173
All checks were successful
test / changelog (pull_request) Successful in 5s
test / lint (pull_request) Successful in 14s
test / scripts (pull_request) Successful in 56s
to eea6e5a6cf
All checks were successful
test / changelog (pull_request) Successful in 8s
test / lint (pull_request) Successful in 29s
test / scripts (pull_request) Successful in 52s
2026-11-12 19:34:03 +00:00
Compare
city-root-review requested changes 2026-11-12 19:46:50 +00:00
Dismissed
city-root-review left a comment

Review of eea6e5a6cf for gascitypacks-jmz. Checks of the head: success.

Verdict

fail

The code can be approved as it stands. The one blocking finding is the pull request's description, which still describes the shell version this head replaced. Fixing it means editing the description. No commit is needed.

Findings

  • [blocking] pull request description: it describes the earlier head (b7143e5), not this one. It names fetch_origin in roles/assets/scripts/fetch-origin.sh and a test tests/fetch-race.sh "added to the scripts job", says it passes "under bash 3.2" and "the v1 changelog check", and says "CHANGELOG has its entry". None of these is in this head. The fetch is now roles git fetch (roles/assets/roles/fetch.go), the test is roles/assets/roles/fetch_test.go, run by go test ./... in test / lint, and the note is the fragment .changelog/fetch-ref-lock-retry.md under the v2 checker. The Operator's note of 14:19 asked for a description, and a merge would carry this one into the history. Fix: rewrite the description for this head. Keep the "why retry rather than serialize" paragraph, which still holds. Also say that docs/shell.md item 3 was changed to match, and that upgrade now needs go on the supervisor's PATH.
  • [minor] roles/assets/roles/fetch_test.go:286: TestTwoPlainFetchesCollideOnTheRef runs git with the user's global configuration, but gitIn and fetchEnv remove it (GIT_CONFIG_GLOBAL=/dev/null, GIT_CONFIG_NOSYSTEM=1). A global core.hooksPath would skip the slow reference-transaction hook, and the test would then fail with "did not collide" for a reason that has nothing to do with the code. Fix: give it the same environment.
  • [minor] roles/assets/roles/fetch_test.go:197: the test's pause sleeps 10 ms, while the command pauses 0.2 to 0.6 s, and the winner holds the lock for at least the hook's 0.3 s. The concurrent tests therefore fit their five tries into a narrower window than production does. They passed 30 rounds here, so this is margin, not a failure. Sleeping the recorded duration, or a fixed 200 ms, would test what runs.

Verified

  • Read the work bead with its notes, the PR description, and REVIEW.md and README.md from main (there is no AGENTS.md or CLAUDE.md). Read the whole diff: 9 files, +449/−12.
  • Merged the head into origin/main (4b703ec): clean, and the forge reports mergeable.
  • On the merge result, with the city's variables removed: go vet ./... ok. go test ./... ok. go test -race ./roles/... ok. go test -count=10 -run 'Fetch|Collide' ./roles/assets/roles/ ok: the plain-git collision test shows the defect every time, and both fetches succeed through fetchOrigin and through run. go test -v -run TestShellBudget ./internal/budget: 28 units, 10 in the ledger, 0 findings. All 17 tests/*.sh scripts of the workflow pass, apply.sh and upgrade.sh among them, both now building the real roles tool. gc lint .: 2 packs ok. changelog -base main (v2): exit 0.
  • Judged the change against the bead. It retries rather than locks, and gives the reason. The retry covers only "cannot lock ref" and an existing .lock. Any other failure fails at once with git's output, and a held lock fails after five tries; tests cover both, and the order still reports it. The logic is in the roles tool, with one-line calls in apply.sh:99 and upgrade.sh:173, as docs/shell.md and the Operator's note ask. The test is a Go test, as the note allows. upgrade.sh now checks that go is on PATH. The README section and the changelog fragment follow main's conventions.
Review of eea6e5a6cf66ed52e9cef5f9e65dab24465f5c3f for gascitypacks-jmz. Checks of the head: success. ### Verdict fail The code can be approved as it stands. The one blocking finding is the pull request's description, which still describes the shell version this head replaced. Fixing it means editing the description. No commit is needed. ### Findings - [blocking] pull request description: it describes the earlier head (b7143e5), not this one. It names `fetch_origin` in `roles/assets/scripts/fetch-origin.sh` and a test `tests/fetch-race.sh` "added to the scripts job", says it passes "under bash 3.2" and "the v1 changelog check", and says "CHANGELOG has its entry". None of these is in this head. The fetch is now `roles git fetch` (`roles/assets/roles/fetch.go`), the test is `roles/assets/roles/fetch_test.go`, run by `go test ./...` in `test / lint`, and the note is the fragment `.changelog/fetch-ref-lock-retry.md` under the v2 checker. The Operator's note of 14:19 asked for a description, and a merge would carry this one into the history. Fix: rewrite the description for this head. Keep the "why retry rather than serialize" paragraph, which still holds. Also say that `docs/shell.md` item 3 was changed to match, and that `upgrade` now needs `go` on the supervisor's `PATH`. - [minor] roles/assets/roles/fetch_test.go:286: `TestTwoPlainFetchesCollideOnTheRef` runs git with the user's global configuration, but `gitIn` and `fetchEnv` remove it (`GIT_CONFIG_GLOBAL=/dev/null`, `GIT_CONFIG_NOSYSTEM=1`). A global `core.hooksPath` would skip the slow `reference-transaction` hook, and the test would then fail with "did not collide" for a reason that has nothing to do with the code. Fix: give it the same environment. - [minor] roles/assets/roles/fetch_test.go:197: the test's pause sleeps 10 ms, while the command pauses 0.2 to 0.6 s, and the winner holds the lock for at least the hook's 0.3 s. The concurrent tests therefore fit their five tries into a narrower window than production does. They passed 30 rounds here, so this is margin, not a failure. Sleeping the recorded duration, or a fixed 200 ms, would test what runs. ### Verified - Read the work bead with its notes, the PR description, and REVIEW.md and README.md from `main` (there is no AGENTS.md or CLAUDE.md). Read the whole diff: 9 files, +449/−12. - Merged the head into `origin/main` (4b703ec): clean, and the forge reports `mergeable`. - On the merge result, with the city's variables removed: `go vet ./...` ok. `go test ./...` ok. `go test -race ./roles/...` ok. `go test -count=10 -run 'Fetch|Collide' ./roles/assets/roles/` ok: the plain-git collision test shows the defect every time, and both fetches succeed through `fetchOrigin` and through `run`. `go test -v -run TestShellBudget ./internal/budget`: 28 units, 10 in the ledger, 0 findings. All 17 `tests/*.sh` scripts of the workflow pass, `apply.sh` and `upgrade.sh` among them, both now building the real roles tool. `gc lint .`: 2 packs ok. `changelog -base main` (v2): exit 0. - Judged the change against the bead. It retries rather than locks, and gives the reason. The retry covers only "cannot lock ref" and an existing `.lock`. Any other failure fails at once with git's output, and a held lock fails after five tries; tests cover both, and the order still reports it. The logic is in the roles tool, with one-line calls in `apply.sh:99` and `upgrade.sh:173`, as `docs/shell.md` and the Operator's note ask. The test is a Go test, as the note allows. `upgrade.sh` now checks that `go` is on `PATH`. The README section and the changelog fragment follow main's conventions.
city-root force-pushed worker/gascitypacks-jmz from eea6e5a6cf
All checks were successful
test / changelog (pull_request) Successful in 8s
test / lint (pull_request) Successful in 29s
test / scripts (pull_request) Successful in 52s
to 7a1a8705f6
All checks were successful
test / changelog (pull_request) Successful in 4s
test / lint (pull_request) Successful in 39s
test / scripts (pull_request) Successful in 50s
2026-11-12 19:50:53 +00:00
Compare
city-root-review requested changes 2026-11-12 19:57:25 +00:00
Dismissed
city-root-review left a comment

Review of 7a1a8705f6 for gascitypacks-jmz. Checks of the head: success.

Verdict

fail

The only thing that blocks is the merge. The head was rebased on b479852, and main has since moved to 62414ca (#82, roles waiting and roles nudge). The head no longer merges into it, and the forge reports not_mergeable. Rebase onto main 62414ca. The code, the tests, the description and the notes can be approved as they stand: every finding of review 355 is addressed.

Findings

  • [blocking] roles/assets/roles/main.go: a merge conflict with main 62414ca (#82), in three places. First, the package comment (lines 6–11 of the head): main now says "has these commands: … version proves the stub …, waiting lists …, and nudge nudges …", where the head says "has three commands". Second, the usage constant (line 41): main added roles waiting … and roles nudge …. Third, run (lines 117–118): main added the waiting/nudge branch at the same spot as the git fetch branch. Fix: rebase onto main and keep both sides in each place: name git fetch among main's commands in the comment, add the git fetch usage line after nudge, and put the git fetch branch after the closing brace of the waiting/nudge block. Nothing else conflicts: README.md, docs/shell.md, the scripts and tests/upgrade.sh merge cleanly.

Verified

  • Read the work bead with all its notes, the PR description, review 355 and its findings, and REVIEW.md and README.md from main. main has no AGENTS.md or CLAUDE.md. Read the whole diff: 9 files, +459/−11.
  • Review 355: the description is rewritten for this head and says what the review asked (docs/shell.md item 3, go for upgrade). TestTwoPlainFetchesCollideOnTheRef now uses isolatedGit() (fetch_test.go:150). The test pause now sleeps the duration it was asked for (fetch_test.go:60).
  • Logic: fetchOrigin retries only on cannot lock ref or an existing .lock. It stops after fetchTries (5) tries or when the context ends, with pauses of 0.2 to 0.6 s at random, and returns git's output of the last try. Any other failure returns at once. runGitFetch bounds the run with orderTimeout. apply.sh:99 and upgrade.sh:170 each make a one-line call under ${PACK_DIR:?}, and their report paths are unchanged. upgrade.sh now checks for go. This matches the bead and docs/shell.md.
  • Merged the head into origin/main (62414ca): the conflict above. To test the result, I resolved it in my clone only (nothing pushed) by keeping both sides as described. Then, with the city's variables removed (proved: 0):
    • gofmt -l .: clean. go vet ./...: ok. go test -race ./...: all four packages ok (roles/assets/roles in 12 s).
    • All 19 tests/*.sh that test.yaml runs pass, apply.sh and upgrade.sh among them.
    • go test -v -count=1 -run TestShellBudget ./internal/budget: 31 units, 10 in the ledger, 0 findings.
    • gc lint ., with a throwaway HOME: 2 packs ok.
    • changelog -base main, built from the action's tag v2 (087d7e8): exit 0, valid.
Review of 7a1a8705f6ba62056fb04c3814c09ed5489e8412 for gascitypacks-jmz. Checks of the head: success. ### Verdict fail The only thing that blocks is the merge. The head was rebased on b479852, and main has since moved to 62414ca (#82, `roles waiting` and `roles nudge`). The head no longer merges into it, and the forge reports `not_mergeable`. Rebase onto main 62414ca. The code, the tests, the description and the notes can be approved as they stand: every finding of review 355 is addressed. ### Findings - [blocking] roles/assets/roles/main.go: a merge conflict with main 62414ca (#82), in three places. First, the package comment (lines 6–11 of the head): main now says "has these commands: … `version` proves the stub …, `waiting` lists …, and `nudge` nudges …", where the head says "has three commands". Second, the `usage` constant (line 41): main added `roles waiting …` and `roles nudge …`. Third, `run` (lines 117–118): main added the `waiting`/`nudge` branch at the same spot as the `git fetch` branch. Fix: rebase onto main and keep both sides in each place: name `git fetch` among main's commands in the comment, add the `git fetch` usage line after `nudge`, and put the `git fetch` branch after the closing brace of the `waiting`/`nudge` block. Nothing else conflicts: `README.md`, `docs/shell.md`, the scripts and `tests/upgrade.sh` merge cleanly. ### Verified - Read the work bead with all its notes, the PR description, review 355 and its findings, and `REVIEW.md` and `README.md` from `main`. `main` has no `AGENTS.md` or `CLAUDE.md`. Read the whole diff: 9 files, +459/−11. - Review 355: the description is rewritten for this head and says what the review asked (docs/shell.md item 3, `go` for `upgrade`). `TestTwoPlainFetchesCollideOnTheRef` now uses `isolatedGit()` (fetch_test.go:150). The test pause now sleeps the duration it was asked for (fetch_test.go:60). - Logic: `fetchOrigin` retries only on `cannot lock ref` or an existing `.lock`. It stops after `fetchTries` (5) tries or when the context ends, with pauses of 0.2 to 0.6 s at random, and returns git's output of the last try. Any other failure returns at once. `runGitFetch` bounds the run with `orderTimeout`. `apply.sh:99` and `upgrade.sh:170` each make a one-line call under `${PACK_DIR:?}`, and their `report` paths are unchanged. `upgrade.sh` now checks for `go`. This matches the bead and docs/shell.md. - Merged the head into `origin/main` (62414ca): the conflict above. To test the result, I resolved it in my clone only (nothing pushed) by keeping both sides as described. Then, with the city's variables removed (proved: 0): - `gofmt -l .`: clean. `go vet ./...`: ok. `go test -race ./...`: all four packages ok (`roles/assets/roles` in 12 s). - All 19 `tests/*.sh` that `test.yaml` runs pass, `apply.sh` and `upgrade.sh` among them. - `go test -v -count=1 -run TestShellBudget ./internal/budget`: 31 units, 10 in the ledger, 0 findings. - `gc lint .`, with a throwaway `HOME`: 2 packs ok. - `changelog -base main`, built from the action's tag v2 (087d7e8): exit 0, valid.
city-root force-pushed worker/gascitypacks-jmz from 7a1a8705f6
All checks were successful
test / changelog (pull_request) Successful in 4s
test / lint (pull_request) Successful in 39s
test / scripts (pull_request) Successful in 50s
to 62f3ea52f2
All checks were successful
test / changelog (pull_request) Successful in 5s
test / lint (pull_request) Successful in 32s
test / scripts (pull_request) Successful in 51s
2026-11-12 19:59:48 +00:00
Compare
Author
Contributor

Rework done, head 62f3ea52f2. Review 357's one blocking finding, the merge conflict with main 62414ca (#82) in roles/assets/roles/main.go: rebased onto 62414ca and kept both sides in all three places (the package comment names git fetch among waiting and nudge, the usage has the git fetch line after nudge, and run has the git fetch branch after the waiting/nudge block). Nothing else conflicted. After the rebase: gofmt clean, go vet ok, go test -race ./... ok (all four packages), tests/apply.sh and tests/upgrade.sh pass, gc lint . ok, changelog -base main exit 0. The description and code are otherwise unchanged.

Rework done, head 62f3ea52f297be26077b828812853afc83dbfa2c. Review 357's one blocking finding, the merge conflict with main 62414ca (#82) in roles/assets/roles/main.go: rebased onto 62414ca and kept both sides in all three places (the package comment names git fetch among waiting and nudge, the usage has the git fetch line after nudge, and run has the git fetch branch after the waiting/nudge block). Nothing else conflicted. After the rebase: gofmt clean, go vet ok, go test -race ./... ok (all four packages), tests/apply.sh and tests/upgrade.sh pass, gc lint . ok, changelog -base main exit 0. The description and code are otherwise unchanged.
city-root-review left a comment

Review of 62f3ea52f2 for gascitypacks-jmz. Checks of the head: success.

Verdict

pass

Review 357's one blocking finding is fixed. The head is rebased onto main 62414ca and fast-forwards onto it. roles/assets/roles/main.go keeps both sides in the three places review 357 named: the package comment names git fetch among main's commands, the usage line roles git fetch <repo> <branch> follows nudge, and the git fetch branch of run comes after the waiting/nudge block (main.go:144).

Findings

  • [minor] pull request description: it still says it "describes head 7a1a870" and that the checks ran "on this head, rebased on main b479852". This head is 62f3ea5, rebased on 62414ca. What it says of the code, the tests and the two review rounds holds for this head. Fix, if you want one: change those two references. A merge would carry them into the history, but they mislead no one about the change.

Verified

  • Read the work bead with all its notes, the pull request's description, reviews 355 and 357, and REVIEW.md and README.md from main. main has no AGENTS.md or CLAUDE.md. Read the whole diff: 9 files, +459/−12.
  • Merged the head into origin/main (62414ca): a fast-forward, and the forge reports mergeable.
  • On the merge result, with the city's variables removed (proved: 0):
    • gofmt -l .: clean. go vet ./...: ok. go test -race -count=1 ./...: all four packages ok.
    • go test -count=5 -run 'Fetch|Collide' ./roles/assets/roles/: ok. The plain-git collision test shows the defect every time, and both fetches succeed through fetchOrigin and through run.
    • go test -v -count=1 -run TestShellBudget ./internal/budget: 31 units, 10 in the ledger, 0 findings.
    • All 19 tests/*.sh that test.yaml runs pass, apply.sh and upgrade.sh among them.
    • gc lint . with a throwaway HOME: 2 packs ok.
    • changelog -base main (the city's pinned build from PATH): exit 0, valid.
  • Judged the change against the bead. It retries a lost ref lock ("cannot lock ref", or an existing .lock) up to five tries, 0.2 to 0.6 s apart. Any other failure, and a lock still held after the last try, fails with git's output, and the order reports it as before. The PR says why it retries rather than serialize. The logic is in the roles tool, with one-line calls in apply.sh:99 and upgrade.sh:170, as docs/shell.md asks. The test is a Go test that makes the two fetches collide against one repository with origin ahead. upgrade.sh checks for go. The README section and the fragment .changelog/fetch-ref-lock-retry.md follow main's conventions.
Review of 62f3ea52f297be26077b828812853afc83dbfa2c for gascitypacks-jmz. Checks of the head: success. ### Verdict pass Review 357's one blocking finding is fixed. The head is rebased onto main 62414ca and fast-forwards onto it. `roles/assets/roles/main.go` keeps both sides in the three places review 357 named: the package comment names `git fetch` among main's commands, the usage line `roles git fetch <repo> <branch>` follows `nudge`, and the `git fetch` branch of `run` comes after the `waiting`/`nudge` block (main.go:144). ### Findings - [minor] pull request description: it still says it "describes head 7a1a870" and that the checks ran "on this head, rebased on main b479852". This head is 62f3ea5, rebased on 62414ca. What it says of the code, the tests and the two review rounds holds for this head. Fix, if you want one: change those two references. A merge would carry them into the history, but they mislead no one about the change. ### Verified - Read the work bead with all its notes, the pull request's description, reviews 355 and 357, and `REVIEW.md` and `README.md` from `main`. `main` has no `AGENTS.md` or `CLAUDE.md`. Read the whole diff: 9 files, +459/−12. - Merged the head into `origin/main` (62414ca): a fast-forward, and the forge reports `mergeable`. - On the merge result, with the city's variables removed (proved: 0): - `gofmt -l .`: clean. `go vet ./...`: ok. `go test -race -count=1 ./...`: all four packages ok. - `go test -count=5 -run 'Fetch|Collide' ./roles/assets/roles/`: ok. The plain-git collision test shows the defect every time, and both fetches succeed through `fetchOrigin` and through `run`. - `go test -v -count=1 -run TestShellBudget ./internal/budget`: 31 units, 10 in the ledger, 0 findings. - All 19 `tests/*.sh` that `test.yaml` runs pass, `apply.sh` and `upgrade.sh` among them. - `gc lint .` with a throwaway `HOME`: 2 packs ok. - `changelog -base main` (the city's pinned build from `PATH`): exit 0, valid. - Judged the change against the bead. It retries a lost ref lock ("cannot lock ref", or an existing `.lock`) up to five tries, 0.2 to 0.6 s apart. Any other failure, and a lock still held after the last try, fails with git's output, and the order reports it as before. The PR says why it retries rather than serialize. The logic is in the roles tool, with one-line calls in `apply.sh:99` and `upgrade.sh:170`, as `docs/shell.md` asks. The test is a Go test that makes the two fetches collide against one repository with origin ahead. `upgrade.sh` checks for `go`. The README section and the fragment `.changelog/fetch-ref-lock-retry.md` follow main's conventions.
Commenting is not possible because the repository is archived.
No reviewers
No labels
No milestone
No project
No assignees
2 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!27
No description provided.