Repository navigation
[lore|star|writ] self upgrade takes the release channel when nothing names one, instead of refusing #1041
Description
When no flag, pin or setting names a channel, [lore|star|writ] self upgrade takes release, the default, instead of refusing. Until the first release exists, an operator who wants develop says so: self.channel: develop in the shared configuration, the environment variable, or --channel develop.
The owner, 2026-10-11: "The default (channel = release) should be selected, if config doesn't say. We have devlore.yaml. Since we've not yet released, I must either configure the global setting, set DEVLORE_SELF_UPGRADE_CHANNEL or specify --channel develop on the [lore|star|writ] self upgrade command."
Why: a setting the configuration leaves unset takes its default. self.channel has none, so a build with no channel of its own refuses to upgrade until it is told what to.
Follows the settings roll-up, #927 (lane 8 of #916, PR C), as lane 97 of #916. The owner, 2026-10-11: "ensure that the self upgrade bug follows the settings roll-up work."
Today
The owner, 2026-10-11:
╰➢ writ self upgrade
Error: nothing says what to upgrade to: this build has no channel of its own; pass --channel develop or --channel release, or set self.channel
resolveUpgradeTarget(cmd/internal/cli/selfupgrade_channel.go:134) takes the first source that speaks:--from,--channel,DEVLORE_VERSION,self.channel, then the channel stamped into the build. When none speaks, it refuses withExitUsage(:172).- That refusal is self upgrade fetches nothing: it re-runs self install from the running binary, so no machine can move to a newer build #947's design. The help says: "A local build has no channel, and upgrades only when told what to."
- Only
make diststamps a channel (CHANNEL=developorCHANNEL=release,Makefile:97-99); otherwiseCHANNELis empty (Makefile:105). Amake buildormake installbuild has no channel, and refuses unless told what to upgrade to.
For the plan
- The stamp. Does the build's stamped channel stay a rung above the default? The owner's words name the configuration, the environment and the flag.
- The environment variable. The owner names
DEVLORE_SELF_UPGRADE_CHANNEL. Todayself.channelbinds through each program's own prefix (cmd/internal/cli/root.go:174-178,cmd/internal/cli/viper.go:80-83):LORE_SELF_CHANNEL,STAR_SELF_CHANNEL,WRIT_SELF_CHANNEL, for a setting self upgrade fetches nothing: it re-runs self install from the running binary, so no machine can move to a newer build #947 placed in the configuration every program shares. Read from the code, not run. - The file. The owner names devlore.yaml. The programs read the shared configuration from
config.yamlin$XDG_CONFIG_HOME/devlore(cmd/internal/cli/viper.go:59-73,cmd/internal/devlore/devlore.go:52). On the Mac this was filed from, that file exists and sets noselfkey. - The words. The help, the
--channelflag's description, the man pages and the completions say what the default is.
Epic: #453 · Feature: #83 · Schedule: #916, lane 97, after PR C
Activity