carlos / platform Public

hostclaim: the stuck admission test probes a stuck executor in probing, where only stuck refuses it

"a stuck source does not wake" passed whether or not the operation was
stuck once main refused every source admission in starting. It now
admits the same probe on a live operation, then shows a stuck one is
refused.

Merge review fix round 1, finding 9.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev 1cc3e58b13fd32bb6becf1d8cda9ef25b160fb72 parent db50d29
1 file changed, +8 −3
  • internal/hostclaim/relocation_test.go +8 −3
diff --git a/internal/hostclaim/relocation_test.go b/internal/hostclaim/relocation_test.go
index b7ae71060..36e52e8e7 100644
--- a/internal/hostclaim/relocation_test.go
+++ b/internal/hostclaim/relocation_test.go
@@ -690,10 +690,15 @@ func TestRelocationAdmissionRules(t *testing.T) {
t.Fatalf("admitted: %v", err)
}
})
- t.Run("a stuck source does not wake", func(t *testing.T) {
- s, o := relAtPhase(t, PhaseStarting)
+ t.Run("a stuck executor does not probe", func(t *testing.T) {
+ // The same probe opens P on an operation that is not stuck.
+ s, o := relAtPhase(t, PhaseRelocatingProbing)
+ if _, err := Update(ctx, s, o, AdmitWriter(probe(o, "P1", false))); err != nil {
+ t.Fatalf("the probe on a live operation: %v", err)
+ }
+ s, o = relAtPhase(t, PhaseRelocatingProbing)
o = step(t, s, o, MarkStuck("rel-1", "operator"))
- if _, err := Update(ctx, s, o, AdmitWriter(probe(o, "g2", false))); !errors.Is(err, ErrWrongState) {
+ if _, err := Update(ctx, s, o, AdmitWriter(probe(o, "P1", false))); !errors.Is(err, ErrWrongState) {
t.Fatalf("admitted: %v", err)
}
})