Skip to content

rpc: gate the claim skip process-wide for every server - #1729

Draft
erikhortsch wants to merge 1 commit into
mainfrom
erik/server-skip-claim
Draft

rpc: gate the claim skip process-wide for every server#1729
erikhortsch wants to merge 1 commit into
mainfrom
erik/server-skip-claim

Conversation

@erikhortsch

Copy link
Copy Markdown
Contributor

Summary

Wires psrpc's new WithServerSkipClaim (livekit/psrpc#122) into
WithServerObservability.

WithServerObservability is the one seam every server constructor shares:
WithDefaultServerOptions calls it, and the constructors that take only a logger
reach it too. In cloud that is 33 server sites — 23 via WithDefaultServerOptions
and 10 via WithServerObservability directly — covered by a single edit.

The setting is process-wide rather than per-service because the claim is a
transport policy, and it is read per request, so callers may set it before or
after their servers are constructed and revoke it at runtime without a redeploy.

Why not per-config

WithDefaultServerOptions already receives PSRPCConfig, so a field there was
the obvious home — but PSRPCConfig is passed by value at construction, which
would lose the runtime kill switch that motivated the client-side version
(livekit/cloud#4567). It also would not reach the 10 logger-only sites. A
process-wide setter keeps both properties.

Verification

  • go build ./... — clean
  • go test -race ./rpc/... ./utils/... — passes
  • New TestServerSkipClaim covers the three properties the call sites depend on:
    unset means claim, the func is consulted per call rather than captured, and it
    stays revocable.

Depends on

livekit/psrpc#122. go.mod currently pins the pseudo-version
v0.7.5-0.20260819230101-cbf56a2f6872 from that branch — needs re-pinning to
the released tag before merge.

🤖 Generated with Claude Code

Wires psrpc's WithServerSkipClaim into WithServerObservability, which is the one
seam every server constructor shares -- WithDefaultServerOptions calls it, and
the constructors that take only a logger reach it too.

The setting is process-wide because the claim is a transport policy rather than a
per-service one, and it is read per request so callers may set it before or after
their servers exist and revoke it without a redeploy.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Aug 20, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 0d27ae4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

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