microsandbox-rb 0.11.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 05d5b2e1200b6aff7dc7801259558a202064a01cac529ea55f2390790b7f84bb
4
- data.tar.gz: d4d357393a51e2b642dd9d6fc6e899a6a92a3895bf98495a01714fbdbb76c0ed
3
+ metadata.gz: 7f062583f2c7fd83962ad03246dfbf6ad8c86be39756f75cf61c7c4a5e96d09e
4
+ data.tar.gz: 23cc401545bb10273d470af66f182f06e9c0be6956ccace5dc6d2b43de93c92d
5
5
  SHA512:
6
- metadata.gz: 994d487f8a606de2664566519ba28964fcc1053e9277b768945472dfac105d34a48479b1677d8598fde596b4d5c9f37a31970d2cf3e3a2065f98a12fdfe85322
7
- data.tar.gz: c0d57191ef9fc97845c773216dd19194dbad4dd0c58f3525989d16df0c37088749fe880ccd89b53d71f9f9454c149429886de208b36cda2de4210f23b4bc05f8
6
+ metadata.gz: b95c8b95460e7fdf03d95241e4e8d3c028a9656e00aeaefa7df28f387c7caaddecc767fae14bb82871d55074f7b24b841d739497cfbd430559c4cf9e8427214c
7
+ data.tar.gz: f780f6378522e1296eae3914687f7b77e534068f7c30b194f56603234920fff951dde5fade2201e5b94dd04ca3dc9a356f287c51339c694477aa6ff56ca90dfc
data/CHANGELOG.md CHANGED
@@ -6,6 +6,132 @@ 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
+
91
+ ## [0.12.0] - 2026-07-30
92
+
93
+ Adopts upstream runtime **`v0.6.7` → `v0.6.8`** and mirrors its breaking SDK
94
+ surface (upstream #1232 "unify cloud backend and paginated listings"), keeping
95
+ parity with the Python/Node SDKs.
96
+
97
+ ### Breaking
98
+
99
+ - **Sandbox listing is cursor-paginated** (upstream #1232). `Sandbox.list` and
100
+ `Sandbox.list_with` now return a {Microsandbox::SandboxPage} — an Enumerable
101
+ page of `SandboxHandle`s carrying `#next_cursor` — instead of a plain Array.
102
+ `Sandbox.list` fetches the first page (upstream default size 20);
103
+ `Sandbox.list_with` gains `limit:` (1..100) and `cursor:` keywords alongside
104
+ the existing `labels:` filter. Code that only enumerates
105
+ (`list.each`/`map`/`to_a`) keeps working; code relying on the return value
106
+ *being* an Array (e.g. `list + other`, `Array ===`) must adapt, and listings
107
+ of more than one page must follow `page.next_cursor` via
108
+ `list_with(cursor:)`.
109
+ - **`UnsupportedError` messages are re-keyed by structured operations**
110
+ (upstream #1232): the core now reports the rejected API and a remedial hint
111
+ (e.g. `image.list is not supported by this backend: use a local backend`)
112
+ instead of the old free-text `feature`/`available_when` pair. The exception
113
+ additionally exposes the new structured attributes below.
114
+
115
+ ### Added
116
+
117
+ - {Microsandbox::SandboxPage} — Enumerable over its `#sandboxes`, plus
118
+ `#next_cursor`, `#size`/`#length`, `#empty?` and `#last_page?`.
119
+ - `Sandbox.list_with(labels:, limit:, cursor:)` pagination keywords.
120
+ - `UnsupportedError#operation` / `#hint` — the rejected API in Ruby rendering
121
+ (`"sandbox.kill"`) and the remedial hint (`"use a local backend"`),
122
+ mirroring the Python SDK's enriched `UnsupportedError`.
123
+
124
+ ### Changed
125
+
126
+ - Direct `VolumeFs` operations now route through the backend's volume trait
127
+ (upstream #1232) instead of a construction-time local-backend guard, so an
128
+ unsupported backend rejects each operation with a precise per-operation
129
+ error.
130
+ - The embedded runtime is `v0.6.8`; see the upstream release notes for
131
+ runtime-side changes (shared log registry for followed streams, cloud
132
+ sandbox reconnect fixes for `exec`/`ssh`, kernel sourced from
133
+ cdn.kernel.org).
134
+
9
135
  ## [0.11.0] - 2026-07-27
10
136
 
11
137
  Adopts upstream runtime **`v0.6.6` → `v0.6.7`** and mirrors its breaking SDK