{"id":"d5792a88-d36a-4f66-9eba-0bfc8dc5fb08", "recipient":"ba1085ea-d1d9-4661-b24d-654a0cbad3d6", "sender":"ba1085ea-d1d9-4661-b24d-654a0cbad3d6/task-1640", "priority":"MESSAGE_PRIORITY_HIGH", "timestamp":"2026-11-18T08:44:27.918493612Z", "renderDetails":{"messageTitle":"Run complete test suite finished"}, "content":"Task id \"ba1085ea-d1d9-4661-b24d-654a0cbad3d6/task-1640\" 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/1640/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 72 items                                                             \r\n\r\ntests/integration/test_auth.py::test_auth_workflow PASSED                [  1%]\r\ntests/integration/test_billing_checkout_and_lifecycle.py::test_full_billing_lifecycle_and_security PASSED [  2%]\r\ntests/integration/test_billing_webhooks.py::test_razorpay_and_stripe_webhooks_and_deduplication PASSED [  4%]\r\ntests/integration/test_celery_telegram_tasks.py::test_telegram_update_task_execution PASSED [  5%]\r\ntests/integration/test_emojis_api.py::test_search_emojis_by_term PASSED  [  6%]\r\ntests/integration/test_emojis_api.py::test_search_emojis_by_category PASSED [  8%]\r\ntests/integration/test_emojis_api.py::test_get_categories_list PASSED    [  9%]\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         [ 15%]\r\ntests/integration/test_i18n_api.py::test_get_translation_bundle PASSED   [ 16%]\r\ntests/integration/test_i18n_api.py::test_update_user_locale PASSED       [ 18%]\r\ntests/integration/test_i18n_api.py::test_save_custom_translation_override PASSED [ 19%]\r\ntests/integration/test_i18n_api.py::test_audit_translations_and_missing_keys PASSED [ 20%]\r\ntests/integration/test_i18n_api.py::test_ai_translation_and_human_approval_workflow PASSED [ 22%]\r\ntests/integration/test_message_studio_api.py::test_bot_message_studio_lifecycle PASSED [ 23%]\r\ntests/integration/test_message_studio_e2e_publishing.py::test_message_studio_publishing_changes_real_bot_response PASSED [ 25%]\r\ntests/integration/test_multi_bot_engine.py::test_multi_tenant_multi_bot_engine_lifecycle FAILED [ 26%]\r\ntests/integration/test_multilingual_bot_responses.py::test_language_selection_in_actual_bot_responses PASSED [ 27%]\r\ntests/integration/test_text_designer_api.py::test_text_designer_api_endpoints PASSED [ 29%]\r\ntests/tenant_isolation/test_tenant_isolation.py::test_strict_tenant_isolation PASSED [ 30%]\r\ntests/unit/test_billing_gateways.py::test_razorpay_payment_signature_verification PASSED [ 31%]\r\ntests/unit/test_billing_gateways.py::test_razorpay_webhook_signature_verification PASSED [ 33%]\r\ntests/unit/test_billing_gateways.py::test_stripe_webhook_signature_verification PASSED [ 34%]\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 [ 40%]\r\ntests/unit/test_bot_engine.py::test_rate_limit_retry_handling PASSED     [ 41%]\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 [ 47%]\r\ntests/unit/test_emojis.py::test_id_precision_is_preserved_as_string PASSED [ 48%]\r\ntests/unit/test_emojis.py::test_custom_emoji_validation PASSED           [ 50%]\r\ntests/unit/test_formatter_and_engine.py::test_box_header_formatting PASSED [ 51%]\r\ntests/unit/test_formatter_and_engine.py::test_separator_presets PASSED   [ 52%]\r\ntests/unit/test_formatter_and_engine.py::test_info_block_formatting PASSED [ 54%]\r\ntests/unit/test_formatter_and_engine.py::test_progress_bar_generation PASSED [ 55%]\r\ntests/unit/test_formatter_and_engine.py::test_progress_step_header PASSED [ 56%]\r\ntests/unit/test_formatter_and_engine.py::test_telegram_message_builder PASSED [ 58%]\r\ntests/unit/test_i18n.py::test_supported_locales_catalog PASSED           [ 59%]\r\ntests/unit/test_i18n.py::test_rtl_detection PASSED                       [ 61%]\r\ntests/unit/test_i18n.py::test_plural_rules PASSED                        [ 62%]\r\ntests/unit/test_i18n.py::test_formatting PASSED                          [ 63%]\r\ntests/unit/test_i18n.py::test_fallback_resolution PASSED                 [ 65%]\r\ntests/unit/test_i18n.py::test_translation_engine PASSED                  [ 66%]\r\ntests/unit/test_i18n.py::test_bcp47_locale_normalization \n<truncated 2841 of 12739 bytes from the middle of the output>\nalpha_bot_1_{uuid.uuid4().hex[:6]}\"\r\n        bot_uname_a2 = f\"alpha_bot_2_{uuid.uuid4().hex[:6]}\"\r\n        bot_uname_b1 = f\"beta_bot_1_{uuid.uuid4().hex[:6]}\"\r\n    \r\n        TelegramApiService.register_mock_bot(token_a1, bot_uname_a1, \"Alpha One\")\r\n        TelegramApiService.register_mock_bot(token_a2, bot_uname_a2, \"Alpha Two\")\r\n        TelegramApiService.register_mock_bot(token_b1, bot_uname_b1, \"Beta One\")\r\n    \r\n        # -------------------------------------------------------------\r\n        # 2. Register User A & Tenant Alpha\r\n        # -------------------------------------------------------------\r\n        user_a_email = f\"user_a_{uuid.uuid4().hex[:6]}@example.com\"\r\n        resp_a = await async_client.post(\r\n            \"/api/v1/auth/register\",\r\n            json={\"email\": user_a_email, \"password\": \"PasswordA123!\", \"full_name\": \"Alice Alpha\"},\r\n        )\r\n        token_user_a = resp_a.json()[\"data\"][\"access_token\"]\r\n    \r\n        tenant_a_resp = await async_client.post(\r\n            \"/api/v1/tenants\",\r\n            headers={\"Authorization\": f\"Bearer {token_user_a}\"},\r\n            json={\"name\": \"Tenant Alpha Org\", \"slug\": f\"alpha-{uuid.uuid4().hex[:6]}\"},\r\n        )\r\n        tenant_a_id = tenant_a_resp.json()[\"data\"][\"id\"]\r\n        headers_a = {\r\n            \"Authorization\": f\"Bearer {token_user_a}\",\r\n            \"X-Tenant-ID\": str(tenant_a_id),\r\n        }\r\n    \r\n        # -------------------------------------------------------------\r\n        # 3. Register User B & Tenant Beta\r\n        # -------------------------------------------------------------\r\n        user_b_email = f\"user_b_{uuid.uuid4().hex[:6]}@example.com\"\r\n        resp_b = await async_client.post(\r\n            \"/api/v1/auth/register\",\r\n            json={\"email\": user_b_email, \"password\": \"PasswordB123!\", \"full_name\": \"Bob Beta\"},\r\n        )\r\n        token_user_b = resp_b.json()[\"data\"][\"access_token\"]\r\n    \r\n        tenant_b_resp = await async_client.post(\r\n            \"/api/v1/tenants\",\r\n            headers={\"Authorization\": f\"Bearer {token_user_b}\"},\r\n            json={\"name\": \"Tenant Beta Org\", \"slug\": f\"beta-{uuid.uuid4().hex[:6]}\"},\r\n        )\r\n        tenant_b_id = tenant_b_resp.json()[\"data\"][\"id\"]\r\n        headers_b = {\r\n            \"Authorization\": f\"Bearer {token_user_b}\",\r\n            \"X-Tenant-ID\": str(tenant_b_id),\r\n        }\r\n    \r\n        # -------------------------------------------------------------\r\n        # 4. Tenant Alpha Registers Bot A1 and Bot A2\r\n        # -------------------------------------------------------------\r\n        reg_a1 = await async_client.post(\r\n            \"/api/v1/bots\",\r\n            headers=headers_a,\r\n            json={\"token\": token_a1, \"name\": \"Alpha Bot 1\", \"default_locale\": \"en\"},\r\n        )\r\n        assert reg_a1.status_code == 201, reg_a1.text\r\n        bot_a1_data = reg_a1.json()[\"data\"]\r\n        bot_a1_id = bot_a1_data[\"id\"]\r\n        assert bot_a1_data[\"username\"] == bot_uname_a1\r\n        assert bot_a1_data[\"webhook_active\"] is True\r\n        # Ensure raw token was NEVER returned\r\n        assert \"token\" not in bot_a1_data\r\n        assert \"encrypted_token\" not in bot_a1_data\r\n    \r\n        reg_a2 = await async_client.post(\r\n            \"/api/v1/bots\",\r\n            headers=headers_a,\r\n            json={\"token\": token_a2, \"name\": \"Alpha Bot 2\", \"default_locale\": \"hi\"},\r\n        )\r\n>       assert reg_a2.status_code == 201\r\nE       assert 429 == 201\r\nE        +  where 429 = <Response [429 Too Many Requests]>.status_code\r\n\r\ntests/integration/test_multi_bot_engine.py:96: AssertionError\r\n----------------------------- Captured stdout call -----------------------------\r\n2026-11-18 08:44:24 [info     ] dispatching_domain_event       event_id=a3308955-9a60-4a7b-a6be-d19abce7339d event_type=UserRegisteredEvent handlers_count=0\r\n2026-11-18 08:44:24 [info     ] dispatching_domain_event       event_id=a18bb453-bc67-45bf-9688-f2043e37c89f event_type=TenantCreatedEvent handlers_count=0\r\n2026-11-18 08:44:24 [info     ] dispatching_domain_event       event_id=dbd63690-7610-41b7-8477-9a3add83f41d event_type=UserRegisteredEvent handlers_count=0\r\n2026-11-18 08:44:24 [info     ] dispatching_domain_event       event_id=04f5a0fc-d340-417e-86f2-5cd8858e2415 event_type=TenantCreatedEvent handlers_count=0\r\n2026-11-18 08:44:24 [info     ] bot_registered_successfully    bot_id=43e64742-f16c-4ba3-9d7e-7456a832bae0 tenant_id=1f63e76c-135f-4a37-8a93-9f459436ba3f username=alpha_bot_1_8ce8f6\r\n2026-11-18 08:44:24 [warning  ] app_exception_handled          error_code=QUOTA_EXCEEDED message=\"Plan 'Free Tier' limit of 1 active bot(s) reached. Please upgrade your subscription to connect more bots.\" method=POST path=/api/v1/bots\r\n=========================== short test summary info ============================\r\nFAILED tests/integration/test_multi_bot_engine.py::test_multi_tenant_multi_bot_engine_lifecycle\r\n========================= 1 failed, 71 passed in 6.53s =========================\r\n\nLog: file:///root/.gemini/antigravity-cli/brain/ba1085ea-d1d9-4661-b24d-654a0cbad3d6/.system_generated/tasks/task-1640.log", "sourceMetadata":{"tool":{"conversationId":"ba1085ea-d1d9-4661-b24d-654a0cbad3d6", "stepIndex":1640, "toolCall":{"id":"call_18280697414730243853", "name":"run_command", "argumentsJson":"{\"CommandLine\":\"cd /root/telegram-saas \\u0026\\u0026 .venv/bin/pytest -v\",\"WaitMsBeforeAsync\":10000,\"toolSummary\":\"Run complete test suite\"}", "thinkingSignature":"EtYDCtMDAWkUfRMq0jQ4X+lgvjYJe7Mgsxkl1/ma6ffcBOMVxp59SCnNLP02+v9dDVQe4ikEKu3mIzA6BzEa8J4ETjfUobkbXBhn27kSVJpMc+LV4+ujbDYuGX2zr7PRYSiVngExPRMiMoJ9BUuAhzl+F6HBizC4WhB6b+oi1ipCaK/eV19us2B8VXjjG5P8AC2u63aaGKE+NT2igh9hpQ+anMSgyJ/nZ2tYDXkPP+sxCRgw+qayNEnMXMfW7Q08mvFbg7eN+3wK5srR3+25jGwIrFesGaw/X+FPX2Y0H0XbobkRC8IUslJJZprsjbsIuD7/4RoDnNTnRGgmvmVrnBokZp7t/E2s+Wkb2MdqVugI5UYmWa/V7P76j7cWep6Rvf9mJlRRu47RoDtu6KOKLpaxO5kS22Z2L9OCDaFJmSi94ceBCVs7cPlZBDNDf4A8nx386SMWkq3W9eIolXU8VyRzgwPMVOTRd7XHjE2NVKkKoN5q+jHyt910svRN4vaZboc/TJ4S/YvM8YXX9FDSRU3PC6//w9qB1PSPjIP1TEaeJYrXbMj6SYddUYfG7njVNZStR8U4ICtt/8lTQqe6Nqwo71qx6sHTv93C5mUgopZYBjijtJIv2N4="}}}}