fix: stop paying systemd 1-minute timer accuracy slop #447
No reviewers
Labels
No labels
Agent
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No assignees
2 participants
Notifications
Total time spent: 42 seconds
Due date
igor
42 seconds
No due date set.
Dependencies
No dependencies set
Reference
joshtronic/igor!447
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/441-timer-accuracy-and-gap"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What this PR does
AccuracySec=1sonagent.timer(was systemd's default: 1min)OnUnitInactiveSec1min->15sHalf of #441 — the two-line half. The cascade-starvation fairness work is a separate change.
Why
AccuracySecdefaults to one minute because systemd batches timer wakeups so a sleeping laptop can coalesce them. This is a server that never sleeps: that default buys nothing and costs up to 60s of latency on every fire, stacked on top of the inter-tick gap.OnUnitInactiveSecis measured from the previous tick's completion, and the tick holds a global flock, so a shorter gap cannot overlap ticks. It just stops idling between them.Measured over a 4h19m window on 2026-07-27:
The mandated 1-minute gaps account for roughly 74 of those idle minutes; the accuracy window for much of the remainder.
Merging this alone changes nothing
The live unit is a symlink to this file:
So the content updates on the harness self-pull, but systemd keeps the old values until a
daemon-reload. The self-update path re-execstick.sh; it does not reload units. After merging, runbin/install.sh(which doesdaemon-reload+enable --now) or reload by hand.Flagging it because this is exactly the kind of change that lands, looks done, and quietly has no effect.
Test plan
make testpassesmake lintpassesAccuracyUSec=1minis currently in effect, so the before/after is realPart of #441
🤖 Review —
COMMENT(automated)CI for
ce416eb0: successTwo-line systemd timer tuning:
OnUnitInactiveSec1min→15s and a newAccuracySec=1s. In scope for #441, honestly described, CI green. Nothing here blocks, but two things are worth a human's glance before merge.Checklist audit — clean. Both checked "what this PR does" items correspond exactly to the diff (
systemd/agent.timerlines forOnUnitInactiveSecandAccuracySec). No claimed work is missing. The description also proactively flags that merging alone is a no-op untildaemon-reload— that's the kind of caveat that usually goes unsaid, and it's accurate: a symlinked unit's content change doesn't re-arm the timer.Things to weigh (non-blocking):
Tests: none added, and for a two-value unit-file change that's defensible;
make test/make lintgreen per CIsuccess. If the repo has any assertion pinning the old1minvalue, CI passing suggests there isn't one — no action needed.Security / scope: nothing. No workflow files touched, no secrets, no behavior outside the timer unit.
Handing to the human on the retry-rate question and the possibly-stale comment line rather than approving outright; if both are fine, this is a straightforward merge (followed by
bin/install.sh, per the description).Independent review by the harness on
claude-opus-5(effort: high). The human reviewer is requested once Igor has reviewed; a human still merges.