Harden universe A2A reachability probe#4621
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR hardens the universe harness A2A reachability probe to reduce false negatives caused by transient A2A gateway/provider latency, while preserving the probe’s side-effect safety guarantees (no duplicate notifications). It also adds a regression test to validate retry behavior.
Changes:
- Add retry/backoff logic to the A2A reachability probe, keeping retries within the caller’s deadline.
- Preserve the side-effect-safe probe prompt and keep the “no extra notifications” assertion around the probe.
- Add a regression test that simulates a transient failure on the first A2A request and verifies a successful retry.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| internal/harness/universe/main.go | Adds deadline-aware retry/backoff behavior to the A2A reachability probe. |
| internal/harness/universe/main_test.go | Adds a regression test covering “first attempt fails, second attempt succeeds” behavior for the probe. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if time.Until(deadline) <= 0 { | ||
| return fmt.Errorf("A2A reachability probe failed after %d attempt(s): %w", attempt, lastErr) | ||
| } | ||
| time.Sleep(minDuration(200*time.Millisecond*time.Duration(attempt), time.Until(deadline))) |
Comment on lines
+34
to
+36
| if got, want := r.URL.Path, "/agents/concierge"; got != want { | ||
| t.Fatalf("path = %q, want %q", got, want) | ||
| } |
Comment on lines
+37
to
+40
| if atomic.AddInt64(&calls, 1) == 1 { | ||
| time.Sleep(5 * time.Second) | ||
| return | ||
| } |
This was referenced Jul 10, 2026
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.
Summary
Closes #4504
Closes #4620
Testing