Skip to content

fix: version stamp reads the running binary, not the changelog marker - #9

Merged
rz1989s merged 1 commit into
mainfrom
fix/running-binary-version-stamp
Oct 1, 2026
Merged

rz1989s merged 1 commit into
mainfrom
fix/running-binary-version-stamp

Conversation

@rz1989s

@rz1989s rz1989s commented Oct 1, 2026

Copy link
Copy Markdown
Member

Problem

The clock-line stamp showed omp 18.4.6 while omp -v reported omp/18.4.8 after a silent brew upgrade.

Root cause

v0.6.2 read ~/.omp/agent/last-changelog-version as the primary source, assuming omp rewrites it on every launch. It does not: the marker is gated behind cfgStartupChangelogMode and only updates when the startup changelog dialog actually displays. Silent upgrades leave it stale, and it is global state — every session (including old resumed panes on 18.2.0) renders whatever the marker last said. Field proof 2026-10-01: marker mtime 09:50 / 18.4.6 vs binary 18.4.8 (upgraded 15:53).

Fix

Spawn --version on process.execPath — the exact binary that launched omp — cached per process. Install-agnostic (brew Cellar, npm global, curl, asdf, source) and correct for sessions resumed across an upgrade. Output must carry the omp/ prefix so a bare node/bun runtime version (source/dev runs) is rejected; on failure the stamp omits rather than lies. Marker code deleted.

Verification

  • pnpm typecheck clean; 51/51 tests (incl. false-positive guard: bare runtime versions rejected)
  • Live render: throwaway tmux omp rendered · omp 18.4.8 · sl 0.6.3 in 4s while the marker still said 18.4.6

~/.omp/agent/last-changelog-version is only rewritten when omp's
config-gated startup changelog actually displays, so it goes stale
across silent upgrades (observed: marker 18.4.6, binary 18.4.8) and is
global state shared by every session — old resumed panes rendered a
version that never ran in them.

Spawn --version on process.execPath instead: whatever binary launched
omp (brew Cellar, npm global, curl, asdf, source), cached per process.
Output must carry the omp/ prefix, so a bare node/bun runtime version
is rejected and the stamp omits rather than lies.
@rz1989s
rz1989s merged commit 9ee538f into main Oct 1, 2026
1 check passed
@rz1989s
rz1989s deleted the fix/running-binary-version-stamp branch October 1, 2026 10:11
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