Skip to content

fix(deps): mark boxlite posix-only, drop unused retrieval extra - #226

Merged
0xKT merged 3 commits into
mainfrom
fix/sandbox_extra_windows_marker
Jul 28, 2026
Merged

fix(deps): mark boxlite posix-only, drop unused retrieval extra#226
0xKT merged 3 commits into
mainfrom
fix/sandbox_extra_windows_marker

Conversation

@0xKT

@0xKT 0xKT commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Two packaging defects, plus the CI simplification the second one unblocks.

raven[sandbox] could not be installed on Windows. boxlite publishes wheels for macOS and Linux only -- it is a microVM runtime built on KVM / Hypervisor.framework, and its PyPI classifiers say so -- but our declaration carried no platform marker, so the install failed outright:

error: Distribution `boxlite==0.9.5` can't be installed because it doesn't have
a source distribution or wheel for the current platform

The code already degrades gracefully when boxlite is absent: sandbox/interfaces.py keeps the shared types importable without it, and both call sites probe with try: import boxlite / except ImportError. So a Windows user should have gotten a Raven that reports the sandbox as unavailable, not a failed install. python-socks and matrix-nio already carry the same sys_platform != 'win32' marker; boxlite now does too.

The retrieval extra had no consumer. It declared torch and transformers, which nothing imports -- a whole-tree grep finds them only in that declaration, two comments, and a doc note, with no dynamic loading and no doc telling users to install it. It dates back to the initial commit. Keeping it cost a multi-hundred-megabyte download per environment and added a native crash surface of the kind cli/_exit.py documents. Removed via uv remove; the lockfile drops from 220 to 194 packages.

CI follows. With torch out of the extras, --all-extras now resolves to what the hand-maintained channels + tools + sandbox list covered, so the unit job goes back to it and stays correct as extras change. Every job also gains timeout-minutes.

A windows-latest cell was added to measure whether the marker fix was enough to run the suite there. It is not: the install now succeeds, but the suite hit 121 failures by 28 percent, across sixteen files, from systemic platform assumptions (assertions hardcoding forward slashes, fcntl locking, socket and subprocess differences). That is a port, not a fix, so the cell was dropped. This matches comparable projects: hermes-agent runs every job on ubuntu and substitutes a blocking static check for Windows-unsafe primitives, and openclaw's PR-blocking workflow is ubuntu-only with Windows behind workflow_dispatch. The dedicated Windows self-upgrade job still covers the install path.

The macos cell is dropped for the same reason, one level milder: it reported the same failures as ubuntu on every run while ubuntu additionally caught two Linux-specific problems it could not, and development happens on macos anyway. The unit job is now a single ubuntu cell, with the matrix block kept so another entry is one list item away.

Type

  • Bug fix

Verification

uv run --all-extras pytest -q
# 4611 passed, 24 deselected -- same count as before, torch was never used

uv run python -c "import importlib.metadata as m; m.version('torch')"
# PackageNotFoundError, and boxlite still installs on this macOS host

bash .claude/scripts/preflight_ci.sh
# ALL PREFLIGHT CHECKS PASSED
  • Relevant tests pass locally
  • Relevant lint / type checks pass locally

Risk

  • Security impact considered
  • Backward compatibility considered
  • Rollback path is clear for risky changes

raven[retrieval] stops being a valid extra. Nothing in the repo or the docs referenced it, and installing it only pulled torch into the environment without any code path using it, so no behaviour changes.

The Windows matrix experiment is described above and left out of the final state; both dependency fixes stand on their own.

Related Issues

Closes #225

0xKT and others added 3 commits July 28, 2026 15:49
boxlite publishes wheels for macOS and Linux only -- it is a microVM runtime
built on KVM / Hypervisor.framework, and its PyPI classifiers say so. Our
declaration carried no platform marker, so `pip install raven[sandbox]` failed
outright on Windows even though the code already degrades gracefully when
boxlite is absent (sandbox/interfaces.py keeps the shared types importable, and
both call sites probe with try/except ImportError). Two sibling dependencies,
python-socks and matrix-nio, already carry the same marker.

The retrieval extra declared torch and transformers, which nothing imports: a
whole-tree grep finds them only in that declaration, two comments, and a doc
note, with no dynamic loading and no doc telling users to install it. It dates
back to the initial commit. Keeping it cost a multi-hundred-megabyte download
per environment and added a native crash surface of the kind cli/_exit.py
documents. The suite collects the same 4611 tests without it.

With torch gone from the extras, CI returns to --all-extras, which now resolves
to what the hand-maintained list covered while staying correct as extras change,
and windows-latest joins the unit matrix.

Co-authored-by: Claude (claude-opus-5) <noreply@anthropic.com>
Adding windows-latest to the unit matrix measured the damage: the boxlite
marker let the install succeed, but the suite itself is not Windows-ready --
121 failures by the time it reached 28 percent, spread across sixteen files,
and far slower than the posix cells. The failures are systemic platform
assumptions rather than isolated bugs: assertions hardcoding forward slashes,
fcntl-based locking, socket and subprocess differences. Making them pass is a
port, not a fix, so the cell is dropped again.

That matches how comparable projects handle it. hermes-agent runs every job on
ubuntu and substitutes a blocking static check (scripts/check-windows-footguns.py)
for Windows-unsafe primitives; openclaw's PR-blocking workflow is ubuntu-only
with all Windows work behind workflow_dispatch. Raven keeps its dedicated
Windows self-upgrade job, so the install path stays covered, and the packaging
fix in this branch already gives Windows users a working install.

Every job also gains timeout-minutes. The hanging Windows cell would otherwise
have burned the six-hour default; nothing here should run for more than twenty
minutes.

Co-authored-by: Claude (claude-opus-5) <noreply@anthropic.com>
The macos cell produced no signal the ubuntu cell did not. Across every run on
this branch and the previous one the two reported identical failure sets, while
ubuntu additionally caught two Linux-specific problems macos could not: the
Py_FinalizeEx segfault and the fork-vs-spawn start method. Development happens
on macos, so that platform is exercised continuously anyway, and the cell only
added wall-clock. hermes-agent, the closest comparable project, runs every job
on ubuntu with no OS matrix at all.

The matrix block stays so another os or python entry is one list item away.

Co-authored-by: Claude (claude-opus-5) <noreply@anthropic.com>
@0xKT
0xKT requested a review from arelchan July 28, 2026 09:04
@0xKT
0xKT merged commit 16719d0 into main Jul 28, 2026
12 checks passed
@0xKT
0xKT deleted the fix/sandbox_extra_windows_marker branch July 28, 2026 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Packaging: sandbox extra breaks install on Windows, retrieval extra has no consumer

2 participants