Skip to content

Make Refresh Build Data force the next poll instead of delaying it - #346

Merged
matt-edmondson merged 2 commits into
mainfrom
fix/303-refresh-forces-update
Oct 7, 2026
Merged

matt-edmondson merged 2 commits into
mainfrom
fix/303-refresh-forces-update

Conversation

@matt-edmondson

Copy link
Copy Markdown
Contributor

Fixes #303

What changed

  • RefreshBuildData called BuildSync.ResetTimer(), which restarted the stopwatch. ShouldUpdate then went false and the next poll moved a full interval away. This also affected the refresh after Re-run, Cancel and Trigger.
  • BuildSync now has ForceUpdate(), which sets a flag that makes ShouldUpdate true (with TimeRemaining at zero) until the next UpdateAsync. UpdateAsync clears the flag before it polls, so a refresh requested while an update is in flight still gets its own poll. After that, normal interval pacing resumes. ResetTimer() had no other callers and has been removed.

Tests

  • New BuildSyncRefreshTests:
    • ForceUpdateMakesTheBuildDueOnTheNextTick: after ForceUpdate(), the build is due immediately.
    • NormalPacingResumesAfterTheForcedUpdate: after the forced poll runs, the build waits out its interval again.
  • To check the test catches the bug, I made ForceUpdate() restart the timer the way the old code did. ForceUpdateMakesTheBuildDueOnTheNextTick failed, then passed again once the fix was put back.
  • Full suite: 87/87 passing locally.

🤖 Generated with Claude Code

https://claude.ai/code/session_01B6YhFsbKVvV6YZVxUJzexE


Generated by Claude Code

claude added 2 commits October 7, 2026 01:24
…it [patch]

RefreshBuildData restarted the build's timer, so ShouldUpdate went false
and the next poll moved a full interval away. BuildSync now has
ForceUpdate(), which makes ShouldUpdate true until the next UpdateAsync
runs, after which normal interval pacing resumes.

Fixes #303

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B6YhFsbKVvV6YZVxUJzexE
@sonarqubecloud

sonarqubecloud Bot commented Oct 7, 2026

Copy link
Copy Markdown

@matt-edmondson
matt-edmondson merged commit aba8393 into main Oct 7, 2026
14 checks passed
@matt-edmondson
matt-edmondson deleted the fix/303-refresh-forces-update branch October 7, 2026 05:35
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.

"Refresh Build Data" (and the refresh after re-run/cancel/trigger) pushes the next poll a full interval away instead of forcing it

2 participants