Fix the update hint going silent and checking the wrong source - #59
Conversation
The update check always asked NuGet, but only a dotnet tool installs from there. The native downloads - Homebrew included - are built from a GitHub release, and the two are published by separate jobs that do not become visible at the same moment. A Homebrew user was therefore told about a package they never install, and gets no hint at all if the NuGet push ever fails while the native publish succeeds. Read the CLI's own version from wherever the running installation updates from, and key the cached answers apart so one source is never served for the other. Other packages, such as the server version, still come from NuGet. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNSXxJz2S2SxP3piPPVK4K
The cached answer was trusted for 24 hours whatever it said. A check that lands in the window between a release being tagged and the package becoming visible records the version before it, so every release published afterwards went unannounced for a full day - which is what happened between 2.3.4 and 2.3.6, where a check ran 25 seconds before the package appeared. The two answers do not go stale at the same rate. "An update is available" stays true until the user installs it and is still held for a day, while "you are up to date" is only held for an hour. An answer that has fallen behind the installed version is not trusted at all, and asking for an update now always goes to the source, since that is the user saying the cached answer will not do. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNSXxJz2S2SxP3piPPVK4K
The check was given a five second deadline measured from process start, so the time was spent while the command ran rather than on the request. Anything slower than that - the workbench, a run, generating a screenplay - cancelled the check before it finished, which meant no hint and, because the cache is only written once an answer arrives, no cached answer for the next run either. The request already carries its own five second timeout, so the deadline it needs is the one it has. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNSXxJz2S2SxP3piPPVK4K
|
Reviewer context. How it went wrong, pinned from the reporter's cache and the release metadata (2026-07-30 UTC):
The check landed in the 53-second window between the release and the package becoming visible. With a single 24-hour interval that answer was then served until the next day, hiding both 2.3.5 and 2.3.6. Two defects, two commits:
Plus Verification
Note on rate limits — the GitHub releases endpoint is unauthenticated (60 req/hour/IP). The caching keeps a single user well inside that, and a rate-limited response is treated like any other failed check: no hint, nothing blocked. Possibly the same root cause as #34 ("Update doesn't run update - it thinks it has the latest", closed). That report is a Mac user being told they were current while other surfaces showed a newer version, which is what the wrong-source defect produces. Worth a look before assuming it stayed fixed. |
Summary
The "update available" hint could stay silent for a day after a release, and never matched how a Homebrew install actually updates.
Fixed
cratis updatenow always asks the source rather than trusting a cached answer.workbench,run, andscreenplay generate.