boxlite 0.9.5: allow_net=false crashes sandbox start (network is now a NetworkSpec)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 88/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- infrastructure
Research direction
Read raven/sandbox/boxlite_executor.py, starting at BoxliteExecutor._ensure_box, and reproduce the sandbox startup with tools.sandbox.allow_net=false. Verify the boxlite 0.9.5 network configuration handles disabled networking and allowlists without the TypeError, while the default network behavior still works.
Written by the indexing model from the issue text.
Description
Version: main @ e1769411, boxlite==0.9.5 (the version pinned in pyproject.toml)
What happens: with tools.sandbox.allow_net = false the sandbox never starts:
TypeError: argument 'network': 'str' object cannot be cast as 'NetworkSpec'
Why: BoxliteExecutor._ensure_box (raven/sandbox/boxlite_executor.py) still uses the boxlite 0.8.2 shape, network="none" and a separate allow_net=[...] kwarg. In 0.9.x BoxOptions.network is a boxlite.NetworkSpec(mode="enabled" | "disabled", allow_net=[...]).
Fix that works here:
if self._allow_net is False:
extra_kwargs["network"] = boxlite.NetworkSpec(mode="disabled")
elif isinstance(self._allow_net, list):
extra_kwargs["network"] = boxlite.NetworkSpec(mode="enabled", allow_net=self._allow_net)
Verified on macOS arm64: with mode="disabled" a TCP connect from the VM fails, and with the default (no network kwarg) it succeeds.
- Dominant language
- Python
- Stars
- 4.1k
- Forks
- 94
- Avg merge
- 10h 2m
- Merged PRs (30d)
- 376
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from EverMind-AI/Raven
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
EverMind-AI/Raven#798 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
EverMind-AI/Raven#640 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
EverMind-AI/Raven#479 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
EverMind-AI/Raven#474 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
EverMind-AI/Raven#462 · 2 comments ·
Maintainers usually reply within 1 day
All issues in EverMind-AI/Raven
Similar issues
-
bug server
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sportsdataverse/sportsdataverse-py#641 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
googleapis/google-cloud-python#18532 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day