docs(service): add ConnectivityProber guide for provider authors#27
Merged
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Documents the optional executor.ConnectivityProber interface introduced in #23 and adopted by #25: when to implement it, the ProbeOutcome to stages mapping, the recommended pattern, reusable utilities (libSSRF, auth factory, ssrfopt), and anti-patterns. Also adds a one-line pointer from CLAUDE.md. Companion to the Midaz and Tracer prober PRs.
The skeleton on line 145 still used the old `ssrfOptions()` identifier, inconsistent with the surrounding text (line 161) that already directs readers to use the shared `pkg/ssrfopt.Options()` helper. After PR #29 merged, `ssrfOptions()` no longer exists in any prober — the canonical name is `ssrfopt.Options()`. Update the example so it matches both the explanatory text below it and the real implementations in midaz/tracer.
1a9af1b to
40f918e
Compare
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
docs/connectivity-prober-guide.md— contributor-facing guide for theexecutor.ConnectivityProberinterface introduced in feat(service): provider-aware connectivity test with Midaz OIDC probe #23.CLAUDE.mdunder the Provider/Executor section so agents and humans land on the guide before adding new providers.Why
After three iterations (#23 Midaz, #25 Tracer, S3 deferred via #26), the pattern is stable enough to document. Without a written guide, the next provider author has to reverse-engineer two existing implementations to figure out what's required, what's reusable, and what's an anti-pattern.
Scope
feature/connectivity-prober-tracerso the guide can reference the Tracer implementation as the simplest reference (single base URL, header auth).What the guide covers
ConnectivityProberandProbeOutcomedefinitions.partialoverall status for "reached but creds wrong".connectivity_prober.go, pick the probe endpoint, write tests at all three layers.libSSRF.ResolveAndValidate,pkg/executors/http/auth.NewFromConfig, the (forthcoming)pkg/ssrfopt.Options()shared helper./healthfor the probe, side effects, panicking, skipping SSRF, lying aboutAuthRequired().Note on the
pkg/ssrfoptreferenceThe guide references
pkg/ssrfopt.Options()as the canonical way to source SSRF options. That package is being introduced in a parallel refactor PR. If that PR doesn't land first, the reference in this guide will be aspirational for a brief window — acceptable trade-off since the guide is forward-looking and both PRs share the same parent branch.Test plan
markdownlintclean (no linter in this repo; manual review for structure/voice).