Building reproducible Python environments with XARs
Jane Street replaced a shared, mutable Conda environment on NFS with js-python, a system that builds Python environments centrally and deploys them as XAR files: single squashfs-based, Zstd-compressed images that mount as a normal file tree. Packing the environment into one file fixed kernel startup, which had taken minutes on NFS because imports read tens of thousands of files. Statically bundling internal Python libraries and OCaml bindings into each XAR means one code revision fully describes an environment, so rollouts and rollbacks cover everything at once, with immutable "stable" tags alongside a continuously deployed "nightly". The tradeoff is slow hotfixes (10–20 minutes to rebuild), handled by splitting code into immutable "core" inside the environment and editable "leaf" notebooks and scripts outside it.
Related posts
- How to create reproducible ZIPs for AWS Lambda
ClickHouse mediumAdept
Deterministic ZIP artifacts for AWS Lambda let Terraform/OpenTofu skip redeploying unchanged functions on every `tofu apply`. Byte-identical archives require sorting file order (with LC_ALL=c), excluding directories, resetting modification times with `touch` because `zip -X` still embeds timestamps, and stripping .pyc files whose bytecode varies by Python version and architecture. Since the `zip` binary produces different output on macOS and Linux, ClickHouse builds the archive with Python's `zipfile` module inside the official `public.ecr.aws/lambda/python` image and installs dependencies in a venv matching the Lambda Python version.
- Improving machine learning iteration speed with faster application build and packaging
Meta Engineering mediumAdeptMeta cut ML engineers' build and packaging overhead by double-digit percentages by tackling build non-determinism, pruning dependencies, and replacing monolithic XAR executables with an incremental Content Addressable Filesystem (CAF). Non-determinism from compilers and build rules is mitigated inside the Remote Execution service that Buck2 sends nearly all build actions to, so stable warm revisions can reuse cached outputs. CAF describes each executable as a flat manifest of content digests, skips uploads already in CAS, and fetches only missing content via per-host CAS daemons that share data peer-to-peer over Owl. Btrfs compression and copy-on-write keep on-disk size close to XAR while sharing files across executables. Planned next steps are lazy on-demand fetching (LazyCAF) and putting all ML engineers on uniform revisions to raise cache hit rates.
- Inside the Codex sandbox
OpenAI mediumAdept
Codex sandboxes agent-run commands in the user's own environment by using each OS's native sandboxing facilities rather than VMs or containers, so native toolchains like Xcode and the iOS simulator keep working. The default :workspace profile allows writes inside the workspace but keeps .git and .codex read-only, allows broad reads, and disables network access. That still leaves risks such as tampering with ignored node_modules, which is why OpenAI treats the sandbox as one layer of defense in depth. The post covers the cross-platform spawn API, per-command permission escalation in the exec_command tool, TOML permission profiles with filesystem and domain rules, a network proxy, and layered enterprise managed requirements, before describing enforcement on macOS, Linux and Windows.
- Advancing Our Chef Infrastructure: Safety Without Disruption
Slack Engineering mediumAdeptSlack split its single production Chef environment into six AZ-mapped environments (prod-1 to prod-6) so newly provisioned nodes no longer pull a possibly bad config from one shared source during scale-outs. prod-1 acts as an hourly canary taking the latest cookbook artifact, while prod-2 through prod-6 advance on a release train where a new version starts only after the previous one reaches prod-6. Because rollout timing is now variable, fixed cron-scheduled Chef runs were replaced by Chef Summoner, an on-node service that polls S3 signals written by Chef Librarian, applies a configurable splay, and still forces a run every 12 hours for compliance. The tradeoff is slower fleet-wide propagation in exchange for a smaller blast radius per AZ. Slack chose this over migrating to Chef Policyfiles to avoid making dozens of teams rewrite their cookbooks.
- How two engineer side projects became the agent taking action inside Dropbox
Dropbox Tech mediumAdeptDropbox's file-acting agent grew out of two engineer prototypes, a server-side sandbox with installed software and a desktop chat UI with permission controls, merged into one system. Each conversation gets a fresh VM restored from a QEMU memory snapshot via the Riviera content-processing platform, with Dropbox files mounted through rclone. The VM has no general internet access, and all outbound requests go through a proxy to host_tools outside the VM, which checks destinations, operations and user-granted folder permissions before attaching credentials. The UI speaks the Codex App Server JSON-RPC protocol (threads, turns, items), and an adapter lets the Pi harness reuse it. Every agent-made file version is tagged with its conversation so a turn can be undone precisely, with conflicting edits saved as renamed copies. 75% of workspaces are ready within 300 ms, and tools sit on a separate virtual disk so the snapshot needn't be rebuilt.