github qu8n/herdr-automatic-rename v0.7.3

latest releases: v0.13.1, v0.13.0, v0.12.0...
one month ago

Fixed

  • Tab naming could stop for a session, or for half a minute at a time, and say nothing either way. Both come from the lock that keeps one reconcile pass running at a time. Its 30-second steal was three filesystem calls, so two passes that found the same abandoned lock could both come away holding it: each writes the whole state file, one overwrites the other's record of which tabs it named, and a tab whose record is gone reads as renamed by hand on the next pass and opts out for good, recoverable only through the reset action. Stealing is now a move, an immediate reservation of the lock path, and only then the question of whether what was moved was really abandoned. Against six processes racing one abandoned lock, that is the difference between two holders in roughly a third of bursts and somewhere between none and one in a hundred.

    The same rewrite turned up three ways to leave a lock that no process holds and none may steal until it ages out, which stops every event in between. A lock whose owner token could not be written was left behind rather than given back, and no race is needed to reach it: a umask of 222 does, and so do a full disk, a quota, and a read-only mount. The hand-back that returns a lock to a live holder truncated its token before reading it, and printed its own failure onto your prompt. And the move that starts a steal did not check its destination was free, where an existing one makes it nest the lock instead of renaming it, out of sight of everything that follows.

  • A state.json that jq cannot read no longer ends tab naming for the session. Every write started from the file already on disk, so one that would not parse failed every write for as long as it sat there, and the reset action could not recover the tab either, because re-adopting one is another write. It renamed the tab once, recorded nothing, reported "Nothing to reset", and the next event went back to doing nothing. Missing and unreadable are now the same answer, and the check insists on exactly one JSON object: jq reads top-level values as a stream, so a file holding two of them parsed, and writers handed the pair updated each document and wrote both back, leaving it broken for good.

    Healing the file does not hand a tab its name back, and cannot. A tab whose record went with the file has a label matching nothing state knows, which is exactly what a hand rename looks like. What changes is that the opt-out is recorded, so reset works again.

Changed

  • make lint can fail. Its recipe was command -v shellcheck && shellcheck ... || echo skipping, and a real warning took the || branch too, so the target printed "shellcheck not installed" and exited 0. make lint-md had the same shape, so a hard-wrapped line reported itself as a missing npx. CI now runs shellcheck as well, over the same file list, and its syntax check covers every bash file in the repo rather than three of them.

Don't miss a new herdr-automatic-rename release

NewReleases is sending notifications on new releases.