Skip to content

Conversation

@moperacz
Copy link
Contributor

@moperacz moperacz commented Oct 20, 2025

Summary

  • overhaul persistent runtime management: introduce persistent::{BundlePool, BundleArtifact, PythonIsolate} with richer telemetry, host callbacks, and guard-rail enforcement while keeping the legacy pool as a thin wrapper
  • tighten sandboxing/diagnostics: add network allowlist enforcement for JavaScript, expose filesystem/network usage and reset summaries through Diagnostics/SandboxTelemetry, and extend tests to cover new failure paths
  • ship a dedicated perf harness (aardvark-perf) plus fixtures, Makefile helpers, and documentation so RawCtx vs JSON performance trade-offs are measurable out of the box
  • refresh documentation for newcomers (lifecycle overview, sandboxing, JSON vs RawCtx guide) and surface the new workflow/telemetry guidance across README, API, and dev docs

Testing

  • cargo fmt
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace
  • make perf-all ITERATIONS=5

Copilot AI review requested due to automatic review settings October 20, 2025 19:27
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refines the sandbox documentation and adds practical guidance for choosing between JSON and RawCtx invocation strategies. It also updates tooling and test coverage to support the new persistent-pool workflow.

Key changes:

  • Introduced newcomer-friendly lifecycle/roadmap docs and linked the architecture overview to them
  • Added JSON vs RawCtx strategy trade-off guide
  • Updated Makefile defaults and perf harness to Python 3.13
  • Refreshed diagnostics guidance with reset + memory telemetry details

Reviewed Changes

Copilot reviewed 72 out of 76 changed files in this pull request and generated no comments.

Show a summary per file
File Description
xtask/src/main.rs Simplified CLI build logic by removing multi-variant support
perf/scripts/render_markdown.py Added Markdown rendering script for benchmark JSON output
perf/runner/src/perf/mod.rs Introduced performance test fixture helpers
perf/runner/src/main.rs Added comprehensive performance harness with pool/reset modes
perf/runner/Cargo.toml Added dependencies for performance runner
perf/fixtures/scenarios/*.py Added benchmark scenarios for echo/numpy/pandas/tensor
docs/perf/report.md Added sample performance report
docs/perf/overview.md Added performance benchmark documentation
docs/dev/workflow.md Updated workflow with sandbox regression tests and tracing tips
docs/dev/runtime-internals.md Added benchmarking basics and threading/pooling model documentation
docs/dev/environment.md Updated Pyodide setup instructions
docs/dev/README.md Removed triage.md reference
docs/architecture/what-this-is.md Added newcomer-friendly overview
docs/architecture/telemetry.md Updated telemetry documentation with reset and memory metrics
docs/architecture/sandboxing.md Updated sandboxing documentation with isolation gaps
docs/architecture/runtime-lifecycle.md Added persistent isolate details and reset visibility
docs/architecture/roadmap.md Added roadmap document
docs/architecture/packages-and-snapshots.md Updated Pyodide references
docs/architecture/overview.md Enhanced architecture overview with reset and guard rail details
docs/architecture/lifecycle.md Added lifecycle documentation with isolation mitigations
docs/api/rust-host.md Updated host API documentation with persistent isolates and pool migration
docs/api/python-handlers.md Added zero-copy output buffer documentation
docs/api/overview.md Added JSON vs RawCtx guide reference
docs/api/manifest.md Updated Pyodide references
docs/api/json-vs-rawctx.md Added JSON vs RawCtx strategy comparison guide
docs/api/diagnostics.md Updated diagnostics with reset and memory telemetry
crates/aardvark-core/tests/telemetry.rs Added pool telemetry tests
crates/aardvark-core/tests/runtime_pool_and_outcome.rs Added persistent isolate and bundle pool tests
crates/aardvark-core/src/strategy.rs Added output buffer allocation helper and cached RawCtx spec
crates/aardvark-core/src/session.rs Added RawCtx spec caching
crates/aardvark-core/src/runtime/python.rs Added overlay preload support and package tracking
crates/aardvark-core/src/runtime/mod.rs Added reset telemetry and module cleanup
crates/aardvark-core/src/runtime/javascript.rs Added reset_in_place support
crates/aardvark-core/src/py/entropy/entropy_import_context.py Fixed tempfile restore for warm snapshots
crates/aardvark-core/src/pool.rs Added PoolResetMode enum
crates/aardvark-core/src/persistent/mod.rs Added persistent module exports
crates/aardvark-core/src/outcome.rs Added ResetSummary and ResetMode
crates/aardvark-core/Cargo.toml Added dependencies for persistent pools

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@moperacz moperacz changed the title Refine sandbox docs and add JSON vs RawCtx guidance Add persistent runtime pools, hardened sandbox telemetry, and perf harness Oct 20, 2025
@moperacz moperacz merged commit fee4aec into master Oct 20, 2025
1 check passed
@moperacz moperacz deleted the speed-v3 branch October 20, 2025 19:41
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.

2 participants