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
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ repos:
args: [--maxkb=1024]
- id: check-merge-conflict
- id: detect-private-key
exclude: ^tests/test_runtime_checkpoint_bug2_deep\.py$
exclude: ^tests/test_runtime_checkpoint_deep\.py$

- repo: local
hooks:
Expand Down
2 changes: 1 addition & 1 deletion docs/everos-memory-e2e-test-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ expectations.

| Layer | What | Where | LLM? |
|---|---|---|---|
| L1 | Backend translation (owner routing, message conversion, result flatten, degradation) | `tests/test_em2_backend.py`, `tests/test_em3_http.py` | no (fakes) — default CI |
| L1 | Backend translation (owner routing, message conversion, result flatten, degradation) | `tests/test_everos_backend.py`, `tests/test_everos_http_adapter.py` | no (fakes) — default CI |
| L2 | everos extraction quality — direct service + `is_final` flush | `tests/integration/test_everos_extraction_real_llm.py` | yes (`real_llm`) |
| L3 | backend ↔ everos e2e — embedded mode `store`/`recall` | `tests/integration/test_everos_backend_e2e.py` | yes (`real_llm`) |

Expand Down
6 changes: 3 additions & 3 deletions docs/memory-plugin-architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,8 @@ place (raven's `pyproject.toml`). The upgrade surface is one line.
written in adapter comments.
3. **Test (all three layers)**:
```bash
uv run pytest tests/test_em1_skeleton.py tests/test_em2_backend.py \
tests/test_em3_http.py tests/test_memory_backend_protocol.py \
uv run pytest tests/test_everos_plugin_discovery.py tests/test_everos_backend.py \
tests/test_everos_http_adapter.py tests/test_memory_backend_protocol.py \
tests/test_memory_backend_contract.py -q # unit (mock adapter)
uv run pytest tests/integration/test_everos_backend_e2e.py -m real_llm # real
python scripts/everos_memory_roundtrip.py # native shell smoke
Expand All @@ -342,7 +342,7 @@ place (raven's `pyproject.toml`). The upgrade surface is one line.

| Layer | Result |
|---|---|
| Unit (em1/em2/em3, protocol, contract, plugin discovery/command/tools, cl1, context, config, ag1/fb1, agent-loop pipeline) | 240 passed |
| Unit (everos plugin discovery / backend / http adapter, protocol, contract, plugin command/tools, cli plugin stack, context, config, agent-loop backend dispatch + feedback, agent-loop pipeline) | 240 passed |
| `raven plugins` | everos-memory · Source=`bundled` · Status=`activated` |
| `real_llm` e2e (`test_everos_backend_e2e.py`) | 2 passed, 1 xfailed (best-effort skill-cluster check) — store→extract→recall + dual-track isolation |
| roundtrip script (new import path) | OK; `users/user-raven/user.md` generated |
Expand Down
24 changes: 12 additions & 12 deletions docs/sandbox/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ On Linux without `/dev/kvm` the entire file is **automatically skipped** — no

**First run — pre-pull OCI images:**

A session-scoped fixture in `test_sandbox_integration.py` pre-pulls all required images
A session-scoped fixture in `test_sandbox_real_vm.py` pre-pulls all required images
(`ubuntu:22.04` and `node:20-slim`) before the first test. On a fast connection this takes
~30–60 s on first run and is instant on subsequent runs (images are cached by boxlite).

Expand All @@ -646,18 +646,18 @@ SKIPPED OCI image pull failed for 'ubuntu:22.04' — likely a network issue, no
**Run all integration tests:**

```bash
uv run python -m pytest tests/test_sandbox_integration.py -v
uv run python -m pytest tests/integration/test_sandbox_real_vm.py -v
```

Expected output:

```
tests/test_sandbox_integration.py::TestBoxliteExecutorIntegration::test_exec_echo PASSED
tests/test_sandbox_integration.py::TestBoxliteExecutorIntegration::test_exec_timeout PASSED
tests/test_sandbox_integration.py::TestBoxliteExecutorIntegration::test_exec_cwd PASSED
tests/test_sandbox_integration.py::TestBoxliteExecutorIntegration::test_volume_mount_file_visible_in_vm PASSED
tests/test_sandbox_integration.py::TestBoxliteExecutorIntegration::test_lifecycle_context_manager PASSED
tests/test_sandbox_integration.py::TestBoxliteStdioMCPRoundtrip::test_npx_mcp_server_everything PASSED
tests/integration/test_sandbox_real_vm.py::TestBoxliteExecutorIntegration::test_exec_echo PASSED
tests/integration/test_sandbox_real_vm.py::TestBoxliteExecutorIntegration::test_exec_timeout PASSED
tests/integration/test_sandbox_real_vm.py::TestBoxliteExecutorIntegration::test_exec_cwd PASSED
tests/integration/test_sandbox_real_vm.py::TestBoxliteExecutorIntegration::test_volume_mount_file_visible_in_vm PASSED
tests/integration/test_sandbox_real_vm.py::TestBoxliteExecutorIntegration::test_lifecycle_context_manager PASSED
tests/integration/test_sandbox_real_vm.py::TestBoxliteStdioMCPRoundtrip::test_npx_mcp_server_everything PASSED

6 passed in ~55s
```
Expand All @@ -670,13 +670,13 @@ on each run (~15 s), then starts the MCP server and validates the full `initiali
**Run unit and integration tests together:**

```bash
uv run python -m pytest tests/test_sandbox_unit.py tests/test_sandbox_integration.py -v
uv run python -m pytest tests/test_sandbox_unit.py tests/integration/test_sandbox_real_vm.py -v
```

**Run the full project test suite** (all test files, excluding integration):

```bash
uv run python -m pytest tests/ --ignore=tests/test_sandbox_integration.py -q
uv run python -m pytest tests/ --ignore=tests/integration/test_sandbox_real_vm.py -q
```

---
Expand All @@ -688,7 +688,7 @@ uv run python -m pytest tests/ --ignore=tests/test_sandbox_integration.py -q
uv run python -m pytest "tests/test_sandbox_unit.py::TestBoxliteTranslateCwd::test_subdir_translates_correctly" -v

# A single integration test
uv run python -m pytest "tests/test_sandbox_integration.py::TestBoxliteStdioMCPRoundtrip::test_npx_mcp_server_everything" -v -s
uv run python -m pytest "tests/integration/test_sandbox_real_vm.py::TestBoxliteStdioMCPRoundtrip::test_npx_mcp_server_everything" -v -s
```

---
Expand Down Expand Up @@ -768,5 +768,5 @@ python -c "from raven.sandbox import build_executor, SandboxConfig; print('sandb
To verify end-to-end (requires KVM / Apple Silicon):

```bash
uv run python -m pytest tests/test_sandbox_integration.py -v
uv run python -m pytest tests/integration/test_sandbox_real_vm.py -v
```
11 changes: 6 additions & 5 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@
def pytest_unconfigure(config: pytest.Config) -> None:
"""On CI, hard-exit past interpreter finalization once the run is over.

Native runtimes pulled in by the suite (lancedb's Rust/tokio thread, asyncio
subprocess transports finalized during GC) segfault Py_FinalizeEx on Linux,
turning a fully green run into exit 139. raven.cli._exit guards the CLI the
same way; the pytest process needs its own guard because it finalizes with
those runtimes live.
A fully green run still exited 139 on Linux: the suite finalizes with
native state live (asyncio subprocess transports collected during GC),
and Py_FinalizeEx segfaults on it, masking the recorded status. The CLI
routes its exit through the same helper, but on a different trigger --
see raven.cli._exit for the lancedb-specific gate it uses, which is not
what fires here.

Local runs keep normal semantics so nothing masks an exit-time error, and
the recorded status is preserved either way -- a failing run still exits
Expand Down
37 changes: 0 additions & 37 deletions tests/integration/test_chat_e2e.py

This file was deleted.

6 changes: 5 additions & 1 deletion tests/integration/test_everos_backend_e2e.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,11 @@ async def test_user_track_recall_through_backend(
user_id=ids.user_id,
top_k=5,
)
assert isinstance(hits, list)
# Recall returning nothing is a best-effort miss per this module's
# strategy, but it must not read as a pass: the per-hit assertions below
# are vacuous on an empty list.
if not hits:
pytest.xfail("recall returned no hits; the per-hit assertions would be vacuous")
for h in hits:
assert isinstance(h, Memory)
assert h.metadata.get("owner_type") == "user"
Expand Down
90 changes: 0 additions & 90 deletions tests/integration/test_tui_exit_e2e.py

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""AG-1 — AgentLoop ``backend`` wiring + ``_dispatch_backend_store``.
"""AgentLoop ``backend`` wiring + ``_dispatch_backend_store``.

The two after-turn callsites (system-message path + REPL path) now call
:meth:`AgentLoop._dispatch_backend_store` as the third peer step in the
Expand Down Expand Up @@ -150,7 +150,7 @@ async def test_backend_exception_swallowed(


# ---------------------------------------------------------------------------
# Legacy compatibility — pre-AG-1 callsites still pass
# Legacy compatibility -- callsites predating the backend keyword still pass
# ---------------------------------------------------------------------------


Expand All @@ -159,7 +159,7 @@ def test_construction_without_backend_unchanged(
self,
tmp_path: Path,
) -> None:
"""Pre-AG-1 construction (no ``backend=`` keyword) still works
"""Construction without the ``backend=`` keyword still works
end-to-end. After Phase B-3 the ``self.memory`` facade is gone;
we now assert against the direct subsystem fields AgentLoop
holds (``memory_consolidator`` + ``context.skills``)."""
Expand Down
4 changes: 1 addition & 3 deletions tests/test_appworld_precheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@
from pathlib import Path
from types import SimpleNamespace

import pytest

REPO_ROOT = Path(__file__).resolve().parents[1]
if str(REPO_ROOT) not in sys.path:
sys.path.insert(0, str(REPO_ROOT))

httpx = pytest.importorskip("httpx")
import httpx

from benchmarks.appworld.evolve.precheck import ( # noqa: E402
_endpoint_problem,
Expand Down
4 changes: 2 additions & 2 deletions tests/test_auth_allowlist.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from __future__ import annotations

import logging
from dataclasses import dataclass
from dataclasses import FrozenInstanceError, dataclass
from typing import Any

import pytest
Expand Down Expand Up @@ -215,5 +215,5 @@ def test_locked_field_membership(self):

def test_frozen_dataclass(self):
s = ManagedSettings()
with pytest.raises(Exception): # FrozenInstanceError subclass
with pytest.raises(FrozenInstanceError):
s.description = "mutated" # type: ignore[misc]
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""FB-1 — qualified_id feedback dispatcher.
"""qualified_id feedback dispatcher.

Exercises:
1. ``_filter_qualified_ids`` helper — prefix matching, native id
Expand Down
6 changes: 2 additions & 4 deletions tests/test_cli_deep_research_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def test_configure_validation_fail_then_save(tmp_path: Path, monkeypatch):

def test_configure_validation_fail_then_cancel(tmp_path: Path, monkeypatch):
fail = {"ok": False, "status": "http_401", "model_ids": None, "error": "bad"}
p = _setup_interactive(monkeypatch, tmp_path, ["configure", "cancel"], validate=lambda *a, **k: fail)
_setup_interactive(monkeypatch, tmp_path, ["configure", "cancel"], validate=lambda *a, **k: fail)
assert configure_deep_research(non_interactive=False, warnings=[]) is False # cancelled, nothing written


Expand Down Expand Up @@ -231,9 +231,7 @@ def _flaky(*a, **k):
calls["n"] += 1
return {"ok": calls["n"] > 1, "status": "http_401" if calls["n"] == 1 else "ok", "model_ids": [], "error": None}

p = _setup_interactive(
monkeypatch, tmp_path, ["configure", "retry", "mirothinker-1-7-deepresearch"], validate=_flaky
)
_setup_interactive(monkeypatch, tmp_path, ["configure", "retry", "mirothinker-1-7-deepresearch"], validate=_flaky)
assert configure_deep_research(non_interactive=False, warnings=[]) is True
assert calls["n"] == 2 # first validate failed, retry validated ok

Expand Down
Loading
Loading