Skip to content

Update archiver/relay/solana-relay/staking to @audius/sdk ^15.3.1#20

Open
dylanjeffers wants to merge 1 commit into
mainfrom
claude/update-plugins-sdk-16xQ4
Open

Update archiver/relay/solana-relay/staking to @audius/sdk ^15.3.1#20
dylanjeffers wants to merge 1 commit into
mainfrom
claude/update-plugins-sdk-16xQ4

Conversation

@dylanjeffers
Copy link
Copy Markdown
Contributor

@dylanjeffers dylanjeffers commented May 1, 2026

Summary

Rebased onto current main. Bumps the four pedalboard plugins still on the old @audius/sdk onto ^15.3.1, matching the version anti-abuse-oracle already runs in prod (PR #34).

Plugin Before After
archiver 10.0.0 ^15.3.1
relay 10.0.0 ^15.3.1
solana-relay 15.1.0 ^15.3.1
staking 10.0.0 ^15.3.1

Source migrations the new SDK requires

  • archiver: bare sdk() now exposes only the generated TracksApi, which doesn't include getTrackDownloadUrl. Switch apps/archiver/src/sdk.ts to createSdkWithServices so the extended TracksApi (with getTrackDownloadUrl) is wired up.

  • relay:

    • Migrate sdk()createSdkWithServices so audiusSdk.services.entityManager (decodeManageEntity / recoverSigner) keeps working. Switch the AudiusSdk type alias to AudiusSdkWithServices.
    • services.entityManager is now typed as optional on AudiusSdkWithServices but is always populated in practice by the SDK's default services — add ! assertions at the call sites (coreRelay.ts, middleware/rateLimiter.ts, middleware/validator.ts, utils.ts, validate.ts).
    • Drop the 'staging' environment value (no longer accepted by the SDK) by routing stage to 'production'. The sandbox script uses the new apiEndpoint override to point at staging discovery.
    • users.updateProfile is gone in 15.3.1 — sandbox switches to the equivalent users.updateUser({ id, userId, metadata }) shape.
  • solana-relay, staking: package.json bump only. The SDK types in solana-relay source (FirstBuyQuoteResponse, RelayRequestBody) are still exported; staking has no @audius/sdk imports in src/.

Intentionally NOT included

Pre-existing main-branch issues not addressed here

  • apps/relay/src/middleware/logging.ts(21,5) has a pino Logger<never> type incompatibility, introduced by the node 24 upgrade / pino pin commits — present on main with or without this change. Relay was also dropped from CI in PR Drop mri and relay from CI; remove mri source #15, so this hasn't been blocking anyone.
  • viem / abitype .d.ts syntax errors under node_modules are flagged by the apps' TS 5.0.4 — same as on main.

Test plan

  • npm install resolves all four plugins to @audius/sdk@15.3.1
  • tsc --noEmit on archiver, solana-relay, staking source is clean
  • relay tsc errors are reduced from ~10 to 1 (the pre-existing pino issue); all services does not exist on UsersApi errors that exist on plain main are gone with this change
  • Smoke test the relay against a stage discovery node to confirm decodeManageEntity / recoverSigner paths still work end-to-end
  • Once merged, monitor archiver getTrackDownloadUrl calls — the switch to createSdkWithServices is required to expose that endpoint

🤖 Generated with Claude Code

Brings the four remaining pedalboard plugins still on the old SDK onto
^15.3.1, matching the version anti-abuse-oracle already runs in prod.

Plugin bumps:
- archiver:     10.0.0 -> ^15.3.1
- relay:        10.0.0 -> ^15.3.1
- solana-relay: 15.1.0 -> ^15.3.1
- staking:      10.0.0 -> ^15.3.1

Source migrations the new SDK requires:

- archiver: bare sdk() now exposes only the *generated* TracksApi,
  which doesn't include getTrackDownloadUrl. Switch the archiver's
  SDK helper to createSdkWithServices so the extended TracksApi
  (with getTrackDownloadUrl) is wired up.

- relay: bump 10.0.0 -> ^15.3.1, migrate sdk() -> createSdkWithServices
  so audiusSdk.services.entityManager (decodeManageEntity /
  recoverSigner) keeps working; switch the AudiusSdk type alias to
  AudiusSdkWithServices; drop the 'staging' environment value (no
  longer accepted by the SDK) by routing stage to 'production'.
  services.entityManager is now typed as optional on
  AudiusSdkWithServices but is always populated in practice by the
  SDK's default services, so add ! assertions at the call sites to
  keep tsc happy. Update the sandbox script to use apiEndpoint for
  the staging discovery node, and switch users.updateProfile (gone
  in 15.3.1) to the equivalent users.updateUser({ id, userId,
  metadata }) shape.

- solana-relay, staking: package.json bump only; no source changes
  (the SDK types they use - FirstBuyQuoteResponse, RelayRequestBody -
  are still exported, and staking has no @audius/sdk imports in src).

Intentionally NOT included:
- trending-challenge-rewards: stays at 14.1.0. The bump to 15.3.1
  with createSdkWithServices was tried in 044f0e2 and explicitly
  reverted in 2d9f65d; the revert reason isn't documented but
  predates this PR, so honoring it.
- anti-abuse-oracle: already at ^15.3.1 on main (PR #34); the original
  PR #20 AAO changes targeted the pre-migration source that no
  longer exists.

Pre-existing main-branch issues not addressed by this PR:
- apps/relay/src/middleware/logging.ts(21,5) has a pino Logger<never>
  type incompatibility introduced by the node 24 upgrade / pino pin
  commits. Unrelated to the SDK and present without this change.
- viem / abitype .d.ts syntax errors under node_modules are flagged
  by relay's TS 5.0.4 - same as on main, not introduced here.

Test plan:
- [x] npm install resolves all four plugins to @audius/sdk 15.3.1
- [x] tsc --noEmit on archiver, solana-relay, staking source is clean
- [x] relay tsc errors are reduced from ~10 to 1 (the pre-existing
      pino issue); all 'services does not exist on UsersApi' errors
      that existed on main are gone
- [ ] Smoke test the relay against a stage discovery node to confirm
      decodeManageEntity / recoverSigner paths still work end-to-end

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@dylanjeffers dylanjeffers force-pushed the claude/update-plugins-sdk-16xQ4 branch from 847cf24 to 63f6574 Compare May 22, 2026 16:59
@dylanjeffers dylanjeffers changed the title Update all plugins to @audius/sdk 15.3.1 Update archiver/relay/solana-relay/staking to @audius/sdk ^15.3.1 May 22, 2026
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