Repository navigation
fix(self): self upgrade fetches the newest build on its channel, verifies it, and upgrades every devlore program in the prefix - #1001
Merged
David-Noble-at-work merged 2 commits intoOct 1, 2026
Conversation
…s channel self upgrade resolves a channel (develop or release; --prerelease adds the release channel's pre-releases, by GitHub's own flag), finds the newest release on it, verifies the archive against its checksums file and GitHub's digest, and upgrades every devlore program in the prefix together: it places each binary by rename, then hands the program to its own self install. The channel is stamped into every binary and overridden by --channel or self.channel. Resolves #947 when done; lane 20 of #949. The owner's rulings of 2026-09-30 are recorded in the plan. Claude-Session: https://claude.ai/code/session_01DuNfZFyfxBoD9pdaiDEMrY
…fies it, and upgrades every devlore program in the prefix self upgrade fetched nothing: it re-installed the running binary over itself. Now it finds a release, verifies it, and upgrades the suite. The channel. Every binary is stamped with its channel, develop or release, and whether it takes the release channel's pre-releases (by GitHub's own flag): develop builds are develop, builds from main and release/* are release with pre-releases, a v* tag is release without. The build proves the stamp binds, and --version and version report it. What a run installs is decided first to last by --from, --channel, a DEVLORE_VERSION pin, the shared self.channel setting, and the stamp; --prerelease comes with whichever decides. One --channel switches, and the new binaries keep the switch. The release. release reads GitHub's /releases/latest; develop, and release with --prerelease, read the release list and each body's Ref: line, 10 pages at most. Assets come from their public download links; GH_TOKEN goes only to api.github.com. The archive must match its checksums line and GitHub's digest before anything is unpacked, into a contained scratch directory that goes on every exit, Ctrl+C included. The suite. lore, star and writ, as the prefix owns them by manifest, plus the program running, upgrade together. For each, the upgrade places the binary itself, then runs that program's own self install, so a build published before this change installs too. Already current is a no-op; --from installs a local archive; --dry-run verifies and changes nothing. devlore-test and renamed binaries are refused. A running binary is replaced by writing bin/<name>.new and renaming it over the target; on Windows the running .exe is renamed aside to .exe.old first, recorded so the next install retires it. A manifest that can't be written now fails the install. Releases are tagged at the commit they were built from (--target). TestSelfUpgradeScenario upgrades a real install from the installed copy on all six scenario legs. #944's plan takes its last three boxes and is complete. Resolves #947 Claude-Session: https://claude.ai/code/session_01DuNfZFyfxBoD9pdaiDEMrY
David-Noble-at-work
deleted the
fix/947-self-upgrade-fetches-nothing-it
branch
October 1, 2026 19:32
This was referenced Oct 1, 2026
Open
This was referenced Oct 20, 2026
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.
Summary
Lane 20 of #949, alone (ruled 2026-09-29: "We'll four PRs: A, B, #959, and then C."). The rulings of 2026-09-30 are in the plan: "all programs together"; "a build keeps its own channel. the channel is stamped into the binary explicitly"; two channels, "develop and release"; "we will use githubs prerelease flag"; "we should use their word: --prerelease"; auto-upgrade stays with #83.
Channel(developorrelease) andPrerelease. Develop builds aredevelop; builds frommainandrelease/*arereleasewith pre-releases; av*tag isreleasewithout. The build's stamp proof checks them;--versionandversionreport them.--from <archive>,--channel <develop|release>, aDEVLORE_VERSIONpin,self.channel, the stamp.--prereleasecomes with whichever decides. One--channelswitches, and the installed builds keep the switch;self.channelandself.prereleaseare the standing override.releasereads/releases/latest;develop, andreleasewith--prerelease, read the list and each release body'sRef:line (10 pages at most). Downloads use the public links;GH_TOKENgoes only toapi.github.com...and symlinks refused) in scratch that goes on every exit, Ctrl+C included.self install, so a release published before this change installs too. Already current is a no-op;--dry-runverifies and changes nothing;devlore-testand renamed binaries are refused.bin/<name>.new, renamed over the target; on Windows the running.exegoes aside to.exe.old, recorded so the next install retires it. A manifest that can't be written now fails the install.gh release create --target <sha>): a build frommainwould otherwise be tagged on develop's head.Also: the runner relays a child's narration as notes, serialized (a race found by
-race); #944's plan takes its last three boxes and iscomplete.docs/plans/fix/947-self-upgrade-fetches-nothing-it.md. It staysactive: its last boxes are this machine's convergence and the follow-up issues.Resolves #947
Test plan
--from;--dry-run; interrupts; each GitHub error; replacing a running binary (fails with "text file busy" against the old code; runs on the required Windows test legs)TestSelfUpgradeScenario: a real install upgraded from the installed copy, fixture stampedv0.0.0-scenario.1, byte-equal binaries, every manifest, Windows'.exe.old, and a no-op second runv0.1.0-dev.20260930194506anonymously, verified; TMPDIR empty after; the owner's programs untouchedmake test,make test-scenario;make vet-allandmake lint-allon linux, darwin and windows, 0 issues;star lint go;star lint shell; the guides' frontmatter;make regeneratechanges nothingwrit self upgrademoves all three, and a second run is a no-opTime
Computed by the algorithm of noblefactor-ops#188 at merge.