forked from mtusi2026/mtusi2026lab7
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user