Repository navigation
Poll a build at its running or recent-failure rate whichever branch the run is on [patch] - #396
Merged
Conversation
…he run is on [patch] BuildSync.Priority read Build.IsOngoing and Build.LastStatus, which describe only the most recently started run across every branch. A long run on main that was still going after a later PR run had finished dropped the build to Low (or skipped it under 15% budget), and main then failing never reached the Medium recent-failure tier. Priority now treats the build as running when any run is ongoing, and as a recent failure when the newest run on any branch failed within the hour. Fixes #392 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017vfJW5KENnPmXEat6KQ92F
|
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.



Fixes #392
What was wrong
BuildSync.PriorityreadBuild.IsOngoingandBuild.LastStatus, which only describe the most recently started run across every branch. When a long run onmainwas still going and a later PR run had already finished, the build dropped to Low. That meant it was polled every 120 s instead of 30 s, or skipped entirely under 15% budget. Ifmainthen failed, the build never reached the Medium recent-failure tier.Change
Build.HasOngoingRun: true when any run on any branch is pending or running.Build.HasRecentBranchFailure(since): true when the newest run on some branch failed and was updated aftersince. A failure that a later run on the same branch has superseded doesn't count.BuildSync.Priorityuses both.Build.IsOngoingandLastStatuskeep their meaning for display and ETA.Tests
New
BuildPriorityTestscover the two-branch scenario from the issue (running main + finished feature → High; main then fails → Medium), a failure superseded on its own branch (Low), and a failure older than an hour (Low). Without the fix, the first two fail. The full suite passes: 166/166.Generated by Claude Code