Skip to content

fix: incode update points a package-managed install at its manager - #71

Merged
blockmandev merged 1 commit into
mainfrom
fix/update-under-package-manager
Oct 24, 2026
Merged

blockmandev merged 1 commit into
mainfrom
fix/update-under-package-manager

Conversation

@blockmandev

Copy link
Copy Markdown
Member

From #56: once incode installs through winget, Scoop or Homebrew (#70), incode update must not replace files those managers keep track of.

Change

  • package_manager recognises an install by where each manager puts it, the same layout the package check measured on every platform:
    • Homebrew: Cellar/incode/<version>;
    • Scoop: apps/incode, under scoop or the root SCOOP/SCOOP_GLOBAL names;
    • winget: WinGet/Packages/IncordAI.Incode_*.
  • What incode update does there: changes nothing, exits non-zero, and names the manager's command: brew upgrade incode, scoop update incode or winget upgrade IncordAI.Incode. incode update --check names it too.
  • Other installs: installs from the scripts update themselves as before.
  • Testability: the decision after the release lookup is now a pure next_step, so every outcome is unit-tested without the network.

Verified

  • New tests: 4, covering managers recognised on paths from every OS, near misses not, every update outcome, and each command. The decision test fails with the manager ignored.
  • Local gate: fmt and clippy -D warnings clean; 2344 lib + 59 bin tests passed.
  • Not provable live yet: the first release with this code will be the newest one, so it can only meet a newer release, and be refused under a package manager, from the release after it.

…efs #56)

Root cause: `incode update` replaced the running program's files wherever
they were. Since #70 incode installs through winget, Scoop and Homebrew,
which keep track of the files they install: replaced underneath them, the
manager would still list the old version and its next upgrade would undo
the update.

Now `package_manager` recognises an install by where each manager puts it,
as package-check.yml measured: Homebrew's Cellar/incode/<version>,
Scoop's apps/incode (a `scoop` root, or the one SCOOP/SCOOP_GLOBAL names),
winget's WinGet/Packages/IncordAI.Incode_*. For such an install, `incode
update` changes nothing and names the manager's command (`brew upgrade
incode`, `scoop update incode`, `winget upgrade IncordAI.Incode`);
`--check` names it too. Installs by the scripts update themselves as before.

The decision after the release lookup is now `next_step`, apart from the
network and the files, so every outcome is tested: managed and refused,
managed with --check, unmanaged install, up to date, untagged release.
The path rules are tested on paths from every platform, with near misses.
The new test fails with the manager ignored.
@blockmandev
blockmandev merged commit 3433491 into main Oct 24, 2026
12 checks passed
@blockmandev
blockmandev deleted the fix/update-under-package-manager branch October 24, 2026 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant