{"id":"88d07efb-7887-476d-b62a-c65cb6bd56af", "recipient":"ba1085ea-d1d9-4661-b24d-654a0cbad3d6", "sender":"ba1085ea-d1d9-4661-b24d-654a0cbad3d6/task-2157", "priority":"MESSAGE_PRIORITY_HIGH", "timestamp":"2026-11-18T09:26:37.895199636Z", "renderDetails":{"messageTitle":"Run pytest test suite finished"}, "content":"Task id \"ba1085ea-d1d9-4661-b24d-654a0cbad3d6/task-2157\" finished with result:\nThe tool's output was truncated due to being too long. You can find the full output in a file at file:///root/.gemini/antigravity-cli/brain/ba1085ea-d1d9-4661-b24d-654a0cbad3d6/.system_generated/steps/2157/output.txt.\n\nHere is a preview with the middle of the output truncated:\nCommand exited with code 1.\n\nCommand output:\n============================= test session starts ==============================\r\nplatform linux -- Python 3.12.3, pytest-9.2.0, pluggy-1.7.0 -- /root/telegram-saas/.venv/bin/python3\r\ncachedir: .pytest_cache\r\nrootdir: /root/telegram-saas\r\nconfigfile: pyproject.toml\r\ntestpaths: tests\r\nplugins: anyio-4.16.0, asyncio-1.5.0\r\nasyncio: mode=Mode.AUTO, debug=False, asyncio_default_fixture_loop_scope=function, asyncio_default_test_loop_scope=function\r\ncollecting ... \rcollected 88 items                                                             \r\n\r\ntests/integration/test_ai_api.py::test_ai_module_full_lifecycle PASSED   [  1%]\r\ntests/integration/test_auth.py::test_auth_workflow PASSED                [  2%]\r\ntests/integration/test_billing_checkout_and_lifecycle.py::test_full_billing_lifecycle_and_security PASSED [  3%]\r\ntests/integration/test_billing_webhooks.py::test_razorpay_and_stripe_webhooks_and_deduplication PASSED [  4%]\r\ntests/integration/test_broadcasts_api.py::test_broadcast_and_notifications_full_lifecycle PASSED [  5%]\r\ntests/integration/test_celery_telegram_tasks.py::test_telegram_update_task_execution PASSED [  6%]\r\ntests/integration/test_emojis_api.py::test_search_emojis_by_term PASSED  [  7%]\r\ntests/integration/test_emojis_api.py::test_search_emojis_by_category PASSED [  9%]\r\ntests/integration/test_emojis_api.py::test_get_categories_list PASSED    [ 10%]\r\ntests/integration/test_emojis_api.py::test_bulk_emoji_import_and_packs_management PASSED [ 11%]\r\ntests/integration/test_health.py::test_health_liveness PASSED            [ 12%]\r\ntests/integration/test_health.py::test_health_readiness PASSED           [ 13%]\r\ntests/integration/test_i18n_api.py::test_get_locales_list PASSED         [ 14%]\r\ntests/integration/test_i18n_api.py::test_get_translation_bundle PASSED   [ 15%]\r\ntests/integration/test_i18n_api.py::test_update_user_locale PASSED       [ 17%]\r\ntests/integration/test_i18n_api.py::test_save_custom_translation_override PASSED [ 18%]\r\ntests/integration/test_i18n_api.py::test_audit_translations_and_missing_keys PASSED [ 19%]\r\ntests/integration/test_i18n_api.py::test_ai_translation_and_human_approval_workflow PASSED [ 20%]\r\ntests/integration/test_message_studio_api.py::test_bot_message_studio_lifecycle FAILED [ 21%]\r\ntests/integration/test_message_studio_e2e_publishing.py::test_message_studio_publishing_changes_real_bot_response FAILED [ 22%]\r\ntests/integration/test_multi_bot_engine.py::test_multi_tenant_multi_bot_engine_lifecycle FAILED [ 23%]\r\ntests/integration/test_multilingual_bot_responses.py::test_language_selection_in_actual_bot_responses FAILED [ 25%]\r\ntests/integration/test_plugins_api.py::test_plugins_module_full_lifecycle FAILED [ 26%]\r\ntests/integration/test_text_designer_api.py::test_text_designer_api_endpoints FAILED [ 27%]\r\ntests/tenant_isolation/test_tenant_isolation.py::test_strict_tenant_isolation FAILED [ 28%]\r\ntests/unit/test_ai_engine.py::test_openai_provider_models_and_completion PASSED [ 29%]\r\ntests/unit/test_ai_engine.py::test_openrouter_provider_models_and_completion PASSED [ 30%]\r\ntests/unit/test_ai_engine.py::test_ai_provider_factory PASSED            [ 31%]\r\ntests/unit/test_billing_gateways.py::test_razorpay_payment_signature_verification PASSED [ 32%]\r\ntests/unit/test_billing_gateways.py::test_razorpay_webhook_signature_verification PASSED [ 34%]\r\ntests/unit/test_billing_gateways.py::test_stripe_webhook_signature_verification PASSED [ 35%]\r\ntests/unit/test_billing_gateways.py::test_gateway_factory_resolution PASSED [ 36%]\r\ntests/unit/test_bot_engine.py::test_bot_token_validation_with_getme PASSED [ 37%]\r\ntests/unit/test_bot_engine.py::test_bot_token_encryption_and_decryption PASSED [ 38%]\r\ntests/unit/test_bot_engine.py::test_webhook_secret_generation_and_verification PASSED [ 39%]\r\ntests/unit/test_bot_engine.py::test_rate_limit_retry_handling PASSED     [ 40%]\r\ntests/unit/test_broadcast_engine.py::test_broadcast_audience_selection_and_opt_out PASSED [ 42%]\r\ntests/unit/test_coupons_and_entitlements.py::test_coupon_validation_and_discounts PASSED [ 43%]\r\ntests/unit/test_coupons_and_entitlements.py::test_entitlement_enforcement_and_feature_gates PASSED [ 44%]\r\ntests/unit/test_emojis.py::test_telegram_html_emoji_formatting PASSED    [ 45%]\r\ntests/unit/test_emojis.py::test_telegram_markdown_emoji_formatting PASSED [ 46%]\r\ntests/unit/test_emojis.py::test_id_precision_is_preserved_as_string PASSED [ 47%]\r\ntests/unit/test_emojis.py::test_custom_emoji_validation PASSED           [ 48%]\r\ntests/unit/test_formatter_and_engine.py::test_box_header_formatting PASSED [ 50%]\r\ntests/unit/test_formatter_and_engine.py::test_separator_presets PASSED   [ 51%]\r\ntests/unit/test_formatter_and_engine.py::test_info_block_formatting PASSED [ 52%]\r\ntests/unit/test_formatter_and_engine.py::test_progress_bar_generation PASSED [ 53%]\r\ntests/unit/test_formatter_and_engine.py::test_progress_step_header PASSED [ 5\n<truncated 34579 of 44477 bytes from the middle of the output>\nb/python3.12/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py:583: in _handle_exception\r\n    self._adapt_connection._handle_exception(error)\r\n.venv/lib/python3.12/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py:862: in _handle_exception\r\n    super()._handle_exception(error)\r\n.venv/lib/python3.12/site-packages/sqlalchemy/connectors/asyncio.py:412: in _handle_exception\r\n    self._handle_exception_no_connection(self.dbapi, error)\r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \r\n\r\ncls = <class 'sqlalchemy.dialects.postgresql.asyncpg.AsyncAdapt_asyncpg_connection'>\r\ndbapi = <sqlalchemy.dialects.postgresql.asyncpg.AsyncAdapt_asyncpg_dbapi object at 0x77e0aaab9850>\r\nerror = ForeignKeyViolationError('insert or update on table \"audit_logs\" violates foreign key constraint \"audit_logs_tenant_id_fkey\"')\r\n\r\n    @classmethod\r\n    def _handle_exception_no_connection(\r\n        cls, dbapi: Any, error: Exception\r\n    ) -> NoReturn:\r\n        if not isinstance(error, AsyncAdapt_asyncpg_dbapi.Error):\r\n            exception_mapping = dbapi._asyncpg_error_translate\r\n    \r\n            for super_ in type(error).__mro__:\r\n                if super_ in exception_mapping:\r\n                    message = error.args[0]\r\n                    translated_error = exception_mapping[super_](\r\n                        message, error\r\n                    )\r\n>                   raise translated_error from error\r\nE                   sqlalchemy.exc.IntegrityError: (sqlalchemy.dialects.postgresql.asyncpg.ForeignKeyViolationError) insert or update on table \"audit_logs\" violates foreign key constraint \"audit_logs_tenant_id_fkey\"\r\nE                   [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)]\r\nE                   [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))]\r\nE                   (Background on this error at: https://sqlalche.me/e/21/gkpj)\r\n\r\n.venv/lib/python3.12/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py:855: IntegrityError\r\n=============================== warnings summary ===============================\r\ntests/unit/test_security_audit.py:15\r\n  /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\r\n    @pytest.mark.unit\r\n\r\ntests/unit/test_security_audit.py:25\r\n  /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\r\n    @pytest.mark.unit\r\n\r\ntests/unit/test_security_audit.py:50\r\n  /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\r\n    @pytest.mark.unit\r\n\r\ntests/unit/test_security_audit.py:72\r\n  /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\r\n    @pytest.mark.unit\r\n\r\n-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html\r\n=========================== short test summary info ============================\r\nFAILED tests/integration/test_message_studio_api.py::test_bot_message_studio_lifecycle\r\nFAILED tests/integration/test_message_studio_e2e_publishing.py::test_message_studio_publishing_changes_real_bot_response\r\nFAILED tests/integration/test_multi_bot_engine.py::test_multi_tenant_multi_bot_engine_lifecycle\r\nFAILED tests/integration/test_multilingual_bot_responses.py::test_language_selection_in_actual_bot_responses\r\nFAILED tests/integration/test_plugins_api.py::test_plugins_module_full_lifecycle\r\nFAILED tests/integration/test_text_designer_api.py::test_text_designer_api_endpoints\r\nFAILED tests/tenant_isolation/test_tenant_isolation.py::test_strict_tenant_isolation\r\nFAILED tests/unit/test_security_audit.py::test_secure_filename_and_path_traversal_neutralization\r\nFAILED tests/unit/test_security_audit.py::test_audit_service_action_logging\r\n=================== 9 failed, 79 passed, 4 warnings in 4.68s ===================\r\n\nLog: file:///root/.gemini/antigravity-cli/brain/ba1085ea-d1d9-4661-b24d-654a0cbad3d6/.system_generated/tasks/task-2157.log", "sourceMetadata":{"tool":{"conversationId":"ba1085ea-d1d9-4661-b24d-654a0cbad3d6", "stepIndex":2157, "toolCall":{"id":"call_2540232417168144356", "name":"run_command", "argumentsJson":"{\"CommandLine\":\"cd /root/telegram-saas \\u0026\\u0026 .venv/bin/pytest -v\",\"WaitMsBeforeAsync\":10000,\"toolSummary\":\"Run pytest test suite\"}", "thinkingSignature":"EtgBCtUBAWkUfROs29ilGZgQJGve1PW3517yHunUPDleBIcB/8q7YZbm1839EEpaHZdCQ4gCeWTQw/D5vlMvYQ0zT7tAb+R2Aw49++EvslxUWDKQ8WSMcWcSLCZ3uXdvZcs369eRJ5g2Hg1M4lmlL4CjXgOLiqiMEBOOpZGKqa29HCwqGICw1zDUqd39mmqAlWOa50bQA6z9f7chUMcOZum6HiJl00yJtlPhMyFFBCLT612wslwZEIsQ+Q8eZUA6Gqw31KUHREBrtj0N/MmwZ+KRbuuCiQ12Ff7K"}}}}