Skip to content

docs(service): add ConnectivityProber guide for provider authors#27

Merged
alexgarzao merged 2 commits into
developfrom
docs/connectivity-prober-guide
May 21, 2026
Merged

docs(service): add ConnectivityProber guide for provider authors#27
alexgarzao merged 2 commits into
developfrom
docs/connectivity-prober-guide

Conversation

@alexgarzao
Copy link
Copy Markdown
Collaborator

Summary

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

  • Strictly documentation. No code changes.
  • Stacked on feature/connectivity-prober-tracer so the guide can reference the Tracer implementation as the simplest reference (single base URL, header auth).

What the guide covers

  1. When to implement — concrete criteria (multiple base URLs, non-trivial auth, root doesn't return 2xx, need to validate specific configured resource).
  2. The interface — annotated ConnectivityProber and ProbeOutcome definitions.
  3. Stage mapping table — full ProbeOutcome → (Connectivity, Authentication, End-to-End) decision matrix, including the deliberate partial overall status for "reached but creds wrong".
  4. Implementation steps — wrap the provider, add connectivity_prober.go, pick the probe endpoint, write tests at all three layers.
  5. Reusable utilitieslibSSRF.ResolveAndValidate, pkg/executors/http/auth.NewFromConfig, the (forthcoming) pkg/ssrfopt.Options() shared helper.
  6. Existing implementations table — Midaz + Tracer with endpoints and auth styles.
  7. Anti-patterns — calling /health for the probe, side effects, panicking, skipping SSRF, lying about AuthRequired().

Note on the pkg/ssrfopt reference

The 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

  • markdownlint clean (no linter in this repo; manual review for structure/voice).
  • Manual review of the rendered Markdown on GitHub before merge.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 15, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (1)
  • develop

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 8a2dc523-c285-4b8b-bdbe-9544f8e68f9a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands and usage tips.

@alexgarzao alexgarzao changed the title docs(provider): add ConnectivityProber guide for provider authors docs(service): add ConnectivityProber guide for provider authors May 15, 2026
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.
@alexgarzao alexgarzao force-pushed the docs/connectivity-prober-guide branch from 1a9af1b to 40f918e Compare May 21, 2026 20:10
@alexgarzao alexgarzao changed the base branch from feature/connectivity-prober-tracer to develop May 21, 2026 20:10
@alexgarzao alexgarzao merged commit 668588d into develop May 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant