Repository navigation
Conversation
[Medium impact] This PR appears safe to merge; no new actionable issues were found. SummaryThis PR limits night-light process checks and application restarts to the calling user.
Previous discussion:
Reviews (10) · Last reviewed commit: "Merge remote-tracking branch 'upstream/q..." · Reviewed by Greptile |
chessing234
left a comment
There was a problem hiding this comment.
everything seems fine, ready to merge.
a3a8ce8 to
6c0682d
Compare
6c0682d to
52480e0
Compare
The loop's comment, from omacom#15035, says why a hyprsunset still starting needs the resend even once its socket answers: it applies its boot default after accepting a temperature. The rewrite in this branch described only an unopened socket, which loses the reason a process under three seconds old counts as starting, and is unrelated to scoping the lookup to this user. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Codex Medium <noreply@openai.com>
This comment has been minimized.
This comment has been minimized.
|
Reviewed and verified. This fixes #14037 for both the toggle command and the bar's night light service. Reproduced on an Omarchy worker (Hyprland 0.56.2, hyprsunset 0.4.0), with a second user's
Tests on the worker: Pushed one commit, 75f99b7. It restores the retry-loop comment in Two optional test gaps, not blocking: removing Second opinion: Codex Medium reviewed it in two rounds. It agreed that the user scoping is correct ( Competing fixes: #14041 and #14530 fix the same bug. This one is the oldest and covers both the CLI and the shell service. #14041 scopes only the CLI. #14530's extra CI is green. This now waits on the maintainer. |
The service's start-and-apply command moves into NightlightModel.applyCommand, so the test runs it against the mocks instead of grepping Service.qml for the string. It runs the script without -l, so no login profile can put the real commands ahead of the mocks. Co-Authored-By: Henning Futrell <11961362+henningfutrell@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Another user's process of the same name belongs to their session; an unprivileged pkill could not signal it anyway and only reported the failure. Co-Authored-By: Henning Futrell <11961362+henningfutrell@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Two parts of #14530 by @henningfutrell, which fixes the same bug and was decided in favour of this one, are now on this branch with credit to them:
Checked on a worker built from the Omarchy ISO, with this head merged onto current Reviewed by Claude Opus 5.5, with Codex Medium as a second opinion. Codex found nothing to change: same command as before, a sound test, and no other unscoped hyprsunset lookup. Its independence is not guaranteed. This stays |
|
Thanks @chessing234 — I appreciate the review. I also closed the remaining service-wiring coverage gap in |
|
Reviewed the new commit, 086768c, and verified this head again. Nothing found. The commit adds an assertion to Checked on a worker built from the Omarchy ISO, with this head merged onto current Reviewed by Claude Opus 5.5, with Codex Medium as a second opinion. Codex found no defect in the new commit or the full diff. It noted that a check on the source text cannot rule out the assignment ending up in a dead branch, which is a limit of that kind of test and not something to change here. Its independence is not guaranteed. This stays |
…793113457 # Conflicts: # test/shell.d/nightlight-test.sh
|
I merged current Focused verification on the merged tree:
A fresh Codex review against current |
…8-20261031 # Conflicts: # shell/plugins/services/nightlight/Service.qml
|
I merged current I added the reset behavior to the tested
A fresh Codex review found no blocking security or logic issue. It also ran the two permitted focused tests and found the conflict resolution preserved both sides' behavior. I did not run |
|
Reviewed the two merges of The merge that brought in #14489 is resolved correctly. Checked on a worker built from the Omarchy ISO with the shell linked to each tree, and a process named Reviewed by Claude Opus 5.5, with Codex Medium and muse-wonder (via pi, thinking high) as second opinions. Neither found a defect, and both agreed the merge resolution and the #14041 and #14530 fix the same bug and are still open. This one is the oldest, it covers the CLI, the shell service and |
|
This still merges cleanly on the current base; happy to adjust anything. |
Fixes #14037.
Both night light paths used an unscoped
pgrep -x hyprsunset: the CLI inbin/omarchy-toggle-nightlightand the shell service. On a multi-user machine, another user's process satisfied that lookup even though it belonged to a different Hyprland session. This user's process never started, so the temperature command had no socket to control.I scoped both checks, including the CLI's newest-process lookup, to the effective user with
$UID. The existing startup retry behavior is unchanged. I also incorporated two useful pieces from #14530 with co-author credit to @henningfutrell: the shell command now lives inNightlightModel.applyCommand, which lets the focused test execute it against mocks, andomarchy-restart-appscopes itspkillto the same user.The regression models another user's running process and proves that both the CLI and shell service start this user's instance without touching the other one. It also covers an already-running instance and the finished, still-booting, and freshly-started timing paths. The service test runs without a login shell so profile setup cannot bypass its mocks.
Verified on a disposable Omarchy worker against current
quattro: the old behavior reproduces the missing-socket failure; this head starts the session user's process, applies 4000K, returns to 6500K when disabled, and leaves the other user's process alone.Checks:
test/shell.d/nightlight-test.sh: 18/18test/shell.d/command-operand-boundaries-test.sh: pass./test/cli: passi18n-checkand Greptile Review: passThe full shell suite has the same six unrelated failures on this head and current
quattro; none touches these files.