......F [100%] =================================== FAILURES =================================== __________________________ test_dualcoach_golden_path __________________________ tmp_path = PosixPath('/tmp/pytest-of-cube/pytest-0/test_dualcoach_golden_path0') monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7d1ccc80fbf0> @pytest.mark.asyncio @pytest.mark.filterwarnings( "ignore:Setting custom Request._transport_sockname attribute is discouraged:DeprecationWarning:aiohttp.web_request" ) async def test_dualcoach_golden_path(tmp_path: Path, monkeypatch) -> None: """One real-handler path from committed activation through stopped service.""" import socket from aiohttp import web from gateway.config import PlatformConfig from telegram import Bot, InlineKeyboardMarkup attempts: list[dict[str, str]] = [] server_ready = asyncio.Event() get_me_received = asyncio.Event() delivery_complete = asyncio.Event() async def telegram_send(request: web.Request) -> web.Response: form = await request.post() attempts.append({key: str(value) for key, value in form.items()}) delivery_complete.set() return web.json_response( { "ok": True, "result": { "message_id": 7001, "date": 1786262400, "chat": {"id": -100200, "type": "supergroup"}, "message_thread_id": 73, "text": str(form["text"]), }, } ) async def telegram_get_me(_request: web.Request) -> web.Response: get_me_received.set() return web.json_response( { "ok": True, "result": { "id": 123456, "is_bot": True, "first_name": "Golden", "username": "golden_bot", }, } ) app = web.Application() app.router.add_post("/bot123456:golden/sendMessage", telegram_send) app.router.add_post("/bot123456:golden/getMe", telegram_get_me) runner = web.AppRunner(app) await runner.setup() server_socket = socket.socket() server_socket.bind(("127.0.0.1", 0)) port = server_socket.getsockname()[1] site = web.SockSite(runner, server_socket) await site.start() server_ready.set() async with asyncio.timeout(2): await server_ready.wait() base_url = f"http://127.0.0.1:{port}/bot" bot: Bot | None = None try: > profile_root, registry_path, _data_root = _profile_registry( tmp_path, committed=True, numeric_routes=True, complete_plan_targets=True, ) tests/gateway/test_nutrition_coaching.py:153: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/gateway/test_nutrition_coaching.py:802: in _profile_registry _write_activation_readiness( tests/gateway/test_nutrition_coaching.py:533: in _write_activation_readiness fixture_spec.loader.exec_module(fixture_module) :999: in exec_module ??? :488: in _call_with_frames_removed ??? _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from __future__ import annotations import json import shutil import threading from dataclasses import replace from datetime import date, time, timedelta from pathlib import Path import pytest import checkin_cli.customer_admin as customer_admin_module from checkin_cli.adaptive_nutrition import ( digest, feature_config_digest, initialize_adaptive_customer, load_approved_adaptive_artifacts, ) > from checkin_cli.customer_admin import ( CustomerAdminError, CustomerDraft, activate_customer, approve_adaptive_registration_inputs, approve_dual_coach_risk_policy, audit_gate_d_preflight, load_approved_adaptive_registration_inputs, load_runtime_customer_registry, main, prepare_adaptive_nutrition_runtime, reconcile_adaptive_nutrition_journals, register_customer, set_customer_ai_consent, set_customer_enabled, update_adaptive_registration_inputs, validate_committed_activation, ) E ImportError: cannot import name 'CustomerDraft' from 'checkin_cli.customer_admin' (/tmp/pytest-of-cube/pytest-0/test_cli_cutover_preflight_fai0/package/checkin_cli/customer_admin.py) ../../../.hermes/profiles/dualcoachtest/workspace/checkin_cli/tests/test_customer_admin.py:19: ImportError =========================== short test summary info ============================ FAILED tests/gateway/test_nutrition_coaching.py::test_dualcoach_golden_path 1 failed, 6 passed in 0.58s