9442a718da
The honesty half (no fabricated counts) leaves shallow installs permanently count-less. The compare API knows the full graph regardless of local clone depth: GET /repos/<o>/<r>/compare/<current>...<target> returns ahead_by — exactly the behind count the shallow boundary lost. - hermes_cli/banner.py: _github_compare_behind() (bounded, unauthenticated, best-effort); wired into _check_via_rev and the shallow branch of _check_via_local_git. ahead_by==0 with differing tips = local-ahead => 0. - hermes_cli/update_cmd.py: hermes update --check shallow path prints the exact count when recoverable, presence-only wording otherwise. - apps/desktop/electron/update-count.ts: compareApiUrl() + parseCompareBehindCount() pure helpers; main.ts fetches the count when resolveBehindCount() returns null, and the SSH-official passive path stops fabricating behind:1 (uses compare API + updateAvailable flag). - apps/desktop/src/lib/version-status.ts: updateAvailable now applies to the client target too, so a shallow desktop install shows '(update)' instead of nothing (or the old frozen '(+1)'). Fixes #84591; CLI siblings of #78253 / #53479 behavior. E2E: live compare API returned 61/62 for real 61/62-commit gaps and 0 for the reversed (local-ahead) pair; real shallow-clone fixture (depth-1 clone + depth-1 fetch, merge-base broken) recovers the exact count with the API and falls back to the honest sentinel offline.