Skip to content

v0.8.1

Choose a tag to compare

@github-actions github-actions released this 21 Oct 14:26
· 70 commits to main since this release
29785fe

macOS: status checks the job launchd has loaded

ai-usage status, ai-usage schedule status, and the report checked the launch agent's plist, not the job launchd runs. launchd keeps the job it loaded until it is loaded again or you log in again, so when a scheduled run rewrote the plist, as the installer's copy does to hand the schedule to Homebrew's, launchd went on running the old binary while status said all was well. If that binary was then removed, nothing collected.

Now ai-usage status, ai-usage schedule status, and the menu bar app read what launchd has loaded. When launchd still runs an earlier copy, they say:

launchd still runs the launch agent it loaded before, for another binary path or state folder; `ai-usage schedule install` loads this one

and when launchd has not loaded the agent at all, launchd has not loaded the launch agent, so nothing runs it. Run ai-usage schedule install to fix either. Status only reads launchd: it never reloads the agent itself. A run of v0.8.1 that you start, such as ai-usage, does reload a stale or unloaded agent.

Moving from the installer to Homebrew. Run ai-usage schedule install before you remove the installer's copy. That copy, from v0.8.0, does not read what launchd has loaded, so its own status still says to remove it, and a plain ai-usage that runs it does not load the plist. The README's launchd runs an old copy says how to see what launchd runs.

Linux cron and Windows Task Scheduler already read the live entry, so nothing changes there.

Homebrew on Linux: only the binary

brew install neoromantic/tap/ai-usage now installs only the binary, about 16 MB, on every Linux. On Ubuntu 22.04, Debian 12, and other systems older than Ubuntu 24.04, Homebrew used to add its own glibc and gcc with ten more formulae, about 650 MB that the static binary never used.

If v0.8.0 brought them, remove them after the upgrade, unless another formula needs them:

brew upgrade neoromantic/tap/ai-usage
brew autoremove

macOS: signed with Developer ID and notarized

The menu bar app and the two macOS ai-usage binaries are now signed with Developer ID, with the hardened runtime, and notarized by Apple. A copy of AI Usage.app unzipped from ai-usage_darwin_app.zip downloaded in a browser now opens like any other app, with no Gatekeeper warning. The app has its ticket stapled; Gatekeeper looks up a binary's ticket online.

macOS 27. launchd pins a launch agent to its binary's code signature. Up to v0.8.0, ai-usage was signed ad hoc, so the pin was the binary's hash, which every release changes, and an update could cost one refused scheduled run. A Developer ID binary is expected to be pinned to its developer and identifier, which stay the same from release to release, so updates after this one should keep the pin. The update to v0.8.1 itself changes the pin once and may still cost one refused start, and ai-usage repairs it as before. A binary you build from source is still signed ad hoc.

The release workflow also pins each action it uses to a commit, keeps no Git credentials after checkout, and gives write access only to the job that publishes the release. Installs and updates work as before.

Compatibility and upgrade

What to do. Nothing, for a script install: releases from v0.2.5 on install v0.8.1 within 15 minutes, and on a Mac the menu bar app updates with the binary. A Homebrew install updates with ai-usage update or brew upgrade neoromantic/tap/ai-usage. On a Linux that got Homebrew's glibc and gcc with v0.8.0, run brew autoremove after it.

What changed. The schedule's status on macOS, the Homebrew formula on Linux, and how the macOS files are signed. The report, the JSON's fields, the snapshot, and the relay are as in v0.8.0. The schema version stays 4; collector.schedule.error can now hold the two launchd messages above.

State. Nothing changes in the state folder or the snapshot, and the app keeps its settings.

For the website

The README now says that releases sign the menu bar app and the macOS binary with Developer ID and have them notarized, and that Homebrew on Linux installs only the binary. The site makes no claim that this changes: it never said the app was unsigned or not notarized. Add v0.8.1 to the changelog. No install command or picture in docs/demo changed.

Known limitations

  • That launchd on macOS 27 keeps the pin of a Developer ID binary across updates is seen in other developers' launch agents, not yet confirmed with ai-usage through a login. If it does not hold, the double-start repair of v0.5.1 still covers each update.
  • An installer copy from v0.8.0 that has handed the schedule to Homebrew's leaves updates to Homebrew, so it never gets this check: its own status still says only to remove it. Run ai-usage schedule install first, as above.
  • The Linux formula leaves Homebrew's glibc and gcc out by overriding a method Homebrew does not make public. CI checks it on every change, so a Homebrew that renames the method shows there before a release.

What's Changed

  • chore: adopt devkit v1.1.0 (managed files, hygiene job, ci gate) by @neoromantic in #23
  • chore: sync devkit v1.3.1 by @neoromantic in #27
  • Rename a made-up project folder in the demo report to "~/notes", so the golden files no longer need an exemption from the privacy scan's private markers. by @neoromantic in #26
  • Pin the workflows' actions to commits, drop checkout credentials, and give only the release job write access, so zizmor runs in CI (#24) by @neoromantic in #25
  • Status on macOS checks the job launchd has loaded, not just the plist, so it says when launchd still runs an old binary or nothing at all. by @neoromantic in #29
  • Keep Homebrew's glibc and gcc, about 650 MB the static binary never uses, out of the formula on a Linux older than Ubuntu 24.04. by @neoromantic in #32
  • Sign the macOS binaries and the menu bar app with Developer ID and notarize them in the release workflow, so a browser-downloaded app opens and launchd on macOS 27 keeps its pin across updates. by @neoromantic in #30
  • Write the v0.8.1 release notes: status checks the job launchd has loaded, Homebrew on Linux installs only the binary, and the macOS files are signed with Developer ID and notarized. by @neoromantic in #35

Full Changelog: v0.8.0...v0.8.1