Skip to content

[MERGE] various improvements and cleanups - #35

Open
ThanhDodeurOdoo wants to merge 15 commits into
masterfrom
master-sfu-improvements-tso
Open

[MERGE] various improvements and cleanups#35
ThanhDodeurOdoo wants to merge 15 commits into
masterfrom
master-sfu-improvements-tso

Conversation

@ThanhDodeurOdoo

Copy link
Copy Markdown
Member

various improvements taken out of the recording PR

CPU and heap profiles need a predictable ignored output location.

Add commands that write Node profiles under profiling.
The lint and build configuration targets older TypeScript and Node
definitions.

Update the compiler stack and align its formatting rules. Keep the
package version unchanged until the recording feature lands.
Bus requests return untyped serializable values even though each request
name defines one response contract.

Map existing request names to response types and use that map in Bus.
Keep recording requests out of the shared contract until recording
lands.
A thrown or missing request handler leaves the caller waiting for its
timeout.

Mark failed responses on the wire and reject the matching pending
request.
JWT helpers accept ambiguous private claims and emit padded Base64
segments. Tokens can also omit their expiration.

Type claims at each call site. Use Base64url and require a finite future
expiration while keeping recording encryption out of this change.
Upload failures keep scheduling retries after the client reaches its
error limit. Tests also cannot observe when one failure has been
handled.

Stop retry scheduling when recovery restarts the connection. Emit a
handled error event and remove the browser-only timer reference.
Failed authentication and early disconnects can leave sockets in the
pending or authenticated registries.

Normalize authentication payloads and clear pending state on every exit.
Track a socket as authenticated only after session creation succeeds.
Running the mediasoup io_uring backend in our deployment requires an
unconfined Docker seccomp profile. The deployment security policy
forbids that profile.

Disable liburing so workers run under the required confined profile.
Empty channels currently retain their worker resources for one hour.

Close them after one minute. Keep the policy change visible outside the
recording implementation.
Concurrent channel creation and asynchronous service teardown could
leave duplicate channels or open transports. Test fixtures also depended
on fixed ports and timing sleeps.

Coalesce channel creation, make shutdown awaitable and use deterministic
local test fixtures. Keep the RTC service at its old path so the
directory move remains isolated.
@ThanhDodeurOdoo

Copy link
Copy Markdown
Member Author

@alexkuhn @seb-odoo @nim-odoo I split a few improvements/fixes that I had made when working on the recording PR

The README mixed setup, HTTP, client and signaling details in one long
document. This made each interface harder to find and maintain.

Move the existing non-recording material into focused client, HTTP and
network-flow documents. Recording documentation remains reserved for the
feature commit.
The lockfile pins dependency versions reported as vulnerable by npm.

Refresh compatible resolutions within the declared dependency ranges.

Leave out-of-range development dependency upgrades for separate work.
@ThanhDodeurOdoo
ThanhDodeurOdoo force-pushed the master-sfu-improvements-tso branch from 74c58d0 to 7c31b4a Compare August 31, 2026 08:22
@ThanhDodeurOdoo
ThanhDodeurOdoo marked this pull request as ready for review August 31, 2026 08:37
Odoo needs the recording-facing client contract before the recording
backend can be deployed from an approved SFU branch.

Send disabled recording capabilities and state in the WebSocket startup
message. Keep the new client compatible with older empty acknowledgements.

Expose start and stop methods that warn and return false until recording
support lands.

lines of code

Most additions are protocol documentation and tests for both startup
formats. The client and server changes add the shared contract and inert
compatibility surface.
Odoo provisions SFU channels with keySeed and signs client JWTs with
the matching derived key. Without the same derivation the SFU cannot
authenticate those clients.

Derive HMAC-SHA256 channel keys from AUTH_KEY and a non-empty seed.
Keep legacy key and global-key fallbacks for compatibility.

Cover Odoo interoperability vectors plus seed precedence and empty-seed
fallback behavior.
This only implements the recording API for the client,
if the client attempts to start a recording, the SFU only
answers that it's not allowed (since the feature is not implemented)
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