feat: support chunked transfers and consolidate relay hardening - #28
Open
sidmorizon wants to merge 5 commits into
Open
sidmorizon wants to merge 5 commits into
sidmorizon wants to merge 5 commits into
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
This was referenced Sep 17, 2026
sidmorizon
marked this pull request as ready for review
September 17, 2026 08:43
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The relay's three-second per-method limit rejects consecutive Prime Transfer chunks. This change adds bounded chunk forwarding for actual transfer progress, closes message-envelope and response-channel abuse paths, fixes disconnect-during-join admission, combines #26/#27, and consolidates all ten dependency update PRs.
Transfer progress and compatibility
chunkedTransferVersion: 1in successful room-join responses.sendTransferChunkrequests per connection per second, with at most 64 KiB Base64 data and 72 KiB for the entire JSON envelope. Validate transfer ID, index, and parameters. Invalid chunk input returns 1001; actual chunk throttling returns 1100.Historical client binaries have not been tested across every version combination.
Relay security: #26 and #27
getRoomUserswith a per-connection token bucket (capacity 10, refill 5/second), allowing shipped App pairing/UI queries to overlap with one-second CLI polling. Notify existing room members withuser-joinedafter the peer has joined.E2eeErrorserialization. Server crash logging remains available.credentials: true, including credentialed browser polling; remove the unused allowlist configuration. Retain server-generated room-key fields for wire compatibility.MAX_MESSAGE_SIZE(default 10 MiB).The security fixes are integrated without duplicating their membership checks or bypassing the chunk size/rate limits.
Dependency consolidation and ESLint migration
Several resolved versions include newer compatible patches than the original PR targets. ESLint is intentionally upgraded to the current stable 10.10.0 rather than the older target in #12. Migrate to a shared flat config and typescript-eslint 8.70.0, adapt source typing and obsolete suppressions, and lint source/tests across all workspaces with zero warnings. Pin Yarn 4.14.1 and regenerate the existing lockfile format without copying the old Dependabot lockfile-format churn. No permanent resolution overrides are added.
Validation
yarn install --immutablepasses.yarn lintpasses on ESLint 10.10.0, with zero warnings.yarn workspaces foreach --all --exclude @onekeyhq/monorepo run buildpasses.withCredentialsboth false and true. These use actual bridge source and synthetic data, not every historical app binary.getTransferType; genuine errors and cancellation do not silently fall back. The App fix and derived max-chunk constant are maintained in the App worktree, outside this server PR; the full App commit gate passes.git diff --checkpasses.The full recursive dependency audit is not clean: it reports 62 entries across 23 packages (including deprecation notices). Every reported package/version was already present in the pre-consolidation lockfile; this PR does not resolve the repository's entire existing dependency backlog. Examples include engine.io 6.6.4, mongoose 8.17.1, and older minimatch 5.x/9.x paths. Install also retains existing third-party peer warnings.
Consolidates #7, #12, #14, #16, #18, #20, #21, #22, #23, #24, #26, and #27. The original PRs have been closed after consolidation, with references to this PR. This PR remains pending merge.
Related requirement: OK-63101. This PR is not a production deployment.