ci: pytest runs with the hunt and semantic extras kept; sandbox tests skip by cause where no bwrap exists

CI's first full pytest run since 2836b78 showed 65 failures in three classes. uv run re-synced the environment
to the lockfile's default extras before pytest, removing dspy again (UV_NO_SYNC=1 now). The learn slice, pair
corpus and hunt producer tests need tree-sitter (semantic extra installed). Thirty-two tests need bubblewrap
isolation, which CI's container cannot provide: they carry a sandbox marker and skip where the isolation
preflight fails, with the cause's type in the reason; proven locally by hiding bwrap (7 skipped, 23 passed).
The partial-clone extraction test now probes one lazy fetch through git itself first, so git's own stderr
reaches the next CI log instead of git_exit_128.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
Marius Ciepluch
2026-10-14 07:54:09 +02:00
co-authored by Claude Fable 5.1
parent b35137ed1b
commit 17194b3df9
10 changed files with 61 additions and 1 deletions
+4
View File
@@ -52,6 +52,7 @@ def test_tools_bounds_and_path_escape(tmp_path):
worker.tool("write_demo", {"path": "../escape", "content": "bad"})
@pytest.mark.sandbox
def test_run_scrubs_model_key_in_real_sandbox(tmp_path, monkeypatch):
monkeypatch.setenv("OPENROUTER_API_KEY", "must-not-reach-repo")
worker = Worker(StubModel([]), repo=tmp_path, demo=tmp_path / "demo", executor=InProcessExecutor(tmp_path))
@@ -68,6 +69,7 @@ def test_run_scrubs_model_key_in_real_sandbox(tmp_path, monkeypatch):
assert "must-not-reach-repo" not in json.dumps(result)
@pytest.mark.sandbox
def test_coordinator_stub_smoke_real_verify(tmp_path):
sides, probe_demos = materialise(tmp_path / "pair", "path")
demo = tmp_path / "demo"
@@ -131,6 +133,7 @@ def test_failed_model_call_charged_and_secrets_not_reported(tmp_path):
assert "super-private-key" not in json.dumps(result)
@pytest.mark.sandbox
def test_run_timeout_truncation_and_disk_bound(tmp_path):
worker = Worker(StubModel([]), repo=tmp_path, demo=tmp_path / "demo", executor=InProcessExecutor(tmp_path))
result = worker.tool("run", {"command": ["/bin/sleep", "3"], "timeout_seconds": 1})
@@ -210,6 +213,7 @@ def test_write_demo_accepts_only_declarative_json(tmp_path):
worker.tool("write_demo", {"path": "build.sh", "content": "touch /tmp/pwn"})
@pytest.mark.sandbox
def test_inprocess_executor_observes_all_brain_repository_commands(tmp_path):
class RecordingExecutor(InProcessExecutor):
def __init__(self, repo):