Skip to content

[lore|star|writ] self upgrade takes the release channel when nothing names one, instead of refusing #1041

Open

Description

@David-Noble-at-work

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 with ExitUsage (: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 dist stamps a channel (CHANNEL=develop or CHANNEL=release, Makefile:97-99); otherwise CHANNEL is empty (Makefile:105). A make build or make install build has no channel, and refuses unless told what to upgrade to.

For the plan

  1. 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.
  2. The environment variable. The owner names DEVLORE_SELF_UPGRADE_CHANNEL. Today self.channel binds 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.
  3. The file. The owner names devlore.yaml. The programs read the shared configuration from config.yaml in $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 no self key.
  4. The words. The help, the --channel flag's description, the man pages and the completions say what the default is.

Epic: #453 · Feature: #83 · Schedule: #916, lane 97, after PR C

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Epic:ReleaseDistributionRelease, distribution, and self-installbugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions