carlos / platform Public

rollout sim: the rewake always wakes another instance when the marked build has no record (M17 on three seeds at 300)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev 96abda964ba19c8ce085be6fc20404a82202e0c1 parent 43694ff
2 files changed, +5 −5
  • internal/rollout/sim_test.go +3 −3
  • internal/rollout/testdata/rolloutsim/mutate.sh +2 −2
diff --git a/internal/rollout/sim_test.go b/internal/rollout/sim_test.go
index f55457041..79b18957e 100644
--- a/internal/rollout/sim_test.go
+++ b/internal/rollout/sim_test.go
@@ -1884,8 +1884,8 @@ func (s *sim) retryHeld() {
// before another restriction of its app moves the generation; here the two
// halves are one step apart.
//
-// When X has no failure record yet, half the time the wake is instead
-// another asleep instance's on the same channel, one that never served X,
+// When X has no failure record yet, the wake is instead another asleep
+// instance's on the same channel, one that never served X, when there is one,
// and its first wake of X, if it runs, fails its health check (rewakeFail,
// as a flaky build may: a build with a marker and no record has seldom
// failed anywhere). That failure writes X's first record, which holds every
@@ -1917,7 +1917,7 @@ func (s *sim) rewakeArm() {
o = append(o, h2)
}
}
- if len(o) > 0 && s.gr.Intn(2) == 0 {
+ if len(o) > 0 {
s.rewake, s.rewakeFail = o[s.gr.Intn(len(o))].name, x
}
}
diff --git a/internal/rollout/testdata/rolloutsim/mutate.sh b/internal/rollout/testdata/rolloutsim/mutate.sh
index 0e1b360b8..4f7dd526e 100755
--- a/internal/rollout/testdata/rolloutsim/mutate.sh
+++ b/internal/rollout/testdata/rolloutsim/mutate.sh
@@ -137,8 +137,8 @@ TIMEOUT_MIN=$((SEEDS * 3 / 100 + 20))
# new record as a fact of every host. The random schedule seldom
# lines this up (a build with a marker and no record has seldom
# failed anywhere), so the simulation's rewakeArm makes it: when X
-# has no record, the wake after the Retry is sometimes another
-# instance's first wake of X, made to fail. Like M16 it rests on
+# has no record, the wake after the Retry is another instance's
+# first wake of X, made to fail. Like M16 it rests on
# few seeds at 300, and the same rule holds: a MISSED at 300 seeds
# or fewer is re-run at 3000 before it is read as a regression.
# (Removing the touch outright leaves the generation zero when the