mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-03 19:47:10 +00:00
fix(runner): treat an unchanging transitional tree as settled
A UI persistently showing two route-level Screen ids (overlay, both route ids alive at rest) burned the full retry budget every step and skipped the verifier forever. A tree byte-identical to the previous attempt now breaks the retry loop as settled; genuine cross-fades differ between attempts and keep the retry/skip behavior.
This commit is contained in:
1 parent
c356340563
commit
0550e522cd
2 files changed
+86
-7
No files matched your search
@@ -692,6 +692,7 @@ const (
|
||||
// transient state.
|
||||
func fetchSyncedState(ctx context.Context, options Options, logger *slog.Logger, stepIndex int) (tree *hierarchy.Tree, transitional bool, err error) {
|
||||
var pngBytes []byte
|
||||
var previousJSON string
|
||||
retryLoop:
|
||||
for attempt := range transitionalRetryAttempts {
|
||||
hierarchyJSON, image, snapshotErr := options.Driver.Snapshot(ctx)
|
||||
@@ -705,6 +706,14 @@ retryLoop:
|
||||
if err != nil || !isTransitionalHierarchy(tree) {
|
||||
break
|
||||
}
|
||||
// A tree unchanged since the previous attempt is a settled state
|
||||
// that merely matches the heuristic (persistent overlay, both route
|
||||
// ids alive at rest), not a cross-fade in flight: verify it instead
|
||||
// of burning the retry budget and skipping the verifier forever.
|
||||
if attempt > 0 && hierarchyJSON == previousJSON {
|
||||
break
|
||||
}
|
||||
previousJSON = hierarchyJSON
|
||||
if attempt == transitionalRetryAttempts-1 {
|
||||
transitional = true
|
||||
break
|
||||
|
||||
Reference in new issue
Block a user