aee2c885 fix(ai-sandbox-blaxel): surface failed kills, create write parents, add fork
Review follow-ups on the Blaxel provider.
A spawned process could report a failed termination as a clean exit. `kill()`
rejections are discarded by the abort listener, and `wait()` only tested that
`killPromise` existed, so a reap that never terminated the remote process group
still resolved 143 while the sandbox kept running and billing. `wait()` now
awaits the termination before mapping it to the kill exit code, and a stream
that already failed (8 MiB overflow, capture divergence) is no longer erased
from the exit path by a racing kill.
Also:
- `fs.write()` creates missing parent directories, matching every sibling
provider. `bootstrapWorkspace` writes nested paths through this seam and
Blaxel's PUT does not create parents.
- `spawn().wait()` no longer rejects when scratch-dir cleanup fails, matching
the behaviour `exec()` already documents.
- `fork()` throws `UnsupportedCapabilityError` instead of being absent, so
callers get a named capability error rather than a TypeError.
- Scope the process-global credential comment to what the check actually
covers: an `initialize()` tenant, not a `bl login` one.
- Drop the unrelated `scripts/lovable-gateway.models.json` reformat that an
autofix-ci commit pulled in; it is generated and now matches main exactly.
- Bump the `sandbox/providers` docs `updatedAt` for the new section.
Claude-Session: https://claude.ai/code/session_01H9vdhTohwU9AdcfVjhLi54 aee2c885 fix(ai-sandbox-blaxel): surface failed kills, create write parents, add fork
Review follow-ups on the Blaxel provider.
A spawned process could report a failed termination as a clean exit. `kill()`
rejections are discarded by the abort listener, and `wait()` only tested that
`killPromise` existed, so a reap that never terminated the remote process group
still resolved 143 while the sandbox kept running and billing. `wait()` now
awaits the termination before mapping it to the kill exit code, and a stream
that already failed (8 MiB overflow, capture divergence) is no longer erased
from the exit path by a racing kill.
Also:
- `fs.write()` creates missing parent directories, matching every sibling
provider. `bootstrapWorkspace` writes nested paths through this seam and
Blaxel's PUT does not create parents.
- `spawn().wait()` no longer rejects when scratch-dir cleanup fails, matching
the behaviour `exec()` already documents.
- `fork()` throws `UnsupportedCapabilityError` instead of being absent, so
callers get a named capability error rather than a TypeError.
- Scope the process-global credential comment to what the check actually
covers: an `initialize()` tenant, not a `bl login` one.
- Drop the unrelated `scripts/lovable-gateway.models.json` reformat that an
autofix-ci commit pulled in; it is generated and now matches main exactly.
- Bump the `sandbox/providers` docs `updatedAt` for the new section.
Claude-Session: https://claude.ai/code/session_01H9vdhTohwU9AdcfVjhLi54