Skip to content

Carry omarchy-bar put past a timing-out shell - #13468

Merged
ryanrhughes merged 3 commits into
omacom:quattrofrom
AnPod:fix/migration-bar-put-best-effort
Nov 1, 2026
Merged

ryanrhughes merged 3 commits into
omacom:quattrofrom
AnPod:fix/migration-bar-put-best-effort

Conversation

@AnPod

@AnPod AnPod commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Migration 1790042972 failed on every omarchy update while the running shell kept missing the 2s IPC window (#13301). It's the same failure that aborts the 4.0.6 → 4.5 RC update in #16966.

  • omarchy-bar ask_to_put treated a transient is not responding timeout as fatal on the first attempt. The reporter measured identical putBarWidget calls flapping ok → fail → ok within minutes on one machine.
  • The fail killed the migration under set -e before omarchy-migrate wrote its marker, so the same migration re-ran and re-failed on every subsequent update (observed 4×).

ask_to_put now asks again after a timeout instead of failing. Timeouts get their own budget of 5 asks (OMARCHY_SHELL_TIMEOUT_ATTEMPTS), about 10s, separate from the 50 "not ready" attempts; each miss costs the whole 2s window, so sharing that budget could hold an update for about 105s. The first timeout prints that put is asking again, so the wait isn't silent. Asking again is safe because putBarWidget leaves a widget that's already on the bar where it is.

When the shell never gives a definitive answer (timeouts run out, it disappears mid-request, or it disappears mid-fallback), put prints a stderr note and exits 0. That's the contract an absent shell already gets, and the one the migration documents for itself ("Best-effort … an update whose shell cannot be asked still finishes"). Real errors (unknown widget, unexpected replies) still fail.

Fixes #13301

Testing

bar-test.sh:

  • slow: a shell that times out once and then answers; put lands the widget on the bar.
  • flapping: a shell that always times out; with OMARCHY_SHELL_TIMEOUT_ATTEMPTS=2, put asks exactly twice, then carries on with the did not become ready note.
  • The three exhaustion assertions (never ready, gone mid-request, gone mid-fallback) now expect carry-on instead of a failure.

The suite hasn't been run at this head yet.

A transient 'is not responding' IPC timeout was fatal on the first
attempt, so an update whose shell kept missing the 2s window re-failed
the same migration on every run: no marker, 'Something went wrong
during the update!'. Retry the timeout inside the existing ask budget,
and carry on (stderr note, exit 0) when the shell never gives a
definitive answer - the same contract an absent shell already gets, and
the one the migration documents for itself.

Fixes omacom#13301
@jandrusk

jandrusk commented Oct 7, 2026

Copy link
Copy Markdown

The diagnosis in #13301 holds up. My concern is where the fix lives. This changes the contract of omarchy bar put for every caller, not only migrations:

  • When someone runs omarchy bar put … by hand against a hung shell, it now exits 0 even though the widget wasn't placed. The stderr note is easy to miss in scripts.
  • For migrations, a timeout now marks the migration done without placing the widget. The next update won't retry it, so the user never gets the widget. Before this, the migration failed loudly but stayed retryable.

A narrower option would keep fail in omarchy-bar and make only the best-effort migration tolerant, which is what its own comment already promises:

omarchy-bar put omarchy.elsewhen --before omarchy.clock ||
  echo "Could not put Elsewhen on the bar now; add it with: omarchy bar put omarchy.elsewhen" >&2

Treating is not responding as retryable inside the attempt budget (your first hunk) looks right on its own, and I'd keep it. Related: #12797 (older PR that retries put on the same timeout), #12777 (same failure mode), and #14429 (plugin add --enable hitting the same timeout).

ryanrhughes and others added 2 commits November 1, 2026 01:54
Each timeout costs the whole 2s IPC window, so counting timeouts against the 50 ready attempts could hold an update for about 105s with nothing on screen. Timeouts now get their own budget of 5 (OMARCHY_SHELL_TIMEOUT_ATTEMPTS), about 10s, and the first one prints that put is asking again.

Co-Authored-By: Codex gpt-6.1-sol <noreply@openai.com>
The flapping case only proves put gives up. A branch that returned on the first timeout would pass it too, and that's the case that places Elsewhen during an update.

Co-Authored-By: Codex gpt-6.1-sol <noreply@openai.com>
@greptile-apps

greptile-apps Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

omarchy-bar put now retries IPC timeouts and lets updates finish when the shell never gives a clear answer.

  • Widget puts retry shell timeouts and let updates continue without an answer.

No actionable issues found. Tests were inspected but not run.

Reviews (1) · Last reviewed commit: "Test that put asks again after a single ..." · Reviewed by Greptile

@ryanrhughes
ryanrhughes merged commit ae680f1 into omacom:quattro Nov 1, 2026
3 of 4 checks passed
ryanrhughes added a commit that referenced this pull request Nov 1, 2026
* Carry omarchy-bar put past a timing-out shell

A transient 'is not responding' IPC timeout was fatal on the first
attempt, so an update whose shell kept missing the 2s window re-failed
the same migration on every run: no marker, 'Something went wrong
during the update!'. Retry the timeout inside the existing ask budget,
and carry on (stderr note, exit 0) when the shell never gives a
definitive answer - the same contract an absent shell already gets, and
the one the migration documents for itself.

Fixes #13301

* Stop asking a shell that keeps timing out after five tries

Each timeout costs the whole 2s IPC window, so counting timeouts against the 50 ready attempts could hold an update for about 105s with nothing on screen. Timeouts now get their own budget of 5 (OMARCHY_SHELL_TIMEOUT_ATTEMPTS), about 10s, and the first one prints that put is asking again.

Co-Authored-By: Codex gpt-6.1-sol <noreply@openai.com>

* Test that put asks again after a single timeout

The flapping case only proves put gives up. A branch that returned on the first timeout would pass it too, and that's the case that places Elsewhen during an update.

Co-Authored-By: Codex gpt-6.1-sol <noreply@openai.com>

---------

Co-authored-by: AnPod <1073516+AnPod@users.noreply.github.com>
Co-authored-by: Ryan Hughes <ryan@heyoodle.com>
Co-authored-by: Codex gpt-6.1-sol <noreply@openai.com>
(cherry picked from commit ae680f1)
@emirb emirb added this to the 4.5 milestone Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

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!")

5 participants