Fix the polkit unit's ignored rate limit
systemd logged "Unknown key 'StartLimitIntervalSec'" on every start: rate limiting belongs in [Unit], not [Service], so both keys were ignored and the restart limit they were meant to impose did not exist. An agent that failed repeatedly would have flapped rather than stopping. Found while investigating reported prompt failures, which turned out not to be a defect: the trace showed both authentications succeeding on the first attempt. The failures came from testing -- prompts raised by background pkexec runs and then cancelled seconds later, while someone was trying to type into them. Claude-Session: https://claude.ai/code/session_01BRvzt4H8XXLPVH5MyYdk9L
This commit is contained in:
@@ -43,6 +43,7 @@ Singleton {
|
||||
// Held only between pressing Enter and the helper accepting it on stdin.
|
||||
property string pendingSecret: ""
|
||||
|
||||
|
||||
function begin(path: string): void {
|
||||
// A second request while one is open would leave the first
|
||||
// unanswerable; polkit serializes these in practice, and refusing is
|
||||
@@ -84,6 +85,8 @@ Singleton {
|
||||
helper.running = true;
|
||||
}
|
||||
|
||||
// Cancelled by the person at the keyboard, or withdrawn by whatever asked.
|
||||
// Both close the prompt; only the first is something they did.
|
||||
function cancel(): void {
|
||||
root.dismiss("cancelled");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user