Created At: 2026-11-18T09:26:43Z Completed At: 2026-11-18T09:26:43Z Command exited with code 0. Command output: with util.safe_reraise(): .venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py:166: in __exit__ raise exc_value.with_traceback(exc_tb) .venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py:4730: in _flush flush_context.execute() .venv/lib/python3.12/site-packages/sqlalchemy/orm/unitofwork.py:467: in execute rec.execute(self) .venv/lib/python3.12/site-packages/sqlalchemy/orm/unitofwork.py:643: in execute util.preloaded.orm_persistence._save_obj( .venv/lib/python3.12/site-packages/sqlalchemy/orm/persistence.py:92: in _save_obj _emit_insert_statements( .venv/lib/python3.12/site-packages/sqlalchemy/orm/persistence.py:1250: in _emit_insert_statements result = connection.execute( .venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py:1494: in execute return meth( .venv/lib/python3.12/site-packages/sqlalchemy/sql/elements.py:534: in _execute_on_connection return connection._execute_clauseelement( .venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py:1714: in _execute_clauseelement ret = self._execute_context( .venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py:1868: in _execute_context return self._exec_single_context( .venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py:1996: in _exec_single_context self._handle_dbapi_exception( .venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py:2351: in _handle_dbapi_exception raise sqlalchemy_exception.with_traceback(exc_info[2]) from e .venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py:1977: in _exec_single_context self.dialect.do_execute( .venv/lib/python3.12/site-packages/sqlalchemy/engine/default.py:1192: in do_execute cursor.execute(statement, parameters) .venv/lib/python3.12/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py:671: in execute await_(self._prepare_and_execute(operation, parameters)) .venv/lib/python3.12/site-packages/sqlalchemy/util/concurrency.py:171: in await_ return current.parent.switch(awaitable) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .venv/lib/python3.12/site-packages/sqlalchemy/util/concurrency.py:209: in greenlet_spawn value = await result ^^^^^^^^^^^^ .venv/lib/python3.12/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py:633: in _prepare_and_execute self._handle_exception(error) .venv/lib/python3.12/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py:583: in _handle_exception self._adapt_connection._handle_exception(error) .venv/lib/python3.12/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py:862: in _handle_exception super()._handle_exception(error) .venv/lib/python3.12/site-packages/sqlalchemy/connectors/asyncio.py:412: in _handle_exception self._handle_exception_no_connection(self.dbapi, error) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = dbapi = error = ForeignKeyViolationError('insert or update on table "audit_logs" violates foreign key constraint "audit_logs_tenant_id_fkey"') @classmethod def _handle_exception_no_connection( cls, dbapi: Any, error: Exception ) -> NoReturn: if not isinstance(error, AsyncAdapt_asyncpg_dbapi.Error): exception_mapping = dbapi._asyncpg_error_translate for super_ in type(error).__mro__: if super_ in exception_mapping: message = error.args[0] translated_error = exception_mapping[super_]( message, error ) > raise translated_error from error E sqlalchemy.exc.IntegrityError: (sqlalchemy.dialects.postgresql.asyncpg.ForeignKeyViolationError) insert or update on table "audit_logs" violates foreign key constraint "audit_logs_tenant_id_fkey" E [SQL: INSERT INTO audit_logs (id, tenant_id, user_id, action, resource, ip_address, details, created_at, updated_at) VALUES ($1::UUID, $2::UUID, $3::UUID, $4::VARCHAR, $5::VARCHAR, $6::VARCHAR, $7::JSONB, $8::TIMESTAMP WITH TIME ZONE, $9::TIMESTAMP WITH TIME ZONE)] E [parameters: (UUID('057cd393-a806-43aa-82a9-157a22ec094a'), UUID('47c2a061-edf7-4657-8637-3ad72e2ae12c'), None, 'SECURITY_KEY_ROTATION', 'vault:token_v1', '192.0.2.1', '{"key_version": 2, "actor": "admin"}', datetime.datetime(2026, 11, 18, 9, 26, 36, 81012, tzinfo=datetime.timezone.utc), datetime.datetime(2026, 11, 18, 9, 26, 36, 81015, tzinfo=datetime.timezone.utc))] E (Background on this error at: https://sqlalche.me/e/21/gkpj) .venv/lib/python3.12/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py:855: IntegrityError =============================== warnings summary =============================== tests/unit/test_security_audit.py:15 /root/telegram-saas/tests/unit/test_security_audit.py:15: PytestUnknownMarkWarning: Unknown pytest.mark.unit - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html @pytest.mark.unit tests/unit/test_security_audit.py:25 /root/telegram-saas/tests/unit/test_security_audit.py:25: PytestUnknownMarkWarning: Unknown pytest.mark.unit - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html @pytest.mark.unit tests/unit/test_security_audit.py:50 /root/telegram-saas/tests/unit/test_security_audit.py:50: PytestUnknownMarkWarning: Unknown pytest.mark.unit - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html @pytest.mark.unit tests/unit/test_security_audit.py:72 /root/telegram-saas/tests/unit/test_security_audit.py:72: PytestUnknownMarkWarning: Unknown pytest.mark.unit - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html @pytest.mark.unit -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info ============================ FAILED tests/integration/test_message_studio_api.py::test_bot_message_studio_lifecycle FAILED tests/integration/test_message_studio_e2e_publishing.py::test_message_studio_publishing_changes_real_bot_response FAILED tests/integration/test_multi_bot_engine.py::test_multi_tenant_multi_bot_engine_lifecycle FAILED tests/integration/test_multilingual_bot_responses.py::test_language_selection_in_actual_bot_responses FAILED tests/integration/test_plugins_api.py::test_plugins_module_full_lifecycle FAILED tests/integration/test_text_designer_api.py::test_text_designer_api_endpoints FAILED tests/tenant_isolation/test_tenant_isolation.py::test_strict_tenant_isolation FAILED tests/unit/test_security_audit.py::test_secure_filename_and_path_traversal_neutralization FAILED tests/unit/test_security_audit.py::test_audit_service_action_logging =================== 9 failed, 79 passed, 4 warnings in 4.68s ===================