feat(providers): determine reachability via /pdp/ping instead of version string#320
Merged
Merged
Conversation
|
@beck-8 is attempting to deploy a commit to the FilOz Team on Vercel. A member of the Team first needs to authorize it. |
e6d566c to
f7008db
Compare
…ion string Reachability was proxied by whether a provider's /version response parsed into a known format (softwareVersion set). That conflates "has a parseable version" with "is reachable": prerelease builds whose version string doesn't match the expected pattern were treated as unreachable and hidden by the default reachable=true filter. Add a dedicated /pdp/ping probe (2xx => reachable; endpoint serves CORS *, so it is browser-safe) and a `reachable` field on ServiceProvider. The reachable filter now reads this field directly instead of inferring it from the version string. Version fetch and ping run concurrently per provider.
The reachable filter was keyed to the `softwareVersion` column id while its filterFn read `row.original.reachable`. It worked, but was misleading: the column-filter state reported `softwareVersion` as filtered, and the Version column could not host a real version filter. Move the filter onto a dedicated, hidden `reachable` column (kept out of the table via columnVisibility) so the filter's column id matches what it filters. The Version column no longer carries a filterFn.
f7008db to
71dec00
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes Service Providers table reachability by replacing the prior “parseable /version string” proxy with an explicit /pdp/ping probe, ensuring prerelease Curio nodes (e.g. -rc1) aren’t incorrectly treated as unreachable and hidden by the default “reachable=true” filter.
Changes:
- Adds a browser-safe
fetchReachable()implementation that probesGET /pdp/pingand treats any2xxas reachable. - Extends provider enrichment to populate a new
reachableboolean alongsidesoftwareVersion. - Updates table filtering to use a dedicated hidden
reachablecolumn instead of piggybacking on the Version column.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/services/providers/types.ts | Updates base provider type to exclude the new reachable field prior to enrichment. |
| src/services/providers/ping.ts | Introduces /pdp/ping probe logic with timeout + abort handling. |
| src/services/providers/index.ts | Enriches each provider with reachable (via ping) in parallel with /version. |
| src/services/providers/constants.ts | Adds ping timeout and renames concurrency constant to reflect enrichment batching. |
| src/schemas/provider-schema.ts | Adds required reachable: boolean to the provider schema/type. |
| src/app/service-providers/utils/service-provider-filters.ts | Reworks reachability filter to read row.original.reachable directly. |
| src/app/service-providers/utils/map-filter-state-to-column-filters.ts | Maps the reachable filter state to the new reachable column id. |
| src/app/service-providers/data/column-definition.tsx | Adds a hidden data-only reachable column to back filtering (decoupled from Version). |
| src/app/service-providers/components/ServiceProvidersTable.tsx | Hides the filter-only reachable column via columnVisibility. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
silent-cipher
approved these changes
Jun 8, 2026
silent-cipher
left a comment
Collaborator
There was a problem hiding this comment.
Looks good to me!
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.
What
Replace the version-string reachability proxy with a real
/pdp/pingprobe.Why
The Service Providers table defaults to showing only reachable providers (
reachable=['true']). Reachability was inferred from whether a provider's/versionstring parsed into a known format. That conflated "has a parseable version" with "is reachable" — providers running prerelease Curio builds (version like1.28.2-rc1+...) failed the version pattern and were therefore treated as unreachable and dropped from the default list.How
fetchReachable()hittingGET /pdp/ping;2xx⇒ reachable. The endpoint serves permissive CORS (access-control-allow-origin: *), so the existing browser-side enrichment can call it directly.reachableboolean toServiceProvider, populated during enrichment (runs concurrently with the/versionfetch).reachableFilterFnnow readsreachabledirectly instead of thesoftwareVersionproxy.Part of #319. The Version-column display of prerelease builds is fixed separately, pending upstream FilecoinFoundationWeb/filecoin-foundation#2336.
Test
GET https://pdp.660688.xyz:8443/pdp/ping→200,access-control-allow-origin: *.biome check+tscclean on changed files.