Skip to content

Make Elsewhen migration bar put best-effort on shell timeouts - #13608

Closed
AnPod wants to merge 4 commits into
omacom:quattrofrom
AnPod:cursor/fix-migration-bar-put-best-effort-e0d3
Closed

AnPod wants to merge 4 commits into
omacom:quattrofrom
AnPod:cursor/fix-migration-bar-put-best-effort-e0d3

Conversation

@AnPod

@AnPod AnPod commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Fixes #13301

Migration 1790042972 no longer aborts the update when omarchy-bar put times out. ask_to_put retries "not responding" like "not ready", and the migration treats put failure as best-effort.

Draft.

@jandrusk

jandrusk commented Oct 7, 2026

Copy link
Copy Markdown

Thanks for this. Making the Elsewhen put best-effort in the migration (|| true) fixes #13301 by itself, and I'd keep that part. I'd drop the ask_to_put change, though:

  • omarchy-shell deliberately doesn't retry a timeout. Its comment says the call "may already have run", so it reports not responding instead of resending. Retrying putBarWidget on that reply can repeat a put that already landed.
  • Each attempt can take the full IPC timeout (2 s plus a 1 s kill-after), and ask_to_put tries up to 50 times. A wedged shell could now hold omarchy bar put (and any migration that calls it) for about 100 s before failing, where today it fails at once.

Also, #11015, merged on 2026-10-04, fixed the bar startup stall, which was the most likely cause of these timeouts. Related open PRs: #12797 (retry on timeout) and #13468 (yours, earlier).

@greptile-apps

greptile-apps Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no new actionable issues remain.

Summary

Makes Elsewhen placement best-effort so a failed request does not stop the update.

  • Elsewhen placement failures no longer stop the migration.

Reviews (4) · Last reviewed commit: "Merge remote-tracking branch 'upstream/q..." · Reviewed by Greptile

Comment thread migrations/1790042972.sh Resolved
Comment thread test/shell.d/elsewhen-migration-test.sh Resolved
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed at 9fb022a by Claude Opus 5.5, with Codex Medium as the second opinion.

What was checked. On a disposable Omarchy worker I froze the real running shell so that putBarWidget timed out, then ran migrations/1790042972.sh under bash -euo pipefail against it. On quattro it exits 1 with could not put omarchy.elsewhen on the bar: omarchy-shell is not responding, the failure from #13301. On this branch it exits 0 and prints the recovery command. With only the migration reverted, it fails again. test/shell.d/elsewhen-migration-test.sh passes 14/14. With the branch merged onto current quattro, ./test/cli is green. The shell suite fails 5 files, and all 5 also fail on quattro alone on the same worker (ascii, branding-about-animation, default-agent, launch-browser, passwordless-grant-lifecycle). None of them touch this change.

What was found. I found no defect in the change itself, and neither did Codex. The diff does more than the title says, though. The || at migrations/1790042972.sh:12 catches every omarchy-bar put failure, not only a timeout. That includes an unknown widget, which the old test deliberately kept pending. Any of them now writes the migration's marker without placing Elsewhen, so a later update never tries again. agents/skills/migrations.md asks the opposite of a migration that could not finish: exit non-zero and stay pending.

Competing fixes. Two older open pull requests fix #13301 in bin/omarchy-bar instead:

Retrying is safe for this call. putBarWidget (shell/services/PluginRegistry.qml:321) leaves a widget that is already on the bar alone, so a put that ran despite timing out is not repeated.

#12797 addresses the cause, a transient timeout treated as fatal. Elsewhen then actually gets placed, and the migration still stays pending when placement really fails. This PR completes the migration without the widget instead. Asked to choose among the three, with no answer suggested, Codex picked #12797 for that reason. I checked its reasoning against the source and agree. The one case it does not cover is a shell that times out on every attempt for the whole retry budget. With the startup stall fixed in #11015, that case should now be rare, and whether it should stop an update is the maintainer's call.

This is waiting on the maintainer to choose between #12797, #13468 and this one.

cursoragent and others added 3 commits October 13, 2026 07:50
omarchy-bar put no longer aborts migration 1790042972 when the shell is
unresponsive, and ask_to_put retries "not responding" like "not ready".

Co-authored-by: AnPod <AnPod@users.noreply.github.com>
@AnPod
AnPod force-pushed the cursor/fix-migration-bar-put-best-effort-e0d3 branch from 9fb022a to 4083550 Compare October 13, 2026 05:54
@omarchybot

Copy link
Copy Markdown
Collaborator

Re-reviewed at 4083550 by Claude Opus 5.5, with Codex Medium as the second opinion. Nothing was run this time: both models read the new head against quattro and against the two competing fixes, and the earlier worker run at 9fb022a covered the same migration change.

What changed. The ask_to_put retry is gone, so bin/omarchy-bar is untouched and the description's second sentence no longer matches the diff. The migration now prints the command to place Elsewhen by hand when the put fails, and the test adds a timeout case, including one through a copy of the real bin/omarchy-migrate that checks the marker is written.

What still stands. The || at migrations/1790042972.sh:12 catches every failure from omarchy-bar put, not only a timeout. An unknown reply, which the test on quattro keeps pending on purpose, now completes the migration without placing the widget, and no later update tries again. The recovery line tells the user how to fix it, but only once, in update output. Codex agreed, though it could read the earlier review, so that agreement is not independent; it added that the new runner case at test/shell.d/elsewhen-migration-test.sh:102 checks only the exit status and the marker, not that a timed-out put was what it ran, so a failure before the IPC call would pass it too.

Competing fixes. Two other open pull requests fix #13301 in bin/omarchy-bar, where the timeout is decided, and both keep an unknown reply failing:

Asked to choose among the three with no answer suggested, Codex picked #13468, because #12797 still fails the update when the shell times out on every attempt. I checked that against the source and it holds. Neither of us would bring this one forward: what it does for a timeout, #13468 does without also completing the migration on a definitive failure. Whether a shell that never answers should let the migration finish without the widget, as #13468 decides, is a policy choice, and it is the maintainer's.

This is waiting on the maintainer to choose between #12797 and #13468.

@omarchybot

Copy link
Copy Markdown
Collaborator

Re-reviewed at 5e97b01 by Claude Opus 5.5, with Codex Medium as the second opinion. The new commit only merges quattro into the branch. The pull request's own diff is the same as at 4083550, and nothing that came in from quattro changes how omarchy-bar put or omarchy-shell handle a timeout. Nothing was run: the earlier worker run at 9fb022a covered this migration change, and both models read the new head.

What still stands. The || at migrations/1790042972.sh:12 catches every omarchy-bar put failure, not only a timeout. An unknown reply now exits 0, bin/omarchy-migrate:93 writes the marker, and no later update tries to place Elsewhen again. Codex found the same and nothing else in this diff. It could read the earlier reviews, so its agreement is not independent.

Competing fixes. #12797 and #13468 are unchanged since the last review. Asked again to choose among the three, Codex picked #13468, because #12797 still fails the update when the shell times out on every attempt, while #13468 carries on in that case and keeps an unknown reply failing. Neither of us would bring this one forward.

This is waiting on the maintainer to choose between #12797 and #13468.

AnPod commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

Closing as superseded by #12797, which fixes #13301.

@AnPod AnPod closed this Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migration 1790042972 fails on every update when the running shell predates it ("Something went wrong during the update!")

4 participants