Skip to content

Fix update check timeout bug#558

Merged
Jaylyn-Barbee merged 4 commits into
mainfrom
zt/555-update-check-timeout
Jun 1, 2026
Merged

Fix update check timeout bug#558
Jaylyn-Barbee merged 4 commits into
mainfrom
zt/555-update-check-timeout

Conversation

@zateutsch
Copy link
Copy Markdown
Contributor

fixes #555

Upped timeout on github request from 250ms to 1s
Writing a placeholder value to update check file to ensure there aren't subsequent failures

Copilot AI review requested due to automatic review settings May 31, 2026 22:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes a race in the first-run update check cache. The 250 ms foreground wait for the background refresh task often expired before GitHub's API responded, so ~/.winapp/.update-check was never written and every subsequent invocation re-raced. This PR raises the wait to 1000 ms and also writes a placeholder cache file synchronously on first run so the 24-hour gate trips even if the refresh loses the race.

Changes:

  • Increase FirstRunRefreshTimeout from 250 ms to 1000 ms.
  • Write a placeholder UpdateCheckCache (with LastCheck = UtcNow) synchronously before scheduling the background refresh on first run.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 31, 2026

Build in progress — metrics below are from a previous commit and will update when the current build finishes.

Build Metrics Report

Binary Sizes

Artifact Baseline Current Delta
CLI (ARM64) 31.45 MB 31.45 MB 📈 +0.5 KB (+0.00%)
CLI (x64) 31.79 MB 31.79 MB ✅ 0.0 KB (0.00%)
MSIX (ARM64) 13.21 MB 13.21 MB 📉 -0.6 KB (-0.00%)
MSIX (x64) 14.05 MB 14.05 MB 📉 -0.3 KB (-0.00%)
NPM Package 27.50 MB 27.50 MB 📉 -0.2 KB (-0.00%)
NuGet Package 27.59 MB 27.59 MB 📈 +0.7 KB (+0.00%)
VS Code Extension 20.31 MB 20.31 MB 📈 +0.2 KB (+0.00%)

Test Results

1186 passed, 1 skipped out of 1187 tests in 448.8s (+20.5s vs. baseline)

Test Coverage

17.2% line coverage, 36.2% branch coverage · ✅ no change vs. baseline

CLI Startup Time

40ms median (x64, winapp --version) · ✅ -7ms vs. baseline


Updated 2026-06-01 18:05:09 UTC · commit 1732c75 · workflow run

Copy link
Copy Markdown
Contributor

@Jaylyn-Barbee Jaylyn-Barbee left a comment

Choose a reason for hiding this comment

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

LGTM.

@Jaylyn-Barbee Jaylyn-Barbee enabled auto-merge (squash) June 1, 2026 18:05
@Jaylyn-Barbee Jaylyn-Barbee merged commit aae4f75 into main Jun 1, 2026
21 checks passed
@Jaylyn-Barbee Jaylyn-Barbee deleted the zt/555-update-check-timeout branch June 1, 2026 18:20
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.

Update-check cache (~/.winapp/.update-check) not reliably written on first run — 250 ms timeout races GitHub API

3 participants