fix: address track1-worker-compromise verify findings

- restore a verified row by fact: three variants give ready, otherwise
  failed with a known code instead of ready without content
- check trigger functions are not SECURITY DEFINER and pin search_path
- record the working stand comparison, the permanent drill lock file and
  the remaining SeaweedFS details

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-02 05:50:36 +03:00
co-authored by Claude Opus 5.5
parent 55959e3805
commit 5a9721876e
15 changed files with 299 additions and 56 deletions
+16 -1
View File
@@ -7,12 +7,27 @@ from typing import Any
import asyncpg
from conftest import TEST_DB
from conftest import ROLE_PASSWORDS, TEST_DB, settings
from src.infra.tls import build_client_context
PIPELINE_VERSION = 1
VARIANTS = ("thumbnail", "crop", "optimized")
async def connect_as(role: str) -> asyncpg.Connection:
"""Соединение роли процесса с временной базой."""
source = settings.database
return await asyncpg.connect(
host=source.host,
port=source.port,
user=role,
password=ROLE_PASSWORDS[role],
database=TEST_DB,
timeout=source.connect_timeout_seconds,
ssl=build_client_context(settings.client_tls.ca_file),
)
async def add_world(connection: asyncpg.Connection) -> tuple[uuid.UUID, ...]:
"""Пользователь, чат и участник: владелец вложений."""
user, chat = uuid.uuid4(), uuid.uuid4()