fix(hyperlight-codeact): pin version >=0.3.0 and handle Python 3.14+ - #1
Merged
Merged
Conversation
…compatibility Problems encountered when using the skill: 1. `uv run --with 'hyperlight-sandbox[wasm,python_guest]'` resolved to v0.0.1, a stub package with no Sandbox class. Fix: pin >=0.3.0. 2. The Wasm backend (hyperlight-sandbox-backend-wasm) only ships wheels for Python <=3.13. On Python 3.14+ uv fails with an ABI mismatch. Fix: add --python 3.13 to all uv run examples and add runtime detection with an actionable error message. 3. The _try_install fallback was unhelpful when running inside `uv run --with` (ephemeral env). Fix: add _import_sandbox() that detects stub versions and Python ABI mismatches before falling back to interactive install. Changes: - scripts/codeact.py: Add _check_python_version(), _import_sandbox() with version/ABI detection and clear error messages - SKILL.md: Pin >=0.3.0, add --python 3.13, document Python <=3.13 requirement in prerequisites
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When using the hyperlight-codeact skill, three issues prevent it from working first-try:
Stub package resolution —
uv run --with 'hyperlight-sandbox[wasm,python_guest]'resolves to v0.0.1, which is an empty stub with noSandboxclass. The import fails withImportError: cannot import name 'Sandbox'.Python 3.14+ ABI mismatch — The
hyperlight-sandbox-backend-wasmpackage only ships wheels for Python ≤3.13. On Python 3.14+ (now the default on many systems), uv fails to find a compatible wheel.Unhelpful fallback — The
_try_installfunction tries interactive pip/uv installs, which don't help inuv runephemeral environments and give no indication of what actually went wrong.Fix
scripts/codeact.py_check_python_version()— early-exits with a clear message and the exactuv run --python 3.13command to use_import_sandbox()— detects stub packages (installed but noSandboxattr) with an actionable error, then falls back to interactive install with the pinned version>=in the install prompt so the stub package is never installedSKILL.md>=0.3.0in alluv run --withexamples--python 3.13to all execution examplesuv run --python 3.13on newer systems