microsandbox-rb 0.14.0 → 0.16.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: 5347e3ff3b98575cd98ee948fce387efc1bde98da5069fb808ed62e8d065a066
4
- data.tar.gz: 4c143ec287857130709632f19d124c56488fd22837215a85e61e7c52da609884
3
+ metadata.gz: 011c5bcfdd4eff6b2f86ec6ded70720520b5c77d93ceb575dc4ac9b0ce0a5078
4
+ data.tar.gz: 2e84a073bd4852e2cdbc124f4ce6b400beb5b20012c6b9ff81833169f13d58e1
5
5
  SHA512:
6
- metadata.gz: f4d810f63d588b685b0393e93d637fa28554bdbfbf34a09b0b5d0ca45a4962acd9ac9991e0e6bd8157e5ef31b9cf4321d6dd20a703ad7d251099b1d4a951f346
7
- data.tar.gz: f89447fa04f1bd6112199a7286101c26e1c2bed28d66d08816d171298f357ee412474207b60782b8592838f5191914657adafa3b89745dec9600552cb0507e1b
6
+ metadata.gz: 6a12d8b308f479630dc8b266c3129bb7e337939da1963faf975fda7ebb890fe95d50ccbf77b37e9f33d3ccb0506dd94633e0374ac6c52cac599c6c80348ee931
7
+ data.tar.gz: 730a26aef15b87d348e95a23ede127520aee10d410856526f956d3366118959dc51f60d418e7c876781191be0c72009daafaa442a353afc6b6010643adf1a46f
data/CHANGELOG.md CHANGED
@@ -6,6 +6,137 @@ 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.16.0] - 2026-09-01
10
+
11
+ Adopts upstream runtime **`v0.6.14` → `v0.6.16`**, stepping through the
12
+ intermediate tag (`v0.6.15` verified and committed on its own).
13
+
14
+ ### Added
15
+
16
+ - Per-mount fallback ownership: a bind or named mount in `volumes:` accepts
17
+ `uid:`/`gid:`, pinning the guest owner presented for host files that carry no
18
+ per-file stat override (upstream #1451, `v0.6.15`). They travel on the wire as
19
+ the core's `override_uid`/`override_gid` and mirror the Python SDK's public
20
+ `uid:`/`gid:` spelling. Validation matches the Python SDK: the pair must be
21
+ given together, each must be a plain `Integer` in `0..4294967295` (strings,
22
+ Floats and Booleans are rejected rather than coerced — a truncated or parsed
23
+ owner ID is never what the caller meant), and they conflict with both
24
+ `stat_virtualization: :off` (no overlay to rewrite the owner in) and
25
+ tmpfs/disk mounts. The one Python rule with no Ruby counterpart is
26
+ "unsupported for disk-backed named volumes": a Ruby `{ named: "vol" }` spec
27
+ only references an existing volume by name, so the volume's kind is known
28
+ only to the core, which rejects that combination at create time.
29
+ - **Convergent lifecycle APIs** (upstream #1462, `v0.6.16`) — idempotent
30
+ operations that take a name to the state you want, whatever state it is in
31
+ now:
32
+ - `Sandbox.connect_or_create(name, **kwargs)` — connect to (and start) the
33
+ persisted sandbox with this name, or create it when none exists; concurrent
34
+ callers converge on the winning identity instead of one losing to a name
35
+ clash. Takes exactly `create`'s keyword options — the same normalization
36
+ path, not a second copy of it — and they apply only when a create actually
37
+ happens. The block form yields the sandbox and then stops it **only when the
38
+ call owns its lifecycle** — a deliberate divergence from `create`, whose
39
+ block form always stops: `connect_or_create` can hand back a sandbox this
40
+ process did not start, and tearing down someone else's long-lived service on
41
+ the way out of a block is never what the caller meant. So a sandbox created
42
+ here is stopped as usual; one merely *connected* to, or started with
43
+ `detached: true`, is left running. `replace:` / `replace_with_timeout:` are
44
+ accepted for kwargs parity but rejected by the core with
45
+ `InvalidConfigError`: replacing a sandbox is the opposite of converging
46
+ on it.
47
+ - `Sandbox#id` and `SandboxHandle#id` — the opaque, backend-assigned identity
48
+ of the *persisted* sandbox. Names are reusable labels; this changes when a
49
+ name is removed and recreated.
50
+ - `Sandbox#wait_for_status(status)` and `SandboxHandle#wait_for_status(status)`
51
+ — block until this exact sandbox reaches one of `:created`, `:starting`,
52
+ `:running`, `:draining`, `:paused`, `:stopped`, `:crashed`, returning a fresh
53
+ `SandboxHandle` (from both receivers, mirroring the official SDKs). There is
54
+ no built-in timeout and the wait is uninterruptible from Ruby (the native
55
+ call releases the GVL with no unblock function), so an unknown status name
56
+ raises `ArgumentError` up front rather than blocking forever — and only
57
+ states the active backend can reach are worth waiting for (`:created` and
58
+ `:paused` are cloud-side). Impose a deadline by running the call on its own
59
+ Thread.
60
+ - `Sandbox#restart(force:, timeout:, detached:)` and
61
+ `SandboxHandle#restart(...)` — stop and start this exact sandbox, returning a
62
+ new live `Sandbox`.
63
+ - `Sandbox#destroy(force:, timeout:)` and `SandboxHandle#destroy(...)` — stop
64
+ and remove this exact sandbox in one step.
65
+ - `SandboxHandle#connect_or_start(detached:)` — connect when the sandbox is
66
+ running, wait while it is starting, start it when it is created/stopped/
67
+ crashed.
68
+ - `Microsandbox::SandboxReplacedError` (code `"sandbox-replaced"`) — raised by
69
+ every one of the identity-checked operations above when the name now refers to
70
+ a different persisted sandbox, instead of quietly acting on the replacement.
71
+ Mirrors the Python SDK's `SandboxReplacedError`; wired into the native
72
+ error-code mapping like the other `sandbox-*` codes.
73
+
74
+ ### Fixed
75
+
76
+ - **The live `Sandbox#stop` no longer stops a same-name replacement.** The
77
+ binding re-fetched a `SandboxHandle` *by name* and stopped that — a pattern
78
+ left over from before the core's live `stop` was identity-scoped. As of
79
+ runtime v0.6.16 the core routes `stop` → `request_stop` →
80
+ `stop_identified(name, self.identity())`, so the fix is to route through the
81
+ live sandbox (`self.inner.stop()`) the way `kill`/`drain`/`wait`/
82
+ `stop_and_wait` already did, and the way both official bindings do. A sandbox
83
+ removed and recreated under the same name now raises `SandboxReplacedError`
84
+ (or `SandboxNotFoundError` when nothing holds the name) instead of terminating
85
+ whoever answers to it. This also hardens `Sandbox.connect_or_create`'s block
86
+ form, whose teardown calls `#stop`.
87
+ - **Operations that can boot a microVM now provision the runtime first.**
88
+ `SandboxHandle#connect_or_start`, `SandboxHandle#restart` and
89
+ `Sandbox#restart` were missing the `ensure_runtime!` call `Sandbox.create` and
90
+ `Sandbox.start` make, so on a machine with no runtime installed they failed in
91
+ the native layer instead of fetching it. (`Sandbox.connect_or_create` was
92
+ already covered — it shares `create`'s option builder.)
93
+
94
+ ### Changed
95
+
96
+ - Upstream runtime highlights carried without further Ruby surface:
97
+ - `v0.6.15` — read-only mounts no longer fail a write probe at mount time,
98
+ Windows DNS/NTFS handling, and the mount-ownership core work above.
99
+ - `v0.6.16` — log retrieval rerouted through the SDK backends (#1459; the
100
+ `logs`/`log_stream` bindings are unchanged and keep their behaviour — the
101
+ new `follow_logs`/`boot_error` core entry points are not bound, matching the
102
+ Python binding), sandbox config overlaid by field presence with
103
+ `LocalConfig` renamed to `GlobalConfig` (#1460; the gem touches neither —
104
+ the ext only calls `config::set_sdk_*_path` — and no Ruby config
105
+ round-trip or `modify` semantics changed), network-slot recycling and
106
+ migration, single-file mount isolation, empty `MSB_HOME` treated as unset.
107
+
108
+ ## [0.15.0] - 2026-08-24
109
+
110
+ Adopts upstream runtime **`v0.6.9` → `v0.6.14`**, stepping through every
111
+ intermediate tag (v0.6.10, v0.6.11, v0.6.12, v0.6.13 each verified and
112
+ committed individually).
113
+
114
+ ### Added
115
+
116
+ - `ssh.open_client` and `ssh.prepare_server` accept `inactivity_timeout:` —
117
+ a per-session SSH inactivity timeout in seconds (upstream #1341, `v0.6.10`).
118
+ `nil` (the default) inherits the global config (600s out of the box), `0`
119
+ disables the timeout, and a negative or non-finite value raises
120
+ `ArgumentError`, matching the Python binding's `ValueError` semantics. The
121
+ SSH inactivity timeout stays separate from the sandbox lifecycle
122
+ `idle_timeout`.
123
+
124
+ ### Changed
125
+
126
+ - Upstream runtime highlights carried without further Ruby surface:
127
+ - `v0.6.10` — bind-mount correctness (contained rootfs patches, parent-first
128
+ nested destinations, path formatting), guest bootstrap moved off the kernel
129
+ command line, DNS pins required for deferred domain allows, host-loopback
130
+ family fallback, configurable global ssh inactivity timeout.
131
+ - `v0.6.11` / `v0.6.12` — release-pipeline fixes (Linux glibc baseline
132
+ lowered to 2.28; bundled `msb` executable mode preserved), reflected in the
133
+ prebuilt bundles the companion binaries gem vendors.
134
+ - `v0.6.13` — legacy ext4 upper-disk resize support; temporary exec
135
+ sandboxes stopped on errors; `LocalBackendBuilder::try_build_lazy()` added
136
+ upstream (embedding-host API — not adopted here, matching the Python
137
+ binding; the ext stays on `LocalBackend::lazy()`).
138
+ - `v0.6.14` — `msb_krun` VMM stack bumped to 0.1.32.
139
+
9
140
  ## [0.14.0] - 2026-08-24
10
141
 
11
142
  Runtime tag unchanged — still upstream **`v0.6.9`**.