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
@@ -0,0 +1,29 @@
import pytest
from mcp_servers import email_server
@pytest.mark.asyncio
@pytest.mark.parametrize('scope,expected', [
({'folder': 'Archive'}, ['Archive']),
({'folder': 'Finance/2026'}, ['Finance/2026']),
({'folders': ['INBOX', 'Sent']}, ['INBOX', 'Sent']),
({'folders': ['Sent'], 'folder': 'Archive'}, ['Sent']),
({}, None),
])
async def test_search_honors_advertised_folder(monkeypatch, scope, expected):
calls = []
monkeypatch.setattr(email_server, '_read_accounts_from_db', lambda: [])
monkeypatch.setattr(email_server, '_mcp_owner_required', lambda accounts: False)
def search(query, **kwargs):
calls.append((query, kwargs))
return []
monkeypatch.setattr(email_server, '_search_emails', search)
await email_server.call_tool('search_emails', {
'query': 'design review', 'account': 'fixture@example.com', **scope,
})
assert len(calls) == 1
assert calls[0][1]['folders'] == expected
assert calls[0][1]['account'] == 'fixture@example.com'