Commit Graph
4074 Commits
Author SHA1 Message Date
Benjamin PrachtandClaude Opus 5.5 32c4bd80ce build: match the builder comment to measured numbers
Measured on an arm64 host: go build -a for linux/amd64 took 61s under
QEMU versus 15s natively, so "several times slower" rather than an order
of magnitude.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 10:34:34 -07:00
Benjamin PrachtandClaude Opus 5.5 4a958aed60 build: pin the test-server builder stage to the host platform
Same change as the server Dockerfile: the builder already cross-compiles
via GOARCH=$TARGETARCH, so running it on $BUILDPLATFORM avoids compiling
the arm64 image under QEMU.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 10:31:44 -07:00
Elliot Morales SoléandClaude Opus 5.5 1c72fd2b53 build: let Renovate's builder-suffix manager see the platform pin
The custom regex manager that bumps the builder's Alpine suffix and digest
required a literal "FROM golang:", so it stopped matching the server
Dockerfile once the builder gained --platform=$BUILDPLATFORM. It now accepts
an optional --platform=... flag, and still extracts both builder pins
(Dockerfile and cmd/test-server/Dockerfile).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 15:27:46 +01:00
Elliot Morales Solé a55d4c6c0f build: pin the builder stage to the host platform
The build already cross-compiles explicitly (CGO_ENABLED=0, GOOS=linux,
GOARCH=$TARGETARCH), so the toolchain never needs to match the target arch.
Without --platform=$BUILDPLATFORM a cross-arch build runs the entire Go
compilation under QEMU emulation for a byte-identical binary: building
linux/amd64 on an arm64 host went from minutes to still-running after ten.

Only the final stage stays on $TARGETPLATFORM, where it belongs.

go-version.sh reads the Go version out of the builder's FROM line, so its
pattern now accepts an optional --platform flag before the image.
2026-10-27 15:18:28 +01:00
cnderrauber 37901309a3 Revert #5033 (#5077)
WHIP passthrough ingress has been failing DTLS
2026-10-27 21:04:38 +08:00
Raja Subramanian 08221befb6 pion/transport update to pick up wake up all waiters on batch conn flush complete (#5076) 2026-10-27 14:27:59 +05:30
Hassan Kazi 953b489987 service: check room name length in CreateDispatch (#5071)
With auto_create on, CreateDispatch creates the room through router.CreateRoom without checking limits.max_room_name_length, so it could create a room that CreateRoom and the join paths reject.
2026-10-27 00:56:36 -07:00
Raja SubramanianandClaude Opus 5.5 d0a296dad3 Bump pion/transport/v4 to v4.1.2 (#5075)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 08:53:03 +05:30
Raja SubramanianandClaude Opus 5.5 d2cf39bce6 sfu: replace forward scheduling delay with processing per write (#5072)
* sfu: replace forward scheduling delay with processing per subscriber

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* sfu: describe processing per subscriber as per write

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* telemetry: name forward processing metrics per write

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Pin protocol with NodeStats forward_processing_per_write

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 01:52:17 +05:30
Daisuke Iuchi b50c7f09cf Return an error when the ingress store exhausts its retries; tolerate missing state in UpdateIngress/DeleteIngress (#5049)
- pkg/service/redisstore.go: after the retry loop, return an error wrapping redis.TxFailedErr instead of nil. CreateIngress now fails instead of returning an ingress that was never written, StoreIngress stops before creating the orphan state key, and a dropped UpdateIngressState reaches the caller's existing error log. 

- pkg/service/ingress.go: the Fix nil pointer dereference in IOInfoService.UpdateIngressState on concurrent DeleteIngress #4806 guard applied to the two Twirp handlers, treating a nil State as empty. UpdateIngress then applies and stores the request; DeleteIngress deletes without calling the ingress service.

- pkg/service/redisstore.go: UpdateIngress now fails with ErrIngressNotFound when the ingress no longer exists, checked inside the WATCH on the ingress hash so a later delete fails the EXEC. Without it an update racing a  DeleteIngress recreated the deleted ingress and its stream key; this was possible before this PR whenever the delete landed after LoadIngress, and the guard in 2 widened the window to the gap between its two reads.
The guard stays at the call sites to match #4806 and keep API responses unchanged.
2026-10-26 13:00:41 -07:00
David Zhao 85c678c7f0 fix flaky TestAgentNamespaces (#5074)
causing a few race failures in CI
2026-10-26 12:46:38 -07:00
David Zhao 213df1a634 chore: add AttachJob interface on Worker (#5069)
* chore: add AttachJob interface on Worker

allows for a worker to take ownership of an existing job

* ensure we can handle stateless jobs

* set initial state in AssignJob
2026-10-26 12:42:16 -07:00
Raja SubramanianandClaude Opus 5.5 c82f28d6cd service: export CheckConnectLimits (#5067)
Servers that embed pkg/service and run their own join paths need the
same join limit check. Rename checkConnectLimits to CheckConnectLimits.
No behavior change.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 17:30:10 +05:30
e01a473d04 service: consolidate join grant-limit checks on the validate path (#5066)
* service: enforce participant name length on join

StartSession checked the token's metadata and attributes against the configured limits but not its name, so a participant could join with a name longer than limits.max_participant_name_length, which UpdateParticipant and the signal UpdateMetadata path reject.

* service: consolidate join grant-limit checks on the validate path

Extract checkGrantLimits and run it from ValidateConnectRequest and
WHIPService.validateCreate so the /rtc/validate endpoint and the WHIP
ingest path reject over-limit name, metadata and attributes the same way
a real join does. StartSession keeps its own checks as the backstop.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* service: run the full join limit check in StartSession

StartSession now calls checkConnectLimits, so the RTC node checks
identity, room name, participant name, metadata and attributes itself.
ValidateConnectRequest runs the check after the publish suffix, so it
measures the same identity StartSession sees. checkConnectLimits returns
a plain error, and the HTTP callers map it to 400. The name-only
StartSession test is dropped for TestConnectLimits, which gains a
publish-suffix case.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* service: test the StartSession limit check directly

TestStartSessionConnectLimits runs the same over-limit cases as
TestConnectLimits through StartSession on the RTC node. The cases move
into an exported ConnectLimitCases table so both test packages share it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: ANDROIDHASSAN <84630851+ANDROIDHASSAN@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-26 17:16:51 +05:30
Raja SubramanianandClaude Opus 5.5 125ea44a61 sfu: report forward scheduling delay next to forwarding latency (#5065)
* sfu: report forward scheduling delay next to forwarding latency

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* sfu: keep full forwarding transit when packing scheduling delay

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* sfu: saturate reported forwarding p90s instead of wrapping

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 15:24:31 +05:30
Hassan Kazi 043637d36f rtc: refuse WHIP publish to a missing room when auto_create is off (#5062)
The WHIP create handler never called ValidateCreateRoom, so with room.auto_create: false a publisher token without roomCreate could create any room over WHIP, while the same join over /rtc gets 404.
2026-10-26 14:32:43 +05:30
Raja SubramanianandClaude Opus 4.8 385aa40f92 Release v1.13.11. (#5061)
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
v1.13.11
2026-10-25 15:14:05 +05:30
Raja Subramanian 6294ab37c7 prometheus: count keyframes received and forwarded (#5060) 2026-10-25 13:08:05 +05:30
Raja SubramanianandClaude Opus 5.5 61fa1058bc config-sample: add rtc.rtx_budget (#5059)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 11:22:31 +05:30
Raja SubramanianandClaude Opus 5.5 7c575a5c31 sfu: cap retransmissions per down track (#5054)
* sfu: cap retransmissions per down track (rtc.rtx config, off by default)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* sfu: rtx budget review fixes (sequencer undo, sent bytes, newest first, rtx_budget)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* sfu: rtx budget second review (order unchanged when off, keep NACK window, metric in down track)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* sfu: rtx budget sorts NACKs newest first by extended sequence number

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 11:05:54 +05:30
Raja SubramanianandClaude Opus 5.5 04f7cb71e3 rtc: fix flaky TestSetPermissionDataTrackSubscriptions (#5056)
* rtc: wait for the recorded data track subscription before revoking in test

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* rtc: drop a subscription whose canSubscribe was revoked while it was in flight

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 11:05:33 +05:30
Raja Subramanian 095e33996a ci: list failed tests after the test step (#5057) 2026-10-24 23:35:41 +05:30
Raja Subramanian a8729ee65b sfu: read lock for BufferBase.GetPacket (#5055) 2026-10-24 23:35:23 +05:30
Raja SubramanianandClaude Opus 4.8 9644b99247 rtc: log the API key that issued the join token (#5050)
Thread the issuing API key from the /rtc join path to the media node via
StartSession, and include it in the "starting RTC session" log and the
twirp API-request log, so participant activity can be correlated with the
key. Logs the key id only, never the secret.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-23 23:35:15 +05:30
Raja SubramanianandClaude Opus 5.5 704c3280fe rtc: measure subscribe pacing delay in shadow (#5046)
* rtc: measure subscribe pacing delay in shadow

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* prometheus: raise the subscribe pace shadow top bucket to 120 s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* rtc: pace video subscribes per node in shadow, record the wait only

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* rtc: subscribe pacer doc wording, make the wiring test independent of timing

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* rtc: sample shadow pacing at arrival, skip one-shot, keep sub-millisecond waits

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* rtc: take the shadow pacing token before setup, in arrival order

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* rtc: build shadow pacing buckets in one pass

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 16:17:12 +05:30
Raja SubramanianandClaude Opus 5.5 45ce73c874 Add StreamType accessor to telemetry StatsKey (#5047)
Lets a ParticipantTelemetryListener tell downstream track stats from
upstream ones.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 15:58:38 +05:30
Raja Subramanian d8a4cdac11 Extend the TTL of data channel cache to 10s. (#5045)
To cover slow subscribers. Size still stays so that it does not grow
beyond a certain size.
2026-10-23 12:07:58 +05:30
kyle-livekitandClaude Opus 5.5 276731c261 fix: rebuild runtime image on patched alpine (eMudhra CA compromise) (#5044)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 16:31:06 -07:00
shubhamkapoor01 752bd339b7 agent: run the agent name lookup off the worker pool (#5043) 2026-10-22 14:36:11 -07:00
6342d8fd1b Enable upstream FlexFEC03 (#4845)
* Add upstream FlexFEC recovery support

* Guard short TWCC extensions in FEC packets

* Release completed FlexFEC states

* Validate FlexFEC payload type range

* Invoke FEC callbacks after unlocking

* Reduce FlexFEC protection state allocations

* Avoid allocations for complete FlexFEC packets

* Optimize ordered FlexFEC packet insertion

* Reuse RTP packet storage for FlexFEC recovery

* Limit pending FlexFEC repair packets

* Lower FlexFEC repair window to two seconds

* Harden upstream FlexFEC handling

* Test FlexFEC with E2EE media

* Fix FlexFEC negotiation with libwebrtc publishers

* Enhance payload length validation in decoder

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* remove the ability to configure payload type for FlexFEC

* moved some helpers into protocol

* Handle big gaps in media sequence numbers

Reset buffers when a big gap in media sequence numbers is detected.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* bump protocol & psrpc deps

* Handle FEC packet recovery failure

Increment FEC packets discarded counter and remove packet.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* do not NACK on fec recovered packet (#4896)

* do not NACK on fec recovered packet

* fix test race in CI

* Fix FEC write return after merging RTX feedback changes

* PR fixes for FlexFEC implementation (#4898)

* do not NACK on fec recovered packet

* refactor common code into unlockAndInvokeFECRecovery

* add FEC stats to RTPStats

* add log for when fecdecoder unavailable after creation

* rename markAsFECRepair to setFECRepairBufferLimit for clarity

* refactor packet generation for tests into util

* fix test race in CI

* move the unlocks back inline for readability

* update RTPstats

* Fix FEC write return after merging RTX feedback changes

* Use shared RTP packet helper in merged FEC NACK test

* Remove redundant return from FEC write handler

* packet post process (#5020)

* packet post process

* remove redundant writeRTX

* send out RTCP (NACK and RR) from packetPostProcess only

* handle FEC decoder on receiver restart (#5032)

* handle FEC decoder on receiver restart

* move onStreamRestartLocked into BufferBaseParams

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Raja Subramanian <raja.gobi@tutanota.com>
2026-10-22 13:58:04 -07:00
David Chen a390d03d28 Adding metrics for frame metadata use (#4687)
* adding observability metrics for frame metadata usage

* remove else if

* revert log additions

* revert

* rename for consistency

* remove redundant metrics

* add total track w/ packet trailer metric
2026-10-21 15:58:36 -07:00
Raja Subramanian 49414fe100 pion/webrtc deps for multi codec negotiation when media engine copy is disabled (#5038) 2026-10-21 22:56:30 +05:30
Raja SubramanianandClaude Opus 4.8 22f91ce383 Align SFU RPC caller timeouts with client SDK (#5037)
Pick up protocol#1879 (round-trip 7s, default response 15s) so a
server-initiated PerformRpc tolerates the same ack and response windows
as the client SDK caller.

Also log an RPC response the v1 caller cannot decode (compressed_payload
or data-stream) instead of dropping it, which otherwise surfaces only as
a response timeout.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-21 12:55:11 +05:30
Raja SubramanianandClaude Opus 4.8 a8afbd69bd Fix data race on global logger in sfu downtrack integration test (#5036)
TestDownTrackResumesAfterBandwidthPause called logger.InitFromConfig
(SetLogger) mid-run while the hwstats CPU monitor goroutine, started by
prometheus.Init in forwardstats_test, read the same non-atomic logger
package globals. go test -race flagged the write-vs-read and failed CI.

Set the global logger once in TestMain, before any test starts that
goroutine, and drop the per-test InitFromConfig.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-21 12:14:51 +05:30
Raja Subramanian 0a94c9cf9c Set the psrpc request timeout for PerformRpc (#5035) 2026-10-21 11:36:46 +05:30
kyle-livekitandClaude Opus 5.5 7c73bcc0c7 fix: build with Go 1.27.3 (eMudhra intermediate CA compromise) (#5034)
Go 1.27.3 includes crypto/x509 security fixes for the compromised eMudhra
intermediates. See https://emudhra.we-have-a-problem.com/.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 13:37:00 -07:00
cnderrauber 19b6c60347 Pick dtls server role when ice-lite is enabled (#5033)
Speed up the connection with warp/negotiated data channel
2026-10-20 21:48:45 +08:00
renovate[bot] 39622ccd99 fix(deps): update module github.com/quic-go/quic-go to v0.63.0 (#5028)
Generated by renovateBot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-19 14:56:53 -07:00
Raja SubramanianandClaude Fable 5.1 65f0c01d15 Echo offered video payload types in single peer connection answers (#5031)
* Echo offered video payload types in single peer connection answers

restrictReceiverCodecsToPublishList pinned server payload types on a video
sender that had no media section yet. The later answer then ignored the
payload types the client offered, and Firefox never decoded the track.
Skip transceivers with an empty mid. Fixes #5030.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* Shorten the mid guard comment

Point at sendersPendingConfig, which already documents the rule.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-19 23:36:43 +05:30
cnderrauber 7f6224d823 Use constant data channel ids in proto (#5029)
Also don't create neogitated channels in migration case.
2026-10-19 19:41:05 +08:00
Ben YounesandOra Agent 11d2736d86 Support file-backed username/credential for external TURN servers (#4784)
turn_servers already accepts secret_file for the dynamic (static-auth-secret)
mechanism, but the static username/credential pair could only be written inline
in the config, forcing deployments that mount secrets as files to inline them.

Add username_file and credential_file, resolved through a single helper shared
with secret_file: the inline value wins when both are set, file contents are
trimmed, an empty file fails startup, and credential_file must not be readable
by others. username_file carries no permission requirement because the username
is not a secret.

Co-authored-by: Ora Agent <noreply@oratelecom.net>
2026-10-19 16:00:00 +08:00
renovate[bot] 412d00a479 fix(deps): update module github.com/dustin/go-humanize to v1.1.0 (#5027)
Generated by renovateBot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-18 23:00:04 -07:00
renovate[bot] 39abf357a4 chore(deps): update module github.com/maxbrunsfeld/counterfeiter/v6 to v6.14.0 (#5025)
Generated by renovateBot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-18 22:43:42 -07:00
renovate[bot] d9f060affe chore(deps): update github workflows (#5024)
Generated by renovateBot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-18 21:28:02 -07:00
renovate[bot] 7d053b28ad fix(deps): update github.com/livekit/protocol digest to c45251b (#4914)
Generated by renovateBot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-18 21:16:11 -07:00
renovate[bot] b3e7f85816 fix(deps): update module github.com/moby/moby/client to v0.6.1 (#5023)
Generated by renovateBot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-18 21:15:36 -07:00
cnderrauber 4b0c9ece0a Use negotiated data channels in single PC mode (#5017)
* Use negotiated data channels in single PC mode

Bump the protocol version to 18. For protocol >= 18 single peer connection
clients, the server creates its publisher data channels as negotiated with
fixed IDs (100/101/102), so it can send on them without waiting for the
client's DCEP OPEN. Dual PC keeps the in-band channels.

* solve comment
2026-10-18 17:25:59 +08:00
Raja SubramanianandClaude Fable 5.1 cde3991916 sfu: reset dummy start offset on forwarder restart (#5019)
* sfu: reset dummy start offset on forwarder restart

Restart() kept dummyStartTSOffset. The next source switch recomputed it
from a refTS that already included the old offset, so every switch after
that was off by the old value and the subscriber's timestamp jumped.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* sfu: log extTimestamp in sequencer packet meta, add Chrome case to AV1 config test

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* sfu: do not apply dummy start offset without a reference layer

With skipReferenceTS, refTS is the last outgoing timestamp, which is
already on the downtrack's timeline. Computing and adding an offset there
re-added the gap between the last packet and a restart on every later
layer switch.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-16 19:04:20 +05:30
Miguel Delgado 103d7bec84 sfu: apply dummy start offset modulo 2^32 on source switch (#5018)
processSourceSwitch added dummyStartTSOffset to extRefTS in 64 bits. When
the offset is negative and the reference layer's 32-bit RTP timestamp has
wrapped but is still below |offset|, the addition borrows from the upper
half and extRefTS ends up 2^32 below the right value. The wrap correction
that follows only compares the lower 32 bits, so it cannot undo it.

The switch point then looks ~47,722 s (2^32 / 90 kHz) behind and is
rejected with errSwitchPointTooFarBehind on every keyframe, until the
reference layer's timestamp climbs past |offset|, which can take hours.

Apply the offset modulo 2^32 before restoring the cycles from extLastTS.
The lower 32 bits, and so the timestamp sent to subscribers, are unchanged.
2026-10-16 18:24:18 +05:30
cnderrauber 3d45aa2e87 Disable AV1 for firefox (#5015)
* Disable AV1 for firefox

* test
2026-10-15 09:28:42 +08:00