Skip to content

fix(engine): harden fs OCap, VFS tombstones, asymmetric crypto, and WinterTC hot path - #71

Merged
siktec-lab merged 6 commits into
mainfrom
fix/fs-ocap-and-vfs-isolation
Nov 12, 2026
Merged

siktec-lab merged 6 commits into
mainfrom
fix/fs-ocap-and-vfs-isolation

Conversation

@siktec-lab

Copy link
Copy Markdown
Collaborator

Summary

  1. Deny-by-Default Filesystem OCap & CoW VFS Tombstone Isolation:

    • Enforced strict deny-by-default filesystem capability tokens across CapabilityToken::pure_compute(), Slice.evalSandbox, slice eval, slice serve, and slice mcp unless explicit --allow-read / --allow-write flags or slice.toml capabilities are configured (slice test retains isolated /tmp and /vfs scratch access).
    • Added copy-on-write VFS deletion tombstones (BOA_VFS_TOMBSTONES) so unlinkSync, rmSync, rmdirSync, and renameSync mask paths in memory without deleting underlying host files, with O(1) rollback on Slice.restore().
  2. Multi-Frame Source-Mapped Stack Traces & Class Method Spans (#60):

    • Extended //#[SLICE_SMAP_V1] source mapping in slice-cas and stack trace formatting in slice-engine to map multi-frame uncaught call stacks and class/object methods back to original TypeScript files and line numbers.
    • Aligned global line-offset accounting across pre-fused SLICEBC\x01 prelude shards for Slice.evalSandbox and source execution.
  3. WinterTC fetch Hot-Path Latency Optimization (#62):

    • Optimized SliceIsolate::dispatch_http_request with lazy header materialization, direct synchronous Response extraction, and conditional event-loop draining (154,737 req/s Tier-1 WinterTC HTTP/1.1 keep-alive throughput; 6.46 us/req average latency).
  4. Asymmetric Cryptography Hardening (RSA 2048..8192 & RFC 7748 X25519):

    • Removed static RSA-2048 keys and disabled unbounded runtime RSA/DSA key generation in the multi-tenant edge sandbox (ERR_CRYPTO_UNSUPPORTED_OPERATION / NotSupportedError / ERR_INVALID_ARG_VALUE).
    • Implemented dynamic 2048 to 8192-bit ASN.1 DER (PKCS#8, PKCS#1, SPKI) and JWK RSA import/export plus ring-backed RSASSA-PKCS1-v1_5 and RSA-PSS (SHA-256, SHA-384, SHA-512) signing and verification across node:crypto and crypto.subtle.
    • Implemented constant-time RFC 7748 X25519 key generation, PKCS#8 v1/v2 + SPKI + JWK + raw codecs, crypto.diffieHellman, and crypto.subtle X25519 (deriveBits, deriveKey) via x25519-dalek with constant-time low-order public point rejection.
    • Aligned COMPATIBILITY.md and docs/ with exact runtime behavior.
  5. Full 33-Workload Benchmark Suite Refresh:

    • Regenerated tests/reports/latest.md (bench_v0.10.12_20261112_020639Z_4c5089a.md) and synchronized benchmark tables across README.md, tests/README.md, and docs/general/09_benchmarks_testing_and_docker_suite.md.

Closes #60
Closes #62

Verification

  • cargo clippy --workspace --all-targets -- -D warnings: 0 warnings
  • cargo test --workspace: 208/208 passed
  • slice verify-security: 5/5 attack vectors deterministically contained
  • Full 33-workload Linux x86_64 Docker benchmark suite:
    • Isolate Cold-Start (Min / P50 / P99): 0.94 us / 1.24 us / 2.10 us
    • 1,000-Tenant MicroVM Swarm: 1.50 ms (4.0 KB per-tenant compartment)
    • slice serve Tier-1 WinterTC Throughput: 154,737 req/s (1.60x vs Bun.serve, 2.71x vs Node.js)
    • 33/33 wins vs Deno & Node.js, 29/33 cold & 33/33 --warm wins vs Bun

@siktec-lab
siktec-lab merged commit 8aa4054 into main Nov 12, 2026
3 checks passed
@siktec-lab
siktec-lab deleted the fix/fs-ocap-and-vfs-isolation branch November 12, 2026 02:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants