Repository navigation
Conversation
|
Reviewed at f982491 against What was checked. I ran this on a disposable Omarchy worker. Your test passes there, and It reinstalls tools a user chose to remove. It overwrites files the user owns. Every entry goes through
Whether a migration is the right fix. Recovery already exists. Nothing was pushed to your branch. The preinstalls behaviour is a deliberate choice your test pins down, so it's yours to change rather than ours to rewrite. This is waiting on you for the three defects above, and on the maintainer for whether the migration is wanted at all. |
|
Pushed 5ca68f5 to address the three defects.
On the one-shot question: agreed this only covers stubs deleted before the migration runs. |
[Medium impact] The change reaches the user update workflow and command launchers. Do not merge until the migration actually restores commands and the test follows the repository's requirements. FindingsSummaryAdds a migration intended to restore missing mise commands, plus a test covering restoration, existing launchers, opt-out state, and a missing install file.
Reviews (4) · Last reviewed commit: "Leave the restore migration pending when..." · Reviewed by Greptile |
|
Pushed ebfd17c for the Greptile pass on 5ca68f5.
Still waiting on a maintainer for whether a second one-shot is wanted at all versus pointing #13708 at |
|
Want your agent to iterate on Greptile's feedback? Try greploops. |
|
Re-reviewed at 107467a against What was checked. I ran this on a disposable Omarchy worker, with the branch merged onto current Fixed: skipped stubs that were removed with preinstalls, left existing files and dangling symlinks alone, and dropped the top-level Pushed: 107467a, leave the migration pending when the install list is missing. Our last review was wrong to treat a failing migration as the problem. Not a problem: a restored stub does not shadow a copy the user installed elsewhere, because Omarchy appends Waiting on the maintainer to decide whether a one-shot restore is wanted. It recovers installs that have already emptied |
|
Thanks for the re-review and for 107467a. Leaving the migration pending when |
1784909971.sh only rewrote wrappers that already existed in ~/.local/bin, so clearing that directory permanently dropped the documented gh lazy install. Source install/user/mise.sh so later updates recreate the stubs, without bringing hey/basecamp/cf back after preinstalls-removed. Closes omacom#13708.
Honor preinstalls-removed the way other stub migrations do, leave files the user already owns, and exit 0 when the install list is absent instead of a top-level return.
-e treats a broken symlink as absent, so a user-owned ~/.local/bin/gh with a missing target was rm -f'd and replaced. Check -L as well.
The migrations guide requires a migration that cannot finish to exit non-zero and stay pending. Exiting 0 when install/user/mise.sh is absent marked the restore done having restored nothing, so it never ran again once the file came back. The list ships in the same package as the migration, so dropping the guard lets source fail under bash -e instead. The test for that case reused the home that already had preinstalls-removed set, so it passed through the opt-out exit whether the guard existed or not. It now uses a fresh home and asserts the migration fails. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
107467a to
5f9188d
Compare
| exit 0 | ||
| fi | ||
|
|
||
| mise() { :; } |
There was a problem hiding this comment.
mise() { :; } disables every action in the current install/user/mise.sh. That file only calls mise reshim --system and mise reshim; it never calls omarchy-mise-install. The migration therefore restores nothing but returns success, so omarchy-migrate marks the repair complete. The added test also fails its first gh check.
Update the migration to use the current way mise creates missing commands instead of disabling it.
| migration="$ROOT/migrations/1790712217.sh" | ||
| [[ -f $migration ]] || fail "the restore migration is present" |
There was a problem hiding this comment.
Migration tests break repository rules
This adds a test specifically for 1790712217.sh. AGENTS.md explicitly says not to add migration tests because migrations run once and are frozen after shipping. This repository requirement must be satisfied before merging.
Remove this suite test. If the repair needs reusable logic worth testing, move that logic into a bin/ command and test the command instead.
File Used: AGENTS.md (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
|
Re-reviewed at 5f9188d. The commits are the same five reviewed at 107467a, rebased onto What changed. #9596 (da2db1a) replaced the handwritten wrappers in What that does to this PR. The bug it fixes. #13708 was about losing What was checked. This review was done by reading only, against Classification. The two models classifying the PR disagreed: one called it a bug fix, the other an enhancement, since recreating tools a user deleted is new behaviour. It carries neither label for now. Waiting on the maintainer to decide whether to close it as superseded by #9596. #13708 can probably be closed with it. If you see a case |
What
Existing installs that clear
~/.local/binnever get the documented mise stubs back.migrations/1784909971.shonly rewrites wrappers that already exist there.This migration sources
install/user/mise.shsoomarchy updaterecreates the canonical stubs (includinggh).hey,basecamp, andcfstay omitted whenpreinstalls-removedis set.Why
#13708: after
rm ~/.local/bin/*,ghis gone forever and the documented first-run auto-install never returns.Testing
bash test/shell.d/mise-stub-restore-migration-test.shgit diff --checkCloses #13708.