Preserve preview harness, editor, email and task improvements

Snapshot current maintainer-preview application changes and regression fixtures for integration into lab. Excludes local runtime data, evaluation outputs and source backups. Focused Python regression selection: 140 passed; full suite not certified.
This commit is contained in:
pewdiepie-archdaemon
2026-10-01 01:34:26 +00:00
parent 86f376ac3a
commit 2e8413a54a
170 changed files with 11010 additions and 1094 deletions
+20 -14
View File
@@ -177,7 +177,7 @@ async def test_native_product_browser_turn_cannot_bypass_family_contract(
@pytest.mark.asyncio
async def test_native_transcription_turn_does_not_offer_shell_fallbacks(
async def test_native_transcription_turn_keeps_reader_and_workspace_recovery(
monkeypatch, registered_mcp_manager,
):
from routes import chat_routes
@@ -223,14 +223,13 @@ async def test_native_transcription_turn_does_not_offer_shell_fallbacks(
contract = observed[0]
assert contract is not None
assert contract.capabilities == {"transcription"}
assert contract.offered == {"transcribe_media"}
assert "bash" not in contract.offered
assert "python" not in contract.offered
assert "inspect_media" not in contract.offered
from src.clean_agent_preview import INTERACTIVE_CORE_TOOLS, NATIVE_WORKSPACE_TOOLS
assert contract.required == {"transcribe_media"}
assert contract.offered == (INTERACTIVE_CORE_TOOLS | NATIVE_WORKSPACE_TOOLS) & contract.executable
@pytest.mark.asyncio
async def test_native_ocr_turn_offers_only_extract_text(
async def test_native_ocr_turn_keeps_reader_and_workspace_recovery(
monkeypatch, registered_mcp_manager,
):
from routes import chat_routes
@@ -276,10 +275,9 @@ async def test_native_ocr_turn_offers_only_extract_text(
contract = observed[0]
assert contract is not None
assert contract.capabilities == {"ocr"}
assert contract.offered == {"extract_text"}
assert "inspect_media" not in contract.offered
assert "bash" not in contract.offered
assert "python" not in contract.offered
from src.clean_agent_preview import INTERACTIVE_CORE_TOOLS, NATIVE_WORKSPACE_TOOLS
assert contract.required == {"extract_text"}
assert contract.offered == (INTERACTIVE_CORE_TOOLS | NATIVE_WORKSPACE_TOOLS) & contract.executable
@pytest.mark.asyncio
@@ -334,16 +332,21 @@ async def test_native_sft_owner_can_use_confined_read_file_tool(
@pytest.mark.asyncio
async def test_exact_odysseus_clean_route_offers_only_requested_compact_family(
monkeypatch, registered_mcp_manager,
@pytest.mark.parametrize('deny_core', [False, True])
async def test_exact_odysseus_clean_route_keeps_requested_family_and_core(
monkeypatch, registered_mcp_manager, deny_core,
):
from routes import chat_routes
from src import tool_security
from src import settings, tool_security
endpoint = _chat_stream_endpoint(
monkeypatch, "agent", {},
session_model="odysseus-qwen3.5-tools-pre-heretic",
)
if deny_core:
monkeypatch.setattr(settings, 'get_setting', lambda key, default=None:
['bash', 'python', 'read_file', 'web_search', 'web_fetch', 'ask_user']
if key == 'disabled_tools' else default)
message = "List my scheduled tasks. Return at most three names and statuses."
monkeypatch.setattr(
chat_routes, "coerce_message_and_session",
@@ -370,8 +373,11 @@ async def test_exact_odysseus_clean_route_offers_only_requested_compact_family(
contract = observed[0]
assert contract.selection_mode == "clean_compact_v3_preview"
assert contract.capabilities == {"tasks"}
assert contract.offered == {"manage_tasks"}
from src.clean_agent_preview import INTERACTIVE_CORE_TOOLS
assert contract.offered == ({"manage_tasks"} | INTERACTIVE_CORE_TOOLS) & contract.executable
assert contract.required == {"manage_tasks"}
if deny_core:
assert not contract.offered & INTERACTIVE_CORE_TOOLS
@pytest.mark.asyncio