basename: invalid option -- 'b' in maintenance-tick process reaper #392
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
1 participant
Notifications
Total time spent: 36 seconds
Due date
igor
36 seconds
No due date set.
Dependencies
No dependencies set
Reference
joshtronic/igor#392
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Diagnosis
During the maintenance/recovery portion of the tick, a
basenameinvocation is receiving an argument that begins with a dash (-b...), so it's being parsed as an option flag instead of a path. This is the classic "unguarded argument" shell bug: a variable containing a value starting with-(or a missing--end-of-options guard) is passed straight tobasename.It fired in two separate ticks this hour (15:38 and 15:41), from tick subprocesses spawned right after
recovery sweep (igor)and just beforemaintenance: no repos eligible this week. The timing lines up with the newly-merged #389 ("reap stale headless-browser process trees at the top of the maintenance tick") — that reaper likely feeds a process arg/command string intobasenamewithout quoting or a--guard, so this looks like a regression from that change rather than something a recent commit already fixes.The tick itself still completes ("-- continuing"), so this is non-fatal, but the reaping step is almost certainly failing silently, defeating the purpose of #389.
Evidence
Fixed looks like
The reaper's
basenamecall is hardened — e.g.basename -- "$path"(orbasename "./$path") — so command/arg strings beginning with-no longer get misparsed, and the maintenance tick runs without emittingbasename: invalid optionwarnings.service: agent.service
severity: medium
window: 2026-07-15 15:00-16:00 (filed by the hourly logwatch pass)