microsandbox-rb 0.12.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +82 -0
- data/Cargo.lock +993 -552
- data/README.md +39 -6
- data/ext/microsandbox/Cargo.toml +4 -4
- data/ext/microsandbox/src/backend.rs +22 -0
- data/ext/microsandbox/src/error.rs +4 -0
- data/ext/microsandbox/src/sandbox.rs +198 -9
- data/ext/microsandbox/src/snapshot.rs +10 -3
- data/ext/microsandbox/src/volume.rs +9 -0
- data/lib/microsandbox/backend_info.rb +46 -0
- data/lib/microsandbox/errors.rb +4 -0
- data/lib/microsandbox/root_disk.rb +24 -0
- data/lib/microsandbox/sandbox.rb +181 -9
- data/lib/microsandbox/snapshot.rb +12 -8
- data/lib/microsandbox/version.rb +2 -2
- data/lib/microsandbox/volume.rb +16 -0
- data/lib/microsandbox.rb +16 -3
- data/sig/microsandbox.rbs +29 -2
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7f062583f2c7fd83962ad03246dfbf6ad8c86be39756f75cf61c7c4a5e96d09e
|
|
4
|
+
data.tar.gz: 23cc401545bb10273d470af66f182f06e9c0be6956ccace5dc6d2b43de93c92d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b95c8b95460e7fdf03d95241e4e8d3c028a9656e00aeaefa7df28f387c7caaddecc767fae14bb82871d55074f7b24b841d739497cfbd430559c4cf9e8427214c
|
|
7
|
+
data.tar.gz: f780f6378522e1296eae3914687f7b77e534068f7c30b194f56603234920fff951dde5fade2201e5b94dd04ca3dc9a356f287c51339c694477aa6ff56ca90dfc
|
data/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,88 @@ All notable changes to this gem are documented here. The format is based on
|
|
|
6
6
|
microsandbox runtime it embeds; each release notes the upstream runtime tag it
|
|
7
7
|
wraps, and the README's Versioning section keeps the full gem→runtime map.
|
|
8
8
|
|
|
9
|
+
## [0.13.0] - 2026-08-18
|
|
10
|
+
|
|
11
|
+
Adopts upstream runtime **`v0.6.8` → `v0.6.9`**.
|
|
12
|
+
|
|
13
|
+
### Breaking
|
|
14
|
+
|
|
15
|
+
- **A bare `MSB_API_KEY` no longer selects the cloud backend** (upstream
|
|
16
|
+
backend-selection hardening: "a bare API key is credential material, not
|
|
17
|
+
backend intent"). Cloud intent must now be explicit: set `MSB_BACKEND=cloud`
|
|
18
|
+
(with a non-empty `MSB_API_KEY`), select a cloud profile, or call
|
|
19
|
+
`Microsandbox.set_default_backend(:cloud, ...)`. Code that relied on
|
|
20
|
+
exporting only `MSB_API_KEY` now silently runs on the **local** backend —
|
|
21
|
+
audit deployment environments when upgrading.
|
|
22
|
+
- **Invalid cloud configuration fails closed** instead of silently falling
|
|
23
|
+
back to local execution: `MSB_BACKEND=cloud` without a usable API key or
|
|
24
|
+
cloud profile raises {Microsandbox::InvalidConfigError} at first use rather
|
|
25
|
+
than dispatching sandboxes locally.
|
|
26
|
+
- **Snapshot payload integrity is opt-in** (upstream #1346). New snapshots no
|
|
27
|
+
longer record a content digest unless created with
|
|
28
|
+
`record_integrity: true` (previously documented as a no-op because schema-1
|
|
29
|
+
always recorded integrity — that default reversed upstream, as hashing
|
|
30
|
+
large allocated uppers is expensive). {Microsandbox::Snapshot.verify} on a
|
|
31
|
+
snapshot without recorded integrity now reports
|
|
32
|
+
`SnapshotVerifyReport#status == :not_recorded` (with `#algorithm` /
|
|
33
|
+
`#content_digest` nil, `#verified?` false) instead of always `:verified`.
|
|
34
|
+
|
|
35
|
+
### Added
|
|
36
|
+
|
|
37
|
+
`v0.6.9` SDK parity (matching the official Python binding surface):
|
|
38
|
+
|
|
39
|
+
- **Default-workload execution** — `Sandbox.create` is strictly boot-only, so
|
|
40
|
+
the image's resolved OCI `ENTRYPOINT`+`CMD` now runs via
|
|
41
|
+
{Microsandbox::Sandbox#exec_default} (buffered),
|
|
42
|
+
{Microsandbox::Sandbox#exec_default_stream} (streaming), and
|
|
43
|
+
{Microsandbox::Sandbox#attach_default} (interactive). New
|
|
44
|
+
{Microsandbox::NoDefaultCommandError} when the image resolves no executable
|
|
45
|
+
command. New `cmd:` create keyword overrides the durable image CMD (an
|
|
46
|
+
explicit `[]` clears it) without executing anything at create time.
|
|
47
|
+
- **Flat OCI root disks** — `RootDisk.flat(size_mib, fstype:, clone:)` boots
|
|
48
|
+
from a single complete ext4 root disk materialized from the OCI image
|
|
49
|
+
(skips the overlay stack; content-addressed and cached; `clone:` picks
|
|
50
|
+
`:auto`/`:copy`/`:reflink` private-disk cloning).
|
|
51
|
+
- **Root-disk resizing** — `modify(root_disk_size:)` grows the managed upper
|
|
52
|
+
or flat root disk (MiB).
|
|
53
|
+
- **Per-sandbox network rate limits** — `rate_limiter:` create keyword with
|
|
54
|
+
per-direction (`egress:`/`ingress:`) `bandwidth:`/`ops:` token buckets
|
|
55
|
+
(`size:`, `refill_time_ms:`, `one_time_burst:`).
|
|
56
|
+
- **Host vsock routes** — `vsock:` create keyword exposes host Unix sockets
|
|
57
|
+
on guest-to-host vsock ports: `{ "/host/api.sock" => 5000 }` or an Array of
|
|
58
|
+
`{host_socket:, port:, socket_type: :stream|:dgram}`.
|
|
59
|
+
- **Active backend context** — {Microsandbox.default_backend_info} returns a
|
|
60
|
+
secret-safe {Microsandbox::BackendInfo} (`kind`, `api_url`, `source`,
|
|
61
|
+
`profile`; never the API key).
|
|
62
|
+
- **Default volume** — {Microsandbox::Volume.get_default} (cloud backend;
|
|
63
|
+
local raises {Microsandbox::UnsupportedError}) and
|
|
64
|
+
`VolumeInfo#default?`. The full `VolumeInfo#fs` surface works against cloud
|
|
65
|
+
default and managed directory volumes as of `v0.6.9`.
|
|
66
|
+
|
|
67
|
+
Not exposed, matching the official Python binding at `v0.6.9`:
|
|
68
|
+
`DeploymentProfile`/CPU-placement/THP create options (upstream wires them via
|
|
69
|
+
`config.json`/CLI only so far) and the Rust-only sparse
|
|
70
|
+
`SandboxConfigPatch`/`builder.configure` surface.
|
|
71
|
+
|
|
72
|
+
### Fixed
|
|
73
|
+
|
|
74
|
+
- `entrypoint: []` now clears the image's `ENTRYPOINT` (blocking the
|
|
75
|
+
image-config merge), matching the upstream builder contract and the Python
|
|
76
|
+
binding. Previously the empty array was silently dropped in the native
|
|
77
|
+
layer, so the image ENTRYPOINT survived — observable under the new
|
|
78
|
+
`exec_default`/`attach_default`, which would have run the wrong command.
|
|
79
|
+
`nil` (the default) still inherits the image value.
|
|
80
|
+
|
|
81
|
+
### Runtime
|
|
82
|
+
|
|
83
|
+
- Upstream `v0.6.9` runtime changes carried without further Ruby surface
|
|
84
|
+
change: NUMA-aware placement profiles, degraded placement under pressure,
|
|
85
|
+
integrated host performance stack (topology-aware CPU placement, THP
|
|
86
|
+
policy, bounded block writeback), long-link-target preservation in saved
|
|
87
|
+
image archives, nested OCI image index loads, backpressured published-port
|
|
88
|
+
data preservation, DNS network-rule parsing in release builds, and
|
|
89
|
+
child-process reaping in `agentd`.
|
|
90
|
+
|
|
9
91
|
## [0.12.0] - 2026-07-30
|
|
10
92
|
|
|
11
93
|
Adopts upstream runtime **`v0.6.7` → `v0.6.8`** and mirrors its breaking SDK
|