fix(dms): 3 von 4 Vorbestand-Testfailures behoben — Suite 125->128 gruen
Check Cross-Plugin Imports / check (push) Has been cancelled

1. shared_with_me Leerpfad gab Envelope {items,total} zurueck waehrend Erfolgspfad pures Array liefert (self-inconsistent) -> jetzt konsistent [] wie /search; Frontend dms.ts vertraegt beide Shapes
2+3. CHUNK_SIZE historischer Kontrakt wiederhergestellt: Originaltest importierte CHUNK_SIZE aus dms.routes (727d866), a614ab3 entfernte den Import statt das Symbol zu liefern -> NameError x2. Jetzt: oeffentliche Konstante in common.py + Re-Export + Importzeile im Test restauriert

Beweis: Full-DMS-Suite 129 Tests = 128 passed + 1 failed (nur multiple_files, s. Follow-up) vs Baseline 125+4
This commit is contained in:
Agent Zero
2026-08-26 23:17:38 +02:00
parent 4cf7a91416
commit e0255412ac
4 changed files with 6 additions and 2 deletions
+3
View File
@@ -106,3 +106,6 @@ def _is_blocked_filetype(filename: str) -> bool:
chunk_size = 1024 * 1024 # 1MB chunks for streaming uploads
# ─── Folders ───
# Public stream-chunk constant (original contract name from tests/test_p1_6_dms_streaming.py)
CHUNK_SIZE = chunk_size
+1
View File
@@ -29,6 +29,7 @@ from app.deps import get_current_user, require_permission
from app.plugins.builtins.dms.common import ( # noqa: F401
ALLOWED_MIME_PREFIXES,
BLOCKED_EXTENSIONS,
CHUNK_SIZE,
MAX_FILE_SIZE,
OFFICE_EXTENSIONS,
_file_storage_path,
@@ -86,7 +86,7 @@ async def shared_with_me(
file_ids = {p.file_id for p in perms}
if not file_ids:
return {"items": [], "total": 0}
return []
query = select(DmsFile).where(
DmsFile.tenant_id == tenant_id,
+1 -1
View File
@@ -14,7 +14,7 @@ from unittest.mock import AsyncMock, MagicMock
import pytest
from app.core.storage import LocalStorage, StorageBackend
from app.plugins.builtins.dms.routes import _sanitize_filename
from app.plugins.builtins.dms.routes import CHUNK_SIZE, _sanitize_filename
class TestSanitizeFilename: