Repository navigation
update: releases come from one repository; retire the former-name fallback - #1832
Merged
Merged
Conversation
…lback - The updater (Select, TagPublished, Install) and scripts/install.sh no longer ask the repository's former name after a 404 from the release repository. That name is only GitHub's redirect to the same repository (same repository id), so it never held a release the real one lacks; asking it could only ever reach a repository created under that name later. - Install always downloads from the release repository, whatever repository a caller wrote on the release. - The former asset name is still tried inside the same release, for v0.1.0, the one stable published before the rename. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Drop the stale H10 comment that described the old fallback above the helper that now forbids it. - selectRelease reads the release repository itself and assetURL builds every download address from the constant, so no Release field is ever an address. - The fake servers' request lists in the new update tests are kept under a lock. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Releases now come from one repository only: the updater and the curl installer stop asking the repository's former name after a 404.
What changed
internal/updateno longer asks the former name after a 404. A 404 fromAgent-Field/codeafis now final for:Select)TagPublished)Install)Installalways downloads fromAgent-Field/codeaf, even when the caller set a different repository on the release.scripts/install.sh: the same fallback is removed from the release lookup and the download. Its own comment said it was meant to go after one release.v0.1.0(the one stable from before the rename) uses it, and itschecksums.txtstill verifies it.Agent-Field/codeaf. It is only a redirect, so it never had a release the real repository lacks.How it was checked
gh api repos/Agent-Field/<former name>andgh api repos/Agent-Field/codeafreturn the same repository id.Agent-Field/codeaf. Onlyv0.1.0and the oldbuild-*tags use the former asset name.go test ./internal/update/:ok(11.2s). New tests:TestANotFoundFromTheReleaseRepositoryIsTheAnswer: a 404 failsSelect,TagPublishedandInstall, and no request goes to any other repository.TestTheFormerAssetNameStillInstallsTheOneOldRelease:v0.1.0installs under its former asset name from the same repository.go test ./internal/release/(the shell installer):TestInstallerAsksOnlyTheReleaseRepository: the fake also answers under the former name, yet the install fails and nothing is asked there.TestPinnedFormerReleaseTakesItsFormerAssetFromTheReleaseRepository.TestTheReleaseSurfaceTestSurvivesEveryLedgerState. It fails withtest_args[@]: unbound variableunder macOS's bash 3.2, and fails the same way onorigin/dev1acf751.make test-quick: passes.make test-touched: exit 0.internal/updatepasses; the oneinternal/releasefailure is reported as "already failing on the base".Checklist
docs/changes/unreleased/1832-one-release-repository.md.github/known-red.txtentry (the ledger no longer exists; removed in provider, cmd/aforge: the last loose locks hold their mutex from a defer (review needed) #1012)git add -A🤖 Generated with Claude Code