Skip to content

feat: wait for service dependencies with cancellation and backoff - #4956

Merged
asim merged 1 commit into
masterfrom
codex/4940-wait-for-service
Sep 21, 2026
Merged

asim merged 1 commit into
masterfrom
codex/4940-wait-for-service

Conversation

@asim

@asim asim commented Sep 21, 2026

Copy link
Copy Markdown
Member

Services currently duplicate startup retry loops for dependencies that register after they start.

Add micro.WaitForService with capped exponential backoff and context cancellation. Require an addressable discovered node, with an optional repeatable readiness probe for application-level checks. Preserve the last completed error alongside the caller cancellation/deadline. Document that discovery alone does not prove readiness and context-ignoring backends can finish one in-flight call later.

Validation: fake-registry tests cover delayed discovery, empty addresses, probe retries, cancellation before/during discovery, and error preservation. Repository build and golangci-lint pass. Full tests run in CI.

Closes #4940

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 21, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-21T07:22:36.429757Z 754231f PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@asim
asim merged commit 39e5f4a into master Sep 21, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] No first-class "wait for dependency" helper; every service hand-rolls a retry loop

1 participant