Skip to content

fix(release): repin the local-sync LaunchAgent too, not just the dashboard#80

Merged
pitimon merged 1 commit into
mainfrom
chore/release-repin-local-sync
Jul 22, 2026
Merged

fix(release): repin the local-sync LaunchAgent too, not just the dashboard#80
pitimon merged 1 commit into
mainfrom
chore/release-repin-local-sync

Conversation

@pitimon

@pitimon pitimon commented Jul 22, 2026

Copy link
Copy Markdown
Owner

Why

scripts/release.sh repinned + reloaded only the dashboard agent. The 5-minute local-sync agent (com.pitimon.tokentracker.local-sync) pins the version independently, so a release left it stale — and its next sync --auto tick re-parses logs with the OLD CLI.

During the #75 rebuild this silently undid the migration: dashboard was on 0.39.39 but local-sync was still @0.39.20, so after the migration reset the Codex cursors the stale agent re-parsed from offset 0 with the buggy parser and re-inflated the corrected data (hours to diagnose).

What

  • Repin + reload both agents to the target version.
  • local-sync is optional — skipped with a notice if not installed.
  • No HTTP verify for local-sync (it's an interval job, not a server) — a successful plist repin + reload is the check. Backup + restore-on-failure mirror the dashboard path.
  • New override TOKENTRACKER_SYNC_LABEL (default com.pitimon.tokentracker.local-sync).

Test plan

  • bash -n scripts/release.sh — syntax OK
  • sed repin pattern is the one already proven on the dashboard plist (matches both pinned & unpinned specs)
  • npm run ci:local green (release.sh is not gated by ci:local — deploy script)
  • next real release exercises it end-to-end

Refs #75

…board

scripts/release.sh only repinned + reloaded the dashboard agent
(com.pitimon.tokentracker.dashboard). The 5-minute local-sync agent
(com.pitimon.tokentracker.local-sync) pins the package version independently,
so a release left it on an OLDER version — and its next `sync --auto` tick
re-parses the logs with the old CLI.

During the issue #75 rebuild this silently UNDID the migration: the dashboard
was on 0.39.39 but local-sync was still pinned to 0.39.20, so after the
migration reset the Codex cursors the stale agent re-parsed from offset 0 with
the buggy parser and re-inflated the corrected data. Cost hours to diagnose.

Now release.sh repins + reloads BOTH agents to the same version. The local-sync
agent is optional (skipped if not installed); it has no server, so a successful
plist repin + reload is the check (no HTTP verify). Backup + restore-on-failure
mirror the dashboard path. Overridable via TOKENTRACKER_SYNC_LABEL.

Co-authored-by: itarun.p <itarun.p@somapait.com>
@pitimon
pitimon merged commit 632165b into main Jul 22, 2026
1 check passed
@pitimon
pitimon deleted the chore/release-repin-local-sync branch July 22, 2026 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant