Skip to content

fix(cli): the latest version in _meta is never older than the running CLI - #7049

Merged
miguel-heygen merged 2 commits into
mainfrom
fix/latest-version-not-older-than-running
Nov 3, 2026
Merged

miguel-heygen merged 2 commits into
mainfrom
fix/latest-version-not-older-than-running

Conversation

@miguel-heygen

@miguel-heygen miguel-heygen commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

What

_meta.latestVersion no longer reports a version older than the one running. A cached latest that is older than the running CLI is treated as unknown in the metadata and the update notice; the daily check cadence is unchanged, so a prerelease running ahead of latest does not recheck more often.

Why

getUpdateMeta and cachedUpdateCheck in packages/cli/src/utils/updateCheck.ts read the 24 hour cache of the registry's latest version as is. A CLI upgraded within that day kept the old cache, so on 0.9.6 --json output said latestVersion: 0.9.5. The cached value is read through one helper for display; the "is a check due" test looks only at the timestamp and whether the cached value is a safe version.

Testing

fails without the fix: packages/cli/src/utils/updateCheck.test.ts > "treats a cached latest older than the running CLI as unknown, without re-checking sooner than the daily cadence"

On the devbox: 70 passed in the update-check and auto-update tests, 3 runs in a row; the new test fails (1 failed, 40 passed) with the old updateCheck.ts. The old "preserves cached version 0.0.1" case was dropped, since that is exactly the stale cache.

Size

A three-line change to one helper and its test; it has no other carrier.

@heygengenesis heygengenesis Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: APPROVE · 0 blocker · 1 important · 1 nit · head b6bef2bc

The fix covers every reader of the cache because getUpdateMeta, fallbackResult/cachedUpdateCheck, updateCheckDue and checkForUpdate all go through safeCachedVersion. The named test pins the 0.9.6 vs cached 0.9.5 case for meta, due and the cached result. ↓ 2 inline

ScopeRead the full diff and the callers in `backgroundChecks.ts`, `cli.ts:299` and `doctor.ts`. Required checks were still running at review time. The non-required `Comments` check fails on this head (see inline).

Comment thread packages/cli/src/utils/updateCheck.ts Resolved
Comment thread packages/cli/src/utils/updateCheck.ts Resolved
@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Edit accuracy: accurate 267 (base branch 267), smooth 118 of those

The gate passes.
Smoothness is reported in the artifact, not gated. A case fails only if it fails 2 of 3 runs.

Quarantined, measured but not gated (8)

Unstable (1)

  • seqab-none-pct-r0-root-z100: tracking 0.05, pressJump 0, drop 0, reload 0, render 0.03, renderKey -, undo true, teleport true / tracking 0.05, pressJump 0, drop 0, reload 0, render 0.03, renderKey -, undo true, teleport true / tracking 0.05, pressJump 0, drop 0, reload 0, render 0.03, renderKey -, undo true, teleport true

@heygengenesis heygengenesis Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: APPROVE — 2 resolved, 0 open, 0 new · b6bef2bc → ccddbf64

@miguel-heygen
miguel-heygen added this pull request to the merge queue Nov 3, 2026
Merged via the queue into main with commit 8a6636e Nov 3, 2026
133 of 135 checks passed
@miguel-heygen
miguel-heygen deleted the fix/latest-version-not-older-than-running branch November 3, 2026 01:29
@jrusso1020 jrusso1020 mentioned this pull request Nov 3, 2026
SanHsien added a commit to SanHsien/hyperframes that referenced this pull request Nov 4, 2026
…metadata

Ports upstream heygen-com#7049 (8a6636e): a cached latestVersion that is older
than the running CLI, including a prerelease of an older line, is no
longer reported as an available update. The daily check cadence is
unchanged. Adds regression cases that failed on the old code.

Also records the continued 2026-11-04 upstream review: 14 more
consecutive commits judged with file:line evidence, watermark advanced
to 8a6636e; the remaining range stays in ROADMAP.

Co-authored-by: Miguel Ángel <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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