Skip to content

filter out SPs with dev or other known "not useful to test" tags #454

Description

@SgtPooki

I was going to say that we should just pull serviceStatus out of the provider info and do the filtering here because it's still there, Synapse just stopped caring about it. But it turns out we're actively stripping non-official fields from the capabilities list in Synapse now so you can't. Here's a fix that brings it back: FilOzone/synapse-sdk#687

Then here, in apps/backend/src/wallet-sdk/wallet-sdk.service.ts loadProviders you do the filtering, comparing info.pdp.extraCapabilities?.serviceStatus to '0x646576' ("dev"), something like this with bonus logging:

-      const validProviders = providerInfos.filter((info) => !!info);
+      const validProviders = providerInfos.filter((info) => {
+        if (!info) return false;
+        // Skip providers that have declared serviceStatus=dev in their capabilities
+        const serviceStatus = info.pdp.extraCapabilities?.serviceStatus;
+        if (serviceStatus === "0x646576") { // "dev"
+          this.logger.log({
+            event: "provider_skip_dev",
+            message: `Skipping dev provider "${info.name}" (ID ${info.id})`,
+            providerId: info.id,
+            providerName: info.name,
+          });
+          return false;
+        }
+        return true;
+      });

This is not to argue that we shouldn't also have a way to opt-out on our end, but it would be nice for an SP to signal without having to tell us that they don't want to be tested. I know Zen's going to be setting up his test SP again so will be in the same boat probably.

Originally posted by @rvagg in #364

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestgood first issueGood for newcomershelp wantedExtra attention is neededready-for-workTriaged: scope, plan, and DoD are clear; contributor can pick up

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
🎉 Done

Relationships

None yet

Development

No branches or pull requests

Issue actions