Repository navigation
fix(cli): the latest version in _meta is never older than the running CLI - #7049
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
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
Scope
Read 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).
Contributor
Edit accuracy: accurate 267 (base branch 267), smooth 118 of thoseThe gate passes. Quarantined, measured but not gated (8)
Unstable (1)
|
…der than the running CLI
miguel-heygen
enabled auto-merge
November 3, 2026 00:34
Merged
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
_meta.latestVersionno 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 oflatestdoes not recheck more often.Why
getUpdateMetaandcachedUpdateCheckinpackages/cli/src/utils/updateCheck.tsread 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--jsonoutput saidlatestVersion: 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.