Skip to content

v0.4.3 — a pinned location warns when it looks stale

Latest

Choose a tag to compare

@mrCode mrCode released this 26 Sep 16:47
· 5 commits to master since this release

A pinned location no longer goes quiet when you travel.

Pinning (auto_update = false, set for you by a manual relocate --lat/--lon/...) stops the app following your IP. That is the point of it — IP geolocation can be hundreds of kilometres wrong without you going anywhere.

But it also meant a pin could sit on the wrong city indefinitely after you actually moved, calculating every prayer time for somewhere you left, and saying nothing about it.

What changed

While pinned, if your system timezone is in a different country than the one you pinned, you now get one notification a day:

Prayer times: pinned location may be stale
Pinned to Palo Alto, US, but this system's timezone is Asia/Riyadh. Prayer times are being calculated for Palo Alto. Run omarchy-prayer relocate --auto to follow your location again, or re-pin with relocate --lat … --lon ….

The same line goes to the journal, so journalctl --user -u omarchy-prayer-schedule shows it too.

It never unpins by itself. You chose the pin; silently overriding that would be the previous release's bug in the other direction. It tells you and leaves the decision with you.

Why the timezone and not the IP

Your timezone is set by you or your OS. Your IP is guessed by a third party — and on the connection that prompted all of this, two providers disagreed by hundreds of kilometres while the user had not moved at all. A country-level disagreement between /etc/localtime and a pinned country is real evidence of travel; an IP disagreement is not.

The check is country-granular on purpose, and understands zones shared by several countries (Asia/Riyadh covers SA, KW, YE and AQ — pinning to any of them stays silent). A false alarm on a pin you set deliberately would just train you to ignore the warning.

Not noisy

The scheduler runs at 00:01, on resume, and on every network-up. The warning is rate-limited to one notification per day per mismatch, and re-notifies at once if the mismatch changes — moving again is new information. If it cannot write its marker it errs toward warning rather than staying silent.


340 tests, green under both invocations. Every guard is mutation-tested. The widget is unchanged; the plugin stays at 0.4.0.

Also in this release

--country is validated. relocate --country "Saudi Arabia" used to be written verbatim, which silently fell back to the wrong calculation method. It now requires a two-letter ISO code.

CI is green for the first time since April. Four tests had been failing on every push, unnoticed. The shims used #!/usr/bin/env bash while the tests that simulate a missing binary strip PATH to the shim directory alone — so env could not find bash and the shim never ran. They passed on a developer machine only because the code falls back to checking for /usr/share/omarchy/shell, which exists there and not on a runner: green locally for the wrong reason. The shims now use an absolute interpreter, and the fallback is injectable so the tests prove the path they claim to.