Skip to content

chore(website), perf(runtime): SvelteKit 3.4.0 security bump and event-driven I/O readiness - #338

Merged
pouya-eghbali merged 4 commits into
developfrom
fix/sveltekit-and-net-readiness
Nov 25, 2026
Merged

pouya-eghbali merged 4 commits into
developfrom
fix/sveltekit-and-net-readiness

Conversation

@pouya-eghbali

Copy link
Copy Markdown
Member

Summary

  1. Resolve Dependabot & bun audit Advisories (@sveltejs/kit 3.4.0)

    • Upgrades @sveltejs/kit (^3.4.0), @sveltejs/adapter-static (^4.0.1), @sveltejs/vite-plugin-svelte (^7.3.2), svelte (^5.57.1), vite (^8.3.8), and @tailwindcss/vite / tailwindcss (^4.3.5) in apps/website, plus root overrides (@sveltejs/kit, dompurify, katex, lodash-es) to bring bun audit from 13 advisories down to 0 vulnerabilities (resolving Dependabot alerts #402, #403, #404).
    • Migrates apps/website to SvelteKit 3 conventions: moves adapter-static directly into sveltekit({ ... }) in apps/website/vite.config.ts (removing legacy svelte.config.js), switches +error.svelte from $app/stores to $app/state, adopts #lib/* Node subpath imports across website sources, and keeps a Vite $lib alias for @tiramisu-docs/kit source components.
  2. Event-Driven Socket & File Readiness (std/net & FileSystem Runtime)

    • Adds native/runtime/SocketPoller.h (kqueue on macOS, epoll + eventfd on Linux, WSAPoll on Windows) with bounded 1024-slot capacity, zero runtime heap allocations, ABA-safe generation tickets, full-duplex reader/writer co-registration for split TCP streams (split -> takeReader + takeWriter), std::shared_ptr<tcp::Socket> descriptor lifetime pinning while monitored, and <= 5 ms bounded wait slices so task cancellation never blocks on idle peers.
    • Updates native/runtime/FileSystem.cpp and native/runtime/TcpOperations.inc to distinguish PauseKind::{Yield, Executor, Socket, Timer} on Operation:
      • Socket backpressure (EAGAIN / EWOULDBLOCK / EINPROGRESS): wakes via SocketPoller on OS readiness instead of a blind 5 ms sleep.
      • Background Executor completion: signals ExternalCompletion (or waiterCv in closed synchronous mode) immediately when the worker finishes while retaining a cancellable 5 ms safety ticket in case an OS call blocks during cancellation.
      • Ready-socket fairness turns (socketBytes 16-turn cap / try_to_lock contention): yields immediately to the tail of the scheduler FIFO ready queue (0 ms artificial delay).
    • Measured impact (TcpSourceTests.py 4.2 MiB full-duplex exchange): drops from ~850 ms (~4.9 MiB/s) to 20 ms (~200 MiB/s, ~42x faster) on 4 workers (65 ms on 1 worker), and cuts 2,000-iteration native-filesystem-source-* runs to 18.9s–25.7s.

Verification

  • bun audit (0 vulnerabilities found)
  • bun run check (prettier, tsc, svelte-kit sync, svelte-check 0 errors / 0 warnings, bun test, vite build static prerender)
  • bun run verify:docs -- --tools build/native/native (52 pages, 155 native examples, 125 executable CPU programs)
  • ctest across native-tcp-lifecycle, native-tcp-source-{debug,optimized,sanitized,thread-sanitized}, native-stream-source-{debug,optimized,sanitized}, native-process-runtime-{debug,optimized,sanitized,thread-sanitized}, native-process-streams-{debug,optimized,sanitized,thread-sanitized}, native-filesystem-runtime-{debug,optimized,sanitized,thread-sanitized}, native-filesystem-source-{debug,optimized,sanitized}, native-resumable-calls-{debug,optimized,sanitized,thread-sanitized}, and native-subscription-lifecycle (28/28 passed)

@pouya-eghbali
pouya-eghbali merged commit 4115e01 into develop Nov 25, 2026
14 checks passed
@pouya-eghbali
pouya-eghbali deleted the fix/sveltekit-and-net-readiness branch November 25, 2026 20:00
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