Repository navigation
Carry omarchy-bar put past a timing-out shell - #13468
Conversation
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
|
The diagnosis in #13301 holds up. My concern is where the fix lives. This changes the contract of
A narrower option would keep 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" >&2Treating |
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>
[Medium impact] The PR appears safe to merge. Summary
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 |
* 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)
Summary
Migration
1790042972failed on everyomarchy updatewhile 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_puttreated a transientis not respondingtimeout as fatal on the first attempt. The reporter measured identicalputBarWidgetcalls flapping ok → fail → ok within minutes on one machine.failkilled the migration underset -ebeforeomarchy-migratewrote its marker, so the same migration re-ran and re-failed on every subsequent update (observed 4×).ask_to_putnow 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 becauseputBarWidgetleaves 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; withOMARCHY_SHELL_TIMEOUT_ATTEMPTS=2, put asks exactly twice, then carries on with thedid not become readynote.The suite hasn't been run at this head yet.