Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ jobs:
- name: Pytest (Windows sandbox tests must run, not skip)
run: >
python -m pytest -rs -p no:cacheprovider
tests/tools/test_sandbox_windows.py tests/tools/test_sandbox_spec.py
tests/tools/test_sandbox_windows.py tests/tools/test_sandbox_windows_postures.py tests/tools/test_sandbox_spec.py
--junitxml=sandbox-junit.xml
- name: Assert the Windows sandbox tests ran
shell: python
Expand All @@ -156,6 +156,26 @@ jobs:
print("SKIPPED:", c.get("name"), "-", (c.find("skipped").get("message") or ""))
if len(cases) < 60 or skipped or failed:
sys.exit("The Windows sandbox tests did not all run and pass on this Windows host.")
# The runner is disposable: the smoke test may write the sandbox's entries and labels on
# its real profile and drives (never set this variable on a machine someone uses).
- name: Pytest (the sandbox on this runner's real profile and drives)
env:
ABSTRACTCORE_SANDBOX_REAL_HOST: "1"
run: >
python -m pytest -s -rs -p no:cacheprovider
tests/tools/test_sandbox_windows_real_host.py
--junitxml=real-host-junit.xml
- name: Assert the real-host smoke ran
shell: python
run: |
import sys
import xml.etree.ElementTree as ET

cases = list(ET.parse("real-host-junit.xml").getroot().iter("testcase"))
bad = [c.get("name") for c in cases if any(c.find(k) is not None for k in ("skipped", "failure", "error"))]
print(f"real host: {len(cases)} collected, {len(cases) - len(bad)} passed; not passed: {bad}")
if len(cases) < 3 or bad:
sys.exit("The real-host sandbox smoke did not run and pass on this Windows host.")

build:
runs-on: ubuntu-latest
Expand Down
59 changes: 59 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,65 @@ Unreleased changes live in [`changelog.d/`](changelog.d/README.md), one file per

## [Unreleased]

## [2.39.0] - 2026-11-25

### Added

- **Commands run sandboxed on Windows under every workspace posture** (`tools/sandbox.py`,
`tools/sandbox_windows.py`). "Deny everything, allow listed workspaces" and "Allow everything,
refuse listed workspaces" with a read-only default no longer refuse every command:
`host_sandbox_kind` is `windows-restricted-token` for both postures. Under both, writes are
limited to the read & write rows, the run's private workspace and its `.tmp`: the command's
restricted token runs at an integrity level between Low and Medium (so every write elsewhere,
the registry included, is refused) and those folders are labelled for it, once. A folder one
run may write stays read-only to every other run's command that can reach it. "Deny
everything" refuses the user's data computed from the machine: the profile, and on each fixed
drive the drive itself or each folder at its root that the user may change (not `Windows`,
`Program Files*`, `ProgramData`), plus the user's recycle bin folder; the host's own Python
stays readable. Limits (Git Bash, folders and registry keys Windows labels Low, what the user
cannot change) are listed in `abstractcore/tools/README.md` (*Command sandbox*, Windows).
- **Drives the Windows sandbox cannot protect are reported** (`sandbox.windows_unprotected_volumes`).
A drive without permissions (FAT, exFAT) or a network share: where writes are limited to the
rows, a command's result says so (`sandbox.unprotected`, `sandbox.unprotected_note`, the
`Sandbox:` line); a refused or read-only row there stops the command with one line naming it.

### Removed

- `WINDOWS_ALLOW_LIST_UNEXPRESSIBLE` and `WINDOWS_READ_ONLY_UNEXPRESSIBLE` (`tools/sandbox.py`):
nothing is refused for its posture on Windows any more.

### Fixed

- **git runs in rows inside a refused folder on Windows** (`tools/sandbox_windows.py`). A refused
folder with a row inside it could not be listed, and git stopped with "unable to get current
working directory" wherever a folder on the way had a name that could be a short (8.3) name (a
`src` row in a refused project). Such folders now list the names directly inside them (never
their content); folders carved by 2.38.0 are rewritten in place at the next command.
- **A folder can change its role between runs** (`tools/sandbox_windows.py`). A folder made inside
a refused folder after a first command, then listed read & write or read-only (or on the way to
a deeper row), answered "Access is denied"; it now takes its new role, and a row that is no
longer listed is refused again.
- **What a command makes in a read & write row inside a refused folder is fully its own**
(`tools/sandbox_windows.py`), its permissions included: `icacls` on it works, as do programs
that set permissions on what they create (`tempfile.mkdtemp`, hence `python -m venv` and
`pip install`). The row folder's own permissions stay closed to the command.
- **A sandboxed command can no longer stop every later command** (`tools/sandbox_windows.py`). The
launchers' lock was a named object of the session, which any command could hold (every later
launch waited) or create with a refusing access list (every later launch failed). It is now a
file in the launcher's state folder, which every policy refuses; a launch waits for it at most
10 minutes and then says which process holds it.
- **The launcher's state is refused to every command** (`tools/sandbox.py`), read & write by default
included. Another run's read & write folder no longer depends on the launcher's list to stay
read-only (`tools/sandbox_windows.py`): each such folder also refuses writes to one of 256
bucket identifiers, held by every other run whose writes are limited unless one of its own
rows shares the bucket; this also refuses a command that was already running when the folder
was first listed. A lost or damaged list is started again on its own.
- **Reparse points that are not links are refused** (`tools/sandbox_windows.py`). Inside a
refused folder that has a row in it, a cloud file placeholder (OneDrive) or an app alias was
skipped like a junction and stayed readable. Only links (junctions, symbolic links), which a
lookup follows to a target with its own rules, are left alone now. Paths longer than 260
characters are handled whether or not Windows' long paths are enabled.

## [2.38.0] - 2026-11-24

### Added
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
Unified LLM Interface
> Write once, run everywhere

What's new in 2.39.0: on Windows, agents' shell commands run inside the command sandbox under every workspace setting ("Allow everything, refuse listed workspaces" read & write or read-only by default, and "Deny everything, allow listed workspaces"); a drive that stores no permissions (exFAT, FAT, a network share) is named in each command's result as not protected. In 2.38.0: the first Windows sandbox, for the read & write default. See the [changelog](CHANGELOG.md#2390---2026-11-25).

What's new in 2.37.0: with `stream=True`, a native tool call arrives once and complete from OpenAI, OpenAI-compatible (vLLM, LM Studio, OpenRouter, Portkey) and Anthropic streams; a tool call the model did not finish (output stopped at its limit) is reported in `metadata["unparsed_tool_call"]` instead of being delivered with empty arguments, streamed or not; and the registry covers the Thinking Machines Inkling family (Inkling 2 Mini, Inkling 2 Small, Inkling, Inkling Small) with native tool calling. See the [changelog](CHANGELOG.md#2370---2026-11-23).

What's new in 2.36.0: on an NVIDIA GPU the recommended text model follows the total GPU memory (Qwen3.8 27B from 22 GiB, across all GPUs); Qwen3 Embedding 0.6B joins the recommended starter set; a circuit-breaker refusal names the provider's last error and when the next attempt is made.
Expand Down
Loading
Loading