error[invalid-argument-type]: Argument to bound method `get` is incorrect
   --> dualcoach/profile/checkin_cli/coaching_grounding.py:161:15
    |
159 |             "weekly": "weekly_report_v1",
160 |             "adaptive_operator": "adaptive_nutrition_v1",
161 |         }.get(selected_surface)
    |               ^^^^^^^^^^^^^^^^ Expected `str`, found `~None`
162 |     if selected_playbook not in _PLAYBOOKS:
163 |         raise ValueError("grounding playbook is not allowlisted")
    |
info: Matching overload defined here
    --> stdlib/builtins.pyi:3015:9
     |
3013 |     # Positional-only in dict, but not in MutableMapping
3014 |     @overload  # type: ignore[override]
3015 |     def get(self, key: _KT, default: None = None, /) -> _VT | None:
     |         ^^^       -------- Parameter declared here
3016 |         """Return the value for key if key is in the dictionary, else default."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@dict, default: _VT@dict, /) -> _VT@dict
info:   [_T](self, key: _KT@dict, default: _T, /) -> _VT@dict | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method dict[str, tuple[str, ...]].__getitem__(key: str, /) -> tuple[str, ...]` cannot be called with key of type `object` on object of type `dict[str, tuple[str, ...]]`
   --> dualcoach/profile/checkin_cli/coaching_grounding.py:190:18
    |
188 |         "source clusters",
189 |         allowed=_ALLOWED_SOURCE_CLUSTERS,
190 |         expected=_SURFACE_CLUSTERS[selected_surface],
    |                  ^^^^^^^^^^^^^^^^^
191 |     )
192 |     risks = _opaque_ids(
    |
info: rule `invalid-argument-type` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `items`
   --> dualcoach/profile/checkin_cli/coaching_grounding.py:224:53
    |
222 |     current = _finalized_snapshot(snapshot)
223 |     source_facts = current.get("answers", {}) if isinstance(current.get("answers"), dict) else {}
224 |     query = {str(key): str(value) for key, value in source_facts.items() if isinstance(value, str)}
    |                                                     ^^^^^^^^^^^^^^^^^^
225 |     retrieved = _compat_retrieved(retrieve_for_checkin(profile_root, query))
226 |     try:
    |
info: rule `unresolved-attribute` is enabled by default

error[not-iterable]: Object of type `object` is not iterable
   --> dualcoach/profile/checkin_cli/coaching_grounding.py:292:21
    |
290 |             text=item.text,
291 |         )
292 |         for item in items
    |                     ^^^^^
293 |     )
    |
info: It doesn't have an `__iter__` method or a `__getitem__` method
info: rule `not-iterable` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[Mapping[Unknown, object]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["previous_comparison"]` on object of type `Top[Mapping[Unknown, object]]`
   --> dualcoach/profile/checkin_cli/coaching_grounding.py:342:33
    |
340 |         for key in ("previous_comparison", "recent_committed_adjustment", "next_check_time"):
341 |             if key in facts and not any(isinstance(pair, (tuple, list)) and len(pair) == 2 and pair[0] == key for pair in pairs):
342 |                 pairs += ((key, facts[key]),)
    |                                 ^^^^^
343 |     result: list[tuple[str, str]] = []
344 |     seen: set[str] = set()
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[Mapping[Unknown, object]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["recent_committed_adjustment"]` on object of type `Top[Mapping[Unknown, object]]`
   --> dualcoach/profile/checkin_cli/coaching_grounding.py:342:33
    |
340 |         for key in ("previous_comparison", "recent_committed_adjustment", "next_check_time"):
341 |             if key in facts and not any(isinstance(pair, (tuple, list)) and len(pair) == 2 and pair[0] == key for pair in pairs):
342 |                 pairs += ((key, facts[key]),)
    |                                 ^^^^^
343 |     result: list[tuple[str, str]] = []
344 |     seen: set[str] = set()
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[Mapping[Unknown, object]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["next_check_time"]` on object of type `Top[Mapping[Unknown, object]]`
   --> dualcoach/profile/checkin_cli/coaching_grounding.py:342:33
    |
340 |         for key in ("previous_comparison", "recent_committed_adjustment", "next_check_time"):
341 |             if key in facts and not any(isinstance(pair, (tuple, list)) and len(pair) == 2 and pair[0] == key for pair in pairs):
342 |                 pairs += ((key, facts[key]),)
    |                                 ^^^^^
343 |     result: list[tuple[str, str]] = []
344 |     seen: set[str] = set()
    |
info: rule `invalid-argument-type` is enabled by default

error[no-matching-overload]: No overload of function `fullmatch` matches arguments
   --> dualcoach/profile/checkin_cli/coaching_grounding.py:433:12
    |
431 |     if any(type(item) is not str for item in value):
432 |         raise ValueError(f"{label} are invalid")
433 |     if any(re.fullmatch(r"[a-z][a-z0-9_.-]{1,63}", item) is None for item in value):
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
434 |         raise ValueError(f"{label} are invalid")
435 |     if len(set(value)) != len(value):
    |
info: First overload defined here
   --> stdlib/re.pyi:471:5
    |
469 | def match(pattern: bytes | Pattern[bytes], string: ReadableBuffer, flags: _FlagsType = 0) -> Match[bytes] | None: ...
470 | @overload
471 | def fullmatch(pattern: str | Pattern[str], string: str, flags: _FlagsType = 0) -> Match[str] | None:
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
472 |     """Try to apply the pattern to all of the string, returning
473 |     a Match object, or None if no match was found.
    |
info: Possible overloads for function `fullmatch`:
info:   (pattern: str | Pattern[str], string: str, flags: int = 0) -> Match[str] | None
info:   (pattern: bytes | Pattern[bytes], string: Buffer, flags: int = 0) -> Match[bytes] | None
info: rule `no-matching-overload` is enabled by default

error[invalid-return-type]: Return type does not match returned value
   --> dualcoach/profile/checkin_cli/coaching_grounding.py:441:12
    |
439 |     if expected is not None and value != expected:
440 |         raise ValueError(f"{label} are invalid")
441 |     return value
    |            ^^^^^ expected `tuple[str, ...]`, found `tuple[object, ...]`
    |
   ::: dualcoach/profile/checkin_cli/coaching_grounding.py:428:6
    |
426 |     allowed: frozenset[str] | None = None,
427 |     expected: tuple[str, ...] | None = None,
428 | ) -> tuple[str, ...]:
    |      --------------- Expected `tuple[str, ...]` because of return type
429 |     if type(value) is not tuple or not 1 <= len(value) <= _MAX_MEMORY_ITEMS:
430 |         raise ValueError(f"{label} are invalid")
    |
info: rule `invalid-return-type` is enabled by default

error[invalid-assignment]: Invalid subscript assignment with key of type `object` and value of type `str` on object of type `dict[str, object]`
   --> dualcoach/profile/checkin_cli/coaching_grounding.py:505:17
    |
503 |                 continue
504 |             if isinstance(value, str):
505 |                 sanitized_answers[key] = " ".join(value.split())[:500]
    |                 ^^^^^^^^^^^^^^^^^^---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |                                   |
    |                                   Expected key of type `str`, got `object`
506 |             elif isinstance(value, (int, float)) and not isinstance(value, bool):
507 |                 sanitized_answers[key] = value
    |
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Invalid subscript assignment with key of type `object` and value of type `(int & ~bool) | float` on object of type `dict[str, object]`
   --> dualcoach/profile/checkin_cli/coaching_grounding.py:507:17
    |
505 |                 sanitized_answers[key] = " ".join(value.split())[:500]
506 |             elif isinstance(value, (int, float)) and not isinstance(value, bool):
507 |                 sanitized_answers[key] = value
    |                 ^^^^^^^^^^^^^^^^^^---^^^^^^^^^
    |                                   |
    |                                   Expected key of type `str`, got `object`
508 |     return {
509 |         "flow": flow if isinstance(flow, str) else "unknown",
    |
info: rule `invalid-assignment` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
   --> dualcoach/profile/checkin_cli/coaching_grounding.py:531:30
    |
529 |     if not isinstance(raw, dict):
530 |         return "관측 범위 정보를 확인할 수 없음."
531 |     first = _integer(raw.get("first_observed_day"))
    |                              ^^^^^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["first_observed_day"]`
532 |     last = _integer(raw.get("last_observed_day"))
533 |     weights = _count(raw.get("days_with_weight"))
    |
info: Matching overload defined here
    --> stdlib/builtins.pyi:3015:9
     |
3013 |     # Positional-only in dict, but not in MutableMapping
3014 |     @overload  # type: ignore[override]
3015 |     def get(self, key: _KT, default: None = None, /) -> _VT | None:
     |         ^^^       -------- Parameter declared here
3016 |         """Return the value for key if key is in the dictionary, else default."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@dict, default: _VT@dict, /) -> _VT@dict
info:   [_T](self, key: _KT@dict, default: _T, /) -> _VT@dict | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
   --> dualcoach/profile/checkin_cli/coaching_grounding.py:532:29
    |
530 |         return "관측 범위 정보를 확인할 수 없음."
531 |     first = _integer(raw.get("first_observed_day"))
532 |     last = _integer(raw.get("last_observed_day"))
    |                             ^^^^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["last_observed_day"]`
533 |     weights = _count(raw.get("days_with_weight"))
534 |     sleep = _count(raw.get("days_with_sleep"))
    |
info: Matching overload defined here
    --> stdlib/builtins.pyi:3015:9
     |
3013 |     # Positional-only in dict, but not in MutableMapping
3014 |     @overload  # type: ignore[override]
3015 |     def get(self, key: _KT, default: None = None, /) -> _VT | None:
     |         ^^^       -------- Parameter declared here
3016 |         """Return the value for key if key is in the dictionary, else default."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@dict, default: _VT@dict, /) -> _VT@dict
info:   [_T](self, key: _KT@dict, default: _T, /) -> _VT@dict | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
   --> dualcoach/profile/checkin_cli/coaching_grounding.py:533:30
    |
531 |     first = _integer(raw.get("first_observed_day"))
532 |     last = _integer(raw.get("last_observed_day"))
533 |     weights = _count(raw.get("days_with_weight"))
    |                              ^^^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["days_with_weight"]`
534 |     sleep = _count(raw.get("days_with_sleep"))
535 |     without = _count(raw.get("days_without_measurements"))
    |
info: Matching overload defined here
    --> stdlib/builtins.pyi:3015:9
     |
3013 |     # Positional-only in dict, but not in MutableMapping
3014 |     @overload  # type: ignore[override]
3015 |     def get(self, key: _KT, default: None = None, /) -> _VT | None:
     |         ^^^       -------- Parameter declared here
3016 |         """Return the value for key if key is in the dictionary, else default."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@dict, default: _VT@dict, /) -> _VT@dict
info:   [_T](self, key: _KT@dict, default: _T, /) -> _VT@dict | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
   --> dualcoach/profile/checkin_cli/coaching_grounding.py:534:28
    |
532 |     last = _integer(raw.get("last_observed_day"))
533 |     weights = _count(raw.get("days_with_weight"))
534 |     sleep = _count(raw.get("days_with_sleep"))
    |                            ^^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["days_with_sleep"]`
535 |     without = _count(raw.get("days_without_measurements"))
536 |     parts = [
    |
info: Matching overload defined here
    --> stdlib/builtins.pyi:3015:9
     |
3013 |     # Positional-only in dict, but not in MutableMapping
3014 |     @overload  # type: ignore[override]
3015 |     def get(self, key: _KT, default: None = None, /) -> _VT | None:
     |         ^^^       -------- Parameter declared here
3016 |         """Return the value for key if key is in the dictionary, else default."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@dict, default: _VT@dict, /) -> _VT@dict
info:   [_T](self, key: _KT@dict, default: _T, /) -> _VT@dict | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
   --> dualcoach/profile/checkin_cli/coaching_grounding.py:535:30
    |
533 |     weights = _count(raw.get("days_with_weight"))
534 |     sleep = _count(raw.get("days_with_sleep"))
535 |     without = _count(raw.get("days_without_measurements"))
    |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["days_without_measurements"]`
536 |     parts = [
537 |         f"관측 일차: D{first}~D{last}." if first is not None and last is not None else "관측 일차 범위 미상.",
    |
info: Matching overload defined here
    --> stdlib/builtins.pyi:3015:9
     |
3013 |     # Positional-only in dict, but not in MutableMapping
3014 |     @overload  # type: ignore[override]
3015 |     def get(self, key: _KT, default: None = None, /) -> _VT | None:
     |         ^^^       -------- Parameter declared here
3016 |         """Return the value for key if key is in the dictionary, else default."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@dict, default: _VT@dict, /) -> _VT@dict
info:   [_T](self, key: _KT@dict, default: _T, /) -> _VT@dict | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
   --> dualcoach/profile/checkin_cli/coaching_grounding.py:540:23
    |
538 |         f"체중 관측 {weights}일, 수면 관측 {sleep}일." if weights is not None and sleep is not None else "체중·수면 관측 수 미상.",
539 |     ]
540 |     missing = raw.get("missing_days")
    |                       ^^^^^^^^^^^^^^ Expected `Never`, found `Literal["missing_days"]`
541 |     if isinstance(missing, list) and all(_integer(item) is not None for item in missing) and set(range(1, 21)).issubset({_integer(ite…
542 |         parts.append("D1–D20은 관찰되지 않아 추세에 포함하지 않음.")
    |
info: Matching overload defined here
    --> stdlib/builtins.pyi:3015:9
     |
3013 |     # Positional-only in dict, but not in MutableMapping
3014 |     @overload  # type: ignore[override]
3015 |     def get(self, key: _KT, default: None = None, /) -> _VT | None:
     |         ^^^       -------- Parameter declared here
3016 |         """Return the value for key if key is in the dictionary, else default."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@dict, default: _VT@dict, /) -> _VT@dict
info:   [_T](self, key: _KT@dict, default: _T, /) -> _VT@dict | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
   --> dualcoach/profile/checkin_cli/coaching_grounding.py:553:66
    |
551 |     entries: list[str] = []
552 |     for item in raw:
553 |         if not isinstance(item, dict) or not isinstance(item.get("date"), str):
    |                                                                  ^^^^^^ Expected `Never`, found `Literal["date"]`
554 |             continue
555 |         metrics = _observed_metrics(item)
    |
info: Matching overload defined here
    --> stdlib/builtins.pyi:3015:9
     |
3013 |     # Positional-only in dict, but not in MutableMapping
3014 |     @overload  # type: ignore[override]
3015 |     def get(self, key: _KT, default: None = None, /) -> _VT | None:
     |         ^^^       -------- Parameter declared here
3016 |         """Return the value for key if key is in the dictionary, else default."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@dict, default: _VT@dict, /) -> _VT@dict
info:   [_T](self, key: _KT@dict, default: _T, /) -> _VT@dict | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `_observed_metrics` is incorrect
   --> dualcoach/profile/checkin_cli/coaching_grounding.py:555:37
    |
553 |         if not isinstance(item, dict) or not isinstance(item.get("date"), str):
554 |             continue
555 |         metrics = _observed_metrics(item)
    |                                     ^^^^ Expected `dict[str, object]`, found `Top[dict[Unknown, Unknown]]`
556 |         if metrics:
557 |             entries.append(f"{item['date']}: {', '.join(metrics)}")
    |
info: Function defined here
   --> dualcoach/profile/checkin_cli/coaching_grounding.py:562:5
    |
562 | def _observed_metrics(item: dict[str, object]) -> tuple[str, ...]:
    |     ^^^^^^^^^^^^^^^^^ ----------------------- Parameter declared here
563 |     metrics: list[str] = []
564 |     weight = _number(item.get("weight_kg"))
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["date"]` on object of type `Top[dict[Unknown, Unknown]]`
   --> dualcoach/profile/checkin_cli/coaching_grounding.py:557:31
    |
555 |         metrics = _observed_metrics(item)
556 |         if metrics:
557 |             entries.append(f"{item['date']}: {', '.join(metrics)}")
    |                               ^^^^
558 |     recent = entries[-7:]
559 |     return "최근 구조화 관측: " + " | ".join(recent) if recent else "최근 관측된 수치 없음."
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
   --> dualcoach/profile/checkin_cli/coaching_grounding.py:583:25
    |
581 |         if not isinstance(item, dict):
582 |             continue
583 |         week = item.get("week_start")
    |                         ^^^^^^^^^^^^ Expected `Never`, found `Literal["week_start"]`
584 |         average = _number(item.get("average_weight_kg"))
585 |         samples = _integer(item.get("sample_count"))
    |
info: Matching overload defined here
    --> stdlib/builtins.pyi:3015:9
     |
3013 |     # Positional-only in dict, but not in MutableMapping
3014 |     @overload  # type: ignore[override]
3015 |     def get(self, key: _KT, default: None = None, /) -> _VT | None:
     |         ^^^       -------- Parameter declared here
3016 |         """Return the value for key if key is in the dictionary, else default."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@dict, default: _VT@dict, /) -> _VT@dict
info:   [_T](self, key: _KT@dict, default: _T, /) -> _VT@dict | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
   --> dualcoach/profile/checkin_cli/coaching_grounding.py:584:36
    |
582 |             continue
583 |         week = item.get("week_start")
584 |         average = _number(item.get("average_weight_kg"))
    |                                    ^^^^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["average_weight_kg"]`
585 |         samples = _integer(item.get("sample_count"))
586 |         if isinstance(week, str) and average is not None and samples is not None:
    |
info: Matching overload defined here
    --> stdlib/builtins.pyi:3015:9
     |
3013 |     # Positional-only in dict, but not in MutableMapping
3014 |     @overload  # type: ignore[override]
3015 |     def get(self, key: _KT, default: None = None, /) -> _VT | None:
     |         ^^^       -------- Parameter declared here
3016 |         """Return the value for key if key is in the dictionary, else default."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@dict, default: _VT@dict, /) -> _VT@dict
info:   [_T](self, key: _KT@dict, default: _T, /) -> _VT@dict | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
   --> dualcoach/profile/checkin_cli/coaching_grounding.py:585:37
    |
583 |         week = item.get("week_start")
584 |         average = _number(item.get("average_weight_kg"))
585 |         samples = _integer(item.get("sample_count"))
    |                                     ^^^^^^^^^^^^^^ Expected `Never`, found `Literal["sample_count"]`
586 |         if isinstance(week, str) and average is not None and samples is not None:
587 |             entries.append(f"{week} 주간 평균 {average:g}kg (표본 {samples}일)")
    |
info: Matching overload defined here
    --> stdlib/builtins.pyi:3015:9
     |
3013 |     # Positional-only in dict, but not in MutableMapping
3014 |     @overload  # type: ignore[override]
3015 |     def get(self, key: _KT, default: None = None, /) -> _VT | None:
     |         ^^^       -------- Parameter declared here
3016 |         """Return the value for key if key is in the dictionary, else default."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@dict, default: _VT@dict, /) -> _VT@dict
info:   [_T](self, key: _KT@dict, default: _T, /) -> _VT@dict | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `_registration_kst_timestamp` is incorrect
   --> dualcoach/profile/checkin_cli/customer_admin.py:159:60
    |
157 |             "approved": True,
158 |             "approved_by": owner_actor.model_dump(mode="json"),
159 |             "approved_at_kst": _registration_kst_timestamp(approved_at_kst),
    |                                                            ^^^^^^^^^^^^^^^ Expected `str | None`, found `str | datetime | None`
160 |             "customer_key": key,
161 |             "owner_digest": authority["owner_digest"],
    |
info: Element `datetime` of this union is not assignable to `str | None`
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_admin.py:2197:5
     |
2197 | def _registration_kst_timestamp(value: str | None) -> str:
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ----------------- Parameter declared here
2198 |     timestamp = datetime.now(_KST) if value is None else value
2199 |     if isinstance(timestamp, str):
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `_require_opaque_id` is incorrect
   --> dualcoach/profile/checkin_cli/customer_admin.py:614:9
    |
612 |     attempt = _require_opaque_id(attempt_id, "attempt_id")
613 |     replacement = _require_opaque_id(
614 |         supersedes_entry_id,
    |         ^^^^^^^^^^^^^^^^^^^ Expected `str`, found `str | None`
615 |         "supersedes_entry_id",
616 |         optional=True,
    |
info: Element `None` of this union is not assignable to `str`
info: Function defined here
   --> dualcoach/profile/checkin_cli/customer_admin.py:371:5
    |
371 | def _require_opaque_id(
    |     ^^^^^^^^^^^^^^^^^^
372 |     value: str, field_name: str, *, optional: bool = False
    |     ---------- Parameter declared here
373 | ) -> str | None:
374 |     if optional and value is None:
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `record_operator_time` is incorrect
   --> dualcoach/profile/checkin_cli/customer_admin.py:637:13
    |
635 |         result = EventStore.for_registered(runtime).record_operator_time(
636 |             customer_key,
637 |             entry_id=entry,
    |             ^^^^^^^^^^^^^^ Expected `str`, found `str | None`
638 |             attempt_id=attempt,
639 |             minutes=minutes,
    |
info: Element `None` of this union is not assignable to `str`
info: Method defined here
    --> dualcoach/profile/checkin_cli/store.py:1013:9
     |
1011 |         return self._append_customer_record(customer_key, event)
1012 |
1013 |     def record_operator_time(
     |         ^^^^^^^^^^^^^^^^^^^^
1014 |         self,
1015 |         customer_key: str,
1016 |         *,
1017 |         entry_id: str,
     |         ------------- Parameter declared here
1018 |         attempt_id: str,
1019 |         minutes: int,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `record_operator_time` is incorrect
   --> dualcoach/profile/checkin_cli/customer_admin.py:638:13
    |
636 |             customer_key,
637 |             entry_id=entry,
638 |             attempt_id=attempt,
    |             ^^^^^^^^^^^^^^^^^^ Expected `str`, found `str | None`
639 |             minutes=minutes,
640 |             task=operator_task,
    |
info: Element `None` of this union is not assignable to `str`
info: Method defined here
    --> dualcoach/profile/checkin_cli/store.py:1013:9
     |
1011 |         return self._append_customer_record(customer_key, event)
1012 |
1013 |     def record_operator_time(
     |         ^^^^^^^^^^^^^^^^^^^^
1014 |         self,
1015 |         customer_key: str,
1016 |         *,
1017 |         entry_id: str,
1018 |         attempt_id: str,
     |         --------------- Parameter declared here
1019 |         minutes: int,
1020 |         task: OperatorTask | str,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `validate_legacy_activation_authority` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:1934:13
     |
1932 |             ) from exc
1933 |         if not isinstance(manifest, dict) or not validate_legacy_activation_authority(
1934 |             manifest,
     |             ^^^^^^^^ Expected `dict[str, str]`, found `dict[str, object]`
1935 |             customer_key=spec.customer_key,
1936 |             activation_receipt_digest=_json_digest(journal),
     |
info: Function defined here
   --> dualcoach/profile/checkin_cli/nutrition_onboarding_projection.py:177:5
    |
177 | def validate_legacy_activation_authority(
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
178 |     manifest: dict[str, str],
    |     ------------------------ Parameter declared here
179 |     *,
180 |     customer_key: str,
    |
info: rule `invalid-argument-type` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `get`
    --> dualcoach/profile/checkin_cli/customer_admin.py:2400:13
     |
2398 |         document = row["input_document"]
2399 |         if (
2400 |             document.get("customer_key") != customer_key
     |             ^^^^^^^^^^^^
2401 |             or document.get("digest") != revision_digest
2402 |         ):
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `get`
    --> dualcoach/profile/checkin_cli/customer_admin.py:2401:16
     |
2399 |         if (
2400 |             document.get("customer_key") != customer_key
2401 |             or document.get("digest") != revision_digest
     |                ^^^^^^^^^^^^
2402 |         ):
2403 |             raise CustomerAdminError("adaptive registration revision document mismatch")
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `get`
    --> dualcoach/profile/checkin_cli/customer_admin.py:2404:12
     |
2402 |         ):
2403 |             raise CustomerAdminError("adaptive registration revision document mismatch")
2404 |         if document.get("supersedes_digest") != supersedes:
     |            ^^^^^^^^^^^^
2405 |             raise CustomerAdminError(
2406 |                 "adaptive registration revision supersession mismatch"
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `get`
    --> dualcoach/profile/checkin_cli/customer_admin.py:2408:12
     |
2406 |                 "adaptive registration revision supersession mismatch"
2407 |             )
2408 |         if document.get("authority_digest") != authority_digest:
     |            ^^^^^^^^^^^^
2409 |             raise CustomerAdminError(
2410 |                 "adaptive registration revision authority mismatch"
     |
info: rule `unresolved-attribute` is enabled by default

error[no-matching-overload]: No overload of bound method `__init__` matches arguments
    --> dualcoach/profile/checkin_cli/customer_admin.py:2412:28
     |
2410 |                 "adaptive registration revision authority mismatch"
2411 |             )
2412 |         if adaptive_digest(dict(row["authority"])) != authority_digest:
     |                            ^^^^^^^^^^^^^^^^^^^^^^
2413 |             raise CustomerAdminError("adaptive registration authority digest mismatch")
2414 |         if state == "committed":
     |
info: First overload defined here
    --> stdlib/builtins.pyi:2962:9
     |
2960 |     # Also multiprocessing.managers.SyncManager.dict()
2961 |     @overload
2962 |     def __init__(self, /) -> None: ...
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^
2963 |     @overload
2964 |     def __init__(self: dict[str, _VT], /, **kwargs: _VT) -> None: ...  # pyright: ignore[reportInvalidTypeVarUse]  #11780
     |
info: Possible overloads for bound method `__init__`:
info:   (self, /) -> None
info:   (self: dict[str, _VT@dict], /, **kwargs: _VT@dict) -> None
info:   (self, map: SupportsKeysAndGetItem[_KT@dict, _VT@dict], /) -> None
info:   (self: dict[str, _VT@dict], map: SupportsKeysAndGetItem[str, _VT@dict], /, **kwargs: _VT@dict) -> None
info:   (self, iterable: Iterable[tuple[_KT@dict, _VT@dict]], /) -> None
info:   (self: dict[str, _VT@dict], iterable: Iterable[tuple[str, _VT@dict]], /, **kwargs: _VT@dict) -> None
info:   (self: dict[str, str], iterable: Iterable[list[str]], /) -> None
info:   (self: dict[bytes, bytes], iterable: Iterable[list[bytes]], /) -> None
info: Union variant `Overload[[_KT, _VT]() -> None, [_KT, _VT](**kwargs: _VT) -> None, [_KT, _VT](map: SupportsKeysAndGetItem[_KT, _VT], /) -> None, [_KT, _VT](map: SupportsKeysAndGetItem[str, _VT], /, **kwargs: _VT) -> None, [_KT, _VT](iterable: Iterable[tuple[_KT, _VT]], /) -> None, [_KT, _VT](iterable: Iterable[tuple[str, _VT]], /, **kwargs: _VT) -> None, [_KT, _VT](iterable: Iterable[list[str]], /) -> None, [_KT, _VT](iterable: Iterable[list[bytes]], /) -> None]` is incompatible with this call site
info: Attempted to call union type `(def __new__[Self, _KT, _VT](cls, /, *args: Any, **kwargs: Any) -> Self) | (Overload[[_KT, _VT]() -> None, [_KT, _VT](**kwargs: _VT) -> None, [_KT, _VT](map: SupportsKeysAndGetItem[_KT, _VT], /) -> None, [_KT, _VT](map: SupportsKeysAndGetItem[str, _VT], /, **kwargs: _VT) -> None, [_KT, _VT](iterable: Iterable[tuple[_KT, _VT]], /) -> None, [_KT, _VT](iterable: Iterable[tuple[str, _VT]], /, **kwargs: _VT) -> None, [_KT, _VT](iterable: Iterable[list[str]], /) -> None, [_KT, _VT](iterable: Iterable[list[bytes]], /) -> None])`
info: rule `no-matching-overload` is enabled by default

error[no-matching-overload]: No overload of bound method `__init__` matches arguments
    --> dualcoach/profile/checkin_cli/customer_admin.py:2603:12
     |
2601 |     if not isinstance(value, Mapping):
2602 |         raise CustomerAdminError(f"adaptive {artifact_kind} artifact must be an object")
2603 |     return dict(value)
     |            ^^^^^^^^^^^
     |
info: First overload defined here
    --> stdlib/builtins.pyi:2962:9
     |
2960 |     # Also multiprocessing.managers.SyncManager.dict()
2961 |     @overload
2962 |     def __init__(self, /) -> None: ...
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^
2963 |     @overload
2964 |     def __init__(self: dict[str, _VT], /, **kwargs: _VT) -> None: ...  # pyright: ignore[reportInvalidTypeVarUse]  #11780
     |
info: Possible overloads for bound method `__init__`:
info:   (self, /) -> None
info:   (self: dict[str, _VT@dict], /, **kwargs: _VT@dict) -> None
info:   (self, map: SupportsKeysAndGetItem[_KT@dict, _VT@dict], /) -> None
info:   (self: dict[str, _VT@dict], map: SupportsKeysAndGetItem[str, _VT@dict], /, **kwargs: _VT@dict) -> None
info:   (self, iterable: Iterable[tuple[_KT@dict, _VT@dict]], /) -> None
info:   (self: dict[str, _VT@dict], iterable: Iterable[tuple[str, _VT@dict]], /, **kwargs: _VT@dict) -> None
info:   (self: dict[str, str], iterable: Iterable[list[str]], /) -> None
info:   (self: dict[bytes, bytes], iterable: Iterable[list[bytes]], /) -> None
info: Union variant `Overload[[_KT, _VT]() -> None, [_KT, _VT](**kwargs: _VT) -> None, [_KT, _VT](map: SupportsKeysAndGetItem[_KT, _VT], /) -> None, [_KT, _VT](map: SupportsKeysAndGetItem[str, _VT], /, **kwargs: _VT) -> None, [_KT, _VT](iterable: Iterable[tuple[_KT, _VT]], /) -> None, [_KT, _VT](iterable: Iterable[tuple[str, _VT]], /, **kwargs: _VT) -> None, [_KT, _VT](iterable: Iterable[list[str]], /) -> None, [_KT, _VT](iterable: Iterable[list[bytes]], /) -> None]` is incompatible with this call site
info: Attempted to call union type `(def __new__[Self, _KT, _VT](cls, /, *args: Any, **kwargs: Any) -> Self) | (Overload[[_KT, _VT]() -> None, [_KT, _VT](**kwargs: _VT) -> None, [_KT, _VT](map: SupportsKeysAndGetItem[_KT, _VT], /) -> None, [_KT, _VT](map: SupportsKeysAndGetItem[str, _VT], /, **kwargs: _VT) -> None, [_KT, _VT](iterable: Iterable[tuple[_KT, _VT]], /) -> None, [_KT, _VT](iterable: Iterable[tuple[str, _VT]], /, **kwargs: _VT) -> None, [_KT, _VT](iterable: Iterable[list[str]], /) -> None, [_KT, _VT](iterable: Iterable[list[bytes]], /) -> None])`
info: rule `no-matching-overload` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:2683:23
     |
2681 |     if artifact_kind == "catalog":
2682 |         rows = (
2683 |             value.get("foods")
     |                       ^^^^^^^ Expected `Never`, found `Literal["foods"]`
2684 |             if isinstance(value, Mapping) and "foods" in value
2685 |             else value
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:2702:29
     |
2700 |         "budget_tier": payload["budget_band"],
2701 |         "cooking_access": payload["cooking_access"],
2702 |         "preferences": list(payload["preferences"]),
     |                             ^^^^^^^^^^^^^^^^^^^^^^ Expected `Iterable[Unknown]`, found `object`
2703 |         "excluded_food_ids": list(payload["exclusions"]),
2704 |         "allergies": list(payload["allergies"]),
     |
info: Matching overload defined here
    --> stdlib/builtins.pyi:2839:9
     |
2837 |     def __init__(self) -> None: ...
2838 |     @overload
2839 |     def __init__(self, iterable: Iterable[_T], /) -> None: ...
     |         ^^^^^^^^       ---------------------- Parameter declared here
2840 |     def copy(self) -> list[_T]:
2841 |         """Return a shallow copy of the list."""
     |
info: Non-matching overloads for bound method `__init__`:
info:   (self) -> None
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:2703:35
     |
2701 |         "cooking_access": payload["cooking_access"],
2702 |         "preferences": list(payload["preferences"]),
2703 |         "excluded_food_ids": list(payload["exclusions"]),
     |                                   ^^^^^^^^^^^^^^^^^^^^^ Expected `Iterable[Unknown]`, found `object`
2704 |         "allergies": list(payload["allergies"]),
2705 |         "training_time_by_day": [
     |
info: Matching overload defined here
    --> stdlib/builtins.pyi:2839:9
     |
2837 |     def __init__(self) -> None: ...
2838 |     @overload
2839 |     def __init__(self, iterable: Iterable[_T], /) -> None: ...
     |         ^^^^^^^^       ---------------------- Parameter declared here
2840 |     def copy(self) -> list[_T]:
2841 |         """Return a shallow copy of the list."""
     |
info: Non-matching overloads for bound method `__init__`:
info:   (self) -> None
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:2704:27
     |
2702 |         "preferences": list(payload["preferences"]),
2703 |         "excluded_food_ids": list(payload["exclusions"]),
2704 |         "allergies": list(payload["allergies"]),
     |                           ^^^^^^^^^^^^^^^^^^^^ Expected `Iterable[Unknown]`, found `object`
2705 |         "training_time_by_day": [
2706 |             {
     |
info: Matching overload defined here
    --> stdlib/builtins.pyi:2839:9
     |
2837 |     def __init__(self) -> None: ...
2838 |     @overload
2839 |     def __init__(self, iterable: Iterable[_T], /) -> None: ...
     |         ^^^^^^^^       ---------------------- Parameter declared here
2840 |     def copy(self) -> list[_T]:
2841 |         """Return a shallow copy of the list."""
     |
info: Non-matching overloads for bound method `__init__`:
info:   (self) -> None
info: rule `invalid-argument-type` is enabled by default

error[not-iterable]: Object of type `object` is not iterable
    --> dualcoach/profile/checkin_cli/customer_admin.py:2712:26
     |
2710 |                 "load_category": entry["load_category"],
2711 |             }
2712 |             for entry in payload["training_schedule"]
     |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2713 |         ],
2714 |         "strict_inputs": True,
     |
info: It doesn't have an `__iter__` method or a `__getitem__` method
info: rule `not-iterable` is enabled by default

error[invalid-return-type]: Return type does not match returned value
    --> dualcoach/profile/checkin_cli/customer_admin.py:2726:12
     |
2724 |         "meal_constraints": value,
2725 |     }
2726 |     return document, str(document["version"]), artifact_digest
     |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `tuple[dict[str, object], str, str]`, found `tuple[dict[str, str | bool | dict[str, str] | dict[str, object]], str, str]`
     |
    ::: dualcoach/profile/checkin_cli/customer_admin.py:2697:6
     |
2695 |     owner: Mapping[str, str],
2696 |     approved_at_kst: str,
2697 | ) -> tuple[dict[str, object], str, str]:
     |      ---------------------------------- Expected `tuple[dict[str, object], str, str]` because of return type
2698 |     value = {
2699 |         "meal_count": payload["meal_count"],
     |
info: rule `invalid-return-type` is enabled by default

error[invalid-return-type]: Return type does not match returned value
    --> dualcoach/profile/checkin_cli/customer_admin.py:2802:12
     |
2800 |                   "adaptive meal constraints must be derived from the registration inputs"
2801 |               )
2802 |       return (
     |  ____________^
2803 | |         ("base_policy", policy_document, policy_version, policy_digest),
2804 | |         (
2805 | |             "meal_constraints",
2806 | |             constraints_document,
2807 | |             constraints_version,
2808 | |             constraints_digest,
2809 | |         ),
2810 | |         ("catalog", catalog_document, catalog_version, catalog_digest),
2811 | |     )
     | |_____^ expected `tuple[tuple[str, dict[str, object], str, str], ...]`, found `tuple[tuple[Literal["base_policy"], Mapping[str, object], str, str], tuple[Literal["meal_constraints"], dict[str, object], str, str], tuple[Literal["catalog"], Mapping[str, object], str, str]]`
     |
    ::: dualcoach/profile/checkin_cli/customer_admin.py:2736:6
     |
2734 |       owner: Mapping[str, str],
2735 |       approved_at_kst: str,
2736 |   ) -> tuple[tuple[str, dict[str, object], str, str], ...]:
     |        --------------------------------------------------- Expected `tuple[tuple[str, dict[str, object], str, str], ...]` because of return type
2737 |       if isinstance(inputs, AdaptiveRegistrationInputs):
2738 |           raw = inputs.model_dump(mode="json", exclude_none=True)
     |
info: rule `invalid-return-type` is enabled by default

error[invalid-argument-type]: Argument to function `_registration_artifact_value` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:2898:13
     |
2896 |             raise CustomerAdminError("adaptive input approval artifact is invalid")
2897 |         artifact_value = _registration_artifact_value(
2898 |             row["artifact_document"],
     |             ^^^^^^^^^^^^^^^^^^^^^^^^ Expected `Mapping[str, object]`, found `object`
2899 |             str(row["artifact_kind"]),
2900 |         )
     |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_admin.py:2606:5
     |
2606 | def _registration_artifact_value(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2607 |     document: Mapping[str, object],
     |     ------------------------------ Parameter declared here
2608 |     artifact_kind: str,
2609 | ) -> object:
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `_registration_kst_timestamp` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:2908:37
     |
2906 |         if not isinstance(row.get("approved_at_kst"), str):
2907 |             raise CustomerAdminError("adaptive input approval time is invalid")
2908 |         _registration_kst_timestamp(row["approved_at_kst"])
     |                                     ^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
2909 |         if row.get("state") == "prepared" and row.get("prepared_digest") is not None:
2910 |             raise CustomerAdminError(
     |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_admin.py:2197:5
     |
2197 | def _registration_kst_timestamp(value: str | None) -> str:
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ----------------- Parameter declared here
2198 |     timestamp = datetime.now(_KST) if value is None else value
2199 |     if isinstance(timestamp, str):
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `_registration_approval_row` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:3101:25
     |
3099 |                         authority=authority,
3100 |                         authority_digest=authority_digest,
3101 |                         owner=owner,
     |                         ^^^^^^^^^^^ Expected `Mapping[str, str]`, found `Top[Mapping[Unknown, object]]`
3102 |                         approved_at_kst=str(document["approved_at_kst"]),
3103 |                         prepared_digest=str(prepared["row_digest"]),
     |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_admin.py:2814:5
     |
2814 | def _registration_approval_row(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
2815 |     *,
2816 |     sequence: int,
     |
    ::: dualcoach/profile/checkin_cli/customer_admin.py:2828:5
     |
2826 |     authority: Mapping[str, object],
2827 |     authority_digest: str,
2828 |     owner: Mapping[str, str],
     |     ------------------------ Parameter declared here
2829 |     approved_at_kst: str,
2830 |     prepared_digest: str | None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `_registration_approval_row` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:3125:21
     |
3123 |                     authority=authority,
3124 |                     authority_digest=authority_digest,
3125 |                     owner=owner,
     |                     ^^^^^^^^^^^ Expected `Mapping[str, str]`, found `Top[Mapping[Unknown, object]]`
3126 |                     approved_at_kst=str(document["approved_at_kst"]),
3127 |                     prepared_digest=None,
     |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_admin.py:2814:5
     |
2814 | def _registration_approval_row(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
2815 |     *,
2816 |     sequence: int,
     |
    ::: dualcoach/profile/checkin_cli/customer_admin.py:2828:5
     |
2826 |     authority: Mapping[str, object],
2827 |     authority_digest: str,
2828 |     owner: Mapping[str, str],
     |     ------------------------ Parameter declared here
2829 |     approved_at_kst: str,
2830 |     prepared_digest: str | None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `_registration_approval_row` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:3143:21
     |
3141 |                     authority=authority,
3142 |                     authority_digest=authority_digest,
3143 |                     owner=owner,
     |                     ^^^^^^^^^^^ Expected `Mapping[str, str]`, found `Top[Mapping[Unknown, object]]`
3144 |                     approved_at_kst=str(document["approved_at_kst"]),
3145 |                     prepared_digest=prepared["row_digest"],
     |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_admin.py:2814:5
     |
2814 | def _registration_approval_row(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
2815 |     *,
2816 |     sequence: int,
     |
    ::: dualcoach/profile/checkin_cli/customer_admin.py:2828:5
     |
2826 |     authority: Mapping[str, object],
2827 |     authority_digest: str,
2828 |     owner: Mapping[str, str],
     |     ------------------------ Parameter declared here
2829 |     approved_at_kst: str,
2830 |     prepared_digest: str | None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `_registration_approval_row` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:3145:21
     |
3143 |                     owner=owner,
3144 |                     approved_at_kst=str(document["approved_at_kst"]),
3145 |                     prepared_digest=prepared["row_digest"],
     |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
3146 |                 )
3147 |                 _append_registration_row(approval_path, committed_row)
     |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_admin.py:2814:5
     |
2814 | def _registration_approval_row(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
2815 |     *,
2816 |     sequence: int,
     |
    ::: dualcoach/profile/checkin_cli/customer_admin.py:2830:5
     |
2828 |     owner: Mapping[str, str],
2829 |     approved_at_kst: str,
2830 |     prepared_digest: str | None,
     |     --------------------------- Parameter declared here
2831 | ) -> dict[str, object]:
2832 |     body = {
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-return-type]: Return type does not match returned value
    --> dualcoach/profile/checkin_cli/customer_admin.py:3380:12
     |
3378 |             "adaptive registration input digest does not match content"
3379 |         )
3380 |     return payload
     |            ^^^^^^^ expected `dict[str, object]`, found `dict[str, str | (Unknown & int) | list[str] | list[dict[str, object]]]`
     |
    ::: dualcoach/profile/checkin_cli/customer_admin.py:3250:6
     |
3248 |     *,
3249 |     default_version: str,
3250 | ) -> dict[str, object]:
     |      ----------------- Expected `dict[str, object]` because of return type
3251 |     if type(inputs) is AdaptiveRegistrationInputs:
3252 |         raw: dict[str, object] = inputs.model_dump(mode="json", exclude_none=True)
     |
info: rule `invalid-return-type` is enabled by default

error[invalid-argument-type]: Argument to function `_registration_config_row` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:3554:17
     |
3552 |                 state="committed",
3553 |                 document=document,
3554 |                 prepared_digest=config_prepared["row_digest"],
     |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
3555 |             )
3556 |             _append_registration_row(config_path, config_commit)
     |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_admin.py:3474:5
     |
3474 | def _registration_config_row(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^
3475 |     *,
3476 |     sequence: int,
     |
    ::: dualcoach/profile/checkin_cli/customer_admin.py:3480:5
     |
3478 |     state: str,
3479 |     document: Mapping[str, object],
3480 |     prepared_digest: str | None,
     |     --------------------------- Parameter declared here
3481 | ) -> dict[str, object]:
3482 |     body = {
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `_registration_revision_row` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:3602:13
     |
3600 |             state="committed",
3601 |             document=document,
3602 |             prepared_digest=prepared["row_digest"],
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
3603 |         )
3604 |         _append_registration_row(revisions_path, commit)
     |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_admin.py:3442:5
     |
3442 | def _registration_revision_row(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
3443 |     *,
3444 |     sequence: int,
     |
    ::: dualcoach/profile/checkin_cli/customer_admin.py:3448:5
     |
3446 |     state: str,
3447 |     document: Mapping[str, object],
3448 |     prepared_digest: str | None,
     |     --------------------------- Parameter declared here
3449 | ) -> dict[str, object]:
3450 |     body = {
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `_registration_config_row` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:3657:17
     |
3655 |                 state="committed",
3656 |                 document=document,
3657 |                 prepared_digest=config_prepared["row_digest"],
     |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
3658 |             )
3659 |             _append_registration_row(config_path, config_commit)
     |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_admin.py:3474:5
     |
3474 | def _registration_config_row(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^
3475 |     *,
3476 |     sequence: int,
     |
    ::: dualcoach/profile/checkin_cli/customer_admin.py:3480:5
     |
3478 |     state: str,
3479 |     document: Mapping[str, object],
3480 |     prepared_digest: str | None,
     |     --------------------------- Parameter declared here
3481 | ) -> dict[str, object]:
3482 |     body = {
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `_registration_authority_matches` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:3749:9
     |
3747 |         raise CustomerAdminError("adaptive registration input document is invalid")
3748 |     _registration_authority_matches(
3749 |         input_document,
     |         ^^^^^^^^^^^^^^ Expected `Mapping[str, object]`, found `Top[Mapping[Unknown, object]]`
3750 |         authority,
3751 |         authority_digest,
     |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_admin.py:3217:5
     |
3217 | def _registration_authority_matches(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3218 |     document: Mapping[str, object],
     |     ------------------------------ Parameter declared here
3219 |     authority: Mapping[str, object],
3220 |     authority_digest: str,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:3755:63
     |
3753 |     )
3754 |     owner_payload = document.owner.model_dump(mode="json")
3755 |     revision_digest = _registration_digest(input_document.get("digest"), "revision")
     |                                                               ^^^^^^^^ Expected `Never`, found `Literal["digest"]`
3756 |     if revision_digest != latest.get("revision_digest"):
3757 |         raise CustomerAdminError("adaptive registration revision is stale")
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[no-matching-overload]: No overload of bound method `get` matches arguments
    --> dualcoach/profile/checkin_cli/customer_admin.py:3762:33
     |
3760 |             input_document,
3761 |             key,
3762 |             default_version=str(input_document.get("version", "v1")),
     |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3763 |         )
3764 |         expected_meal_document, expected_meal_version, expected_meal_digest = (
     |
info: First overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Possible overloads for bound method `get`:
info:   (self, key: _KT@Mapping, /) -> _VT_co@Mapping | None
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `no-matching-overload` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[Mapping[Unknown, object]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["approved_at_kst"]` on object of type `Top[Mapping[Unknown, object]]`
    --> dualcoach/profile/checkin_cli/customer_admin.py:3768:37
     |
3766 |                 derived_payload,
3767 |                 owner=owner_payload,
3768 |                 approved_at_kst=str(input_document["approved_at_kst"]),
     |                                     ^^^^^^^^^^^^^^
3769 |             )
3770 |         )
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:3779:43
     |
3777 |     if not isinstance(expected_meal_value, Mapping):
3778 |         raise CustomerAdminError("adaptive meal constraints artifact is invalid")
3779 |     supplied_derived = input_document.get("derived_constraints")
     |                                           ^^^^^^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["derived_constraints"]`
3780 |     if supplied_derived is not None and (
3781 |         not isinstance(supplied_derived, Mapping)
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:3785:50
     |
3783 |     ):
3784 |         raise CustomerAdminError("adaptive registration derived constraints are stale")
3785 |     supplied_derived_digest = input_document.get("derived_constraints_digest")
     |                                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["derived_constraints_digest"]`
3786 |     if (
3787 |         supplied_derived_digest is not None
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:3793:27
     |
3791 |             "adaptive registration derived constraints digest is stale"
3792 |         )
3793 |     if input_document.get("meal_constraints_digest") != expected_meal_digest:
     |                           ^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["meal_constraints_digest"]`
3794 |         raise CustomerAdminError(
3795 |             "adaptive registration meal constraints digest is stale"
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:3797:27
     |
3795 |             "adaptive registration meal constraints digest is stale"
3796 |         )
3797 |     if input_document.get("meal_constraints_version") != expected_meal_version:
     |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["meal_constraints_version"]`
3798 |         raise CustomerAdminError(
3799 |             "adaptive registration meal constraints version is stale"
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:3801:42
     |
3799 |             "adaptive registration meal constraints version is stale"
3800 |         )
3801 |     input_artifacts = input_document.get("artifact_documents")
     |                                          ^^^^^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["artifact_documents"]`
3802 |     if input_artifacts is not None:
3803 |         if not isinstance(input_artifacts, Mapping) or set(input_artifacts) != {
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:3818:43
     |
3816 |             ):
3817 |                 raise CustomerAdminError("adaptive registration artifacts are stale")
3818 |     artifact_digests = input_document.get("artifact_digests")
     |                                           ^^^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["artifact_digests"]`
3819 |     if (
3820 |         not isinstance(artifact_digests, Mapping)
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:3823:62
     |
3821 |         or set(artifact_digests) != {"base_policy", "meal_constraints", "catalog"}
3822 |         or any(
3823 |             artifact_digests.get(kind) != input_document.get(f"{kind}_digest")
     |                                                              ^^^^^^^^^^^^^^^^ Expected `Never`, found `str`
3824 |             for kind in ("base_policy", "meal_constraints", "catalog")
3825 |         )
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:3840:65
     |
3838 |             != authority.get("activation_receipt_digest")
3839 |             or row.get("approved_by") != owner_payload
3840 |             or row.get("artifact_digest") != input_document.get(digest_field)
     |                                                                 ^^^^^^^^^^^^ Expected `Never`, found `str`
3841 |             or row.get("artifact_version")
3842 |             != input_document.get(f"{artifact_kind}_version")
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:3842:35
     |
3840 |             or row.get("artifact_digest") != input_document.get(digest_field)
3841 |             or row.get("artifact_version")
3842 |             != input_document.get(f"{artifact_kind}_version")
     |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `Never`, found `str`
3843 |         ):
3844 |             raise CustomerAdminError("adaptive input approval artifacts are stale")
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `_registration_artifact_value` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:3850:17
     |
3848 |         if artifact_kind == "meal_constraints":
3849 |             artifact_value = _registration_artifact_value(
3850 |                 artifact_document,
     |                 ^^^^^^^^^^^^^^^^^ Expected `Mapping[str, object]`, found `Top[Mapping[Unknown, object]]`
3851 |                 artifact_kind,
3852 |             )
     |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_admin.py:2606:5
     |
2606 | def _registration_artifact_value(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2607 |     document: Mapping[str, object],
     |     ------------------------------ Parameter declared here
2608 |     artifact_kind: str,
2609 | ) -> object:
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:3854:39
     |
3852 |             )
3853 |             if (
3854 |                 artifact_document.get("approved") is not True
     |                                       ^^^^^^^^^^ Expected `Never`, found `Literal["approved"]`
3855 |                 or artifact_document.get("approved_by") != owner_payload
3856 |                 or artifact_document.get("version") != expected_meal_version
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:3855:42
     |
3853 |             if (
3854 |                 artifact_document.get("approved") is not True
3855 |                 or artifact_document.get("approved_by") != owner_payload
     |                                          ^^^^^^^^^^^^^ Expected `Never`, found `Literal["approved_by"]`
3856 |                 or artifact_document.get("version") != expected_meal_version
3857 |                 or artifact_document.get("approved_at_kst")
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:3856:42
     |
3854 |                 artifact_document.get("approved") is not True
3855 |                 or artifact_document.get("approved_by") != owner_payload
3856 |                 or artifact_document.get("version") != expected_meal_version
     |                                          ^^^^^^^^^ Expected `Never`, found `Literal["version"]`
3857 |                 or artifact_document.get("approved_at_kst")
3858 |                 != input_document.get("approved_at_kst")
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:3857:42
     |
3855 |                 or artifact_document.get("approved_by") != owner_payload
3856 |                 or artifact_document.get("version") != expected_meal_version
3857 |                 or artifact_document.get("approved_at_kst")
     |                                          ^^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["approved_at_kst"]`
3858 |                 != input_document.get("approved_at_kst")
3859 |                 or row.get("artifact_digest") != expected_meal_digest
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:3858:39
     |
3856 |                 or artifact_document.get("version") != expected_meal_version
3857 |                 or artifact_document.get("approved_at_kst")
3858 |                 != input_document.get("approved_at_kst")
     |                                       ^^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["approved_at_kst"]`
3859 |                 or row.get("artifact_digest") != expected_meal_digest
3860 |                 or artifact_value != expected_meal_value
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:3864:49
     |
3862 |             ):
3863 |                 raise CustomerAdminError("adaptive meal constraints artifact is stale")
3864 |             approved_at = artifact_document.get("approved_at_kst")
     |                                                 ^^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["approved_at_kst"]`
3865 |             if not isinstance(approved_at, str):
3866 |                 raise CustomerAdminError(
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `_registration_validate_external_artifact` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:3872:13
     |
3870 |             continue
3871 |         _, row_version, row_digest = _registration_validate_external_artifact(
3872 |             artifact_document,
     |             ^^^^^^^^^^^^^^^^^ Expected `Mapping[str, object]`, found `Top[Mapping[Unknown, object]]`
3873 |             artifact_kind,
3874 |             owner_payload,
     |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_admin.py:2640:5
     |
2640 | def _registration_validate_external_artifact(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2641 |     document: Mapping[str, object],
     |     ------------------------------ Parameter declared here
2642 |     artifact_kind: str,
2643 |     owner: Mapping[str, str],
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:3894:38
     |
3892 |             or current_digest != row.get("artifact_digest")
3893 |             or current_document.get("approved_at_kst")
3894 |             != artifact_document.get("approved_at_kst")
     |                                      ^^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["approved_at_kst"]`
3895 |             or current_document.get("approved_by") != owner_payload
3896 |         ):
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:3914:9
     |
3912 |         )
3913 |     ) or latest_config.get("artifact_digests") != input_document.get(
3914 |         "artifact_digests"
     |         ^^^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["artifact_digests"]`
3915 |     ):
3916 |         raise CustomerAdminError("adaptive registration config is stale")
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[no-matching-overload]: No overload of bound method `__init__` matches arguments
    --> dualcoach/profile/checkin_cli/customer_admin.py:3921:24
     |
3919 |     authoritative_document["derived_constraints_digest"] = expected_meal_digest
3920 |     authoritative_document["artifact_documents"] = {
3921 |         artifact_kind: dict(row["artifact_document"])
     |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3922 |         for artifact_kind, row in approval_artifacts.items()
3923 |         if isinstance(row.get("artifact_document"), Mapping)
     |
info: First overload defined here
    --> stdlib/builtins.pyi:2962:9
     |
2960 |     # Also multiprocessing.managers.SyncManager.dict()
2961 |     @overload
2962 |     def __init__(self, /) -> None: ...
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^
2963 |     @overload
2964 |     def __init__(self: dict[str, _VT], /, **kwargs: _VT) -> None: ...  # pyright: ignore[reportInvalidTypeVarUse]  #11780
     |
info: Possible overloads for bound method `__init__`:
info:   (self, /) -> None
info:   (self: dict[str, _VT@dict], /, **kwargs: _VT@dict) -> None
info:   (self, map: SupportsKeysAndGetItem[_KT@dict, _VT@dict], /) -> None
info:   (self: dict[str, _VT@dict], map: SupportsKeysAndGetItem[str, _VT@dict], /, **kwargs: _VT@dict) -> None
info:   (self, iterable: Iterable[tuple[_KT@dict, _VT@dict]], /) -> None
info:   (self: dict[str, _VT@dict], iterable: Iterable[tuple[str, _VT@dict]], /, **kwargs: _VT@dict) -> None
info:   (self: dict[str, str], iterable: Iterable[list[str]], /) -> None
info:   (self: dict[bytes, bytes], iterable: Iterable[list[bytes]], /) -> None
info: Union variant `Overload[[_KT, _VT]() -> None, [_KT, _VT](**kwargs: _VT) -> None, [_KT, _VT](map: SupportsKeysAndGetItem[_KT, _VT], /) -> None, [_KT, _VT](map: SupportsKeysAndGetItem[str, _VT], /, **kwargs: _VT) -> None, [_KT, _VT](iterable: Iterable[tuple[_KT, _VT]], /) -> None, [_KT, _VT](iterable: Iterable[tuple[str, _VT]], /, **kwargs: _VT) -> None, [_KT, _VT](iterable: Iterable[list[str]], /) -> None, [_KT, _VT](iterable: Iterable[list[bytes]], /) -> None]` is incompatible with this call site
info: Attempted to call union type `(def __new__[Self, _KT, _VT](cls, /, *args: Any, **kwargs: Any) -> Self) | (Overload[[_KT, _VT]() -> None, [_KT, _VT](**kwargs: _VT) -> None, [_KT, _VT](map: SupportsKeysAndGetItem[_KT, _VT], /) -> None, [_KT, _VT](map: SupportsKeysAndGetItem[str, _VT], /, **kwargs: _VT) -> None, [_KT, _VT](iterable: Iterable[tuple[_KT, _VT]], /) -> None, [_KT, _VT](iterable: Iterable[tuple[str, _VT]], /, **kwargs: _VT) -> None, [_KT, _VT](iterable: Iterable[list[str]], /) -> None, [_KT, _VT](iterable: Iterable[list[bytes]], /) -> None])`
info: rule `no-matching-overload` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:4053:32
     |
4051 |             if raw_supersedes is None:
4052 |                 raw_supersedes = (
4053 |                     inputs.get("supersedes_digest")
     |                                ^^^^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["supersedes_digest"]`
4054 |                     if isinstance(inputs, Mapping)
4055 |                     else getattr(inputs, "supersedes_digest", None)
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[no-matching-overload]: No overload of bound method `__init__` matches arguments
    --> dualcoach/profile/checkin_cli/customer_admin.py:4126:40
     |
4124 |                   "meal_constraints_version": bundle[1][2],
4125 |                   "meal_constraints_digest": bundle[1][3],
4126 |                   "derived_constraints": dict(
     |  ________________________________________^
4127 | |                     _registration_artifact_value(bundle[1][1], "meal_constraints")
4128 | |                 ),
     | |_________________^
4129 |                   "derived_constraints_digest": bundle[1][3],
4130 |                   "catalog_version": bundle[2][2],
     |
info: First overload defined here
    --> stdlib/builtins.pyi:2962:9
     |
2960 |     # Also multiprocessing.managers.SyncManager.dict()
2961 |     @overload
2962 |     def __init__(self, /) -> None: ...
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^
2963 |     @overload
2964 |     def __init__(self: dict[str, _VT], /, **kwargs: _VT) -> None: ...  # pyright: ignore[reportInvalidTypeVarUse]  #11780
     |
info: Possible overloads for bound method `__init__`:
info:   (self, /) -> None
info:   (self: dict[str, _VT@dict], /, **kwargs: _VT@dict) -> None
info:   (self, map: SupportsKeysAndGetItem[_KT@dict, _VT@dict], /) -> None
info:   (self: dict[str, _VT@dict], map: SupportsKeysAndGetItem[str, _VT@dict], /, **kwargs: _VT@dict) -> None
info:   (self, iterable: Iterable[tuple[_KT@dict, _VT@dict]], /) -> None
info:   (self: dict[str, _VT@dict], iterable: Iterable[tuple[str, _VT@dict]], /, **kwargs: _VT@dict) -> None
info:   (self: dict[str, str], iterable: Iterable[list[str]], /) -> None
info:   (self: dict[bytes, bytes], iterable: Iterable[list[bytes]], /) -> None
info: Union variant `Overload[[_KT, _VT]() -> None, [_KT, _VT](**kwargs: _VT) -> None, [_KT, _VT](map: SupportsKeysAndGetItem[_KT, _VT], /) -> None, [_KT, _VT](map: SupportsKeysAndGetItem[str, _VT], /, **kwargs: _VT) -> None, [_KT, _VT](iterable: Iterable[tuple[_KT, _VT]], /) -> None, [_KT, _VT](iterable: Iterable[tuple[str, _VT]], /, **kwargs: _VT) -> None, [_KT, _VT](iterable: Iterable[list[str]], /) -> None, [_KT, _VT](iterable: Iterable[list[bytes]], /) -> None]` is incompatible with this call site
info: Attempted to call union type `(def __new__[Self, _KT, _VT](cls, /, *args: Any, **kwargs: Any) -> Self) | (Overload[[_KT, _VT]() -> None, [_KT, _VT](**kwargs: _VT) -> None, [_KT, _VT](map: SupportsKeysAndGetItem[_KT, _VT], /) -> None, [_KT, _VT](map: SupportsKeysAndGetItem[str, _VT], /, **kwargs: _VT) -> None, [_KT, _VT](iterable: Iterable[tuple[_KT, _VT]], /) -> None, [_KT, _VT](iterable: Iterable[tuple[str, _VT]], /, **kwargs: _VT) -> None, [_KT, _VT](iterable: Iterable[list[str]], /) -> None, [_KT, _VT](iterable: Iterable[list[bytes]], /) -> None])`
info: rule `no-matching-overload` is enabled by default

error[no-matching-overload]: No overload of bound method `get` matches arguments
    --> dualcoach/profile/checkin_cli/customer_admin.py:4276:37
     |
4274 |                 input_document,
4275 |                 key,
4276 |                 default_version=str(input_document.get("version", "v1")),
     |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4277 |             )
4278 |             if adaptive_digest(payload) != latest_digest:
     |
info: First overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Possible overloads for bound method `get`:
info:   (self, key: _KT@Mapping, /) -> _VT_co@Mapping | None
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `no-matching-overload` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:4280:48
     |
4278 |             if adaptive_digest(payload) != latest_digest:
4279 |                 raise CustomerAdminError("adaptive registration revision is stale")
4280 |             old_authority = input_document.get("authority")
     |                                                ^^^^^^^^^^^ Expected `Never`, found `Literal["authority"]`
4281 |             old_authority_digest = input_document.get("authority_digest")
4282 |             expected_authority_fields = {
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:4281:55
     |
4279 |                 raise CustomerAdminError("adaptive registration revision is stale")
4280 |             old_authority = input_document.get("authority")
4281 |             old_authority_digest = input_document.get("authority_digest")
     |                                                       ^^^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["authority_digest"]`
4282 |             expected_authority_fields = {
4283 |                 "schema_version",
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:4296:39
     |
4294 |                 or not isinstance(old_authority_digest, str)
4295 |                 or adaptive_digest(dict(old_authority)) != old_authority_digest
4296 |                 or input_document.get("approved_by") != owner
     |                                       ^^^^^^^^^^^^^ Expected `Never`, found `Literal["approved_by"]`
4297 |                 or old_authority.get("owner") != owner
4298 |                 or old_authority.get("owner_digest") != authority["owner_digest"]
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:4299:39
     |
4297 |                 or old_authority.get("owner") != owner
4298 |                 or old_authority.get("owner_digest") != authority["owner_digest"]
4299 |                 or input_document.get("owner_digest")
     |                                       ^^^^^^^^^^^^^^ Expected `Never`, found `Literal["owner_digest"]`
4300 |                 != old_authority.get("owner_digest")
4301 |                 or input_document.get("registry_digest")
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:4301:39
     |
4299 |                 or input_document.get("owner_digest")
4300 |                 != old_authority.get("owner_digest")
4301 |                 or input_document.get("registry_digest")
     |                                       ^^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["registry_digest"]`
4302 |                 != old_authority.get("registry_digest")
4303 |                 or input_document.get("activation_receipt_id")
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:4303:39
     |
4301 |                 or input_document.get("registry_digest")
4302 |                 != old_authority.get("registry_digest")
4303 |                 or input_document.get("activation_receipt_id")
     |                                       ^^^^^^^^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["activation_receipt_id"]`
4304 |                 != old_authority.get("activation_receipt_id")
4305 |                 or input_document.get("activation_receipt_digest")
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:4305:39
     |
4303 |                 or input_document.get("activation_receipt_id")
4304 |                 != old_authority.get("activation_receipt_id")
4305 |                 or input_document.get("activation_receipt_digest")
     |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["activation_receipt_digest"]`
4306 |                 != old_authority.get("activation_receipt_digest")
4307 |             ):
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:4316:51
     |
4314 |                 latest_digest,
4315 |             )
4316 |             artifact_digests = input_document.get("artifact_digests")
     |                                                   ^^^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["artifact_digests"]`
4317 |             if not isinstance(artifact_digests, Mapping) or set(artifact_digests) != {
4318 |                 "base_policy",
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:4325:50
     |
4323 |                     "adaptive registration artifacts are incomplete"
4324 |                 )
4325 |             approved_at_kst = input_document.get("approved_at_kst")
     |                                                  ^^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["approved_at_kst"]`
4326 |             if not isinstance(approved_at_kst, str):
4327 |                 raise CustomerAdminError(
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[no-matching-overload]: No overload of bound method `get` matches arguments
    --> dualcoach/profile/checkin_cli/customer_admin.py:4493:37
     |
4491 |                 previous_document,
4492 |                 key,
4493 |                 default_version=str(previous_document.get("version", "v1")),
     |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4494 |             )
4495 |             if adaptive_digest(previous_payload) != predecessor:
     |
info: First overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Possible overloads for bound method `get`:
info:   (self, key: _KT@Mapping, /) -> _VT_co@Mapping | None
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `no-matching-overload` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:4504:42
     |
4502 |             if (
4503 |                 previous_payload != current_payload
4504 |                 or previous_document.get("approved_by")
     |                                          ^^^^^^^^^^^^^ Expected `Never`, found `Literal["approved_by"]`
4505 |                 != current_document.get("approved_by")
4506 |                 or previous_document.get("owner_digest") != current.owner_digest
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:4506:42
     |
4504 |                 or previous_document.get("approved_by")
4505 |                 != current_document.get("approved_by")
4506 |                 or previous_document.get("owner_digest") != current.owner_digest
     |                                          ^^^^^^^^^^^^^^ Expected `Never`, found `Literal["owner_digest"]`
4507 |                 or previous_document.get("artifact_digests") != current.artifact_digests
4508 |             ):
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:4507:42
     |
4505 |                 != current_document.get("approved_by")
4506 |                 or previous_document.get("owner_digest") != current.owner_digest
4507 |                 or previous_document.get("artifact_digests") != current.artifact_digests
     |                                          ^^^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["artifact_digests"]`
4508 |             ):
4509 |                 raise CustomerAdminError(
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `_registration_latest_approvals` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:4515:17
     |
4513 |                 _registration_jsonl(approval_path),
4514 |                 key,
4515 |                 current.digest,
     |                 ^^^^^^^^^^^^^^ Expected `str`, found `str | None`
4516 |             )
4517 |     return True
     |
info: Element `None` of this union is not assignable to `str`
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_admin.py:3156:5
     |
3156 | def _registration_latest_approvals(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3157 |     rows: list[dict[str, object]],
3158 |     customer_key: str,
3159 |     registration_digest: str,
     |     ------------------------ Parameter declared here
3160 | ) -> dict[str, dict[str, object]]:
3161 |     committed, pending = _validate_registration_approval_rows(rows)
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:4655:37
     |
4653 |     source_ref: object = None
4654 |     if isinstance(provenance, Mapping):
4655 |         source_ref = provenance.get("source_ref")
     |                                     ^^^^^^^^^^^^ Expected `Never`, found `Literal["source_ref"]`
4656 |     if source_ref is not None and not isinstance(source_ref, str):
4657 |         raise CustomerAdminError("canonical event provenance is invalid")
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:4677:44
     |
4675 |         payload = record.get(payload_name)
4676 |         if isinstance(payload, Mapping):
4677 |             payload_customer = payload.get("customer_key")
     |                                            ^^^^^^^^^^^^^^ Expected `Never`, found `Literal["customer_key"]`
4678 |             if payload_customer is not None and payload_customer != customer_key:
4679 |                 raise CustomerAdminError("canonical event customer scope is invalid")
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to class `tuple` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:4732:34
     |
4731 | def _reconciliation_journal_digest(rows: object) -> str:
4732 |     return adaptive_digest(tuple(rows))
     |                                  ^^^^ Expected `Iterable[Unknown]`, found `object`
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to class `tuple` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:4896:22
     |
4894 |             row.get("epoch") != epoch
4895 |             or row.get("config_digest") != config_digest
4896 |             or tuple(row.get("customer_keys", ())) != enabled_keys
     |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `Iterable[Unknown]`, found `object`
4897 |             or row.get("customer_state") != expected_config_states[expected_state]
4898 |             or row.get("approved_by") != owner
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method dict[str, dict[str, str]].__getitem__(key: str, /) -> dict[str, str]` cannot be called with key of type `object` on object of type `dict[str, dict[str, str]]`
    --> dualcoach/profile/checkin_cli/customer_admin.py:4897:45
     |
4895 |             or row.get("config_digest") != config_digest
4896 |             or tuple(row.get("customer_keys", ())) != enabled_keys
4897 |             or row.get("customer_state") != expected_config_states[expected_state]
     |                                             ^^^^^^^^^^^^^^^^^^^^^^
4898 |             or row.get("approved_by") != owner
4899 |         ):
     |
info: rule `invalid-argument-type` is enabled by default

error[unsupported-operator]: Unsupported `>=` operation
    --> dualcoach/profile/checkin_cli/customer_admin.py:4918:17
     |
4916 |             if isinstance(existing, Mapping)
4917 |             and type(existing.get("writer_epoch")) is int
4918 |             and existing["writer_epoch"] >= 0
     |                 ------------------------^^^^-
     |                 |                           |
     |                 |                           Has type `Literal[0]`
     |                 Has type `object`
4919 |             else plan["writer_epoch"]
4920 |         )
     |
info: rule `unsupported-operator` is enabled by default

error[invalid-argument-type]: Argument to bound method `append_source_day_mapping` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:4925:13
     |
4923 |             customer_key=str(plan["customer_key"]),
4924 |             mapped_flow=str(plan["mapped_flow"]),
4925 |             observation_kst_day=plan["observation_kst_day"],
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `date | str`, found `object`
4926 |             session_id=str(plan["session_id"]),
4927 |             writer_epoch=mapping_epoch,
     |
info: Method defined here
    --> dualcoach/profile/checkin_cli/adaptive_nutrition.py:5647:9
     |
5645 |         raise ValueError("legacy canonical prefix is unsupported")
5646 |
5647 |     def append_source_day_mapping(
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^
5648 |         self,
5649 |         *,
     |
    ::: dualcoach/profile/checkin_cli/adaptive_nutrition.py:5653:9
     |
5651 |         customer_key: str,
5652 |         mapped_flow: str,
5653 |         observation_kst_day: date | str,
     |         ------------------------------- Parameter declared here
5654 |         session_id: str,
5655 |         writer_epoch: int = 0,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `append_source_day_mapping` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:4927:13
     |
4925 |             observation_kst_day=plan["observation_kst_day"],
4926 |             session_id=str(plan["session_id"]),
4927 |             writer_epoch=mapping_epoch,
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `int`, found `object`
4928 |             root_preimage_digest=str(plan["root_preimage_digest"]),
4929 |         )
     |
info: Method defined here
    --> dualcoach/profile/checkin_cli/adaptive_nutrition.py:5647:9
     |
5645 |         raise ValueError("legacy canonical prefix is unsupported")
5646 |
5647 |     def append_source_day_mapping(
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^
5648 |         self,
5649 |         *,
     |
    ::: dualcoach/profile/checkin_cli/adaptive_nutrition.py:5655:9
     |
5653 |         observation_kst_day: date | str,
5654 |         session_id: str,
5655 |         writer_epoch: int = 0,
     |         --------------------- Parameter declared here
5656 |         root_preimage_digest: str = "",
5657 |     ) -> Mapping[str, object]:
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-assignment]: Invalid subscript assignment with key of type `str` and value of type `Mapping[str, object]` on object of type `dict[str, dict[str, object]]`
    --> dualcoach/profile/checkin_cli/customer_admin.py:4930:9
     |
4928 |             root_preimage_digest=str(plan["root_preimage_digest"]),
4929 |         )
4930 |         mappings_by_event[str(plan["root_event_id"])] = mapping
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-------
     |                                                         |
     |                                                         Expected value of type `dict[str, object]`, got `Mapping[str, object]`
4931 |         intent_id = f"source-day:{mapping['mapping_id']}"
4932 |         intent_payload = {
     |
info: rule `invalid-assignment` is enabled by default

error[invalid-argument-type]: Argument to function `__new__` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:4999:35
     |
4997 |             canonical_fact_digest=authority_fact_digest,
4998 |             valid_from=str(authority_payload["valid_from"]),
4999 |             adaptive_sequence=int(authority_payload["adaptive_sequence"]),
     |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | Buffer | SupportsInt | SupportsIndex | SupportsTrunc`, found `object`
5000 |             state="prepared",
5001 |             customer_key=key,
     |
info: Matching overload defined here
   --> stdlib/builtins.pyi:366:9
    |
365 |     @overload
366 |     def __new__(cls, x: ConvertibleToInt = 0, /) -> Self: ...
    |         ^^^^^^^      ----------------------- Parameter declared here
367 |     @overload
368 |     def __new__(cls, x: str | bytes | bytearray, /, base: SupportsIndex) -> Self: ...
    |
info: Non-matching overloads for function `__new__`:
info:   [Self](cls, x: str | bytes | bytearray, /, base: SupportsIndex) -> Self
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to class `tuple` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:5024:31
     |
5022 |         if row.get("state") != "committed":
5023 |             continue
5024 |         observed_keys = tuple(row.get("customer_keys", ()))
     |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `Iterable[Unknown]`, found `object`
5025 |         observed_states = row.get("customer_state")
5026 |         if (
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `append` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:5908:27
     |
5906 |             if not isinstance(parent, list):
5907 |                 raise CustomerAdminError("Gate-D configuration list is invalid")
5908 |             parent.append(_preflight_scalar(content[2:]))
     |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `Never`, found `object`
5909 |             continue
5910 |         if ":" not in content or not isinstance(parent, dict):
     |
info: Method defined here
    --> stdlib/builtins.pyi:2843:9
     |
2841 |         """Return a shallow copy of the list."""
2842 |
2843 |     def append(self, object: _T, /) -> None:
     |         ^^^^^^       ---------- Parameter declared here
2844 |         """Append object to the end of the list."""
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-assignment]: Invalid subscript assignment with key of type `str & ~AlwaysFalsy` and value of type `object` on object of type `Top[dict[Unknown, Unknown]]`
    --> dualcoach/profile/checkin_cli/customer_admin.py:5918:13
     |
5916 |         raw_value = raw_value.strip()
5917 |         if raw_value:
5918 |             parent[key] = _preflight_scalar(raw_value)
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5919 |             continue
5920 |         next_is_list = (
     |
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Invalid subscript assignment with key of type `str & ~AlwaysFalsy` and value of type `list[Unknown] | dict[Unknown, Unknown]` on object of type `Top[dict[Unknown, Unknown]]`
    --> dualcoach/profile/checkin_cli/customer_admin.py:5926:9
     |
5924 |         )
5925 |         child: object = [] if next_is_list else {}
5926 |         parent[key] = child
     |         ^^^^^^^^^^^^^^^^^^^
5927 |         stack.append((indentation, child))
5928 |     return root
     |
info: rule `invalid-assignment` is enabled by default

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
    --> dualcoach/profile/checkin_cli/customer_admin.py:5957:26
     |
5955 |     else:
5956 |         try:
5957 |             import yaml  # type: ignore
     |                          ^^^^^^^^^^^^^^
5958 |         except ImportError:
5959 |             payload = _preflight_simple_yaml(raw.decode("utf-8"))
     |
help: Remove the unused suppression comment
5954 |             raise CustomerAdminError("Gate-D configuration is invalid") from exc
5955 |     else:
5956 |         try:
     -             import yaml  # type: ignore
5957 +             import yaml
5958 |         except ImportError:
5959 |             payload = _preflight_simple_yaml(raw.decode("utf-8"))
5960 |         else:

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:5979:31
     |
5977 |             if not isinstance(value, Mapping):
5978 |                 break
5979 |             value = value.get(key)
     |                               ^^^ Expected `Never`, found `str`
5980 |         else:
5981 |             if isinstance(value, Mapping):
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:5993:32
     |
5991 |     values = tuple(
5992 |         str(item) if isinstance(item, int) and not isinstance(item, bool) else item
5993 |         for item in (value.get(key) for key in ("user_id", "chat_id", "topic_id"))
     |                                ^^^ Expected `Never`, found `Literal["user_id", "chat_id", "topic_id"]`
5994 |     )
5995 |     if any(not isinstance(item, str) or not item.strip() for item in values):
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[Mapping[Unknown, object]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["user_id"]` on object of type `Top[Mapping[Unknown, object]]`
    --> dualcoach/profile/checkin_cli/customer_admin.py:6011:15
     |
6009 |     }:
6010 |         return None
6011 |     user_id = value["user_id"]
     |               ^^^^^
6012 |     chat_id = value["chat_id"]
6013 |     topic_value = value["topic_id"]
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[Mapping[Unknown, object]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["chat_id"]` on object of type `Top[Mapping[Unknown, object]]`
    --> dualcoach/profile/checkin_cli/customer_admin.py:6012:15
     |
6010 |         return None
6011 |     user_id = value["user_id"]
6012 |     chat_id = value["chat_id"]
     |               ^^^^^
6013 |     topic_value = value["topic_id"]
6014 |     version = value["version"]
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[Mapping[Unknown, object]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["topic_id"]` on object of type `Top[Mapping[Unknown, object]]`
    --> dualcoach/profile/checkin_cli/customer_admin.py:6013:19
     |
6011 |     user_id = value["user_id"]
6012 |     chat_id = value["chat_id"]
6013 |     topic_value = value["topic_id"]
     |                   ^^^^^
6014 |     version = value["version"]
6015 |     if (
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[Mapping[Unknown, object]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["version"]` on object of type `Top[Mapping[Unknown, object]]`
    --> dualcoach/profile/checkin_cli/customer_admin.py:6014:15
     |
6012 |     chat_id = value["chat_id"]
6013 |     topic_value = value["topic_id"]
6014 |     version = value["version"]
     |               ^^^^^
6015 |     if (
6016 |         not isinstance(user_id, str)
     |
info: rule `invalid-argument-type` is enabled by default

error[no-matching-overload]: No overload of bound method `get` matches arguments
    --> dualcoach/profile/checkin_cli/customer_admin.py:6039:15
     |
6037 |     """Normalize one reserved route to its chat/topic pair."""
6038 |     if isinstance(value, Mapping):
6039 |         raw = value.get("space_key", value.get("key", value))
     |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6040 |     else:
6041 |         raw = getattr(value, "space_key", None)
     |
info: First overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Possible overloads for bound method `get`:
info:   (self, key: _KT@Mapping, /) -> _VT_co@Mapping | None
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `no-matching-overload` is enabled by default

error[no-matching-overload]: No overload of bound method `get` matches arguments
    --> dualcoach/profile/checkin_cli/customer_admin.py:6039:38
     |
6037 |     """Normalize one reserved route to its chat/topic pair."""
6038 |     if isinstance(value, Mapping):
6039 |         raw = value.get("space_key", value.get("key", value))
     |                                      ^^^^^^^^^^^^^^^^^^^^^^^
6040 |     else:
6041 |         raw = getattr(value, "space_key", None)
     |
info: First overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Possible overloads for bound method `get`:
info:   (self, key: _KT@Mapping, /) -> _VT_co@Mapping | None
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `no-matching-overload` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:6076:32
     |
6074 |             and "topics" in value
6075 |         ):
6076 |             topics = value.get("topics")
     |                                ^^^^^^^^ Expected `Never`, found `Literal["topics"]`
6077 |             if not isinstance(topics, (tuple, list)):
6078 |                 raise CustomerAdminError(
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:6087:50
     |
6085 |                     )
6086 |                 candidate = dict(topic)
6087 |                 candidate["chat_id"] = value.get("chat_id")
     |                                                  ^^^^^^^^^ Expected `Never`, found `Literal["chat_id"]`
6088 |                 yield candidate
6089 |             return
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:6137:28
     |
6135 |     if isinstance(review_raw, Mapping):
6136 |         review_raw = tuple(
6137 |             review_raw.get(field) for field in ("user_id", "chat_id", "topic_id")
     |                            ^^^^^ Expected `Never`, found `Literal["user_id", "chat_id", "topic_id"]`
6138 |         )
6139 |     if not isinstance(review_raw, (tuple, list)) or len(review_raw) != 3:
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:6198:32
     |
6196 |             and "topics" in value
6197 |         ):
6198 |             topics = value.get("topics")
     |                                ^^^^^^^^ Expected `Never`, found `Literal["topics"]`
6199 |             if not isinstance(topics, (tuple, list)):
6200 |                 raise CustomerAdminError("Gate-D reserved route is invalid")
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:6205:50
     |
6203 |                     raise CustomerAdminError("Gate-D reserved route is invalid")
6204 |                 candidate = dict(topic)
6205 |                 candidate["chat_id"] = value.get("chat_id")
     |                                                  ^^^^^^^^^ Expected `Never`, found `Literal["chat_id"]`
6206 |                 yield from _preflight_route_values(
6207 |                     candidate,
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:6274:24
     |
6272 |     if not isinstance(value, Mapping):
6273 |         return None
6274 |     nested = value.get("config")
     |                        ^^^^^^^^ Expected `Never`, found `Literal["config"]`
6275 |     if isinstance(nested, Mapping):
6276 |         value = nested
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:6278:30
     |
6276 |         value = nested
6277 |     for name in ("bot_id", "bot_username", "username", "name", "config_id"):
6278 |         identity = value.get(name)
     |                              ^^^^ Expected `Never`, found `Literal["bot_id", "bot_username", "username", "name", "config_id"]`
6279 |         if isinstance(identity, str) and identity.strip():
6280 |             return identity
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `append` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:6302:31
     |
6300 |     ):
6301 |         if isinstance(value, Mapping):
6302 |             candidates.append(value)
     |                               ^^^^^ Expected `Mapping[str, object]`, found `Top[Mapping[Unknown, object]]`
6303 |     for candidate in candidates:
6304 |         bot_config = candidate.get("config")
     |
info: Method defined here
    --> stdlib/builtins.pyi:2843:9
     |
2841 |         """Return a shallow copy of the list."""
2842 |
2843 |     def append(self, object: _T, /) -> None:
     |         ^^^^^^       ---------- Parameter declared here
2844 |         """Append object to the end of the list."""
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:6308:28
     |
6306 |             bot_config = candidate
6307 |         dedicated = (
6308 |             bot_config.get("separate") is True or bot_config.get("dedicated") is True
     |                            ^^^^^^^^^^ Expected `Never`, found `Literal["separate"]`
6309 |         )
6310 |         identity = _preflight_bot_identity(candidate)
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:6308:66
     |
6306 |             bot_config = candidate
6307 |         dedicated = (
6308 |             bot_config.get("separate") is True or bot_config.get("dedicated") is True
     |                                                                  ^^^^^^^^^^^ Expected `Never`, found `Literal["dedicated"]`
6309 |         )
6310 |         identity = _preflight_bot_identity(candidate)
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `_preflight_config_routes` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:6669:13
     |
6667 |             config,
6668 |             telegram,
6669 |             telegram_extra,
     |             ^^^^^^^^^^^^^^ Expected `Mapping[str, object]`, found `object`
6670 |             names=(
6671 |                 "owner_scheduled_routes",
     |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_admin.py:6250:5
     |
6250 | def _preflight_config_routes(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^
6251 |     config: Mapping[str, object],
6252 |     telegram: Mapping[str, object],
6253 |     telegram_extra: Mapping[str, object],
     |     ------------------------------------ Parameter declared here
6254 |     *,
6255 |     names: tuple[str, ...],
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `_preflight_config_routes` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:6684:13
     |
6682 |             config,
6683 |             telegram,
6684 |             telegram_extra,
     |             ^^^^^^^^^^^^^^ Expected `Mapping[str, object]`, found `object`
6685 |             names=(
6686 |                 "dm_topics",
     |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_admin.py:6250:5
     |
6250 | def _preflight_config_routes(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^
6251 |     config: Mapping[str, object],
6252 |     telegram: Mapping[str, object],
6253 |     telegram_extra: Mapping[str, object],
     |     ------------------------------------ Parameter declared here
6254 |     *,
6255 |     names: tuple[str, ...],
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `__new__` is incorrect
    --> dualcoach/profile/checkin_cli/customer_admin.py:6740:40
     |
6738 |             if "operator_topic_id" in adaptive:
6739 |                 try:
6740 |                     legacy_topic = int(adaptive["operator_topic_id"])
     |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | Buffer | SupportsInt | SupportsIndex | SupportsTrunc`, found `object`
6741 |                 except (TypeError, ValueError):
6742 |                     legacy_pair_valid = False
     |
info: Matching overload defined here
   --> stdlib/builtins.pyi:366:9
    |
365 |     @overload
366 |     def __new__(cls, x: ConvertibleToInt = 0, /) -> Self: ...
    |         ^^^^^^^      ----------------------- Parameter declared here
367 |     @overload
368 |     def __new__(cls, x: str | bytes | bytearray, /, base: SupportsIndex) -> Self: ...
    |
info: Non-matching overloads for function `__new__`:
info:   [Self](cls, x: str | bytes | bytearray, /, base: SupportsIndex) -> Self
info: rule `invalid-argument-type` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `customer_key`
  --> dualcoach/profile/checkin_cli/customer_coaching.py:94:9
   |
92 |         raise CustomerRegistryError("daily customer actions require approved continuity records")
93 |     if any(
94 |         item.customer_key != proposal.customer_key
   |         ^^^^^^^^^^^^^^^^^
95 |         or item.approved_proposal_digest != proposal.digest
96 |         or item.revision != proposal.revision
   |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `approved_proposal_digest`
  --> dualcoach/profile/checkin_cli/customer_coaching.py:95:12
   |
93 |     if any(
94 |         item.customer_key != proposal.customer_key
95 |         or item.approved_proposal_digest != proposal.digest
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
96 |         or item.revision != proposal.revision
97 |         for item in selected
   |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `revision`
  --> dualcoach/profile/checkin_cli/customer_coaching.py:96:12
   |
94 |         item.customer_key != proposal.customer_key
95 |         or item.approved_proposal_digest != proposal.digest
96 |         or item.revision != proposal.revision
   |            ^^^^^^^^^^^^^
97 |         for item in selected
98 |     ):
   |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `action_text`
   --> dualcoach/profile/checkin_cli/customer_coaching.py:123:15
    |
121 |     return CustomerDailyProjection(
122 |         today_state, comparison, judgement, reason,
123 |         tuple(item.action_text for item in selected), next_check,
    |               ^^^^^^^^^^^^^^^^
124 |     )
    |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
   --> dualcoach/profile/checkin_cli/customer_coaching.py:145:13
    |
143 |         self.adaptive_store = AdaptiveEventStore(
144 |             runtime.nutrition_plans_root / "events.jsonl",
145 |             canonical_transaction=self.canonical_transaction,
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `CanonicalEventTransaction | None`, found `object`
146 |             root=runtime.nutrition_plans_root,
147 |         )
    |
info: Method defined here
    --> dualcoach/profile/checkin_cli/adaptive_nutrition.py:5160:9
     |
5158 |     """Append-only exact-revision audit store with recovery-aware journals."""
5159 |
5160 |     def __init__(
     |         ^^^^^^^^
5161 |         self,
5162 |         path: Path,
5163 |         *,
5164 |         canonical_events_path: Path | None = None,
5165 |         canonical_transaction: CanonicalEventTransaction | None = None,
     |         -------------------------------------------------------------- Parameter declared here
5166 |         root: Path | None = None,
5167 |     ) -> None:
     |
info: rule `invalid-argument-type` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `current_schedule_reference`
   --> dualcoach/profile/checkin_cli/customer_coaching.py:158:16
    |
156 |     def current_reference(self, customer_key: str) -> object | None:
157 |         self._require_customer(customer_key)
158 |         return self.canonical_transaction.current_schedule_reference(customer_key)
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
159 |     @property
160 |     def _reference_pending_path(self) -> Path:
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `version`
   --> dualcoach/profile/checkin_cli/customer_coaching.py:250:31
    |
248 |             "event": event.model_dump(mode="json", exclude_none=True),
249 |             "event_digest": self._event_digest(event),
250 |             "policy_version": policy.version,
    |                               ^^^^^^^^^^^^^^
251 |             "policy_digest": policy.policy_digest,
252 |             "policy_document_digest": policy.document_digest,
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `policy_digest`
   --> dualcoach/profile/checkin_cli/customer_coaching.py:251:30
    |
249 |             "event_digest": self._event_digest(event),
250 |             "policy_version": policy.version,
251 |             "policy_digest": policy.policy_digest,
    |                              ^^^^^^^^^^^^^^^^^^^^
252 |             "policy_document_digest": policy.document_digest,
253 |             "epoch": epoch,
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `document_digest`
   --> dualcoach/profile/checkin_cli/customer_coaching.py:252:39
    |
250 |             "policy_version": policy.version,
251 |             "policy_digest": policy.policy_digest,
252 |             "policy_document_digest": policy.document_digest,
    |                                       ^^^^^^^^^^^^^^^^^^^^^^
253 |             "epoch": epoch,
254 |             "parent_digest": parent_digest,
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `read_snapshot`
   --> dualcoach/profile/checkin_cli/customer_coaching.py:296:20
    |
294 |         if customer_key != self.runtime.spec.customer_key or pending.get("event_digest") != self._event_digest(event):
295 |             raise DualCoachCoordinatorError("schedule reference recovery state mismatches customer authority")
296 |         snapshot = self.canonical_transaction.read_snapshot()
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
297 |         canonical = next((item for item in snapshot.events if item.event_id == event.event_id), None)
298 |         if canonical is None:
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `version`
   --> dualcoach/profile/checkin_cli/customer_coaching.py:309:46
    |
307 |         policy, epoch, parent_digest = self._strategy_pins()
308 |         if (
309 |             pending.get("policy_version") != policy.version
    |                                              ^^^^^^^^^^^^^^
310 |             or pending.get("policy_digest") != policy.policy_digest
311 |             or pending.get("policy_document_digest") != policy.document_digest
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `policy_digest`
   --> dualcoach/profile/checkin_cli/customer_coaching.py:310:48
    |
308 |         if (
309 |             pending.get("policy_version") != policy.version
310 |             or pending.get("policy_digest") != policy.policy_digest
    |                                                ^^^^^^^^^^^^^^^^^^^^
311 |             or pending.get("policy_document_digest") != policy.document_digest
312 |             or pending.get("epoch") != epoch
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `document_digest`
   --> dualcoach/profile/checkin_cli/customer_coaching.py:311:57
    |
309 |             pending.get("policy_version") != policy.version
310 |             or pending.get("policy_digest") != policy.policy_digest
311 |             or pending.get("policy_document_digest") != policy.document_digest
    |                                                         ^^^^^^^^^^^^^^^^^^^^^^
312 |             or pending.get("epoch") != epoch
313 |             or pending.get("parent_digest") != parent_digest
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `schedule_reference_digest`
   --> dualcoach/profile/checkin_cli/customer_coaching.py:316:28
    |
314 |         ):
315 |             raise DualCoachCoordinatorError("schedule reference recovery pins mismatch authority")
316 |         reference_digest = self.canonical_transaction.schedule_reference_digest(canonical)
    |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
317 |         baseline = self.adaptive_store.project_schedule_baseline(
318 |             customer_key=customer_key,
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `version`
   --> dualcoach/profile/checkin_cli/customer_coaching.py:321:28
    |
319 |             source_reference_id=canonical.event_id,
320 |             source_reference_digest=reference_digest,
321 |             policy_version=policy.version,
    |                            ^^^^^^^^^^^^^^
322 |             policy_digest=policy.policy_digest,
323 |             policy_document_digest=policy.document_digest,
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `policy_digest`
   --> dualcoach/profile/checkin_cli/customer_coaching.py:322:27
    |
320 |             source_reference_digest=reference_digest,
321 |             policy_version=policy.version,
322 |             policy_digest=policy.policy_digest,
    |                           ^^^^^^^^^^^^^^^^^^^^
323 |             policy_document_digest=policy.document_digest,
324 |             epoch=epoch,
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `document_digest`
   --> dualcoach/profile/checkin_cli/customer_coaching.py:323:36
    |
321 |             policy_version=policy.version,
322 |             policy_digest=policy.policy_digest,
323 |             policy_document_digest=policy.document_digest,
    |                                    ^^^^^^^^^^^^^^^^^^^^^^
324 |             epoch=epoch,
325 |             parent_digest=parent_digest,
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `version`
   --> dualcoach/profile/checkin_cli/customer_coaching.py:343:31
    |
341 |             "event": event.model_dump(mode="json", exclude_none=True),
342 |             "event_digest": self._event_digest(event),
343 |             "policy_version": policy.version,
    |                               ^^^^^^^^^^^^^^
344 |             "policy_digest": policy.policy_digest,
345 |             "policy_document_digest": policy.document_digest,
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `policy_digest`
   --> dualcoach/profile/checkin_cli/customer_coaching.py:344:30
    |
342 |             "event_digest": self._event_digest(event),
343 |             "policy_version": policy.version,
344 |             "policy_digest": policy.policy_digest,
    |                              ^^^^^^^^^^^^^^^^^^^^
345 |             "policy_document_digest": policy.document_digest,
346 |         }
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `document_digest`
   --> dualcoach/profile/checkin_cli/customer_coaching.py:345:39
    |
343 |             "policy_version": policy.version,
344 |             "policy_digest": policy.policy_digest,
345 |             "policy_document_digest": policy.document_digest,
    |                                       ^^^^^^^^^^^^^^^^^^^^^^
346 |         }
347 |         path = self._pending_path
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `read_snapshot`
   --> dualcoach/profile/checkin_cli/customer_coaching.py:388:20
    |
386 |         if customer_key != self.runtime.spec.customer_key or pending.get("event_digest") != self._event_digest(event):
387 |             raise DualCoachCoordinatorError("schedule confirmation recovery state mismatches customer authority")
388 |         snapshot = self.canonical_transaction.read_snapshot()
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
389 |         canonical = next((item for item in snapshot.events if item.event_id == event.event_id), None)
390 |         if canonical is None:
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `~None` has no attribute `event_id`
   --> dualcoach/profile/checkin_cli/customer_coaching.py:419:33
    |
417 |             raise DualCoachCoordinatorError("dual-coach confirmation payload is missing")
418 |         reference = self.current_reference(customer_key)
419 |         if reference is None or reference.event_id != payload.reference_event_id:
    |                                 ^^^^^^^^^^^^^^^^^^
420 |             raise DualCoachCoordinatorError("dual-coach confirmation reference is not current")
421 |         reference_digest = self.canonical_transaction.schedule_reference_digest(reference)
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `schedule_reference_digest`
   --> dualcoach/profile/checkin_cli/customer_coaching.py:421:28
    |
419 |         if reference is None or reference.event_id != payload.reference_event_id:
420 |             raise DualCoachCoordinatorError("dual-coach confirmation reference is not current")
421 |         reference_digest = self.canonical_transaction.schedule_reference_digest(reference)
    |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
422 |         if reference_digest != payload.reference_digest:
423 |             raise DualCoachCoordinatorError("dual-coach confirmation reference digest is invalid")
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `version`
   --> dualcoach/profile/checkin_cli/customer_coaching.py:426:13
    |
424 |         pinned_policy, epoch, _ = self._strategy_pins()
425 |         if (
426 |             pinned_policy.version != policy.version
    |             ^^^^^^^^^^^^^^^^^^^^^
427 |             or pinned_policy.policy_digest != policy.policy_digest
428 |             or pinned_policy.document_digest != policy.document_digest
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `version`
   --> dualcoach/profile/checkin_cli/customer_coaching.py:426:38
    |
424 |         pinned_policy, epoch, _ = self._strategy_pins()
425 |         if (
426 |             pinned_policy.version != policy.version
    |                                      ^^^^^^^^^^^^^^
427 |             or pinned_policy.policy_digest != policy.policy_digest
428 |             or pinned_policy.document_digest != policy.document_digest
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `policy_digest`
   --> dualcoach/profile/checkin_cli/customer_coaching.py:427:16
    |
425 |         if (
426 |             pinned_policy.version != policy.version
427 |             or pinned_policy.policy_digest != policy.policy_digest
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
428 |             or pinned_policy.document_digest != policy.document_digest
429 |         ):
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `policy_digest`
   --> dualcoach/profile/checkin_cli/customer_coaching.py:427:47
    |
425 |         if (
426 |             pinned_policy.version != policy.version
427 |             or pinned_policy.policy_digest != policy.policy_digest
    |                                               ^^^^^^^^^^^^^^^^^^^^
428 |             or pinned_policy.document_digest != policy.document_digest
429 |         ):
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `document_digest`
   --> dualcoach/profile/checkin_cli/customer_coaching.py:428:16
    |
426 |             pinned_policy.version != policy.version
427 |             or pinned_policy.policy_digest != policy.policy_digest
428 |             or pinned_policy.document_digest != policy.document_digest
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
429 |         ):
430 |             raise DualCoachCoordinatorError("dual-coach confirmation policy mismatches authority")
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `document_digest`
   --> dualcoach/profile/checkin_cli/customer_coaching.py:428:49
    |
426 |             pinned_policy.version != policy.version
427 |             or pinned_policy.policy_digest != policy.policy_digest
428 |             or pinned_policy.document_digest != policy.document_digest
    |                                                 ^^^^^^^^^^^^^^^^^^^^^^
429 |         ):
430 |             raise DualCoachCoordinatorError("dual-coach confirmation policy mismatches authority")
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `get`
   --> dualcoach/profile/checkin_cli/customer_coaching.py:434:17
    |
432 |             row for row in self.adaptive_store.read()
433 |             if row["event_type"] == "schedule_strategy_baseline"
434 |             and row["payload"].get("source_reference_id") == reference.event_id
    |                 ^^^^^^^^^^^^^^^^^^
435 |             and row["payload"].get("source_reference_digest") == reference_digest
436 |         ]
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `~None` has no attribute `event_id`
   --> dualcoach/profile/checkin_cli/customer_coaching.py:434:62
    |
432 |             row for row in self.adaptive_store.read()
433 |             if row["event_type"] == "schedule_strategy_baseline"
434 |             and row["payload"].get("source_reference_id") == reference.event_id
    |                                                              ^^^^^^^^^^^^^^^^^^
435 |             and row["payload"].get("source_reference_digest") == reference_digest
436 |         ]
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `get`
   --> dualcoach/profile/checkin_cli/customer_coaching.py:435:17
    |
433 |             if row["event_type"] == "schedule_strategy_baseline"
434 |             and row["payload"].get("source_reference_id") == reference.event_id
435 |             and row["payload"].get("source_reference_digest") == reference_digest
    |                 ^^^^^^^^^^^^^^^^^^
436 |         ]
437 |         if len(baseline_rows) != 1:
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `~None` has no attribute `schedule_reference`
   --> dualcoach/profile/checkin_cli/customer_coaching.py:444:17
    |
442 |             self.runtime.customer_root.parents[2], customer_key
443 |         )
444 |         start = reference.schedule_reference.session_kst_date
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
445 |         training_days = {
446 |             item.date for item in registration.training_schedule
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `~None` has no attribute `event_id`
   --> dualcoach/profile/checkin_cli/customer_coaching.py:454:27
    |
452 |         )
453 |         mapping = self.adaptive_store.append_source_day_mapping(
454 |             root_event_id=reference.event_id,
    |                           ^^^^^^^^^^^^^^^^^^
455 |             customer_key=customer_key,
456 |             mapped_flow="schedule_confirmation",
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `~None` has no attribute `event_id`
   --> dualcoach/profile/checkin_cli/customer_coaching.py:464:33
    |
462 |         return self.adaptive_store.project_confirmed_schedule_strategy(
463 |             customer_key=customer_key,
464 |             source_reference_id=reference.event_id,
    |                                 ^^^^^^^^^^^^^^^^^^
465 |             source_reference_digest=reference_digest,
466 |             confirmation_id=event.event_id,
    |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to bound method `project_confirmed_schedule_strategy` is incorrect
   --> dualcoach/profile/checkin_cli/customer_coaching.py:467:13
    |
465 |             source_reference_digest=reference_digest,
466 |             confirmation_id=event.event_id,
467 |             source_day_mapping_digest=mapping["row_digest"],
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
468 |             policy_version=policy.version,
469 |             policy_digest=policy.policy_digest,
    |
info: Method defined here
    --> dualcoach/profile/checkin_cli/adaptive_nutrition.py:5891:9
     |
5889 |         )
5890 |
5891 |     def project_confirmed_schedule_strategy(
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5892 |         self,
5893 |         *,
     |
    ::: dualcoach/profile/checkin_cli/adaptive_nutrition.py:5898:9
     |
5896 |         source_reference_digest: str,
5897 |         confirmation_id: str,
5898 |         source_day_mapping_digest: str,
     |         ------------------------------ Parameter declared here
5899 |         policy_version: str,
5900 |         policy_digest: str,
     |
info: Union variant `bound method AdaptiveEventStore.project_confirmed_schedule_strategy(*, customer_key: str, source_reference_id: str, source_reference_digest: str, confirmation_id: str, source_day_mapping_digest: str, policy_version: str, policy_digest: str, policy_document_digest: str, epoch: int, parent_digest: str, categories: Sequence[str], last_change_note: str) -> Mapping[str, object]` is incompatible with this call site
info: Attempted to call union type `Unknown | (bound method AdaptiveEventStore.project_confirmed_schedule_strategy(*, customer_key: str, source_reference_id: str, source_reference_digest: str, confirmation_id: str, source_day_mapping_digest: str, policy_version: str, policy_digest: str, policy_document_digest: str, epoch: int, parent_digest: str, categories: Sequence[str], last_change_note: str) -> Mapping[str, object])`
info: rule `invalid-argument-type` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `version`
   --> dualcoach/profile/checkin_cli/customer_coaching.py:468:28
    |
466 |             confirmation_id=event.event_id,
467 |             source_day_mapping_digest=mapping["row_digest"],
468 |             policy_version=policy.version,
    |                            ^^^^^^^^^^^^^^
469 |             policy_digest=policy.policy_digest,
470 |             policy_document_digest=policy.document_digest,
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `policy_digest`
   --> dualcoach/profile/checkin_cli/customer_coaching.py:469:27
    |
467 |             source_day_mapping_digest=mapping["row_digest"],
468 |             policy_version=policy.version,
469 |             policy_digest=policy.policy_digest,
    |                           ^^^^^^^^^^^^^^^^^^^^
470 |             policy_document_digest=policy.document_digest,
471 |             epoch=epoch,
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `document_digest`
   --> dualcoach/profile/checkin_cli/customer_coaching.py:470:36
    |
468 |             policy_version=policy.version,
469 |             policy_digest=policy.policy_digest,
470 |             policy_document_digest=policy.document_digest,
    |                                    ^^^^^^^^^^^^^^^^^^^^^^
471 |             epoch=epoch,
472 |             parent_digest=baseline_rows[0]["event_id"],
    |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to bound method `project_confirmed_schedule_strategy` is incorrect
   --> dualcoach/profile/checkin_cli/customer_coaching.py:472:13
    |
470 |             policy_document_digest=policy.document_digest,
471 |             epoch=epoch,
472 |             parent_digest=baseline_rows[0]["event_id"],
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
473 |             categories=categories,
474 |             last_change_note=reference.schedule_reference.last_change_note,
    |
info: Method defined here
    --> dualcoach/profile/checkin_cli/adaptive_nutrition.py:5891:9
     |
5889 |         )
5890 |
5891 |     def project_confirmed_schedule_strategy(
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5892 |         self,
5893 |         *,
     |
    ::: dualcoach/profile/checkin_cli/adaptive_nutrition.py:5903:9
     |
5901 |         policy_document_digest: str,
5902 |         epoch: int,
5903 |         parent_digest: str,
     |         ------------------ Parameter declared here
5904 |         categories: Sequence[str],
5905 |         last_change_note: str,
     |
info: Union variant `bound method AdaptiveEventStore.project_confirmed_schedule_strategy(*, customer_key: str, source_reference_id: str, source_reference_digest: str, confirmation_id: str, source_day_mapping_digest: str, policy_version: str, policy_digest: str, policy_document_digest: str, epoch: int, parent_digest: str, categories: Sequence[str], last_change_note: str) -> Mapping[str, object]` is incompatible with this call site
info: Attempted to call union type `Unknown | (bound method AdaptiveEventStore.project_confirmed_schedule_strategy(*, customer_key: str, source_reference_id: str, source_reference_digest: str, confirmation_id: str, source_day_mapping_digest: str, policy_version: str, policy_digest: str, policy_document_digest: str, epoch: int, parent_digest: str, categories: Sequence[str], last_change_note: str) -> Mapping[str, object])`
info: rule `invalid-argument-type` is enabled by default

error[unresolved-attribute]: Object of type `~None` has no attribute `schedule_reference`
   --> dualcoach/profile/checkin_cli/customer_coaching.py:474:30
    |
472 |             parent_digest=baseline_rows[0]["event_id"],
473 |             categories=categories,
474 |             last_change_note=reference.schedule_reference.last_change_note,
    |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
475 |         )
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `read_snapshot`
   --> dualcoach/profile/checkin_cli/customer_coaching.py:490:20
    |
488 |         if not isinstance(event, Event):
489 |             raise DualCoachCoordinatorError("terminal morning event is required")
490 |         snapshot = self.canonical_transaction.read_snapshot()
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
491 |         evaluation_kst_day = terminal_morning_root_kst_day(snapshot.events, event)
492 |         if evaluation_kst_day is None:
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `~None` has no attribute `event_id`
   --> dualcoach/profile/checkin_cli/customer_coaching.py:589:16
    |
587 |             payload is None
588 |             or reference is None
589 |             or reference.event_id != payload.reference_event_id
    |                ^^^^^^^^^^^^^^^^^^
590 |             or self.canonical_transaction.schedule_reference_digest(reference)
591 |             != payload.reference_digest
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `schedule_reference_digest`
   --> dualcoach/profile/checkin_cli/customer_coaching.py:590:16
    |
588 |             or reference is None
589 |             or reference.event_id != payload.reference_event_id
590 |             or self.canonical_transaction.schedule_reference_digest(reference)
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
591 |             != payload.reference_digest
592 |         ):
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `append_schedule_confirmation`
   --> dualcoach/profile/checkin_cli/customer_coaching.py:598:25
    |
596 |         self._write_pending(event, request.customer_key, policy)
597 |         try:
598 |             canonical = self.canonical_transaction.append_schedule_confirmation(
    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
599 |                 event, customer_key=request.customer_key
600 |             )
    |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to function `non_response_review_candidate` is incorrect
   --> dualcoach/profile/checkin_cli/customer_coaching.py:653:51
    |
651 |         )
652 |
653 |         candidate = non_response_review_candidate(reminder, **kwargs)
    |                                                   ^^^^^^^^ Expected `ScheduledDeliveryReceipt`, found `object`
654 |         if candidate is None:
655 |             return None
    |
info: Function defined here
  --> dualcoach/profile/checkin_cli/weekly_operations_schedule_host_review_r4.py:19:5
   |
19 | def non_response_review_candidate(
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20 |     reminder: ScheduledDeliveryReceipt,
   |     ---------------------------------- Parameter declared here
21 |     *,
22 |     response_window_ends_at: datetime,
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `non_response_review_candidate` is incorrect
   --> dualcoach/profile/checkin_cli/customer_coaching.py:653:61
    |
651 |         )
652 |
653 |         candidate = non_response_review_candidate(reminder, **kwargs)
    |                                                             ^^^^^^^^ Expected `datetime`, found `object`
654 |         if candidate is None:
655 |             return None
    |
info: Function defined here
  --> dualcoach/profile/checkin_cli/weekly_operations_schedule_host_review_r4.py:19:5
   |
19 | def non_response_review_candidate(
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20 |     reminder: ScheduledDeliveryReceipt,
21 |     *,
22 |     response_window_ends_at: datetime,
   |     --------------------------------- Parameter declared here
23 |     now: datetime,
24 |     checkin_received_at: datetime | None = None,
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `non_response_review_candidate` is incorrect
   --> dualcoach/profile/checkin_cli/customer_coaching.py:653:61
    |
651 |         )
652 |
653 |         candidate = non_response_review_candidate(reminder, **kwargs)
    |                                                             ^^^^^^^^ Expected `datetime`, found `object`
654 |         if candidate is None:
655 |             return None
    |
info: Function defined here
  --> dualcoach/profile/checkin_cli/weekly_operations_schedule_host_review_r4.py:19:5
   |
19 | def non_response_review_candidate(
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20 |     reminder: ScheduledDeliveryReceipt,
21 |     *,
22 |     response_window_ends_at: datetime,
23 |     now: datetime,
   |     ------------- Parameter declared here
24 |     checkin_received_at: datetime | None = None,
25 | ) -> NonResponseReviewCandidate | None:
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `non_response_review_candidate` is incorrect
   --> dualcoach/profile/checkin_cli/customer_coaching.py:653:61
    |
651 |         )
652 |
653 |         candidate = non_response_review_candidate(reminder, **kwargs)
    |                                                             ^^^^^^^^ Expected `datetime | None`, found `object`
654 |         if candidate is None:
655 |             return None
    |
info: Function defined here
  --> dualcoach/profile/checkin_cli/weekly_operations_schedule_host_review_r4.py:19:5
   |
19 | def non_response_review_candidate(
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20 |     reminder: ScheduledDeliveryReceipt,
21 |     *,
22 |     response_window_ends_at: datetime,
23 |     now: datetime,
24 |     checkin_received_at: datetime | None = None,
   |     ------------------------------------------- Parameter declared here
25 | ) -> NonResponseReviewCandidate | None:
26 |     """Return one deterministic review signal after proven reminder delivery."""
   |
info: rule `invalid-argument-type` is enabled by default

error[call-non-callable]: Object of type `object` is not callable
   --> dualcoach/profile/checkin_cli/customer_coaching.py:680:34
    |
678 |         if not hasattr(event, "model_dump"):
679 |             raise TypeError("dual-coach event is invalid")
680 |         return _canonical_digest(event.model_dump(mode="json", exclude_none=True))
    |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
681 | CONSENT_VERSION = "privacy-v1"
682 | _REGISTERED_BINDING_TOKEN = object()
    |
info: rule `call-non-callable` is enabled by default

error[invalid-method-override]: Invalid override of method `__reduce__`
   --> dualcoach/profile/checkin_cli/customer_coaching.py:743:9
    |
741 |         raise TypeError("registered customer bindings are not serializable")
742 |
743 |     def __reduce__(self) -> object:
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^ Definition is incompatible with `object.__reduce__`
744 |         raise TypeError("registered customer bindings are not serializable")
    |
   ::: stdlib/builtins.pyi:152:9
    |
150 |     # return type of pickle methods is rather hard to express in the current type system
151 |     # see #6661 and https://docs.python.org/3/library/pickle.html#object.__reduce__
152 |     def __reduce__(self) -> str | tuple[Any, ...]: ...
    |         ----------------------------------------- `object.__reduce__` defined here
153 |     def __reduce_ex__(self, protocol: SupportsIndex, /) -> str | tuple[Any, ...]: ...
154 |     if sys.version_info >= (3, 11):
    |
info: This violates the Liskov Substitution Principle
info: rule `invalid-method-override` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> dualcoach/profile/checkin_cli/customer_schedule.py:613:58
    |
611 |                     raise CustomerScheduleError("schedule claim kind is invalid")
612 |                 result.append(
613 |                     (CustomerScheduleTask(customer.name, claim.stem, kst_day), claim)
    |                                                          ^^^^^^^^^^ Expected `Literal["daily", "weekly", "monthly", "reminder", "cutoff"]`, found `str`
614 |                 )
615 |     return tuple(sorted(result, key=lambda item: _schedule_key(item[0])))
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `_build_row` is incorrect
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1100:29
     |
1098 | …                     reservation_id=str(existing["reservation_id"]),
1099 | …                     task=task,
1100 | …                     body=existing.get("body") if isinstance(existing.get("body"), str) else None,
     |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
1101 | …                     template_digest=str(existing["template_digest"]),
1102 | …                     destination=existing.get("destination"),
     |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1288:5
     |
1288 | def _build_row(
     |     ^^^^^^^^^^
1289 |     *,
1290 |     sequence: int,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1295:5
     |
1293 |     reservation_id: str,
1294 |     task: CustomerScheduleTask,
1295 |     body: str | None,
     |     ---------------- Parameter declared here
1296 |     template_digest: str,
1297 |     destination: object,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `_build_row` is incorrect
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1106:29
     |
1104 |   …                     config_digest=str(existing["config_digest"]),
1105 |   …                     legacy_claim_digest=str(existing["legacy_claim_digest"]),
1106 | / …                     provider_receipt=existing.get("provider_receipt")
1107 | | …                     if isinstance(existing.get("provider_receipt"), str)
1108 | | …                     else None,
     | |_______________________________^ Expected `str | None`, found `object`
1109 |   …                     message_id=existing.get("message_id")
1110 |   …                     if isinstance(existing.get("message_id"), str)
     |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1288:5
     |
1288 | def _build_row(
     |     ^^^^^^^^^^
1289 |     *,
1290 |     sequence: int,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1301:5
     |
1299 |     config_digest: str,
1300 |     legacy_claim_digest: str,
1301 |     provider_receipt: str | None = None,
     |     ----------------------------------- Parameter declared here
1302 |     message_id: str | None = None,
1303 |     reason: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `_build_row` is incorrect
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1109:29
     |
1107 |                               if isinstance(existing.get("provider_receipt"), str)
1108 |                               else None,
1109 | /                             message_id=existing.get("message_id")
1110 | |                             if isinstance(existing.get("message_id"), str)
1111 | |                             else None,
     | |_____________________________________^ Expected `str | None`, found `object`
1112 |                               reason="legacy_claim_unknown",
1113 |                           )
     |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1288:5
     |
1288 | def _build_row(
     |     ^^^^^^^^^^
1289 |     *,
1290 |     sequence: int,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1302:5
     |
1300 |     legacy_claim_digest: str,
1301 |     provider_receipt: str | None = None,
1302 |     message_id: str | None = None,
     |     ----------------------------- Parameter declared here
1303 |     reason: str | None = None,
1304 |     weekly_authority: WeeklyReminderReservationAuthority | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[unresolved-attribute]: Attribute `state` is not defined on `None` in union `ScheduleFenceReceipt | None`
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1195:12
     |
1193 |         elif current.state not in {"ready", "recovery_required"}:
1194 |             raise CustomerScheduleError("schedule startup fence is not ready")
1195 |         if current.state == "ready":
     |            ^^^^^^^^^^^^^
1196 |             try:
1197 |                 _validate_schedule_rows(rows)
     |
info: rule `unresolved-attribute` is enabled by default

error[invalid-return-type]: Return type does not match returned value
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1217:20
     |
1215 |                 assert result is not None
1216 |                 return result
1217 |             return current
     |                    ^^^^^^^ expected `ScheduleFenceReceipt`, found `ScheduleFenceReceipt | None`
1218 |         _write_fence(fence, "preparing")
1219 |         try:
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1185:63
     |
1185 | def initialize_schedule_delivery_fence(profile_root: Path) -> ScheduleFenceReceipt:
     |                                                               -------------------- Expected `ScheduleFenceReceipt` because of return type
1186 |     """Create the durable preparing/ready startup fence for a fresh profile."""
1187 |     with _schedule_lock(profile_root) as (ledger, fence, claims):
     |
info: rule `invalid-return-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1362:9
     |
1360 |     task = CustomerScheduleTask(
1361 |         str(row["customer_key"]),
1362 |         str(row["task_kind"]),
     |         ^^^^^^^^^^^^^^^^^^^^^ Expected `Literal["daily", "weekly", "monthly", "reminder", "cutoff"]`, found `str`
1363 |         date.fromisoformat(str(row["kst_day"])),
1364 |     )
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `_write_tombstone` is incorrect
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1423:52
     |
1421 |         claim = _claim_path(claims_root, task)
1422 |         try:
1423 |             claim_digest = _write_tombstone(claim, requested_reservation)
     |                                                    ^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `str | None`
1424 |         except CustomerScheduleError:
1425 |             _set_recovery_fence(fence)
     |
info: Element `None` of this union is not assignable to `str`
info: Function defined here
   --> dualcoach/profile/checkin_cli/customer_schedule.py:635:5
    |
635 | def _write_tombstone(path: Path, reservation_id: str) -> str:
    |     ^^^^^^^^^^^^^^^^             ------------------- Parameter declared here
636 |     _ensure_regular(path, "schedule claim")
637 |     parent = path.parent
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `_build_row` is incorrect
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1431:13
     |
1429 |             previous_digest=str(rows[-1]["row_digest"]) if rows else None,
1430 |             state="prepared",
1431 |             reservation_id=requested_reservation,
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `str | None`
1432 |             task=task,
1433 |             body=body,
     |
info: Element `None` of this union is not assignable to `str`
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1288:5
     |
1288 | def _build_row(
     |     ^^^^^^^^^^
1289 |     *,
1290 |     sequence: int,
1291 |     previous_digest: str | None,
1292 |     state: str,
1293 |     reservation_id: str,
     |     ------------------- Parameter declared here
1294 |     task: CustomerScheduleTask,
1295 |     body: str | None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-assignment]: Object of type `object` is not assignable to `str | None`
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1691:13
     |
1689 |             # The provider receipt is an immutable transport pin.  An audit
1690 |             # transition may never replace it with an audit-local identifier.
1691 |             provider_receipt = current.get("provider_receipt")
     |             ----------------   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Incompatible value of type `object`
     |             |
     |             Declared type `str | None`
1692 |             if not isinstance(provider_receipt, str):
1693 |                 raise CustomerScheduleError("sent-audited transition has no provider receipt")
     |
info: rule `invalid-assignment` is enabled by default

error[invalid-argument-type]: Argument to function `_build_row` is incorrect
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1702:13
     |
1700 |             reservation_id=str(current["reservation_id"]),
1701 |             task=task,
1702 |             body=current.get("body") if isinstance(current.get("body"), str) else None,
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
1703 |             template_digest=str(current["template_digest"]),
1704 |             destination=current.get("destination"),
     |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1288:5
     |
1288 | def _build_row(
     |     ^^^^^^^^^^
1289 |     *,
1290 |     sequence: int,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1295:5
     |
1293 |     reservation_id: str,
1294 |     task: CustomerScheduleTask,
1295 |     body: str | None,
     |     ---------------- Parameter declared here
1296 |     template_digest: str,
1297 |     destination: object,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `_build_row` is incorrect
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1708:13
     |
1706 |             config_digest=str(current["config_digest"]),
1707 |             legacy_claim_digest=str(current["legacy_claim_digest"]),
1708 |             provider_receipt=provider_receipt or current.get("provider_receipt"),
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
1709 |             message_id=message_id or current.get("message_id"),
1710 |             reason=reason,
     |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1288:5
     |
1288 | def _build_row(
     |     ^^^^^^^^^^
1289 |     *,
1290 |     sequence: int,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1301:5
     |
1299 |     config_digest: str,
1300 |     legacy_claim_digest: str,
1301 |     provider_receipt: str | None = None,
     |     ----------------------------------- Parameter declared here
1302 |     message_id: str | None = None,
1303 |     reason: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `_build_row` is incorrect
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1709:13
     |
1707 |             legacy_claim_digest=str(current["legacy_claim_digest"]),
1708 |             provider_receipt=provider_receipt or current.get("provider_receipt"),
1709 |             message_id=message_id or current.get("message_id"),
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
1710 |             reason=reason,
1711 |             weekly_authority=stored_weekly_authority,
     |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1288:5
     |
1288 | def _build_row(
     |     ^^^^^^^^^^
1289 |     *,
1290 |     sequence: int,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1302:5
     |
1300 |     legacy_claim_digest: str,
1301 |     provider_receipt: str | None = None,
1302 |     message_id: str | None = None,
     |     ----------------------------- Parameter declared here
1303 |     reason: str | None = None,
1304 |     weekly_authority: WeeklyReminderReservationAuthority | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[unsupported-operator]: Unsupported `not in` operation
   --> dualcoach/profile/checkin_cli/diagnostic_evidence.py:849:41
    |
847 |         relative = entry["relative_path"]
848 |         digest = entry["sha256"]
849 |         if not isinstance(kind, str) or kind not in allowed_kinds or kind in forbidden_kinds:
    |                                         ----^^^^^^^^-------------
    |                                         |           |
    |                                         |           Has type `object`
    |                                         Has type `str`
850 |             raise DiagnosticEvidenceError("promotion artifact kind forbidden")
851 |         if not isinstance(relative, str) or "/" not in relative:
    |
info: rule `unsupported-operator` is enabled by default

error[unsupported-operator]: Unsupported `in` operation
   --> dualcoach/profile/checkin_cli/diagnostic_evidence.py:849:70
    |
847 |         relative = entry["relative_path"]
848 |         digest = entry["sha256"]
849 |         if not isinstance(kind, str) or kind not in allowed_kinds or kind in forbidden_kinds:
    |                                                                      ----^^^^---------------
    |                                                                      |       |
    |                                                                      |       Has type `object`
    |                                                                      Has type `str`
850 |             raise DiagnosticEvidenceError("promotion artifact kind forbidden")
851 |         if not isinstance(relative, str) or "/" not in relative:
    |
info: rule `unsupported-operator` is enabled by default

error[not-iterable]: Object of type `object` is not iterable
   --> dualcoach/profile/checkin_cli/diagnostic_evidence.py:865:50
    |
863 |         if any(part.lower() in _BANNED_PATH_PARTS or part.startswith(".") for part in parts):
864 |             raise DiagnosticEvidenceError("promotion path names runtime data")
865 |         allowed_suffixes = {suffix for suffix in suffixes if isinstance(suffix, str)}
    |                                                  ^^^^^^^^
866 |         if Path(root_relative).suffix not in allowed_suffixes:
867 |             raise DiagnosticEvidenceError("promotion artifact suffix is not allowlisted")
    |
info: It doesn't have an `__iter__` method or a `__getitem__` method
info: rule `not-iterable` is enabled by default

error[unsupported-operator]: Unsupported `not in` operation
   --> dualcoach/profile/checkin_cli/diagnostic_evidence.py:868:36
    |
866 |         if Path(root_relative).suffix not in allowed_suffixes:
867 |             raise DiagnosticEvidenceError("promotion artifact suffix is not allowlisted")
868 |         if kind == "migration" and root_relative not in migrations:
    |                                    -------------^^^^^^^^----------
    |                                    |                    |
    |                                    |                    Has type `object`
    |                                    Has type `str & ~AlwaysFalsy`
869 |             raise DiagnosticEvidenceError("promotion migration is not allowlisted")
870 |         if kind == "test" and not (root_relative.startswith("tests/") or "/tests/" in root_relative):
    |
info: rule `unsupported-operator` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> dualcoach/profile/checkin_cli/models.py:695:9
    |
693 | ) -> Event:
694 |     payload = PaymentPayload(
695 |         amount_krw=amount_krw,
    |         ^^^^^^^^^^^^^^^^^^^^^ Expected `Literal[150000]`, found `int`
696 |         paid_on=paid_on,
697 |         period_start_on=period_start_on,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> dualcoach/profile/checkin_cli/models.py:696:9
    |
694 |     payload = PaymentPayload(
695 |         amount_krw=amount_krw,
696 |         paid_on=paid_on,
    |         ^^^^^^^^^^^^^^^ Expected `date`, found `date | str`
697 |         period_start_on=period_start_on,
698 |         period_end_on=period_end_on,
    |
info: Element `str` of this union is not assignable to `date`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> dualcoach/profile/checkin_cli/models.py:697:9
    |
695 |         amount_krw=amount_krw,
696 |         paid_on=paid_on,
697 |         period_start_on=period_start_on,
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `date`, found `date | str`
698 |         period_end_on=period_end_on,
699 |         method=method,
    |
info: Element `str` of this union is not assignable to `date`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> dualcoach/profile/checkin_cli/models.py:698:9
    |
696 |         paid_on=paid_on,
697 |         period_start_on=period_start_on,
698 |         period_end_on=period_end_on,
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `date`, found `date | str`
699 |         method=method,
700 |         kind=kind,
    |
info: Element `str` of this union is not assignable to `date`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> dualcoach/profile/checkin_cli/models.py:699:9
    |
697 |         period_start_on=period_start_on,
698 |         period_end_on=period_end_on,
699 |         method=method,
    |         ^^^^^^^^^^^^^ Expected `Literal["bank_transfer"]`, found `str`
700 |         kind=kind,
701 |     )
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> dualcoach/profile/checkin_cli/models.py:700:9
    |
698 |         period_end_on=period_end_on,
699 |         method=method,
700 |         kind=kind,
    |         ^^^^^^^^^ Expected `PaymentKind`, found `str`
701 |     )
702 |     key = payment_dedupe_key(customer_key, payload.kind, payload.period_start_on)
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> dualcoach/profile/checkin_cli/models.py:733:9
    |
731 | ) -> Event:
732 |     payload = SatisfactionPayload(
733 |         score_1to10=score_1to10 if score_1to10 is not None else score,
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `int`, found `int | None`
734 |         collected_on=collected_on if collected_on is not None else collection_date,
735 |         note=note,
    |
info: Element `None` of this union is not assignable to `int`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> dualcoach/profile/checkin_cli/models.py:734:9
    |
732 |     payload = SatisfactionPayload(
733 |         score_1to10=score_1to10 if score_1to10 is not None else score,
734 |         collected_on=collected_on if collected_on is not None else collection_date,
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `date`, found `date | str | None`
735 |         note=note,
736 |     )
    |
info: Union elements `str` and `None` are not assignable to `date`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> dualcoach/profile/checkin_cli/models.py:775:9
    |
773 |         attempt_id=attempt_id,
774 |         minutes=minutes,
775 |         task=task,
    |         ^^^^^^^^^ Expected `OperatorTask`, found `str`
776 |         work_date=work_date if work_date is not None else work_on,
777 |         supersedes_entry_id=supersedes_entry_id,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> dualcoach/profile/checkin_cli/models.py:776:9
    |
774 |         minutes=minutes,
775 |         task=task,
776 |         work_date=work_date if work_date is not None else work_on,
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `date`, found `date | str | None`
777 |         supersedes_entry_id=supersedes_entry_id,
778 |     )
    |
info: Union elements `str` and `None` are not assignable to `date`
info: rule `invalid-argument-type` is enabled by default

error[unresolved-attribute]: Object of type `Self@finalize` has no attribute `_validate_storage`
  --> dualcoach/profile/checkin_cli/nutrition_onboarding_finalize_service.py:27:9
   |
25 |         authority: OnboardingAuthority | None = None,
26 |     ):
27 |         self._validate_storage()
   |         ^^^^^^^^^^^^^^^^^^^^^^
28 |         if self.enforce_current_authority:
29 |             if authority is None:
   |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `Self@finalize` has no attribute `enforce_current_authority`
  --> dualcoach/profile/checkin_cli/nutrition_onboarding_finalize_service.py:28:12
   |
26 |     ):
27 |         self._validate_storage()
28 |         if self.enforce_current_authority:
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
29 |             if authority is None:
30 |                 raise ValueError("current onboarding authority is required")
   |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `Self@finalize` has no attribute `_validate_current_authority`
  --> dualcoach/profile/checkin_cli/nutrition_onboarding_finalize_service.py:31:13
   |
29 |             if authority is None:
30 |                 raise ValueError("current onboarding authority is required")
31 |             self._validate_current_authority(authority)
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
32 |         document = read_private_json(self.session_path)
33 |         if document.get("state") != OnboardingState.FINALIZING.value:
   |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `Self@finalize` has no attribute `session_path`
  --> dualcoach/profile/checkin_cli/nutrition_onboarding_finalize_service.py:32:38
   |
30 |                 raise ValueError("current onboarding authority is required")
31 |             self._validate_current_authority(authority)
32 |         document = read_private_json(self.session_path)
   |                                      ^^^^^^^^^^^^^^^^^
33 |         if document.get("state") != OnboardingState.FINALIZING.value:
34 |             raise ValueError("owner-approved finalization is not available")
   |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `Self@finalize` has no attribute `profile_root`
  --> dualcoach/profile/checkin_cli/nutrition_onboarding_finalize_service.py:36:26
   |
34 |             raise ValueError("owner-approved finalization is not available")
35 |         ready = finalize_onboarding(
36 |             profile_root=self.profile_root,
   |                          ^^^^^^^^^^^^^^^^^
37 |             customer_key=self.customer_key,
38 |             onboarding_root=self.root,
   |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `Self@finalize` has no attribute `customer_key`
  --> dualcoach/profile/checkin_cli/nutrition_onboarding_finalize_service.py:37:26
   |
35 |         ready = finalize_onboarding(
36 |             profile_root=self.profile_root,
37 |             customer_key=self.customer_key,
   |                          ^^^^^^^^^^^^^^^^^
38 |             onboarding_root=self.root,
39 |             baseline_candidate_path=self.baseline_path,
   |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `Self@finalize` has no attribute `root`
  --> dualcoach/profile/checkin_cli/nutrition_onboarding_finalize_service.py:38:29
   |
36 |             profile_root=self.profile_root,
37 |             customer_key=self.customer_key,
38 |             onboarding_root=self.root,
   |                             ^^^^^^^^^
39 |             baseline_candidate_path=self.baseline_path,
40 |             starts_on=starts_on,
   |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `Self@finalize` has no attribute `baseline_path`
  --> dualcoach/profile/checkin_cli/nutrition_onboarding_finalize_service.py:39:37
   |
37 |             customer_key=self.customer_key,
38 |             onboarding_root=self.root,
39 |             baseline_candidate_path=self.baseline_path,
   |                                     ^^^^^^^^^^^^^^^^^^
40 |             starts_on=starts_on,
41 |             issued_at_kst=issued_at_kst,
   |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `Self@finalize` has no attribute `customer_key`
  --> dualcoach/profile/checkin_cli/nutrition_onboarding_finalize_service.py:53:26
   |
51 |         ready.update(
52 |             schema_version="1.0",
53 |             customer_key=self.customer_key,
   |                          ^^^^^^^^^^^^^^^^^
54 |             authority_digest=document["authority_digest"],
55 |             consumed_updates=document["consumed_updates"],
   |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `Self@finalize` has no attribute `ready_path`
  --> dualcoach/profile/checkin_cli/nutrition_onboarding_finalize_service.py:57:35
   |
55 |             consumed_updates=document["consumed_updates"],
56 |         )
57 |         atomic_write_private_json(self.ready_path, ready)
   |                                   ^^^^^^^^^^^^^^^
58 |         self.session_path.unlink()
59 |         return build_status(customer_key=self.customer_key, document=ready)
   |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `Self@finalize` has no attribute `session_path`
  --> dualcoach/profile/checkin_cli/nutrition_onboarding_finalize_service.py:58:9
   |
56 |         )
57 |         atomic_write_private_json(self.ready_path, ready)
58 |         self.session_path.unlink()
   |         ^^^^^^^^^^^^^^^^^
59 |         return build_status(customer_key=self.customer_key, document=ready)
   |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `Self@finalize` has no attribute `customer_key`
  --> dualcoach/profile/checkin_cli/nutrition_onboarding_finalize_service.py:59:42
   |
57 |         atomic_write_private_json(self.ready_path, ready)
58 |         self.session_path.unlink()
59 |         return build_status(customer_key=self.customer_key, document=ready)
   |                                          ^^^^^^^^^^^^^^^^^
   |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
   --> dualcoach/profile/checkin_cli/wizard.py:219:32
    |
217 |     for name in names:
218 |         if isinstance(source, Mapping):
219 |             value = source.get(name)
    |                                ^^^^ Expected `Never`, found `str`
220 |         else:
221 |             value = getattr(source, name, None)
    |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[missing-argument]: No argument provided for required parameter `class`
   --> dualcoach/profile/checkin_cli/wizard.py:253:12
    |
251 |       if not excerpt:
252 |           raise ValueError("safety reason excerpt must be non-empty")
253 |       return SafetyReason(
    |  ____________^
254 | |         class_=SAFETY_CLASS_BY_RULE[rule_id],
255 | |         source_flow=source_flow,
256 | |         matched_field=matched_field,
257 | |         excerpt=excerpt,
258 | |         rule_id=rule_id,
259 | |     )
    | |_____^
    |
info: rule `missing-argument` is enabled by default

warning[unknown-argument]: Argument `class_` does not match any known parameter
   --> dualcoach/profile/checkin_cli/wizard.py:254:9
    |
252 |         raise ValueError("safety reason excerpt must be non-empty")
253 |     return SafetyReason(
254 |         class_=SAFETY_CLASS_BY_RULE[rule_id],
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
255 |         source_flow=source_flow,
256 |         matched_field=matched_field,
    |
info: rule `unknown-argument` was selected in the configuration file

error[invalid-argument-type]: Argument is incorrect
   --> dualcoach/profile/checkin_cli/wizard.py:255:9
    |
253 |     return SafetyReason(
254 |         class_=SAFETY_CLASS_BY_RULE[rule_id],
255 |         source_flow=source_flow,
    |         ^^^^^^^^^^^^^^^^^^^^^^^ Expected `SafetySourceFlow`, found `str`
256 |         matched_field=matched_field,
257 |         excerpt=excerpt,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> dualcoach/profile/checkin_cli/wizard.py:256:9
    |
254 |         class_=SAFETY_CLASS_BY_RULE[rule_id],
255 |         source_flow=source_flow,
256 |         matched_field=matched_field,
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `SafetyMatchedField`, found `str`
257 |         excerpt=excerpt,
258 |         rule_id=rule_id,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> dualcoach/profile/checkin_cli/wizard.py:258:9
    |
256 |         matched_field=matched_field,
257 |         excerpt=excerpt,
258 |         rule_id=rule_id,
    |         ^^^^^^^^^^^^^^^ Expected `SafetyRule`, found `str`
259 |     )
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `deterministic_branch` is incorrect
   --> dualcoach/profile/checkin_cli/wizard.py:765:13
    |
763 |     ) -> tuple[str, ...]:
764 |         decision = deterministic_branch(
765 |             answers,
    |             ^^^^^^^ Expected `Mapping[str, str | int | float | ... omitted 6 union elements]`, found `Mapping[str, object]`
766 |             trainer_session=answers if flow is WizardFlow.TRAINER_SESSION else None,
767 |             canonical_event_state=event_state,
    |
info: Function defined here
   --> dualcoach/profile/checkin_cli/wizard.py:361:5
    |
361 | def deterministic_branch(
    |     ^^^^^^^^^^^^^^^^^^^^
362 |     answers: Mapping[str, WizardValue],
    |     ---------------------------------- Parameter declared here
363 |     *,
364 |     prior_week_same_weekday_weight: float | None = None,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `deterministic_branch` is incorrect
   --> dualcoach/profile/checkin_cli/wizard.py:778:13
    |
776 |     ) -> WizardBranch | None:
777 |         decision = deterministic_branch(
778 |             answers,
    |             ^^^^^^^ Expected `Mapping[str, str | int | float | ... omitted 6 union elements]`, found `Mapping[str, object]`
779 |             trainer_session=answers if flow is WizardFlow.TRAINER_SESSION else None,
780 |             canonical_event_state=event_state,
    |
info: Function defined here
   --> dualcoach/profile/checkin_cli/wizard.py:361:5
    |
361 | def deterministic_branch(
    |     ^^^^^^^^^^^^^^^^^^^^
362 |     answers: Mapping[str, WizardValue],
    |     ---------------------------------- Parameter declared here
363 |     *,
364 |     prior_week_same_weekday_weight: float | None = None,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> dualcoach/profile/checkin_cli/wizard.py:856:23
    |
854 |         if session.safety_reasons:
855 |             values["reasons"] = session.safety_reasons
856 |         return Safety(**values)
    |                       ^^^^^^^^ Expected `SafetyLevel`, found `object`
857 |
858 |     def _acknowledge(self, session: WizardSession, action: str) -> WizardResult:
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> dualcoach/profile/checkin_cli/wizard.py:856:23
    |
854 |         if session.safety_reasons:
855 |             values["reasons"] = session.safety_reasons
856 |         return Safety(**values)
    |                       ^^^^^^^^ Expected `tuple[str, ...]`, found `object`
857 |
858 |     def _acknowledge(self, session: WizardSession, action: str) -> WizardResult:
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> dualcoach/profile/checkin_cli/wizard.py:856:23
    |
854 |         if session.safety_reasons:
855 |             values["reasons"] = session.safety_reasons
856 |         return Safety(**values)
    |                       ^^^^^^^^ Expected `bool`, found `object`
857 |
858 |     def _acknowledge(self, session: WizardSession, action: str) -> WizardResult:
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> dualcoach/profile/checkin_cli/wizard.py:856:23
    |
854 |         if session.safety_reasons:
855 |             values["reasons"] = session.safety_reasons
856 |         return Safety(**values)
    |                       ^^^^^^^^ Expected `tuple[SafetyReason, ...]`, found `object`
857 |
858 |     def _acknowledge(self, session: WizardSession, action: str) -> WizardResult:
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `load_wizard_event` is incorrect
   --> dualcoach/profile/checkin_cli/wizard.py:987:62
    |
985 |         result = self._events.append_wizard_event(event)
986 |         if session.flow is WizardFlow.MORNING and self._runtime is not None:
987 |             canonical_event = self._events.load_wizard_event(result.event_id)
    |                                                              ^^^^^^^^^^^^^^^ Expected `str`, found `str | None`
988 |             from checkin_cli.customer_coaching import RegisteredCustomerDualCoachCoordinator
989 |             RegisteredCustomerDualCoachCoordinator(self._runtime).record_terminal_morning_risk(
    |
info: Element `None` of this union is not assignable to `str`
info: Method defined here
   --> dualcoach/profile/checkin_cli/store.py:925:9
    |
923 |         with self._record_lock():
924 |             return self._append_wizard_event_locked(event)
925 |     def load_wizard_event(self, event_id: str) -> Event:
    |         ^^^^^^^^^^^^^^^^^       ------------- Parameter declared here
926 |         """Reload one exact persisted canonical wizard event."""
927 |         if not isinstance(event_id, str) or not event_id:
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["approved"]` on object of type `Top[dict[Unknown, Unknown]]`
   --> dualcoach/profile/tests/test_customer_admin.py:640:12
    |
638 |     document = committed["policy_document"]
639 |     assert isinstance(document, dict)
640 |     assert document["approved"] is True
    |            ^^^^^^^^
641 |     assert document["extension_through"] == through.isoformat()
642 |     assert document["supersedes_digest"] == rows[0]["supersedes_digest"]
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["extension_through"]` on object of type `Top[dict[Unknown, Unknown]]`
   --> dualcoach/profile/tests/test_customer_admin.py:641:12
    |
639 |     assert isinstance(document, dict)
640 |     assert document["approved"] is True
641 |     assert document["extension_through"] == through.isoformat()
    |            ^^^^^^^^
642 |     assert document["supersedes_digest"] == rows[0]["supersedes_digest"]
643 |     assert document["digest"] == committed["policy_revision_digest"]
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["supersedes_digest"]` on object of type `Top[dict[Unknown, Unknown]]`
   --> dualcoach/profile/tests/test_customer_admin.py:642:12
    |
640 |     assert document["approved"] is True
641 |     assert document["extension_through"] == through.isoformat()
642 |     assert document["supersedes_digest"] == rows[0]["supersedes_digest"]
    |            ^^^^^^^^
643 |     assert document["digest"] == committed["policy_revision_digest"]
644 |     artifacts = load_approved_adaptive_artifacts(data_root)
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["digest"]` on object of type `Top[dict[Unknown, Unknown]]`
   --> dualcoach/profile/tests/test_customer_admin.py:643:12
    |
641 |     assert document["extension_through"] == through.isoformat()
642 |     assert document["supersedes_digest"] == rows[0]["supersedes_digest"]
643 |     assert document["digest"] == committed["policy_revision_digest"]
    |            ^^^^^^^^
644 |     artifacts = load_approved_adaptive_artifacts(data_root)
645 |     assert artifacts.policy.extended_through == through
    |
info: rule `invalid-argument-type` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `model_dump`
    --> dualcoach/profile/tests/test_customer_admin.py:1192:23
     |
1190 |     def observed_write(path: Path, document: object) -> None:
1191 |         events.append("write")
1192 |         writes.append(document.model_dump(mode="json"))
     |                       ^^^^^^^^^^^^^^^^^^^
1193 |         real_write(path, document)
     |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to function `_write` is incorrect
    --> dualcoach/profile/tests/test_customer_admin.py:1193:26
     |
1191 |         events.append("write")
1192 |         writes.append(document.model_dump(mode="json"))
1193 |         real_write(path, document)
     |                          ^^^^^^^^ Expected `RegistryDocument`, found `object`
1194 |
1195 |     monkeypatch.setattr(
     |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_admin.py:5477:5
     |
5477 | def _write(path: Path, document: RegistryDocument) -> None:
     |     ^^^^^^             -------------------------- Parameter declared here
5478 |     content = (document.model_dump_json(indent=2) + "\n").encode("utf-8")
5479 |     _atomic_write_bytes(path, content)
     |
info: rule `invalid-argument-type` is enabled by default

error[not-subscriptable]: Cannot subscript object of type `object` with no `__getitem__` method
    --> dualcoach/profile/tests/test_customer_admin.py:1215:24
     |
1213 |     assert events == ["lock-enter", "recover", "write", "lock-exit"]
1214 |     assert len(writes) == 1
1215 |     written_customer = writes[0]["customers"][0]
     |                        ^^^^^^^^^^^^^^^^^^^^^^^^^
1216 |     assert written_customer["enabled"] is False
1217 |     assert written_customer["ai_processing_consent"] == {
     |
info: rule `not-subscriptable` is enabled by default

error[invalid-argument-type]: Argument to function `_write` is incorrect
    --> dualcoach/profile/tests/test_customer_admin.py:1248:26
     |
1246 |         nonlocal write_count
1247 |         write_count += 1
1248 |         real_write(path, document)
     |                          ^^^^^^^^ Expected `RegistryDocument`, found `object`
1249 |
1250 |     monkeypatch.setattr(customer_admin_module, "_write", counted_write)
     |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_admin.py:5477:5
     |
5477 | def _write(path: Path, document: RegistryDocument) -> None:
     |     ^^^^^^             -------------------------- Parameter declared here
5478 |     content = (document.model_dump_json(indent=2) + "\n").encode("utf-8")
5479 |     _atomic_write_bytes(path, content)
     |
info: rule `invalid-argument-type` is enabled by default

error[not-subscriptable]: Cannot subscript object of type `None` with no `__getitem__` method
    --> dualcoach/profile/tests/test_customer_admin.py:1876:37
     |
1874 |     assert len(committed) == 6
1875 |     assert all(
1876 |         row["supersedes_digest"] == first.artifact_digests[row["artifact_kind"]]
     |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1877 |         for row in committed[3:]
1878 |     )
     |
info: rule `not-subscriptable` is enabled by default

error[not-subscriptable]: Cannot subscript object of type `None` with no `__getitem__` method
    --> dualcoach/profile/tests/test_customer_admin.py:2063:12
     |
2061 |     legacy_path.chmod(0o600)
2062 |     loaded = load_approved_adaptive_registration_inputs(profile_root, "client_001")
2063 |     assert loaded.artifact_digests["catalog"] == canonical_document["digest"]
     |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2064 |     tampered = dict(canonical_document)
2065 |     tampered["catalog"] = [dict(canonical_document["catalog"][0], label="tampered")]
     |
info: rule `not-subscriptable` is enabled by default

error[invalid-argument-type]: Argument to function `validate_adaptive_registration_reapproval` is incorrect
    --> dualcoach/profile/tests/test_customer_admin.py:2169:9
     |
2167 |         profile_root,
2168 |         "client_001",
2169 |         original.digest,
     |         ^^^^^^^^^^^^^^^ Expected `str`, found `str | None`
2170 |     )
     |
info: Element `None` of this union is not assignable to `str`
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_admin.py:4391:5
     |
4391 | def validate_adaptive_registration_reapproval(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4392 |     profile_root: Path,
4393 |     customer_key: str,
4394 |     predecessor_digest: str,
     |     ----------------------- Parameter declared here
4395 | ) -> bool:
4396 |     """Prove the current registration is an authority-only child revision."""
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `append` is incorrect
    --> dualcoach/profile/tests/test_customer_admin.py:2298:42
     |
2296 |         },
2297 |     }
2298 |     canonical_event = transaction.append(event)["canonical_event"]
     |                                          ^^^^^ Expected `Event`, found `dict[str, str | dict[str, str] | dict[str, int | str]]`
2299 |     reconcile_adaptive_nutrition_journals(
2300 |         profile_root,
     |
info: Method defined here
   --> dualcoach/profile/checkin_cli/store.py:297:9
    |
295 |             return self._append_many_locked(tuple(events), token)
296 |
297 |     def append(
    |         ^^^^^^
298 |         self,
299 |         event: Event,
    |         ------------ Parameter declared here
300 |         *,
301 |         intent_id: str | None = None,
    |
info: rule `invalid-argument-type` is enabled by default

error[not-subscriptable]: Cannot subscript object of type `object` with no `__getitem__` method
    --> dualcoach/profile/tests/test_customer_admin.py:2415:16
     |
2413 |     assert parsed["system_prompt"] == "코칭 원칙:\n- 승인된 내용만 사용한다.\n"
2414 |     assert parsed["toolsets"] == ["audit"]
2415 |     telegram = parsed["platforms"]["telegram"]
     |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2416 |     assert telegram["allowed_user_ids"] == ["1", "2"]
2417 |     assert telegram["extra"]["adaptive_nutrition"] == {
     |
info: rule `not-subscriptable` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["plan"]` on object of type `Top[dict[Unknown, Unknown]]`
   --> dualcoach/profile/tests/test_customer_reporting.py:127:19
    |
125 |     customers = payload["customers"]
126 |     assert isinstance(customers, list) and isinstance(customers[1], dict)
127 |     second_plan = customers[1]["plan"]
    |                   ^^^^^^^^^^^^
128 |     assert isinstance(second_plan, dict) and isinstance(second_plan["weeks"], list)
129 |     for week in second_plan["weeks"]:
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["weeks"]` on object of type `Top[dict[Unknown, Unknown]]`
   --> dualcoach/profile/tests/test_customer_reporting.py:128:57
    |
126 |     assert isinstance(customers, list) and isinstance(customers[1], dict)
127 |     second_plan = customers[1]["plan"]
128 |     assert isinstance(second_plan, dict) and isinstance(second_plan["weeks"], list)
    |                                                         ^^^^^^^^^^^
129 |     for week in second_plan["weeks"]:
130 |         assert isinstance(week, dict)
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["weeks"]` on object of type `Top[dict[Unknown, Unknown]]`
   --> dualcoach/profile/tests/test_customer_reporting.py:129:17
    |
127 |     second_plan = customers[1]["plan"]
128 |     assert isinstance(second_plan, dict) and isinstance(second_plan["weeks"], list)
129 |     for week in second_plan["weeks"]:
    |                 ^^^^^^^^^^^
130 |         assert isinstance(week, dict)
131 |         week["calories_kcal"] = 1900
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-assignment]: Invalid subscript assignment with key of type `Literal["calories_kcal"]` and value of type `Literal[1900]` on object of type `Top[dict[Unknown, Unknown]]`
   --> dualcoach/profile/tests/test_customer_reporting.py:131:9
    |
129 |     for week in second_plan["weeks"]:
130 |         assert isinstance(week, dict)
131 |         week["calories_kcal"] = 1900
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
132 |     registry_path = tmp_path / "registry.json"
133 |     registry_path.write_text(json.dumps(payload), encoding="utf-8")
    |
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Invalid subscript assignment with key of type `Literal["ai_processing_consent"]` and value of type `dict[str, bool]` on object of type `Top[dict[Unknown, Unknown]]`
   --> dualcoach/profile/tests/test_customer_reporting.py:219:5
    |
217 |     customers = payload["customers"]
218 |     assert isinstance(customers, list) and isinstance(customers[0], dict)
219 |     customers[0]["ai_processing_consent"] = {"granted": False}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
220 |     customers[0]["enabled"] = False
221 |     path = tmp_path / "registry.json"
    |
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Invalid subscript assignment with key of type `Literal["enabled"]` and value of type `Literal[False]` on object of type `Top[dict[Unknown, Unknown]]`
   --> dualcoach/profile/tests/test_customer_reporting.py:220:5
    |
218 |     assert isinstance(customers, list) and isinstance(customers[0], dict)
219 |     customers[0]["ai_processing_consent"] = {"granted": False}
220 |     customers[0]["enabled"] = False
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
221 |     path = tmp_path / "registry.json"
222 |     path.write_text(json.dumps(payload), encoding="utf-8")
    |
info: rule `invalid-assignment` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["plan"]` on object of type `Top[dict[Unknown, Unknown]]`
   --> dualcoach/profile/tests/test_customer_reporting.py:235:12
    |
233 |     customers = payload["customers"]
234 |     assert isinstance(customers, list) and isinstance(customers[0], dict)
235 |     plan = customers[0]["plan"]
    |            ^^^^^^^^^^^^
236 |     assert isinstance(plan, dict) and isinstance(plan["weeks"], list)
237 |     second_week = plan["weeks"][1]
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["weeks"]` on object of type `Top[dict[Unknown, Unknown]]`
   --> dualcoach/profile/tests/test_customer_reporting.py:236:50
    |
234 |     assert isinstance(customers, list) and isinstance(customers[0], dict)
235 |     plan = customers[0]["plan"]
236 |     assert isinstance(plan, dict) and isinstance(plan["weeks"], list)
    |                                                  ^^^^
237 |     second_week = plan["weeks"][1]
238 |     assert isinstance(second_week, dict)
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["weeks"]` on object of type `Top[dict[Unknown, Unknown]]`
   --> dualcoach/profile/tests/test_customer_reporting.py:237:19
    |
235 |     plan = customers[0]["plan"]
236 |     assert isinstance(plan, dict) and isinstance(plan["weeks"], list)
237 |     second_week = plan["weeks"][1]
    |                   ^^^^
238 |     assert isinstance(second_week, dict)
239 |     second_week["calories_kcal"] = 1800
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-assignment]: Invalid subscript assignment with key of type `Literal["calories_kcal"]` and value of type `Literal[1800]` on object of type `Top[dict[Unknown, Unknown]]`
   --> dualcoach/profile/tests/test_customer_reporting.py:239:5
    |
237 |     second_week = plan["weeks"][1]
238 |     assert isinstance(second_week, dict)
239 |     second_week["calories_kcal"] = 1800
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
240 |     second_week["protein_g"] = 140
241 |     registry_path = tmp_path / "registry.json"
    |
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Invalid subscript assignment with key of type `Literal["protein_g"]` and value of type `Literal[140]` on object of type `Top[dict[Unknown, Unknown]]`
   --> dualcoach/profile/tests/test_customer_reporting.py:240:5
    |
238 |     assert isinstance(second_week, dict)
239 |     second_week["calories_kcal"] = 1800
240 |     second_week["protein_g"] = 140
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
241 |     registry_path = tmp_path / "registry.json"
242 |     registry_path.write_text(json.dumps(payload), encoding="utf-8")
    |
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Invalid subscript assignment with key of type `Literal["schedule"]` and value of type `dict[str, str | int]` on object of type `Top[dict[Unknown, Unknown]]`
  --> dualcoach/profile/tests/test_customer_schedule.py:34:5
   |
32 |     assert isinstance(customers, list)
33 |     assert isinstance(customers[0], dict) and isinstance(customers[1], dict)
34 |     customers[0]["schedule"] = {"daily_time": "08:00", "weekly_weekday": 0, "monthly_day": 1}
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
35 |     customers[1]["schedule"] = {"daily_time": "09:00", "weekly_weekday": 4, "monthly_day": 15}
36 |     if starts_on is not None:
   |
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Invalid subscript assignment with key of type `Literal["schedule"]` and value of type `dict[str, str | int]` on object of type `Top[dict[Unknown, Unknown]]`
  --> dualcoach/profile/tests/test_customer_schedule.py:35:5
   |
33 |     assert isinstance(customers[0], dict) and isinstance(customers[1], dict)
34 |     customers[0]["schedule"] = {"daily_time": "08:00", "weekly_weekday": 0, "monthly_day": 1}
35 |     customers[1]["schedule"] = {"daily_time": "09:00", "weekly_weekday": 4, "monthly_day": 15}
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
36 |     if starts_on is not None:
37 |         for customer in customers:
   |
info: rule `invalid-assignment` is enabled by default

error[not-subscriptable]: Cannot subscript object of type `object` with no `__getitem__` method
  --> dualcoach/profile/tests/test_customer_schedule.py:38:20
   |
36 |     if starts_on is not None:
37 |         for customer in customers:
38 |             plan = customer["plan"]
   |                    ^^^^^^^^^^^^^^^^
39 |             assert isinstance(plan, dict)
40 |             plan["starts_on"] = starts_on.isoformat()
   |
info: rule `not-subscriptable` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:259:63
    |
257 | def test_static_reminder_is_exactly_once_and_unknown_is_never_retried(tmp_path: Path) -> None:
258 |     reserve = customer_schedule.reserve_missing_checkin_reminder
259 |     first = reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args())
    |                                                               ^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
260 |     duplicate = reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args())
261 |     sending = checkin_cli.mark_customer_task_sending(tmp_path, first)
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1455:5
     |
1453 |     destination: object,
1454 |     *,
1455 |     registry_digest: str,
     |     -------------------- Parameter declared here
1456 |     config_digest: str,
1457 |     operator_approval: str,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:259:63
    |
257 | def test_static_reminder_is_exactly_once_and_unknown_is_never_retried(tmp_path: Path) -> None:
258 |     reserve = customer_schedule.reserve_missing_checkin_reminder
259 |     first = reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args())
    |                                                               ^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
260 |     duplicate = reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args())
261 |     sending = checkin_cli.mark_customer_task_sending(tmp_path, first)
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1456:5
     |
1454 |     *,
1455 |     registry_digest: str,
1456 |     config_digest: str,
     |     ------------------ Parameter declared here
1457 |     operator_approval: str,
1458 |     canonical_sequence: int | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:259:63
    |
257 | def test_static_reminder_is_exactly_once_and_unknown_is_never_retried(tmp_path: Path) -> None:
258 |     reserve = customer_schedule.reserve_missing_checkin_reminder
259 |     first = reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args())
    |                                                               ^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
260 |     duplicate = reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args())
261 |     sending = checkin_cli.mark_customer_task_sending(tmp_path, first)
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1457:5
     |
1455 |     registry_digest: str,
1456 |     config_digest: str,
1457 |     operator_approval: str,
     |     ---------------------- Parameter declared here
1458 |     canonical_sequence: int | None = None,
1459 |     canonical_digest: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:259:63
    |
257 | def test_static_reminder_is_exactly_once_and_unknown_is_never_retried(tmp_path: Path) -> None:
258 |     reserve = customer_schedule.reserve_missing_checkin_reminder
259 |     first = reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args())
    |                                                               ^^^^^^^^^^^^^^^^^^ Expected `int | None`, found `object`
260 |     duplicate = reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args())
261 |     sending = checkin_cli.mark_customer_task_sending(tmp_path, first)
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1458:5
     |
1456 |     config_digest: str,
1457 |     operator_approval: str,
1458 |     canonical_sequence: int | None = None,
     |     ------------------------------------- Parameter declared here
1459 |     canonical_digest: str | None = None,
1460 |     template_version: str = "missing-checkin-v1",
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:259:63
    |
257 | def test_static_reminder_is_exactly_once_and_unknown_is_never_retried(tmp_path: Path) -> None:
258 |     reserve = customer_schedule.reserve_missing_checkin_reminder
259 |     first = reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args())
    |                                                               ^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
260 |     duplicate = reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args())
261 |     sending = checkin_cli.mark_customer_task_sending(tmp_path, first)
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1459:5
     |
1457 |     operator_approval: str,
1458 |     canonical_sequence: int | None = None,
1459 |     canonical_digest: str | None = None,
     |     ----------------------------------- Parameter declared here
1460 |     template_version: str = "missing-checkin-v1",
1461 |     weekly_authority: WeeklyReminderReservationAuthority | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:259:63
    |
257 | def test_static_reminder_is_exactly_once_and_unknown_is_never_retried(tmp_path: Path) -> None:
258 |     reserve = customer_schedule.reserve_missing_checkin_reminder
259 |     first = reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args())
    |                                                               ^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
260 |     duplicate = reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args())
261 |     sending = checkin_cli.mark_customer_task_sending(tmp_path, first)
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1460:5
     |
1458 |     canonical_sequence: int | None = None,
1459 |     canonical_digest: str | None = None,
1460 |     template_version: str = "missing-checkin-v1",
     |     -------------------------------------------- Parameter declared here
1461 |     weekly_authority: WeeklyReminderReservationAuthority | None = None,
1462 | ) -> ScheduledDeliveryReceipt:
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:259:63
    |
257 | def test_static_reminder_is_exactly_once_and_unknown_is_never_retried(tmp_path: Path) -> None:
258 |     reserve = customer_schedule.reserve_missing_checkin_reminder
259 |     first = reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args())
    |                                                               ^^^^^^^^^^^^^^^^^^ Expected `WeeklyReminderReservationAuthority | None`, found `object`
260 |     duplicate = reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args())
261 |     sending = checkin_cli.mark_customer_task_sending(tmp_path, first)
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1461:5
     |
1459 |     canonical_digest: str | None = None,
1460 |     template_version: str = "missing-checkin-v1",
1461 |     weekly_authority: WeeklyReminderReservationAuthority | None = None,
     |     ------------------------------------------------------------------ Parameter declared here
1462 | ) -> ScheduledDeliveryReceipt:
1463 |     """Reserve the one approved static reminder for a missing-check-in window."""
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:260:67
    |
258 |     reserve = customer_schedule.reserve_missing_checkin_reminder
259 |     first = reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args())
260 |     duplicate = reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args())
    |                                                                   ^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
261 |     sending = checkin_cli.mark_customer_task_sending(tmp_path, first)
262 |     unknown = checkin_cli.mark_customer_task_unknown(
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1455:5
     |
1453 |     destination: object,
1454 |     *,
1455 |     registry_digest: str,
     |     -------------------- Parameter declared here
1456 |     config_digest: str,
1457 |     operator_approval: str,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:260:67
    |
258 |     reserve = customer_schedule.reserve_missing_checkin_reminder
259 |     first = reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args())
260 |     duplicate = reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args())
    |                                                                   ^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
261 |     sending = checkin_cli.mark_customer_task_sending(tmp_path, first)
262 |     unknown = checkin_cli.mark_customer_task_unknown(
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1456:5
     |
1454 |     *,
1455 |     registry_digest: str,
1456 |     config_digest: str,
     |     ------------------ Parameter declared here
1457 |     operator_approval: str,
1458 |     canonical_sequence: int | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:260:67
    |
258 |     reserve = customer_schedule.reserve_missing_checkin_reminder
259 |     first = reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args())
260 |     duplicate = reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args())
    |                                                                   ^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
261 |     sending = checkin_cli.mark_customer_task_sending(tmp_path, first)
262 |     unknown = checkin_cli.mark_customer_task_unknown(
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1457:5
     |
1455 |     registry_digest: str,
1456 |     config_digest: str,
1457 |     operator_approval: str,
     |     ---------------------- Parameter declared here
1458 |     canonical_sequence: int | None = None,
1459 |     canonical_digest: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:260:67
    |
258 |     reserve = customer_schedule.reserve_missing_checkin_reminder
259 |     first = reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args())
260 |     duplicate = reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args())
    |                                                                   ^^^^^^^^^^^^^^^^^^ Expected `int | None`, found `object`
261 |     sending = checkin_cli.mark_customer_task_sending(tmp_path, first)
262 |     unknown = checkin_cli.mark_customer_task_unknown(
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1458:5
     |
1456 |     config_digest: str,
1457 |     operator_approval: str,
1458 |     canonical_sequence: int | None = None,
     |     ------------------------------------- Parameter declared here
1459 |     canonical_digest: str | None = None,
1460 |     template_version: str = "missing-checkin-v1",
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:260:67
    |
258 |     reserve = customer_schedule.reserve_missing_checkin_reminder
259 |     first = reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args())
260 |     duplicate = reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args())
    |                                                                   ^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
261 |     sending = checkin_cli.mark_customer_task_sending(tmp_path, first)
262 |     unknown = checkin_cli.mark_customer_task_unknown(
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1459:5
     |
1457 |     operator_approval: str,
1458 |     canonical_sequence: int | None = None,
1459 |     canonical_digest: str | None = None,
     |     ----------------------------------- Parameter declared here
1460 |     template_version: str = "missing-checkin-v1",
1461 |     weekly_authority: WeeklyReminderReservationAuthority | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:260:67
    |
258 |     reserve = customer_schedule.reserve_missing_checkin_reminder
259 |     first = reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args())
260 |     duplicate = reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args())
    |                                                                   ^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
261 |     sending = checkin_cli.mark_customer_task_sending(tmp_path, first)
262 |     unknown = checkin_cli.mark_customer_task_unknown(
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1460:5
     |
1458 |     canonical_sequence: int | None = None,
1459 |     canonical_digest: str | None = None,
1460 |     template_version: str = "missing-checkin-v1",
     |     -------------------------------------------- Parameter declared here
1461 |     weekly_authority: WeeklyReminderReservationAuthority | None = None,
1462 | ) -> ScheduledDeliveryReceipt:
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:260:67
    |
258 |     reserve = customer_schedule.reserve_missing_checkin_reminder
259 |     first = reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args())
260 |     duplicate = reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args())
    |                                                                   ^^^^^^^^^^^^^^^^^^ Expected `WeeklyReminderReservationAuthority | None`, found `object`
261 |     sending = checkin_cli.mark_customer_task_sending(tmp_path, first)
262 |     unknown = checkin_cli.mark_customer_task_unknown(
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1461:5
     |
1459 |     canonical_digest: str | None = None,
1460 |     template_version: str = "missing-checkin-v1",
1461 |     weekly_authority: WeeklyReminderReservationAuthority | None = None,
     |     ------------------------------------------------------------------ Parameter declared here
1462 | ) -> ScheduledDeliveryReceipt:
1463 |     """Reserve the one approved static reminder for a missing-check-in window."""
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:269:59
    |
267 |     assert unknown.state == "unknown"
268 |     with pytest.raises(CustomerScheduleError, match="already terminal"):
269 |         reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args("approval-0002"))
    |                                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1455:5
     |
1453 |     destination: object,
1454 |     *,
1455 |     registry_digest: str,
     |     -------------------- Parameter declared here
1456 |     config_digest: str,
1457 |     operator_approval: str,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:269:59
    |
267 |     assert unknown.state == "unknown"
268 |     with pytest.raises(CustomerScheduleError, match="already terminal"):
269 |         reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args("approval-0002"))
    |                                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1456:5
     |
1454 |     *,
1455 |     registry_digest: str,
1456 |     config_digest: str,
     |     ------------------ Parameter declared here
1457 |     operator_approval: str,
1458 |     canonical_sequence: int | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:269:59
    |
267 |     assert unknown.state == "unknown"
268 |     with pytest.raises(CustomerScheduleError, match="already terminal"):
269 |         reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args("approval-0002"))
    |                                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1457:5
     |
1455 |     registry_digest: str,
1456 |     config_digest: str,
1457 |     operator_approval: str,
     |     ---------------------- Parameter declared here
1458 |     canonical_sequence: int | None = None,
1459 |     canonical_digest: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:269:59
    |
267 |     assert unknown.state == "unknown"
268 |     with pytest.raises(CustomerScheduleError, match="already terminal"):
269 |         reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args("approval-0002"))
    |                                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `int | None`, found `object`
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1458:5
     |
1456 |     config_digest: str,
1457 |     operator_approval: str,
1458 |     canonical_sequence: int | None = None,
     |     ------------------------------------- Parameter declared here
1459 |     canonical_digest: str | None = None,
1460 |     template_version: str = "missing-checkin-v1",
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:269:59
    |
267 |     assert unknown.state == "unknown"
268 |     with pytest.raises(CustomerScheduleError, match="already terminal"):
269 |         reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args("approval-0002"))
    |                                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1459:5
     |
1457 |     operator_approval: str,
1458 |     canonical_sequence: int | None = None,
1459 |     canonical_digest: str | None = None,
     |     ----------------------------------- Parameter declared here
1460 |     template_version: str = "missing-checkin-v1",
1461 |     weekly_authority: WeeklyReminderReservationAuthority | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:269:59
    |
267 |     assert unknown.state == "unknown"
268 |     with pytest.raises(CustomerScheduleError, match="already terminal"):
269 |         reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args("approval-0002"))
    |                                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1460:5
     |
1458 |     canonical_sequence: int | None = None,
1459 |     canonical_digest: str | None = None,
1460 |     template_version: str = "missing-checkin-v1",
     |     -------------------------------------------- Parameter declared here
1461 |     weekly_authority: WeeklyReminderReservationAuthority | None = None,
1462 | ) -> ScheduledDeliveryReceipt:
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:269:59
    |
267 |     assert unknown.state == "unknown"
268 |     with pytest.raises(CustomerScheduleError, match="already terminal"):
269 |         reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args("approval-0002"))
    |                                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `WeeklyReminderReservationAuthority | None`, found `object`
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1461:5
     |
1459 |     canonical_digest: str | None = None,
1460 |     template_version: str = "missing-checkin-v1",
1461 |     weekly_authority: WeeklyReminderReservationAuthority | None = None,
     |     ------------------------------------------------------------------ Parameter declared here
1462 | ) -> ScheduledDeliveryReceipt:
1463 |     """Reserve the one approved static reminder for a missing-check-in window."""
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:276:63
    |
274 | ) -> None:
275 |     reserve = customer_schedule.reserve_missing_checkin_reminder
276 |     first = reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args())
    |                                                               ^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
277 |     abandoned = customer_schedule.abandon_missing_checkin_reminder_for_terminal_morning_response(
278 |         tmp_path, checkin_cli.mark_customer_task_sending(tmp_path, first)
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1455:5
     |
1453 |     destination: object,
1454 |     *,
1455 |     registry_digest: str,
     |     -------------------- Parameter declared here
1456 |     config_digest: str,
1457 |     operator_approval: str,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:276:63
    |
274 | ) -> None:
275 |     reserve = customer_schedule.reserve_missing_checkin_reminder
276 |     first = reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args())
    |                                                               ^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
277 |     abandoned = customer_schedule.abandon_missing_checkin_reminder_for_terminal_morning_response(
278 |         tmp_path, checkin_cli.mark_customer_task_sending(tmp_path, first)
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1456:5
     |
1454 |     *,
1455 |     registry_digest: str,
1456 |     config_digest: str,
     |     ------------------ Parameter declared here
1457 |     operator_approval: str,
1458 |     canonical_sequence: int | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:276:63
    |
274 | ) -> None:
275 |     reserve = customer_schedule.reserve_missing_checkin_reminder
276 |     first = reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args())
    |                                                               ^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
277 |     abandoned = customer_schedule.abandon_missing_checkin_reminder_for_terminal_morning_response(
278 |         tmp_path, checkin_cli.mark_customer_task_sending(tmp_path, first)
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1457:5
     |
1455 |     registry_digest: str,
1456 |     config_digest: str,
1457 |     operator_approval: str,
     |     ---------------------- Parameter declared here
1458 |     canonical_sequence: int | None = None,
1459 |     canonical_digest: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:276:63
    |
274 | ) -> None:
275 |     reserve = customer_schedule.reserve_missing_checkin_reminder
276 |     first = reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args())
    |                                                               ^^^^^^^^^^^^^^^^^^ Expected `int | None`, found `object`
277 |     abandoned = customer_schedule.abandon_missing_checkin_reminder_for_terminal_morning_response(
278 |         tmp_path, checkin_cli.mark_customer_task_sending(tmp_path, first)
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1458:5
     |
1456 |     config_digest: str,
1457 |     operator_approval: str,
1458 |     canonical_sequence: int | None = None,
     |     ------------------------------------- Parameter declared here
1459 |     canonical_digest: str | None = None,
1460 |     template_version: str = "missing-checkin-v1",
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:276:63
    |
274 | ) -> None:
275 |     reserve = customer_schedule.reserve_missing_checkin_reminder
276 |     first = reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args())
    |                                                               ^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
277 |     abandoned = customer_schedule.abandon_missing_checkin_reminder_for_terminal_morning_response(
278 |         tmp_path, checkin_cli.mark_customer_task_sending(tmp_path, first)
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1459:5
     |
1457 |     operator_approval: str,
1458 |     canonical_sequence: int | None = None,
1459 |     canonical_digest: str | None = None,
     |     ----------------------------------- Parameter declared here
1460 |     template_version: str = "missing-checkin-v1",
1461 |     weekly_authority: WeeklyReminderReservationAuthority | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:276:63
    |
274 | ) -> None:
275 |     reserve = customer_schedule.reserve_missing_checkin_reminder
276 |     first = reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args())
    |                                                               ^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
277 |     abandoned = customer_schedule.abandon_missing_checkin_reminder_for_terminal_morning_response(
278 |         tmp_path, checkin_cli.mark_customer_task_sending(tmp_path, first)
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1460:5
     |
1458 |     canonical_sequence: int | None = None,
1459 |     canonical_digest: str | None = None,
1460 |     template_version: str = "missing-checkin-v1",
     |     -------------------------------------------- Parameter declared here
1461 |     weekly_authority: WeeklyReminderReservationAuthority | None = None,
1462 | ) -> ScheduledDeliveryReceipt:
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:276:63
    |
274 | ) -> None:
275 |     reserve = customer_schedule.reserve_missing_checkin_reminder
276 |     first = reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args())
    |                                                               ^^^^^^^^^^^^^^^^^^ Expected `WeeklyReminderReservationAuthority | None`, found `object`
277 |     abandoned = customer_schedule.abandon_missing_checkin_reminder_for_terminal_morning_response(
278 |         tmp_path, checkin_cli.mark_customer_task_sending(tmp_path, first)
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1461:5
     |
1459 |     canonical_digest: str | None = None,
1460 |     template_version: str = "missing-checkin-v1",
1461 |     weekly_authority: WeeklyReminderReservationAuthority | None = None,
     |     ------------------------------------------------------------------ Parameter declared here
1462 | ) -> ScheduledDeliveryReceipt:
1463 |     """Reserve the one approved static reminder for a missing-check-in window."""
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:286:59
    |
284 |     assert abandoned.reason == "terminal_morning_response_before_provider"
285 |     with pytest.raises(CustomerScheduleError, match="already terminal"):
286 |         reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args("approval-0002"))
    |                                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
287 |
288 | def test_known_reminder_failure_requires_new_operator_approval(tmp_path: Path) -> None:
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1455:5
     |
1453 |     destination: object,
1454 |     *,
1455 |     registry_digest: str,
     |     -------------------- Parameter declared here
1456 |     config_digest: str,
1457 |     operator_approval: str,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:286:59
    |
284 |     assert abandoned.reason == "terminal_morning_response_before_provider"
285 |     with pytest.raises(CustomerScheduleError, match="already terminal"):
286 |         reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args("approval-0002"))
    |                                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
287 |
288 | def test_known_reminder_failure_requires_new_operator_approval(tmp_path: Path) -> None:
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1456:5
     |
1454 |     *,
1455 |     registry_digest: str,
1456 |     config_digest: str,
     |     ------------------ Parameter declared here
1457 |     operator_approval: str,
1458 |     canonical_sequence: int | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:286:59
    |
284 |     assert abandoned.reason == "terminal_morning_response_before_provider"
285 |     with pytest.raises(CustomerScheduleError, match="already terminal"):
286 |         reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args("approval-0002"))
    |                                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
287 |
288 | def test_known_reminder_failure_requires_new_operator_approval(tmp_path: Path) -> None:
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1457:5
     |
1455 |     registry_digest: str,
1456 |     config_digest: str,
1457 |     operator_approval: str,
     |     ---------------------- Parameter declared here
1458 |     canonical_sequence: int | None = None,
1459 |     canonical_digest: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:286:59
    |
284 |     assert abandoned.reason == "terminal_morning_response_before_provider"
285 |     with pytest.raises(CustomerScheduleError, match="already terminal"):
286 |         reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args("approval-0002"))
    |                                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `int | None`, found `object`
287 |
288 | def test_known_reminder_failure_requires_new_operator_approval(tmp_path: Path) -> None:
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1458:5
     |
1456 |     config_digest: str,
1457 |     operator_approval: str,
1458 |     canonical_sequence: int | None = None,
     |     ------------------------------------- Parameter declared here
1459 |     canonical_digest: str | None = None,
1460 |     template_version: str = "missing-checkin-v1",
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:286:59
    |
284 |     assert abandoned.reason == "terminal_morning_response_before_provider"
285 |     with pytest.raises(CustomerScheduleError, match="already terminal"):
286 |         reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args("approval-0002"))
    |                                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
287 |
288 | def test_known_reminder_failure_requires_new_operator_approval(tmp_path: Path) -> None:
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1459:5
     |
1457 |     operator_approval: str,
1458 |     canonical_sequence: int | None = None,
1459 |     canonical_digest: str | None = None,
     |     ----------------------------------- Parameter declared here
1460 |     template_version: str = "missing-checkin-v1",
1461 |     weekly_authority: WeeklyReminderReservationAuthority | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:286:59
    |
284 |     assert abandoned.reason == "terminal_morning_response_before_provider"
285 |     with pytest.raises(CustomerScheduleError, match="already terminal"):
286 |         reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args("approval-0002"))
    |                                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
287 |
288 | def test_known_reminder_failure_requires_new_operator_approval(tmp_path: Path) -> None:
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1460:5
     |
1458 |     canonical_sequence: int | None = None,
1459 |     canonical_digest: str | None = None,
1460 |     template_version: str = "missing-checkin-v1",
     |     -------------------------------------------- Parameter declared here
1461 |     weekly_authority: WeeklyReminderReservationAuthority | None = None,
1462 | ) -> ScheduledDeliveryReceipt:
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:286:59
    |
284 |     assert abandoned.reason == "terminal_morning_response_before_provider"
285 |     with pytest.raises(CustomerScheduleError, match="already terminal"):
286 |         reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args("approval-0002"))
    |                                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `WeeklyReminderReservationAuthority | None`, found `object`
287 |
288 | def test_known_reminder_failure_requires_new_operator_approval(tmp_path: Path) -> None:
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1461:5
     |
1459 |     canonical_digest: str | None = None,
1460 |     template_version: str = "missing-checkin-v1",
1461 |     weekly_authority: WeeklyReminderReservationAuthority | None = None,
     |     ------------------------------------------------------------------ Parameter declared here
1462 | ) -> ScheduledDeliveryReceipt:
1463 |     """Reserve the one approved static reminder for a missing-check-in window."""
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:290:63
    |
288 | def test_known_reminder_failure_requires_new_operator_approval(tmp_path: Path) -> None:
289 |     reserve = customer_schedule.reserve_missing_checkin_reminder
290 |     first = reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args())
    |                                                               ^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
291 |     sending = checkin_cli.mark_customer_task_sending(tmp_path, first)
292 |     lease_key = customer_schedule._lease_key(tmp_path, first.reservation_id)
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1455:5
     |
1453 |     destination: object,
1454 |     *,
1455 |     registry_digest: str,
     |     -------------------- Parameter declared here
1456 |     config_digest: str,
1457 |     operator_approval: str,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:290:63
    |
288 | def test_known_reminder_failure_requires_new_operator_approval(tmp_path: Path) -> None:
289 |     reserve = customer_schedule.reserve_missing_checkin_reminder
290 |     first = reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args())
    |                                                               ^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
291 |     sending = checkin_cli.mark_customer_task_sending(tmp_path, first)
292 |     lease_key = customer_schedule._lease_key(tmp_path, first.reservation_id)
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1456:5
     |
1454 |     *,
1455 |     registry_digest: str,
1456 |     config_digest: str,
     |     ------------------ Parameter declared here
1457 |     operator_approval: str,
1458 |     canonical_sequence: int | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:290:63
    |
288 | def test_known_reminder_failure_requires_new_operator_approval(tmp_path: Path) -> None:
289 |     reserve = customer_schedule.reserve_missing_checkin_reminder
290 |     first = reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args())
    |                                                               ^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
291 |     sending = checkin_cli.mark_customer_task_sending(tmp_path, first)
292 |     lease_key = customer_schedule._lease_key(tmp_path, first.reservation_id)
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1457:5
     |
1455 |     registry_digest: str,
1456 |     config_digest: str,
1457 |     operator_approval: str,
     |     ---------------------- Parameter declared here
1458 |     canonical_sequence: int | None = None,
1459 |     canonical_digest: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:290:63
    |
288 | def test_known_reminder_failure_requires_new_operator_approval(tmp_path: Path) -> None:
289 |     reserve = customer_schedule.reserve_missing_checkin_reminder
290 |     first = reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args())
    |                                                               ^^^^^^^^^^^^^^^^^^ Expected `int | None`, found `object`
291 |     sending = checkin_cli.mark_customer_task_sending(tmp_path, first)
292 |     lease_key = customer_schedule._lease_key(tmp_path, first.reservation_id)
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1458:5
     |
1456 |     config_digest: str,
1457 |     operator_approval: str,
1458 |     canonical_sequence: int | None = None,
     |     ------------------------------------- Parameter declared here
1459 |     canonical_digest: str | None = None,
1460 |     template_version: str = "missing-checkin-v1",
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:290:63
    |
288 | def test_known_reminder_failure_requires_new_operator_approval(tmp_path: Path) -> None:
289 |     reserve = customer_schedule.reserve_missing_checkin_reminder
290 |     first = reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args())
    |                                                               ^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
291 |     sending = checkin_cli.mark_customer_task_sending(tmp_path, first)
292 |     lease_key = customer_schedule._lease_key(tmp_path, first.reservation_id)
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1459:5
     |
1457 |     operator_approval: str,
1458 |     canonical_sequence: int | None = None,
1459 |     canonical_digest: str | None = None,
     |     ----------------------------------- Parameter declared here
1460 |     template_version: str = "missing-checkin-v1",
1461 |     weekly_authority: WeeklyReminderReservationAuthority | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:290:63
    |
288 | def test_known_reminder_failure_requires_new_operator_approval(tmp_path: Path) -> None:
289 |     reserve = customer_schedule.reserve_missing_checkin_reminder
290 |     first = reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args())
    |                                                               ^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
291 |     sending = checkin_cli.mark_customer_task_sending(tmp_path, first)
292 |     lease_key = customer_schedule._lease_key(tmp_path, first.reservation_id)
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1460:5
     |
1458 |     canonical_sequence: int | None = None,
1459 |     canonical_digest: str | None = None,
1460 |     template_version: str = "missing-checkin-v1",
     |     -------------------------------------------- Parameter declared here
1461 |     weekly_authority: WeeklyReminderReservationAuthority | None = None,
1462 | ) -> ScheduledDeliveryReceipt:
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:290:63
    |
288 | def test_known_reminder_failure_requires_new_operator_approval(tmp_path: Path) -> None:
289 |     reserve = customer_schedule.reserve_missing_checkin_reminder
290 |     first = reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args())
    |                                                               ^^^^^^^^^^^^^^^^^^ Expected `WeeklyReminderReservationAuthority | None`, found `object`
291 |     sending = checkin_cli.mark_customer_task_sending(tmp_path, first)
292 |     lease_key = customer_schedule._lease_key(tmp_path, first.reservation_id)
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1461:5
     |
1459 |     canonical_digest: str | None = None,
1460 |     template_version: str = "missing-checkin-v1",
1461 |     weekly_authority: WeeklyReminderReservationAuthority | None = None,
     |     ------------------------------------------------------------------ Parameter declared here
1462 | ) -> ScheduledDeliveryReceipt:
1463 |     """Reserve the one approved static reminder for a missing-check-in window."""
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:300:51
    |
298 |     assert lease_handle.closed
299 |     replacement = reserve(
300 |         tmp_path, "client_001", date(2026, 8, 3), **_reminder_args("approval-0002")
    |                                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
301 |     )
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1455:5
     |
1453 |     destination: object,
1454 |     *,
1455 |     registry_digest: str,
     |     -------------------- Parameter declared here
1456 |     config_digest: str,
1457 |     operator_approval: str,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:300:51
    |
298 |     assert lease_handle.closed
299 |     replacement = reserve(
300 |         tmp_path, "client_001", date(2026, 8, 3), **_reminder_args("approval-0002")
    |                                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
301 |     )
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1456:5
     |
1454 |     *,
1455 |     registry_digest: str,
1456 |     config_digest: str,
     |     ------------------ Parameter declared here
1457 |     operator_approval: str,
1458 |     canonical_sequence: int | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:300:51
    |
298 |     assert lease_handle.closed
299 |     replacement = reserve(
300 |         tmp_path, "client_001", date(2026, 8, 3), **_reminder_args("approval-0002")
    |                                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
301 |     )
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1457:5
     |
1455 |     registry_digest: str,
1456 |     config_digest: str,
1457 |     operator_approval: str,
     |     ---------------------- Parameter declared here
1458 |     canonical_sequence: int | None = None,
1459 |     canonical_digest: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:300:51
    |
298 |     assert lease_handle.closed
299 |     replacement = reserve(
300 |         tmp_path, "client_001", date(2026, 8, 3), **_reminder_args("approval-0002")
    |                                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `int | None`, found `object`
301 |     )
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1458:5
     |
1456 |     config_digest: str,
1457 |     operator_approval: str,
1458 |     canonical_sequence: int | None = None,
     |     ------------------------------------- Parameter declared here
1459 |     canonical_digest: str | None = None,
1460 |     template_version: str = "missing-checkin-v1",
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:300:51
    |
298 |     assert lease_handle.closed
299 |     replacement = reserve(
300 |         tmp_path, "client_001", date(2026, 8, 3), **_reminder_args("approval-0002")
    |                                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
301 |     )
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1459:5
     |
1457 |     operator_approval: str,
1458 |     canonical_sequence: int | None = None,
1459 |     canonical_digest: str | None = None,
     |     ----------------------------------- Parameter declared here
1460 |     template_version: str = "missing-checkin-v1",
1461 |     weekly_authority: WeeklyReminderReservationAuthority | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:300:51
    |
298 |     assert lease_handle.closed
299 |     replacement = reserve(
300 |         tmp_path, "client_001", date(2026, 8, 3), **_reminder_args("approval-0002")
    |                                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
301 |     )
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1460:5
     |
1458 |     canonical_sequence: int | None = None,
1459 |     canonical_digest: str | None = None,
1460 |     template_version: str = "missing-checkin-v1",
     |     -------------------------------------------- Parameter declared here
1461 |     weekly_authority: WeeklyReminderReservationAuthority | None = None,
1462 | ) -> ScheduledDeliveryReceipt:
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:300:51
    |
298 |     assert lease_handle.closed
299 |     replacement = reserve(
300 |         tmp_path, "client_001", date(2026, 8, 3), **_reminder_args("approval-0002")
    |                                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `WeeklyReminderReservationAuthority | None`, found `object`
301 |     )
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1461:5
     |
1459 |     canonical_digest: str | None = None,
1460 |     template_version: str = "missing-checkin-v1",
1461 |     weekly_authority: WeeklyReminderReservationAuthority | None = None,
     |     ------------------------------------------------------------------ Parameter declared here
1462 | ) -> ScheduledDeliveryReceipt:
1463 |     """Reserve the one approved static reminder for a missing-check-in window."""
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:332:51
    |
330 |     ]
331 |     assert reserve(
332 |         tmp_path, "client_001", date(2026, 8, 3), **_reminder_args("approval-0002")
    |                                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
333 |     ) == audited_replacement
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1455:5
     |
1453 |     destination: object,
1454 |     *,
1455 |     registry_digest: str,
     |     -------------------- Parameter declared here
1456 |     config_digest: str,
1457 |     operator_approval: str,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:332:51
    |
330 |     ]
331 |     assert reserve(
332 |         tmp_path, "client_001", date(2026, 8, 3), **_reminder_args("approval-0002")
    |                                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
333 |     ) == audited_replacement
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1456:5
     |
1454 |     *,
1455 |     registry_digest: str,
1456 |     config_digest: str,
     |     ------------------ Parameter declared here
1457 |     operator_approval: str,
1458 |     canonical_sequence: int | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:332:51
    |
330 |     ]
331 |     assert reserve(
332 |         tmp_path, "client_001", date(2026, 8, 3), **_reminder_args("approval-0002")
    |                                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
333 |     ) == audited_replacement
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1457:5
     |
1455 |     registry_digest: str,
1456 |     config_digest: str,
1457 |     operator_approval: str,
     |     ---------------------- Parameter declared here
1458 |     canonical_sequence: int | None = None,
1459 |     canonical_digest: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:332:51
    |
330 |     ]
331 |     assert reserve(
332 |         tmp_path, "client_001", date(2026, 8, 3), **_reminder_args("approval-0002")
    |                                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `int | None`, found `object`
333 |     ) == audited_replacement
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1458:5
     |
1456 |     config_digest: str,
1457 |     operator_approval: str,
1458 |     canonical_sequence: int | None = None,
     |     ------------------------------------- Parameter declared here
1459 |     canonical_digest: str | None = None,
1460 |     template_version: str = "missing-checkin-v1",
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:332:51
    |
330 |     ]
331 |     assert reserve(
332 |         tmp_path, "client_001", date(2026, 8, 3), **_reminder_args("approval-0002")
    |                                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
333 |     ) == audited_replacement
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1459:5
     |
1457 |     operator_approval: str,
1458 |     canonical_sequence: int | None = None,
1459 |     canonical_digest: str | None = None,
     |     ----------------------------------- Parameter declared here
1460 |     template_version: str = "missing-checkin-v1",
1461 |     weekly_authority: WeeklyReminderReservationAuthority | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:332:51
    |
330 |     ]
331 |     assert reserve(
332 |         tmp_path, "client_001", date(2026, 8, 3), **_reminder_args("approval-0002")
    |                                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
333 |     ) == audited_replacement
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1460:5
     |
1458 |     canonical_sequence: int | None = None,
1459 |     canonical_digest: str | None = None,
1460 |     template_version: str = "missing-checkin-v1",
     |     -------------------------------------------- Parameter declared here
1461 |     weekly_authority: WeeklyReminderReservationAuthority | None = None,
1462 | ) -> ScheduledDeliveryReceipt:
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:332:51
    |
330 |     ]
331 |     assert reserve(
332 |         tmp_path, "client_001", date(2026, 8, 3), **_reminder_args("approval-0002")
    |                                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `WeeklyReminderReservationAuthority | None`, found `object`
333 |     ) == audited_replacement
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1461:5
     |
1459 |     canonical_digest: str | None = None,
1460 |     template_version: str = "missing-checkin-v1",
1461 |     weekly_authority: WeeklyReminderReservationAuthority | None = None,
     |     ------------------------------------------------------------------ Parameter declared here
1462 | ) -> ScheduledDeliveryReceipt:
1463 |     """Reserve the one approved static reminder for a missing-check-in window."""
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:339:63
    |
337 | ) -> None:
338 |     reserve = customer_schedule.reserve_missing_checkin_reminder
339 |     first = reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args())
    |                                                               ^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
340 |     failed = customer_schedule.mark_customer_task_known_failure(
341 |         tmp_path, checkin_cli.mark_customer_task_sending(tmp_path, first), "provider_rejected"
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1455:5
     |
1453 |     destination: object,
1454 |     *,
1455 |     registry_digest: str,
     |     -------------------- Parameter declared here
1456 |     config_digest: str,
1457 |     operator_approval: str,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:339:63
    |
337 | ) -> None:
338 |     reserve = customer_schedule.reserve_missing_checkin_reminder
339 |     first = reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args())
    |                                                               ^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
340 |     failed = customer_schedule.mark_customer_task_known_failure(
341 |         tmp_path, checkin_cli.mark_customer_task_sending(tmp_path, first), "provider_rejected"
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1456:5
     |
1454 |     *,
1455 |     registry_digest: str,
1456 |     config_digest: str,
     |     ------------------ Parameter declared here
1457 |     operator_approval: str,
1458 |     canonical_sequence: int | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:339:63
    |
337 | ) -> None:
338 |     reserve = customer_schedule.reserve_missing_checkin_reminder
339 |     first = reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args())
    |                                                               ^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
340 |     failed = customer_schedule.mark_customer_task_known_failure(
341 |         tmp_path, checkin_cli.mark_customer_task_sending(tmp_path, first), "provider_rejected"
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1457:5
     |
1455 |     registry_digest: str,
1456 |     config_digest: str,
1457 |     operator_approval: str,
     |     ---------------------- Parameter declared here
1458 |     canonical_sequence: int | None = None,
1459 |     canonical_digest: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:339:63
    |
337 | ) -> None:
338 |     reserve = customer_schedule.reserve_missing_checkin_reminder
339 |     first = reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args())
    |                                                               ^^^^^^^^^^^^^^^^^^ Expected `int | None`, found `object`
340 |     failed = customer_schedule.mark_customer_task_known_failure(
341 |         tmp_path, checkin_cli.mark_customer_task_sending(tmp_path, first), "provider_rejected"
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1458:5
     |
1456 |     config_digest: str,
1457 |     operator_approval: str,
1458 |     canonical_sequence: int | None = None,
     |     ------------------------------------- Parameter declared here
1459 |     canonical_digest: str | None = None,
1460 |     template_version: str = "missing-checkin-v1",
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:339:63
    |
337 | ) -> None:
338 |     reserve = customer_schedule.reserve_missing_checkin_reminder
339 |     first = reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args())
    |                                                               ^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
340 |     failed = customer_schedule.mark_customer_task_known_failure(
341 |         tmp_path, checkin_cli.mark_customer_task_sending(tmp_path, first), "provider_rejected"
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1459:5
     |
1457 |     operator_approval: str,
1458 |     canonical_sequence: int | None = None,
1459 |     canonical_digest: str | None = None,
     |     ----------------------------------- Parameter declared here
1460 |     template_version: str = "missing-checkin-v1",
1461 |     weekly_authority: WeeklyReminderReservationAuthority | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:339:63
    |
337 | ) -> None:
338 |     reserve = customer_schedule.reserve_missing_checkin_reminder
339 |     first = reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args())
    |                                                               ^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
340 |     failed = customer_schedule.mark_customer_task_known_failure(
341 |         tmp_path, checkin_cli.mark_customer_task_sending(tmp_path, first), "provider_rejected"
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1460:5
     |
1458 |     canonical_sequence: int | None = None,
1459 |     canonical_digest: str | None = None,
1460 |     template_version: str = "missing-checkin-v1",
     |     -------------------------------------------- Parameter declared here
1461 |     weekly_authority: WeeklyReminderReservationAuthority | None = None,
1462 | ) -> ScheduledDeliveryReceipt:
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:339:63
    |
337 | ) -> None:
338 |     reserve = customer_schedule.reserve_missing_checkin_reminder
339 |     first = reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args())
    |                                                               ^^^^^^^^^^^^^^^^^^ Expected `WeeklyReminderReservationAuthority | None`, found `object`
340 |     failed = customer_schedule.mark_customer_task_known_failure(
341 |         tmp_path, checkin_cli.mark_customer_task_sending(tmp_path, first), "provider_rejected"
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1461:5
     |
1459 |     canonical_digest: str | None = None,
1460 |     template_version: str = "missing-checkin-v1",
1461 |     weekly_authority: WeeklyReminderReservationAuthority | None = None,
     |     ------------------------------------------------------------------ Parameter declared here
1462 | ) -> ScheduledDeliveryReceipt:
1463 |     """Reserve the one approved static reminder for a missing-check-in window."""
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:350:59
    |
349 |     with pytest.raises(CustomerScheduleError, match="disk failure"):
350 |         reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args("approval-0002"))
    |                                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
351 |
352 |     claim = _legacy_claim_path(
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1455:5
     |
1453 |     destination: object,
1454 |     *,
1455 |     registry_digest: str,
     |     -------------------- Parameter declared here
1456 |     config_digest: str,
1457 |     operator_approval: str,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:350:59
    |
349 |     with pytest.raises(CustomerScheduleError, match="disk failure"):
350 |         reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args("approval-0002"))
    |                                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
351 |
352 |     claim = _legacy_claim_path(
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1456:5
     |
1454 |     *,
1455 |     registry_digest: str,
1456 |     config_digest: str,
     |     ------------------ Parameter declared here
1457 |     operator_approval: str,
1458 |     canonical_sequence: int | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:350:59
    |
349 |     with pytest.raises(CustomerScheduleError, match="disk failure"):
350 |         reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args("approval-0002"))
    |                                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
351 |
352 |     claim = _legacy_claim_path(
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1457:5
     |
1455 |     registry_digest: str,
1456 |     config_digest: str,
1457 |     operator_approval: str,
     |     ---------------------- Parameter declared here
1458 |     canonical_sequence: int | None = None,
1459 |     canonical_digest: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:350:59
    |
349 |     with pytest.raises(CustomerScheduleError, match="disk failure"):
350 |         reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args("approval-0002"))
    |                                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `int | None`, found `object`
351 |
352 |     claim = _legacy_claim_path(
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1458:5
     |
1456 |     config_digest: str,
1457 |     operator_approval: str,
1458 |     canonical_sequence: int | None = None,
     |     ------------------------------------- Parameter declared here
1459 |     canonical_digest: str | None = None,
1460 |     template_version: str = "missing-checkin-v1",
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:350:59
    |
349 |     with pytest.raises(CustomerScheduleError, match="disk failure"):
350 |         reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args("approval-0002"))
    |                                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
351 |
352 |     claim = _legacy_claim_path(
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1459:5
     |
1457 |     operator_approval: str,
1458 |     canonical_sequence: int | None = None,
1459 |     canonical_digest: str | None = None,
     |     ----------------------------------- Parameter declared here
1460 |     template_version: str = "missing-checkin-v1",
1461 |     weekly_authority: WeeklyReminderReservationAuthority | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:350:59
    |
349 |     with pytest.raises(CustomerScheduleError, match="disk failure"):
350 |         reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args("approval-0002"))
    |                                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
351 |
352 |     claim = _legacy_claim_path(
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1460:5
     |
1458 |     canonical_sequence: int | None = None,
1459 |     canonical_digest: str | None = None,
1460 |     template_version: str = "missing-checkin-v1",
     |     -------------------------------------------- Parameter declared here
1461 |     weekly_authority: WeeklyReminderReservationAuthority | None = None,
1462 | ) -> ScheduledDeliveryReceipt:
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:350:59
    |
349 |     with pytest.raises(CustomerScheduleError, match="disk failure"):
350 |         reserve(tmp_path, "client_001", date(2026, 8, 3), **_reminder_args("approval-0002"))
    |                                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `WeeklyReminderReservationAuthority | None`, found `object`
351 |
352 |     claim = _legacy_claim_path(
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1461:5
     |
1459 |     canonical_digest: str | None = None,
1460 |     template_version: str = "missing-checkin-v1",
1461 |     weekly_authority: WeeklyReminderReservationAuthority | None = None,
     |     ------------------------------------------------------------------ Parameter declared here
1462 | ) -> ScheduledDeliveryReceipt:
1463 |     """Reserve the one approved static reminder for a missing-check-in window."""
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:366:51
    |
364 | def test_review_candidate_waits_for_audited_reminder_and_no_response(tmp_path: Path) -> None:
365 |     reminder = customer_schedule.reserve_missing_checkin_reminder(
366 |         tmp_path, "client_001", date(2026, 8, 3), **_reminder_args()
    |                                                   ^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
367 |     )
368 |     sending = checkin_cli.mark_customer_task_sending(tmp_path, reminder)
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1455:5
     |
1453 |     destination: object,
1454 |     *,
1455 |     registry_digest: str,
     |     -------------------- Parameter declared here
1456 |     config_digest: str,
1457 |     operator_approval: str,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:366:51
    |
364 | def test_review_candidate_waits_for_audited_reminder_and_no_response(tmp_path: Path) -> None:
365 |     reminder = customer_schedule.reserve_missing_checkin_reminder(
366 |         tmp_path, "client_001", date(2026, 8, 3), **_reminder_args()
    |                                                   ^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
367 |     )
368 |     sending = checkin_cli.mark_customer_task_sending(tmp_path, reminder)
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1456:5
     |
1454 |     *,
1455 |     registry_digest: str,
1456 |     config_digest: str,
     |     ------------------ Parameter declared here
1457 |     operator_approval: str,
1458 |     canonical_sequence: int | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:366:51
    |
364 | def test_review_candidate_waits_for_audited_reminder_and_no_response(tmp_path: Path) -> None:
365 |     reminder = customer_schedule.reserve_missing_checkin_reminder(
366 |         tmp_path, "client_001", date(2026, 8, 3), **_reminder_args()
    |                                                   ^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
367 |     )
368 |     sending = checkin_cli.mark_customer_task_sending(tmp_path, reminder)
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1457:5
     |
1455 |     registry_digest: str,
1456 |     config_digest: str,
1457 |     operator_approval: str,
     |     ---------------------- Parameter declared here
1458 |     canonical_sequence: int | None = None,
1459 |     canonical_digest: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:366:51
    |
364 | def test_review_candidate_waits_for_audited_reminder_and_no_response(tmp_path: Path) -> None:
365 |     reminder = customer_schedule.reserve_missing_checkin_reminder(
366 |         tmp_path, "client_001", date(2026, 8, 3), **_reminder_args()
    |                                                   ^^^^^^^^^^^^^^^^^^ Expected `int | None`, found `object`
367 |     )
368 |     sending = checkin_cli.mark_customer_task_sending(tmp_path, reminder)
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1458:5
     |
1456 |     config_digest: str,
1457 |     operator_approval: str,
1458 |     canonical_sequence: int | None = None,
     |     ------------------------------------- Parameter declared here
1459 |     canonical_digest: str | None = None,
1460 |     template_version: str = "missing-checkin-v1",
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:366:51
    |
364 | def test_review_candidate_waits_for_audited_reminder_and_no_response(tmp_path: Path) -> None:
365 |     reminder = customer_schedule.reserve_missing_checkin_reminder(
366 |         tmp_path, "client_001", date(2026, 8, 3), **_reminder_args()
    |                                                   ^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
367 |     )
368 |     sending = checkin_cli.mark_customer_task_sending(tmp_path, reminder)
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1459:5
     |
1457 |     operator_approval: str,
1458 |     canonical_sequence: int | None = None,
1459 |     canonical_digest: str | None = None,
     |     ----------------------------------- Parameter declared here
1460 |     template_version: str = "missing-checkin-v1",
1461 |     weekly_authority: WeeklyReminderReservationAuthority | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:366:51
    |
364 | def test_review_candidate_waits_for_audited_reminder_and_no_response(tmp_path: Path) -> None:
365 |     reminder = customer_schedule.reserve_missing_checkin_reminder(
366 |         tmp_path, "client_001", date(2026, 8, 3), **_reminder_args()
    |                                                   ^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
367 |     )
368 |     sending = checkin_cli.mark_customer_task_sending(tmp_path, reminder)
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1460:5
     |
1458 |     canonical_sequence: int | None = None,
1459 |     canonical_digest: str | None = None,
1460 |     template_version: str = "missing-checkin-v1",
     |     -------------------------------------------- Parameter declared here
1461 |     weekly_authority: WeeklyReminderReservationAuthority | None = None,
1462 | ) -> ScheduledDeliveryReceipt:
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_missing_checkin_reminder` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:366:51
    |
364 | def test_review_candidate_waits_for_audited_reminder_and_no_response(tmp_path: Path) -> None:
365 |     reminder = customer_schedule.reserve_missing_checkin_reminder(
366 |         tmp_path, "client_001", date(2026, 8, 3), **_reminder_args()
    |                                                   ^^^^^^^^^^^^^^^^^^ Expected `WeeklyReminderReservationAuthority | None`, found `object`
367 |     )
368 |     sending = checkin_cli.mark_customer_task_sending(tmp_path, reminder)
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1449:5
     |
1447 |         _check_pairs(rows, claims_root)
1448 |         return receipt_from_row(row)
1449 | def reserve_missing_checkin_reminder(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1450 |     profile_root: Path,
1451 |     customer_key: str,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1461:5
     |
1459 |     canonical_digest: str | None = None,
1460 |     template_version: str = "missing-checkin-v1",
1461 |     weekly_authority: WeeklyReminderReservationAuthority | None = None,
     |     ------------------------------------------------------------------ Parameter declared here
1462 | ) -> ScheduledDeliveryReceipt:
1463 |     """Reserve the one approved static reminder for a missing-check-in window."""
     |
info: rule `invalid-argument-type` is enabled by default

error[unresolved-attribute]: Attribute `correlation_id` is not defined on `None` in union `NonResponseReviewCandidate | None`
   --> dualcoach/profile/tests/test_customer_schedule.py:393:36
    |
391 |     assert first is not None
392 |     assert duplicate == first
393 |     assert first.correlation_id == duplicate.correlation_id
    |                                    ^^^^^^^^^^^^^^^^^^^^^^^^
    |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:406:9
    |
404 |         tmp_path,
405 |         task,
406 |         **arguments,
    |         ^^^^^^^^^^^ Expected `str`, found `object`
407 |     )
408 |     sending = checkin_cli.mark_customer_task_sending(tmp_path, prepared)
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
1371 |     body: str,
     |     --------- Parameter declared here
1372 |     destination: object,
1373 |     template_digest: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:406:9
    |
404 |         tmp_path,
405 |         task,
406 |         **arguments,
    |         ^^^^^^^^^^^ Expected `str | None`, found `object`
407 |     )
408 |     sending = checkin_cli.mark_customer_task_sending(tmp_path, prepared)
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
1371 |     body: str,
1372 |     destination: object,
1373 |     template_digest: str | None = None,
     |     ---------------------------------- Parameter declared here
1374 |     registry_digest: str | None = None,
1375 |     config_digest: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:406:9
    |
404 |         tmp_path,
405 |         task,
406 |         **arguments,
    |         ^^^^^^^^^^^ Expected `str | None`, found `object`
407 |     )
408 |     sending = checkin_cli.mark_customer_task_sending(tmp_path, prepared)
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1374:5
     |
1372 |     destination: object,
1373 |     template_digest: str | None = None,
1374 |     registry_digest: str | None = None,
     |     ---------------------------------- Parameter declared here
1375 |     config_digest: str | None = None,
1376 |     reservation_id: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:406:9
    |
404 |         tmp_path,
405 |         task,
406 |         **arguments,
    |         ^^^^^^^^^^^ Expected `str | None`, found `object`
407 |     )
408 |     sending = checkin_cli.mark_customer_task_sending(tmp_path, prepared)
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1375:5
     |
1373 |     template_digest: str | None = None,
1374 |     registry_digest: str | None = None,
1375 |     config_digest: str | None = None,
     |     -------------------------------- Parameter declared here
1376 |     reservation_id: str | None = None,
1377 | ) -> ScheduledDeliveryReceipt:
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:406:9
    |
404 |         tmp_path,
405 |         task,
406 |         **arguments,
    |         ^^^^^^^^^^^ Expected `str | None`, found `object`
407 |     )
408 |     sending = checkin_cli.mark_customer_task_sending(tmp_path, prepared)
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1376:5
     |
1374 |     registry_digest: str | None = None,
1375 |     config_digest: str | None = None,
1376 |     reservation_id: str | None = None,
     |     --------------------------------- Parameter declared here
1377 | ) -> ScheduledDeliveryReceipt:
1378 |     """Persist tombstone then prepared delivery pins before any provider call."""
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:451:9
    |
449 |         tmp_path,
450 |         task,
451 |         **_schedule_delivery_args(),
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
452 |     )
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
1371 |     body: str,
     |     --------- Parameter declared here
1372 |     destination: object,
1373 |     template_digest: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:451:9
    |
449 |         tmp_path,
450 |         task,
451 |         **_schedule_delivery_args(),
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
452 |     )
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
1371 |     body: str,
1372 |     destination: object,
1373 |     template_digest: str | None = None,
     |     ---------------------------------- Parameter declared here
1374 |     registry_digest: str | None = None,
1375 |     config_digest: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:451:9
    |
449 |         tmp_path,
450 |         task,
451 |         **_schedule_delivery_args(),
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
452 |     )
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1374:5
     |
1372 |     destination: object,
1373 |     template_digest: str | None = None,
1374 |     registry_digest: str | None = None,
     |     ---------------------------------- Parameter declared here
1375 |     config_digest: str | None = None,
1376 |     reservation_id: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:451:9
    |
449 |         tmp_path,
450 |         task,
451 |         **_schedule_delivery_args(),
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
452 |     )
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1375:5
     |
1373 |     template_digest: str | None = None,
1374 |     registry_digest: str | None = None,
1375 |     config_digest: str | None = None,
     |     -------------------------------- Parameter declared here
1376 |     reservation_id: str | None = None,
1377 | ) -> ScheduledDeliveryReceipt:
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:451:9
    |
449 |         tmp_path,
450 |         task,
451 |         **_schedule_delivery_args(),
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
452 |     )
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1376:5
     |
1374 |     registry_digest: str | None = None,
1375 |     config_digest: str | None = None,
1376 |     reservation_id: str | None = None,
     |     --------------------------------- Parameter declared here
1377 | ) -> ScheduledDeliveryReceipt:
1378 |     """Persist tombstone then prepared delivery pins before any provider call."""
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:476:75
    |
474 |     task = checkin_cli.CustomerScheduleTask("client_001", "daily", date(2026, 8, 3))
475 |     arguments = _schedule_delivery_args()
476 |     prepared = checkin_cli.reserve_customer_task_delivery(tmp_path, task, **arguments)
    |                                                                           ^^^^^^^^^^^ Expected `str`, found `object`
477 |     sending = checkin_cli.mark_customer_task_sending(tmp_path, prepared)
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
1371 |     body: str,
     |     --------- Parameter declared here
1372 |     destination: object,
1373 |     template_digest: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:476:75
    |
474 |     task = checkin_cli.CustomerScheduleTask("client_001", "daily", date(2026, 8, 3))
475 |     arguments = _schedule_delivery_args()
476 |     prepared = checkin_cli.reserve_customer_task_delivery(tmp_path, task, **arguments)
    |                                                                           ^^^^^^^^^^^ Expected `str | None`, found `object`
477 |     sending = checkin_cli.mark_customer_task_sending(tmp_path, prepared)
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
1371 |     body: str,
1372 |     destination: object,
1373 |     template_digest: str | None = None,
     |     ---------------------------------- Parameter declared here
1374 |     registry_digest: str | None = None,
1375 |     config_digest: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:476:75
    |
474 |     task = checkin_cli.CustomerScheduleTask("client_001", "daily", date(2026, 8, 3))
475 |     arguments = _schedule_delivery_args()
476 |     prepared = checkin_cli.reserve_customer_task_delivery(tmp_path, task, **arguments)
    |                                                                           ^^^^^^^^^^^ Expected `str | None`, found `object`
477 |     sending = checkin_cli.mark_customer_task_sending(tmp_path, prepared)
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1374:5
     |
1372 |     destination: object,
1373 |     template_digest: str | None = None,
1374 |     registry_digest: str | None = None,
     |     ---------------------------------- Parameter declared here
1375 |     config_digest: str | None = None,
1376 |     reservation_id: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:476:75
    |
474 |     task = checkin_cli.CustomerScheduleTask("client_001", "daily", date(2026, 8, 3))
475 |     arguments = _schedule_delivery_args()
476 |     prepared = checkin_cli.reserve_customer_task_delivery(tmp_path, task, **arguments)
    |                                                                           ^^^^^^^^^^^ Expected `str | None`, found `object`
477 |     sending = checkin_cli.mark_customer_task_sending(tmp_path, prepared)
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1375:5
     |
1373 |     template_digest: str | None = None,
1374 |     registry_digest: str | None = None,
1375 |     config_digest: str | None = None,
     |     -------------------------------- Parameter declared here
1376 |     reservation_id: str | None = None,
1377 | ) -> ScheduledDeliveryReceipt:
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:476:75
    |
474 |     task = checkin_cli.CustomerScheduleTask("client_001", "daily", date(2026, 8, 3))
475 |     arguments = _schedule_delivery_args()
476 |     prepared = checkin_cli.reserve_customer_task_delivery(tmp_path, task, **arguments)
    |                                                                           ^^^^^^^^^^^ Expected `str | None`, found `object`
477 |     sending = checkin_cli.mark_customer_task_sending(tmp_path, prepared)
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1376:5
     |
1374 |     registry_digest: str | None = None,
1375 |     config_digest: str | None = None,
1376 |     reservation_id: str | None = None,
     |     --------------------------------- Parameter declared here
1377 | ) -> ScheduledDeliveryReceipt:
1378 |     """Persist tombstone then prepared delivery pins before any provider call."""
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:488:9
    |
486 |         tmp_path,
487 |         task,
488 |         **arguments,
    |         ^^^^^^^^^^^ Expected `str`, found `object`
489 |     )
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
1371 |     body: str,
     |     --------- Parameter declared here
1372 |     destination: object,
1373 |     template_digest: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:488:9
    |
486 |         tmp_path,
487 |         task,
488 |         **arguments,
    |         ^^^^^^^^^^^ Expected `str | None`, found `object`
489 |     )
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
1371 |     body: str,
1372 |     destination: object,
1373 |     template_digest: str | None = None,
     |     ---------------------------------- Parameter declared here
1374 |     registry_digest: str | None = None,
1375 |     config_digest: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:488:9
    |
486 |         tmp_path,
487 |         task,
488 |         **arguments,
    |         ^^^^^^^^^^^ Expected `str | None`, found `object`
489 |     )
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1374:5
     |
1372 |     destination: object,
1373 |     template_digest: str | None = None,
1374 |     registry_digest: str | None = None,
     |     ---------------------------------- Parameter declared here
1375 |     config_digest: str | None = None,
1376 |     reservation_id: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:488:9
    |
486 |         tmp_path,
487 |         task,
488 |         **arguments,
    |         ^^^^^^^^^^^ Expected `str | None`, found `object`
489 |     )
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1375:5
     |
1373 |     template_digest: str | None = None,
1374 |     registry_digest: str | None = None,
1375 |     config_digest: str | None = None,
     |     -------------------------------- Parameter declared here
1376 |     reservation_id: str | None = None,
1377 | ) -> ScheduledDeliveryReceipt:
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:488:9
    |
486 |         tmp_path,
487 |         task,
488 |         **arguments,
    |         ^^^^^^^^^^^ Expected `str | None`, found `object`
489 |     )
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1376:5
     |
1374 |     registry_digest: str | None = None,
1375 |     config_digest: str | None = None,
1376 |     reservation_id: str | None = None,
     |     --------------------------------- Parameter declared here
1377 | ) -> ScheduledDeliveryReceipt:
1378 |     """Persist tombstone then prepared delivery pins before any provider call."""
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:508:75
    |
506 |     task = checkin_cli.CustomerScheduleTask("client_001", "daily", date(2026, 8, 3))
507 |     arguments = _schedule_delivery_args()
508 |     prepared = checkin_cli.reserve_customer_task_delivery(tmp_path, task, **arguments)
    |                                                                           ^^^^^^^^^^^ Expected `str`, found `object`
509 |     sending = checkin_cli.mark_customer_task_sending(tmp_path, prepared)
510 |     delivered = checkin_cli.mark_customer_task_delivered(
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
1371 |     body: str,
     |     --------- Parameter declared here
1372 |     destination: object,
1373 |     template_digest: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:508:75
    |
506 |     task = checkin_cli.CustomerScheduleTask("client_001", "daily", date(2026, 8, 3))
507 |     arguments = _schedule_delivery_args()
508 |     prepared = checkin_cli.reserve_customer_task_delivery(tmp_path, task, **arguments)
    |                                                                           ^^^^^^^^^^^ Expected `str | None`, found `object`
509 |     sending = checkin_cli.mark_customer_task_sending(tmp_path, prepared)
510 |     delivered = checkin_cli.mark_customer_task_delivered(
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
1371 |     body: str,
1372 |     destination: object,
1373 |     template_digest: str | None = None,
     |     ---------------------------------- Parameter declared here
1374 |     registry_digest: str | None = None,
1375 |     config_digest: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:508:75
    |
506 |     task = checkin_cli.CustomerScheduleTask("client_001", "daily", date(2026, 8, 3))
507 |     arguments = _schedule_delivery_args()
508 |     prepared = checkin_cli.reserve_customer_task_delivery(tmp_path, task, **arguments)
    |                                                                           ^^^^^^^^^^^ Expected `str | None`, found `object`
509 |     sending = checkin_cli.mark_customer_task_sending(tmp_path, prepared)
510 |     delivered = checkin_cli.mark_customer_task_delivered(
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1374:5
     |
1372 |     destination: object,
1373 |     template_digest: str | None = None,
1374 |     registry_digest: str | None = None,
     |     ---------------------------------- Parameter declared here
1375 |     config_digest: str | None = None,
1376 |     reservation_id: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:508:75
    |
506 |     task = checkin_cli.CustomerScheduleTask("client_001", "daily", date(2026, 8, 3))
507 |     arguments = _schedule_delivery_args()
508 |     prepared = checkin_cli.reserve_customer_task_delivery(tmp_path, task, **arguments)
    |                                                                           ^^^^^^^^^^^ Expected `str | None`, found `object`
509 |     sending = checkin_cli.mark_customer_task_sending(tmp_path, prepared)
510 |     delivered = checkin_cli.mark_customer_task_delivered(
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1375:5
     |
1373 |     template_digest: str | None = None,
1374 |     registry_digest: str | None = None,
1375 |     config_digest: str | None = None,
     |     -------------------------------- Parameter declared here
1376 |     reservation_id: str | None = None,
1377 | ) -> ScheduledDeliveryReceipt:
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:508:75
    |
506 |     task = checkin_cli.CustomerScheduleTask("client_001", "daily", date(2026, 8, 3))
507 |     arguments = _schedule_delivery_args()
508 |     prepared = checkin_cli.reserve_customer_task_delivery(tmp_path, task, **arguments)
    |                                                                           ^^^^^^^^^^^ Expected `str | None`, found `object`
509 |     sending = checkin_cli.mark_customer_task_sending(tmp_path, prepared)
510 |     delivered = checkin_cli.mark_customer_task_delivered(
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1376:5
     |
1374 |     registry_digest: str | None = None,
1375 |     config_digest: str | None = None,
1376 |     reservation_id: str | None = None,
     |     --------------------------------- Parameter declared here
1377 | ) -> ScheduledDeliveryReceipt:
1378 |     """Persist tombstone then prepared delivery pins before any provider call."""
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:542:74
    |
540 |     task = checkin_cli.CustomerScheduleTask("client_001", "weekly", date(2026, 8, 3))
541 |     arguments = _schedule_delivery_args()
542 |     receipt = checkin_cli.reserve_customer_task_delivery(tmp_path, task, **arguments)
    |                                                                          ^^^^^^^^^^^ Expected `str`, found `object`
543 |
544 |     claim = (
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
1371 |     body: str,
     |     --------- Parameter declared here
1372 |     destination: object,
1373 |     template_digest: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:542:74
    |
540 |     task = checkin_cli.CustomerScheduleTask("client_001", "weekly", date(2026, 8, 3))
541 |     arguments = _schedule_delivery_args()
542 |     receipt = checkin_cli.reserve_customer_task_delivery(tmp_path, task, **arguments)
    |                                                                          ^^^^^^^^^^^ Expected `str | None`, found `object`
543 |
544 |     claim = (
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
1371 |     body: str,
1372 |     destination: object,
1373 |     template_digest: str | None = None,
     |     ---------------------------------- Parameter declared here
1374 |     registry_digest: str | None = None,
1375 |     config_digest: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:542:74
    |
540 |     task = checkin_cli.CustomerScheduleTask("client_001", "weekly", date(2026, 8, 3))
541 |     arguments = _schedule_delivery_args()
542 |     receipt = checkin_cli.reserve_customer_task_delivery(tmp_path, task, **arguments)
    |                                                                          ^^^^^^^^^^^ Expected `str | None`, found `object`
543 |
544 |     claim = (
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1374:5
     |
1372 |     destination: object,
1373 |     template_digest: str | None = None,
1374 |     registry_digest: str | None = None,
     |     ---------------------------------- Parameter declared here
1375 |     config_digest: str | None = None,
1376 |     reservation_id: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:542:74
    |
540 |     task = checkin_cli.CustomerScheduleTask("client_001", "weekly", date(2026, 8, 3))
541 |     arguments = _schedule_delivery_args()
542 |     receipt = checkin_cli.reserve_customer_task_delivery(tmp_path, task, **arguments)
    |                                                                          ^^^^^^^^^^^ Expected `str | None`, found `object`
543 |
544 |     claim = (
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1375:5
     |
1373 |     template_digest: str | None = None,
1374 |     registry_digest: str | None = None,
1375 |     config_digest: str | None = None,
     |     -------------------------------- Parameter declared here
1376 |     reservation_id: str | None = None,
1377 | ) -> ScheduledDeliveryReceipt:
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:542:74
    |
540 |     task = checkin_cli.CustomerScheduleTask("client_001", "weekly", date(2026, 8, 3))
541 |     arguments = _schedule_delivery_args()
542 |     receipt = checkin_cli.reserve_customer_task_delivery(tmp_path, task, **arguments)
    |                                                                          ^^^^^^^^^^^ Expected `str | None`, found `object`
543 |
544 |     claim = (
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1376:5
     |
1374 |     registry_digest: str | None = None,
1375 |     config_digest: str | None = None,
1376 |     reservation_id: str | None = None,
     |     --------------------------------- Parameter declared here
1377 | ) -> ScheduledDeliveryReceipt:
1378 |     """Persist tombstone then prepared delivery pins before any provider call."""
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:605:13
    |
603 |             tmp_path,
604 |             task,
605 |             **_schedule_delivery_args(),
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
606 |         )
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
1371 |     body: str,
     |     --------- Parameter declared here
1372 |     destination: object,
1373 |     template_digest: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:605:13
    |
603 |             tmp_path,
604 |             task,
605 |             **_schedule_delivery_args(),
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
606 |         )
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
1371 |     body: str,
1372 |     destination: object,
1373 |     template_digest: str | None = None,
     |     ---------------------------------- Parameter declared here
1374 |     registry_digest: str | None = None,
1375 |     config_digest: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:605:13
    |
603 |             tmp_path,
604 |             task,
605 |             **_schedule_delivery_args(),
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
606 |         )
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1374:5
     |
1372 |     destination: object,
1373 |     template_digest: str | None = None,
1374 |     registry_digest: str | None = None,
     |     ---------------------------------- Parameter declared here
1375 |     config_digest: str | None = None,
1376 |     reservation_id: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:605:13
    |
603 |             tmp_path,
604 |             task,
605 |             **_schedule_delivery_args(),
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
606 |         )
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1375:5
     |
1373 |     template_digest: str | None = None,
1374 |     registry_digest: str | None = None,
1375 |     config_digest: str | None = None,
     |     -------------------------------- Parameter declared here
1376 |     reservation_id: str | None = None,
1377 | ) -> ScheduledDeliveryReceipt:
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:605:13
    |
603 |             tmp_path,
604 |             task,
605 |             **_schedule_delivery_args(),
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
606 |         )
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1376:5
     |
1374 |     registry_digest: str | None = None,
1375 |     config_digest: str | None = None,
1376 |     reservation_id: str | None = None,
     |     --------------------------------- Parameter declared here
1377 | ) -> ScheduledDeliveryReceipt:
1378 |     """Persist tombstone then prepared delivery pins before any provider call."""
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:630:9
    |
628 |         tmp_path,
629 |         task,
630 |         **_schedule_delivery_args(),
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
631 |     )
632 |     claim = (
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
1371 |     body: str,
     |     --------- Parameter declared here
1372 |     destination: object,
1373 |     template_digest: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:630:9
    |
628 |         tmp_path,
629 |         task,
630 |         **_schedule_delivery_args(),
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
631 |     )
632 |     claim = (
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
1371 |     body: str,
1372 |     destination: object,
1373 |     template_digest: str | None = None,
     |     ---------------------------------- Parameter declared here
1374 |     registry_digest: str | None = None,
1375 |     config_digest: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:630:9
    |
628 |         tmp_path,
629 |         task,
630 |         **_schedule_delivery_args(),
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
631 |     )
632 |     claim = (
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1374:5
     |
1372 |     destination: object,
1373 |     template_digest: str | None = None,
1374 |     registry_digest: str | None = None,
     |     ---------------------------------- Parameter declared here
1375 |     config_digest: str | None = None,
1376 |     reservation_id: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:630:9
    |
628 |         tmp_path,
629 |         task,
630 |         **_schedule_delivery_args(),
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
631 |     )
632 |     claim = (
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1375:5
     |
1373 |     template_digest: str | None = None,
1374 |     registry_digest: str | None = None,
1375 |     config_digest: str | None = None,
     |     -------------------------------- Parameter declared here
1376 |     reservation_id: str | None = None,
1377 | ) -> ScheduledDeliveryReceipt:
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:630:9
    |
628 |         tmp_path,
629 |         task,
630 |         **_schedule_delivery_args(),
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
631 |     )
632 |     claim = (
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1376:5
     |
1374 |     registry_digest: str | None = None,
1375 |     config_digest: str | None = None,
1376 |     reservation_id: str | None = None,
     |     --------------------------------- Parameter declared here
1377 | ) -> ScheduledDeliveryReceipt:
1378 |     """Persist tombstone then prepared delivery pins before any provider call."""
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:662:13
    |
660 |             tmp_path,
661 |             checkin_cli.CustomerScheduleTask("client_001", "daily", date(2026, 8, 3)),
662 |             **_schedule_delivery_args(),
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
663 |         )
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
1371 |     body: str,
     |     --------- Parameter declared here
1372 |     destination: object,
1373 |     template_digest: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:662:13
    |
660 |             tmp_path,
661 |             checkin_cli.CustomerScheduleTask("client_001", "daily", date(2026, 8, 3)),
662 |             **_schedule_delivery_args(),
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
663 |         )
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
1371 |     body: str,
1372 |     destination: object,
1373 |     template_digest: str | None = None,
     |     ---------------------------------- Parameter declared here
1374 |     registry_digest: str | None = None,
1375 |     config_digest: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:662:13
    |
660 |             tmp_path,
661 |             checkin_cli.CustomerScheduleTask("client_001", "daily", date(2026, 8, 3)),
662 |             **_schedule_delivery_args(),
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
663 |         )
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1374:5
     |
1372 |     destination: object,
1373 |     template_digest: str | None = None,
1374 |     registry_digest: str | None = None,
     |     ---------------------------------- Parameter declared here
1375 |     config_digest: str | None = None,
1376 |     reservation_id: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:662:13
    |
660 |             tmp_path,
661 |             checkin_cli.CustomerScheduleTask("client_001", "daily", date(2026, 8, 3)),
662 |             **_schedule_delivery_args(),
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
663 |         )
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1375:5
     |
1373 |     template_digest: str | None = None,
1374 |     registry_digest: str | None = None,
1375 |     config_digest: str | None = None,
     |     -------------------------------- Parameter declared here
1376 |     reservation_id: str | None = None,
1377 | ) -> ScheduledDeliveryReceipt:
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:662:13
    |
660 |             tmp_path,
661 |             checkin_cli.CustomerScheduleTask("client_001", "daily", date(2026, 8, 3)),
662 |             **_schedule_delivery_args(),
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
663 |         )
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1376:5
     |
1374 |     registry_digest: str | None = None,
1375 |     config_digest: str | None = None,
1376 |     reservation_id: str | None = None,
     |     --------------------------------- Parameter declared here
1377 | ) -> ScheduledDeliveryReceipt:
1378 |     """Persist tombstone then prepared delivery pins before any provider call."""
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:670:9
    |
668 |         tmp_path,
669 |         checkin_cli.CustomerScheduleTask("client_001", "daily", date(2026, 8, 3)),
670 |         **_schedule_delivery_args(),
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
671 |     )
672 |     assert receipt.state == "prepared"
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
1371 |     body: str,
     |     --------- Parameter declared here
1372 |     destination: object,
1373 |     template_digest: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:670:9
    |
668 |         tmp_path,
669 |         checkin_cli.CustomerScheduleTask("client_001", "daily", date(2026, 8, 3)),
670 |         **_schedule_delivery_args(),
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
671 |     )
672 |     assert receipt.state == "prepared"
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
1371 |     body: str,
1372 |     destination: object,
1373 |     template_digest: str | None = None,
     |     ---------------------------------- Parameter declared here
1374 |     registry_digest: str | None = None,
1375 |     config_digest: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:670:9
    |
668 |         tmp_path,
669 |         checkin_cli.CustomerScheduleTask("client_001", "daily", date(2026, 8, 3)),
670 |         **_schedule_delivery_args(),
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
671 |     )
672 |     assert receipt.state == "prepared"
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1374:5
     |
1372 |     destination: object,
1373 |     template_digest: str | None = None,
1374 |     registry_digest: str | None = None,
     |     ---------------------------------- Parameter declared here
1375 |     config_digest: str | None = None,
1376 |     reservation_id: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:670:9
    |
668 |         tmp_path,
669 |         checkin_cli.CustomerScheduleTask("client_001", "daily", date(2026, 8, 3)),
670 |         **_schedule_delivery_args(),
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
671 |     )
672 |     assert receipt.state == "prepared"
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1375:5
     |
1373 |     template_digest: str | None = None,
1374 |     registry_digest: str | None = None,
1375 |     config_digest: str | None = None,
     |     -------------------------------- Parameter declared here
1376 |     reservation_id: str | None = None,
1377 | ) -> ScheduledDeliveryReceipt:
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:670:9
    |
668 |         tmp_path,
669 |         checkin_cli.CustomerScheduleTask("client_001", "daily", date(2026, 8, 3)),
670 |         **_schedule_delivery_args(),
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
671 |     )
672 |     assert receipt.state == "prepared"
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1376:5
     |
1374 |     registry_digest: str | None = None,
1375 |     config_digest: str | None = None,
1376 |     reservation_id: str | None = None,
     |     --------------------------------- Parameter declared here
1377 | ) -> ScheduledDeliveryReceipt:
1378 |     """Persist tombstone then prepared delivery pins before any provider call."""
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:688:9
    |
686 |         tmp_path,
687 |         task,
688 |         **_schedule_delivery_args(),
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
689 |     )
690 |     ledger = tmp_path / "data" / "scheduled-deliveries.jsonl"
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
1371 |     body: str,
     |     --------- Parameter declared here
1372 |     destination: object,
1373 |     template_digest: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:688:9
    |
686 |         tmp_path,
687 |         task,
688 |         **_schedule_delivery_args(),
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
689 |     )
690 |     ledger = tmp_path / "data" / "scheduled-deliveries.jsonl"
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
1371 |     body: str,
1372 |     destination: object,
1373 |     template_digest: str | None = None,
     |     ---------------------------------- Parameter declared here
1374 |     registry_digest: str | None = None,
1375 |     config_digest: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:688:9
    |
686 |         tmp_path,
687 |         task,
688 |         **_schedule_delivery_args(),
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
689 |     )
690 |     ledger = tmp_path / "data" / "scheduled-deliveries.jsonl"
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1374:5
     |
1372 |     destination: object,
1373 |     template_digest: str | None = None,
1374 |     registry_digest: str | None = None,
     |     ---------------------------------- Parameter declared here
1375 |     config_digest: str | None = None,
1376 |     reservation_id: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:688:9
    |
686 |         tmp_path,
687 |         task,
688 |         **_schedule_delivery_args(),
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
689 |     )
690 |     ledger = tmp_path / "data" / "scheduled-deliveries.jsonl"
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1375:5
     |
1373 |     template_digest: str | None = None,
1374 |     registry_digest: str | None = None,
1375 |     config_digest: str | None = None,
     |     -------------------------------- Parameter declared here
1376 |     reservation_id: str | None = None,
1377 | ) -> ScheduledDeliveryReceipt:
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:688:9
    |
686 |         tmp_path,
687 |         task,
688 |         **_schedule_delivery_args(),
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
689 |     )
690 |     ledger = tmp_path / "data" / "scheduled-deliveries.jsonl"
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1376:5
     |
1374 |     registry_digest: str | None = None,
1375 |     config_digest: str | None = None,
1376 |     reservation_id: str | None = None,
     |     --------------------------------- Parameter declared here
1377 | ) -> ScheduledDeliveryReceipt:
1378 |     """Persist tombstone then prepared delivery pins before any provider call."""
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:711:9
    |
709 |         tmp_path,
710 |         daily,
711 |         **daily_args,
    |         ^^^^^^^^^^^^ Expected `str`, found `object`
712 |     )
713 |     daily_replay = checkin_cli.reserve_customer_task_delivery(
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
1371 |     body: str,
     |     --------- Parameter declared here
1372 |     destination: object,
1373 |     template_digest: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:711:9
    |
709 |         tmp_path,
710 |         daily,
711 |         **daily_args,
    |         ^^^^^^^^^^^^ Expected `str | None`, found `object`
712 |     )
713 |     daily_replay = checkin_cli.reserve_customer_task_delivery(
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
1371 |     body: str,
1372 |     destination: object,
1373 |     template_digest: str | None = None,
     |     ---------------------------------- Parameter declared here
1374 |     registry_digest: str | None = None,
1375 |     config_digest: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:711:9
    |
709 |         tmp_path,
710 |         daily,
711 |         **daily_args,
    |         ^^^^^^^^^^^^ Expected `str | None`, found `object`
712 |     )
713 |     daily_replay = checkin_cli.reserve_customer_task_delivery(
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1374:5
     |
1372 |     destination: object,
1373 |     template_digest: str | None = None,
1374 |     registry_digest: str | None = None,
     |     ---------------------------------- Parameter declared here
1375 |     config_digest: str | None = None,
1376 |     reservation_id: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:711:9
    |
709 |         tmp_path,
710 |         daily,
711 |         **daily_args,
    |         ^^^^^^^^^^^^ Expected `str | None`, found `object`
712 |     )
713 |     daily_replay = checkin_cli.reserve_customer_task_delivery(
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1375:5
     |
1373 |     template_digest: str | None = None,
1374 |     registry_digest: str | None = None,
1375 |     config_digest: str | None = None,
     |     -------------------------------- Parameter declared here
1376 |     reservation_id: str | None = None,
1377 | ) -> ScheduledDeliveryReceipt:
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:711:9
    |
709 |         tmp_path,
710 |         daily,
711 |         **daily_args,
    |         ^^^^^^^^^^^^ Expected `str | None`, found `object`
712 |     )
713 |     daily_replay = checkin_cli.reserve_customer_task_delivery(
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1376:5
     |
1374 |     registry_digest: str | None = None,
1375 |     config_digest: str | None = None,
1376 |     reservation_id: str | None = None,
     |     --------------------------------- Parameter declared here
1377 | ) -> ScheduledDeliveryReceipt:
1378 |     """Persist tombstone then prepared delivery pins before any provider call."""
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:716:9
    |
714 |         tmp_path,
715 |         daily,
716 |         **daily_args,
    |         ^^^^^^^^^^^^ Expected `str`, found `object`
717 |     )
718 |     weekly_replay = checkin_cli.reserve_customer_task_delivery(
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
1371 |     body: str,
     |     --------- Parameter declared here
1372 |     destination: object,
1373 |     template_digest: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:716:9
    |
714 |         tmp_path,
715 |         daily,
716 |         **daily_args,
    |         ^^^^^^^^^^^^ Expected `str | None`, found `object`
717 |     )
718 |     weekly_replay = checkin_cli.reserve_customer_task_delivery(
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
1371 |     body: str,
1372 |     destination: object,
1373 |     template_digest: str | None = None,
     |     ---------------------------------- Parameter declared here
1374 |     registry_digest: str | None = None,
1375 |     config_digest: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:716:9
    |
714 |         tmp_path,
715 |         daily,
716 |         **daily_args,
    |         ^^^^^^^^^^^^ Expected `str | None`, found `object`
717 |     )
718 |     weekly_replay = checkin_cli.reserve_customer_task_delivery(
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1374:5
     |
1372 |     destination: object,
1373 |     template_digest: str | None = None,
1374 |     registry_digest: str | None = None,
     |     ---------------------------------- Parameter declared here
1375 |     config_digest: str | None = None,
1376 |     reservation_id: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:716:9
    |
714 |         tmp_path,
715 |         daily,
716 |         **daily_args,
    |         ^^^^^^^^^^^^ Expected `str | None`, found `object`
717 |     )
718 |     weekly_replay = checkin_cli.reserve_customer_task_delivery(
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1375:5
     |
1373 |     template_digest: str | None = None,
1374 |     registry_digest: str | None = None,
1375 |     config_digest: str | None = None,
     |     -------------------------------- Parameter declared here
1376 |     reservation_id: str | None = None,
1377 | ) -> ScheduledDeliveryReceipt:
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:716:9
    |
714 |         tmp_path,
715 |         daily,
716 |         **daily_args,
    |         ^^^^^^^^^^^^ Expected `str | None`, found `object`
717 |     )
718 |     weekly_replay = checkin_cli.reserve_customer_task_delivery(
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1376:5
     |
1374 |     registry_digest: str | None = None,
1375 |     config_digest: str | None = None,
1376 |     reservation_id: str | None = None,
     |     --------------------------------- Parameter declared here
1377 | ) -> ScheduledDeliveryReceipt:
1378 |     """Persist tombstone then prepared delivery pins before any provider call."""
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:721:9
    |
719 |           tmp_path,
720 |           weekly,
721 | /         **{
722 | |             **daily_args,
723 | |             "reservation_id": "reservation-00000002",
724 | |         },
    | |_________^ Expected `str`, found `object`
725 |       )
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
1371 |     body: str,
     |     --------- Parameter declared here
1372 |     destination: object,
1373 |     template_digest: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:721:9
    |
719 |           tmp_path,
720 |           weekly,
721 | /         **{
722 | |             **daily_args,
723 | |             "reservation_id": "reservation-00000002",
724 | |         },
    | |_________^ Expected `str | None`, found `object`
725 |       )
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
1371 |     body: str,
1372 |     destination: object,
1373 |     template_digest: str | None = None,
     |     ---------------------------------- Parameter declared here
1374 |     registry_digest: str | None = None,
1375 |     config_digest: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:721:9
    |
719 |           tmp_path,
720 |           weekly,
721 | /         **{
722 | |             **daily_args,
723 | |             "reservation_id": "reservation-00000002",
724 | |         },
    | |_________^ Expected `str | None`, found `object`
725 |       )
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1374:5
     |
1372 |     destination: object,
1373 |     template_digest: str | None = None,
1374 |     registry_digest: str | None = None,
     |     ---------------------------------- Parameter declared here
1375 |     config_digest: str | None = None,
1376 |     reservation_id: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:721:9
    |
719 |           tmp_path,
720 |           weekly,
721 | /         **{
722 | |             **daily_args,
723 | |             "reservation_id": "reservation-00000002",
724 | |         },
    | |_________^ Expected `str | None`, found `object`
725 |       )
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1375:5
     |
1373 |     template_digest: str | None = None,
1374 |     registry_digest: str | None = None,
1375 |     config_digest: str | None = None,
     |     -------------------------------- Parameter declared here
1376 |     reservation_id: str | None = None,
1377 | ) -> ScheduledDeliveryReceipt:
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:721:9
    |
719 |           tmp_path,
720 |           weekly,
721 | /         **{
722 | |             **daily_args,
723 | |             "reservation_id": "reservation-00000002",
724 | |         },
    | |_________^ Expected `str | None`, found `object`
725 |       )
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1376:5
     |
1374 |     registry_digest: str | None = None,
1375 |     config_digest: str | None = None,
1376 |     reservation_id: str | None = None,
     |     --------------------------------- Parameter declared here
1377 | ) -> ScheduledDeliveryReceipt:
1378 |     """Persist tombstone then prepared delivery pins before any provider call."""
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:738:13
    |
736 |             tmp_path,
737 |             daily,
738 |             **{**daily_args, "body": "different body"},
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
739 |         )
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
1371 |     body: str,
     |     --------- Parameter declared here
1372 |     destination: object,
1373 |     template_digest: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:738:13
    |
736 |             tmp_path,
737 |             daily,
738 |             **{**daily_args, "body": "different body"},
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
739 |         )
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
1371 |     body: str,
1372 |     destination: object,
1373 |     template_digest: str | None = None,
     |     ---------------------------------- Parameter declared here
1374 |     registry_digest: str | None = None,
1375 |     config_digest: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:738:13
    |
736 |             tmp_path,
737 |             daily,
738 |             **{**daily_args, "body": "different body"},
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
739 |         )
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1374:5
     |
1372 |     destination: object,
1373 |     template_digest: str | None = None,
1374 |     registry_digest: str | None = None,
     |     ---------------------------------- Parameter declared here
1375 |     config_digest: str | None = None,
1376 |     reservation_id: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:738:13
    |
736 |             tmp_path,
737 |             daily,
738 |             **{**daily_args, "body": "different body"},
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
739 |         )
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1375:5
     |
1373 |     template_digest: str | None = None,
1374 |     registry_digest: str | None = None,
1375 |     config_digest: str | None = None,
     |     -------------------------------- Parameter declared here
1376 |     reservation_id: str | None = None,
1377 | ) -> ScheduledDeliveryReceipt:
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
   --> dualcoach/profile/tests/test_customer_schedule.py:738:13
    |
736 |             tmp_path,
737 |             daily,
738 |             **{**daily_args, "body": "different body"},
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
739 |         )
    |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
     |
    ::: dualcoach/profile/checkin_cli/customer_schedule.py:1376:5
     |
1374 |     registry_digest: str | None = None,
1375 |     config_digest: str | None = None,
1376 |     reservation_id: str | None = None,
     |     --------------------------------- Parameter declared here
1377 | ) -> ScheduledDeliveryReceipt:
1378 |     """Persist tombstone then prepared delivery pins before any provider call."""
     |
info: rule `invalid-argument-type` is enabled by default

error[missing-argument]: No argument provided for required parameter `class`
  --> dualcoach/profile/tests/test_event_contract.py:56:12
   |
55 |   def _typed_reason(source_flow: str) -> SafetyReason:
56 |       return SafetyReason(
   |  ____________^
57 | |         class_="pain",
58 | |         source_flow=source_flow,
59 | |         matched_field="pain_summary",
60 | |         excerpt="knee pain",
61 | |         rule_id="S2",
62 | |     )
   | |_____^
   |
info: rule `missing-argument` is enabled by default

warning[unknown-argument]: Argument `class_` does not match any known parameter
  --> dualcoach/profile/tests/test_event_contract.py:57:9
   |
55 | def _typed_reason(source_flow: str) -> SafetyReason:
56 |     return SafetyReason(
57 |         class_="pain",
   |         ^^^^^^^^^^^^^
58 |         source_flow=source_flow,
59 |         matched_field="pain_summary",
   |
info: rule `unknown-argument` was selected in the configuration file

error[invalid-argument-type]: Argument is incorrect
  --> dualcoach/profile/tests/test_event_contract.py:58:9
   |
56 |     return SafetyReason(
57 |         class_="pain",
58 |         source_flow=source_flow,
   |         ^^^^^^^^^^^^^^^^^^^^^^^ Expected `SafetySourceFlow`, found `str`
59 |         matched_field="pain_summary",
60 |         excerpt="knee pain",
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> dualcoach/profile/tests/test_event_contract.py:59:9
   |
57 |         class_="pain",
58 |         source_flow=source_flow,
59 |         matched_field="pain_summary",
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `SafetyMatchedField`, found `Literal["pain_summary"]`
60 |         excerpt="knee pain",
61 |         rule_id="S2",
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> dualcoach/profile/tests/test_event_contract.py:61:9
   |
59 |         matched_field="pain_summary",
60 |         excerpt="knee pain",
61 |         rule_id="S2",
   |         ^^^^^^^^^^^^ Expected `SafetyRule`, found `Literal["S2"]`
62 |     )
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> dualcoach/profile/tests/test_event_contract.py:69:13
   |
67 |     event = _customer_pilot_event(
68 |         Safety(
69 |             level="monitor",
   |             ^^^^^^^^^^^^^^^ Expected `SafetyLevel`, found `Literal["monitor"]`
70 |             signals=("pain",),
71 |             coaching_held=True,
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> dualcoach/profile/tests/test_event_contract.py:95:20
   |
93 |     with pytest.raises(ValueError, match="typed SafetyReason"):
94 |         builder(
95 |             Safety(level="monitor", signals=("pain",), coaching_held=True),
   |                    ^^^^^^^^^^^^^^^ Expected `SafetyLevel`, found `Literal["monitor"]`
96 |             status,
97 |         )
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> dualcoach/profile/tests/test_event_contract.py:113:23
    |
111 |         status=ContractStatus.UNSAFE,
112 |         dedupe_key="legacy-safety-flag-key",
113 |         safety=Safety(level="stop_and_escalate", signals=("pain",), coaching_held=True),
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `SafetyLevel`, found `Literal["stop_and_escalate"]`
114 |     )
    |
info: rule `invalid-argument-type` is enabled by default

error[missing-argument]: No argument provided for required parameter `class`
   --> dualcoach/profile/tests/test_event_contract.py:208:14
    |
206 |       assert event.payload_ref == "legacy-sidecar.json"
207 |   def test_safety_reason_normalizes_del_character() -> None:
208 |       reason = SafetyReason(
    |  ______________^
209 | |         class_="pain",
210 | |         source_flow="customer_checkin",
211 | |         matched_field="free_text",
212 | |         excerpt="chest\x7fpain",
213 | |         rule_id="S2",
214 | |     )
    | |_____^
215 |
216 |       assert "\x7f" not in reason.excerpt
    |
info: rule `missing-argument` is enabled by default

warning[unknown-argument]: Argument `class_` does not match any known parameter
   --> dualcoach/profile/tests/test_event_contract.py:209:9
    |
207 | def test_safety_reason_normalizes_del_character() -> None:
208 |     reason = SafetyReason(
209 |         class_="pain",
    |         ^^^^^^^^^^^^^
210 |         source_flow="customer_checkin",
211 |         matched_field="free_text",
    |
info: rule `unknown-argument` was selected in the configuration file

error[invalid-argument-type]: Argument is incorrect
   --> dualcoach/profile/tests/test_event_contract.py:210:9
    |
208 |     reason = SafetyReason(
209 |         class_="pain",
210 |         source_flow="customer_checkin",
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `SafetySourceFlow`, found `Literal["customer_checkin"]`
211 |         matched_field="free_text",
212 |         excerpt="chest\x7fpain",
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> dualcoach/profile/tests/test_event_contract.py:211:9
    |
209 |         class_="pain",
210 |         source_flow="customer_checkin",
211 |         matched_field="free_text",
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `SafetyMatchedField`, found `Literal["free_text"]`
212 |         excerpt="chest\x7fpain",
213 |         rule_id="S2",
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> dualcoach/profile/tests/test_event_contract.py:213:9
    |
211 |         matched_field="free_text",
212 |         excerpt="chest\x7fpain",
213 |         rule_id="S2",
    |         ^^^^^^^^^^^^ Expected `SafetyRule`, found `Literal["S2"]`
214 |     )
    |
info: rule `invalid-argument-type` is enabled by default

error[unresolved-attribute]: Attribute `reference_event_id` is not defined on `None` in union `ScheduleConfirmationPayload | None`
   --> dualcoach/profile/tests/test_event_contract.py:233:12
    |
231 |         "client_001", reference.event_id, "a" * 64, "operator_1", "b" * 64,
232 |     )
233 |     assert confirmation.schedule_confirmation.reference_event_id == reference.event_id
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `QUESTION_FIELDS`
   --> dualcoach/profile/tests/test_nutrition_onboarding.py:360:35
    |
358 | ) -> dict[str, object]:
359 |     answers: dict[str, object] = {}
360 |     for index, field in enumerate(mod.QUESTION_FIELDS):
    |                                   ^^^^^^^^^^^^^^^^^^^
361 |         value = (
362 |             equation_sex_basis
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `example_answer`
   --> dualcoach/profile/tests/test_nutrition_onboarding.py:364:18
    |
362 |             equation_sex_basis
363 |             if field == "equation_sex_basis"
364 |             else mod.example_answer(field)
    |                  ^^^^^^^^^^^^^^^^^^
365 |         )
366 |         answers[field] = value
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `submit_answer`
   --> dualcoach/profile/tests/test_nutrition_onboarding.py:367:9
    |
365 |         )
366 |         answers[field] = value
367 |         service.submit_answer(
    |         ^^^^^^^^^^^^^^^^^^^^^
368 |             field=field,
369 |             value=value,
    |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> dualcoach/profile/tests/test_nutrition_onboarding_calculations.py:69:40
   |
67 |     }
68 |     values.update(overrides)
69 |     return NutritionOnboardingBaseline(**values)
   |                                        ^^^^^^^^ Expected `str`, found `object`
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> dualcoach/profile/tests/test_nutrition_onboarding_calculations.py:69:40
   |
67 |     }
68 |     values.update(overrides)
69 |     return NutritionOnboardingBaseline(**values)
   |                                        ^^^^^^^^ Expected `str`, found `object`
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> dualcoach/profile/tests/test_nutrition_onboarding_calculations.py:69:40
   |
67 |     }
68 |     values.update(overrides)
69 |     return NutritionOnboardingBaseline(**values)
   |                                        ^^^^^^^^ Expected `int`, found `object`
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> dualcoach/profile/tests/test_nutrition_onboarding_calculations.py:69:40
   |
67 |     }
68 |     values.update(overrides)
69 |     return NutritionOnboardingBaseline(**values)
   |                                        ^^^^^^^^ Expected `EquationSexBasis`, found `object`
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> dualcoach/profile/tests/test_nutrition_onboarding_calculations.py:69:40
   |
67 |     }
68 |     values.update(overrides)
69 |     return NutritionOnboardingBaseline(**values)
   |                                        ^^^^^^^^ Expected `Decimal`, found `object`
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> dualcoach/profile/tests/test_nutrition_onboarding_calculations.py:69:40
   |
67 |     }
68 |     values.update(overrides)
69 |     return NutritionOnboardingBaseline(**values)
   |                                        ^^^^^^^^ Expected `Decimal`, found `object`
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> dualcoach/profile/tests/test_nutrition_onboarding_calculations.py:69:40
   |
67 |     }
68 |     values.update(overrides)
69 |     return NutritionOnboardingBaseline(**values)
   |                                        ^^^^^^^^ Expected `ActivityCategory`, found `object`
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> dualcoach/profile/tests/test_nutrition_onboarding_calculations.py:69:40
   |
67 |     }
68 |     values.update(overrides)
69 |     return NutritionOnboardingBaseline(**values)
   |                                        ^^^^^^^^ Expected `str`, found `object`
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> dualcoach/profile/tests/test_nutrition_onboarding_calculations.py:69:40
   |
67 |     }
68 |     values.update(overrides)
69 |     return NutritionOnboardingBaseline(**values)
   |                                        ^^^^^^^^ Expected `GoalType`, found `object`
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> dualcoach/profile/tests/test_nutrition_onboarding_calculations.py:69:40
   |
67 |     }
68 |     values.update(overrides)
69 |     return NutritionOnboardingBaseline(**values)
   |                                        ^^^^^^^^ Expected `Decimal | None`, found `object`
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> dualcoach/profile/tests/test_nutrition_onboarding_calculations.py:69:40
   |
67 |     }
68 |     values.update(overrides)
69 |     return NutritionOnboardingBaseline(**values)
   |                                        ^^^^^^^^ Expected `date | None`, found `object`
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> dualcoach/profile/tests/test_nutrition_onboarding_calculations.py:69:40
   |
67 |     }
68 |     values.update(overrides)
69 |     return NutritionOnboardingBaseline(**values)
   |                                        ^^^^^^^^ Expected `StructuredItems`, found `object`
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> dualcoach/profile/tests/test_nutrition_onboarding_calculations.py:69:40
   |
67 |     }
68 |     values.update(overrides)
69 |     return NutritionOnboardingBaseline(**values)
   |                                        ^^^^^^^^ Expected `StructuredItems`, found `object`
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> dualcoach/profile/tests/test_nutrition_onboarding_calculations.py:69:40
   |
67 |     }
68 |     values.update(overrides)
69 |     return NutritionOnboardingBaseline(**values)
   |                                        ^^^^^^^^ Expected `StructuredItems`, found `object`
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> dualcoach/profile/tests/test_nutrition_onboarding_calculations.py:69:40
   |
67 |     }
68 |     values.update(overrides)
69 |     return NutritionOnboardingBaseline(**values)
   |                                        ^^^^^^^^ Expected `StructuredItems`, found `object`
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> dualcoach/profile/tests/test_nutrition_onboarding_calculations.py:69:40
   |
67 |     }
68 |     values.update(overrides)
69 |     return NutritionOnboardingBaseline(**values)
   |                                        ^^^^^^^^ Expected `StructuredItems`, found `object`
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> dualcoach/profile/tests/test_nutrition_onboarding_calculations.py:69:40
   |
67 |     }
68 |     values.update(overrides)
69 |     return NutritionOnboardingBaseline(**values)
   |                                        ^^^^^^^^ Expected `StructuredItems`, found `object`
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> dualcoach/profile/tests/test_nutrition_onboarding_calculations.py:69:40
   |
67 |     }
68 |     values.update(overrides)
69 |     return NutritionOnboardingBaseline(**values)
   |                                        ^^^^^^^^ Expected `StructuredItems`, found `object`
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> dualcoach/profile/tests/test_nutrition_onboarding_calculations.py:69:40
   |
67 |     }
68 |     values.update(overrides)
69 |     return NutritionOnboardingBaseline(**values)
   |                                        ^^^^^^^^ Expected `bool | None`, found `object`
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> dualcoach/profile/tests/test_nutrition_onboarding_calculations.py:69:40
   |
67 |     }
68 |     values.update(overrides)
69 |     return NutritionOnboardingBaseline(**values)
   |                                        ^^^^^^^^ Expected `bool | None`, found `object`
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> dualcoach/profile/tests/test_nutrition_onboarding_calculations.py:69:40
   |
67 |     }
68 |     values.update(overrides)
69 |     return NutritionOnboardingBaseline(**values)
   |                                        ^^^^^^^^ Expected `str`, found `object`
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> dualcoach/profile/tests/test_nutrition_onboarding_calculations.py:69:40
   |
67 |     }
68 |     values.update(overrides)
69 |     return NutritionOnboardingBaseline(**values)
   |                                        ^^^^^^^^ Expected `str`, found `object`
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> dualcoach/profile/tests/test_nutrition_onboarding_calculations.py:69:40
   |
67 |     }
68 |     values.update(overrides)
69 |     return NutritionOnboardingBaseline(**values)
   |                                        ^^^^^^^^ Expected `int`, found `object`
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> dualcoach/profile/tests/test_nutrition_onboarding_calculations.py:69:40
   |
67 |     }
68 |     values.update(overrides)
69 |     return NutritionOnboardingBaseline(**values)
   |                                        ^^^^^^^^ Expected `str`, found `object`
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> dualcoach/profile/tests/test_nutrition_onboarding_calculations.py:69:40
   |
67 |     }
68 |     values.update(overrides)
69 |     return NutritionOnboardingBaseline(**values)
   |                                        ^^^^^^^^ Expected `OnboardingSessionStatus`, found `object`
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> dualcoach/profile/tests/test_nutrition_onboarding_calculations.py:69:40
   |
67 |     }
68 |     values.update(overrides)
69 |     return NutritionOnboardingBaseline(**values)
   |                                        ^^^^^^^^ Expected `ReviewDecision`, found `object`
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> dualcoach/profile/tests/test_nutrition_onboarding_calculations.py:69:40
   |
67 |     }
68 |     values.update(overrides)
69 |     return NutritionOnboardingBaseline(**values)
   |                                        ^^^^^^^^ Expected `PublicationStatus`, found `object`
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> dualcoach/profile/tests/test_nutrition_onboarding_calculations.py:69:40
   |
67 |     }
68 |     values.update(overrides)
69 |     return NutritionOnboardingBaseline(**values)
   |                                        ^^^^^^^^ Expected `str | None`, found `object`
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
  --> dualcoach/profile/tests/test_nutrition_onboarding_calculations.py:69:40
   |
67 |     }
68 |     values.update(overrides)
69 |     return NutritionOnboardingBaseline(**values)
   |                                        ^^^^^^^^ Expected `date | None`, found `object`
   |
info: rule `invalid-argument-type` is enabled by default

warning[unknown-argument]: Argument `food` does not match any known parameter
   --> dualcoach/profile/tests/test_nutrition_onboarding_calculations.py:156:51
    |
155 |     with pytest.raises(ValidationError, match="Extra inputs are not permitted"):
156 |         WeeklyNutritionTarget(**row.model_dump(), food="chicken")
    |                                                   ^^^^^^^^^^^^^^
157 |     with pytest.raises(ValidationError, match="Extra inputs are not permitted"):
158 |         InitialNutritionPlan(
    |
info: rule `unknown-argument` was selected in the configuration file

warning[unknown-argument]: Argument `recommendation` does not match any known parameter
   --> dualcoach/profile/tests/test_nutrition_onboarding_calculations.py:160:13
    |
158 |         InitialNutritionPlan(
159 |             **plan.model_dump(),
160 |             recommendation="eat oats",
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^
161 |         )
162 |     with pytest.raises(ValidationError, match="frozen"):
    |
info: rule `unknown-argument` was selected in the configuration file

error[invalid-argument-type]: Argument is incorrect
   --> dualcoach/profile/tests/test_nutrition_onboarding_calculations.py:183:13
    |
181 |       with pytest.raises(ValidationError, match="1 through 12"):
182 |           InitialNutritionPlan(
183 | /             **{
184 | |                 **plan.model_dump(),
185 | |                 "weeks": (
186 | |                     plan.weeks[0].model_copy(update={"week": 2}),
187 | |                     *plan.weeks[1:],
188 | |                 ),
189 | |             }
    | |_____________^ Expected `str`, found `Unknown | tuple[WeeklyNutritionTarget, *tuple[@Todo, ...]]`
190 |           )
    |
info: Element `tuple[WeeklyNutritionTarget, *tuple[@Todo, ...]]` of this union is not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> dualcoach/profile/tests/test_nutrition_onboarding_calculations.py:183:13
    |
181 |       with pytest.raises(ValidationError, match="1 through 12"):
182 |           InitialNutritionPlan(
183 | /             **{
184 | |                 **plan.model_dump(),
185 | |                 "weeks": (
186 | |                     plan.weeks[0].model_copy(update={"week": 2}),
187 | |                     *plan.weeks[1:],
188 | |                 ),
189 | |             }
    | |_____________^ Expected `str`, found `Unknown | tuple[WeeklyNutritionTarget, *tuple[@Todo, ...]]`
190 |           )
    |
info: Element `tuple[WeeklyNutritionTarget, *tuple[@Todo, ...]]` of this union is not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> dualcoach/profile/tests/test_nutrition_onboarding_calculations.py:183:13
    |
181 |       with pytest.raises(ValidationError, match="1 through 12"):
182 |           InitialNutritionPlan(
183 | /             **{
184 | |                 **plan.model_dump(),
185 | |                 "weeks": (
186 | |                     plan.weeks[0].model_copy(update={"week": 2}),
187 | |                     *plan.weeks[1:],
188 | |                 ),
189 | |             }
    | |_____________^ Expected `str`, found `Unknown | tuple[WeeklyNutritionTarget, *tuple[@Todo, ...]]`
190 |           )
    |
info: Element `tuple[WeeklyNutritionTarget, *tuple[@Todo, ...]]` of this union is not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> dualcoach/profile/tests/test_nutrition_onboarding_calculations.py:183:13
    |
181 |       with pytest.raises(ValidationError, match="1 through 12"):
182 |           InitialNutritionPlan(
183 | /             **{
184 | |                 **plan.model_dump(),
185 | |                 "weeks": (
186 | |                     plan.weeks[0].model_copy(update={"week": 2}),
187 | |                     *plan.weeks[1:],
188 | |                 ),
189 | |             }
    | |_____________^ Expected `str`, found `Unknown | tuple[WeeklyNutritionTarget, *tuple[@Todo, ...]]`
190 |           )
    |
info: Element `tuple[WeeklyNutritionTarget, *tuple[@Todo, ...]]` of this union is not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> dualcoach/profile/tests/test_nutrition_onboarding_calculations.py:183:13
    |
181 |       with pytest.raises(ValidationError, match="1 through 12"):
182 |           InitialNutritionPlan(
183 | /             **{
184 | |                 **plan.model_dump(),
185 | |                 "weeks": (
186 | |                     plan.weeks[0].model_copy(update={"week": 2}),
187 | |                     *plan.weeks[1:],
188 | |                 ),
189 | |             }
    | |_____________^ Expected `Decimal`, found `Unknown | tuple[WeeklyNutritionTarget, *tuple[@Todo, ...]]`
190 |           )
    |
info: Element `tuple[WeeklyNutritionTarget, *tuple[@Todo, ...]]` of this union is not assignable to `Decimal`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> dualcoach/profile/tests/test_nutrition_onboarding_calculations.py:183:13
    |
181 |       with pytest.raises(ValidationError, match="1 through 12"):
182 |           InitialNutritionPlan(
183 | /             **{
184 | |                 **plan.model_dump(),
185 | |                 "weeks": (
186 | |                     plan.weeks[0].model_copy(update={"week": 2}),
187 | |                     *plan.weeks[1:],
188 | |                 ),
189 | |             }
    | |_____________^ Expected `Decimal`, found `Unknown | tuple[WeeklyNutritionTarget, *tuple[@Todo, ...]]`
190 |           )
    |
info: Element `tuple[WeeklyNutritionTarget, *tuple[@Todo, ...]]` of this union is not assignable to `Decimal`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> dualcoach/profile/tests/test_nutrition_onboarding_calculations.py:183:13
    |
181 |       with pytest.raises(ValidationError, match="1 through 12"):
182 |           InitialNutritionPlan(
183 | /             **{
184 | |                 **plan.model_dump(),
185 | |                 "weeks": (
186 | |                     plan.weeks[0].model_copy(update={"week": 2}),
187 | |                     *plan.weeks[1:],
188 | |                 ),
189 | |             }
    | |_____________^ Expected `date`, found `Unknown | tuple[WeeklyNutritionTarget, *tuple[@Todo, ...]]`
190 |           )
    |
info: Element `tuple[WeeklyNutritionTarget, *tuple[@Todo, ...]]` of this union is not assignable to `date`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> dualcoach/profile/tests/test_nutrition_onboarding_calculations.py:183:13
    |
181 |       with pytest.raises(ValidationError, match="1 through 12"):
182 |           InitialNutritionPlan(
183 | /             **{
184 | |                 **plan.model_dump(),
185 | |                 "weeks": (
186 | |                     plan.weeks[0].model_copy(update={"week": 2}),
187 | |                     *plan.weeks[1:],
188 | |                 ),
189 | |             }
    | |_____________^ Expected `bool`, found `Unknown | tuple[WeeklyNutritionTarget, *tuple[@Todo, ...]]`
190 |           )
    |
info: Element `tuple[WeeklyNutritionTarget, *tuple[@Todo, ...]]` of this union is not assignable to `bool`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> dualcoach/profile/tests/test_nutrition_onboarding_calculations.py:183:13
    |
181 |       with pytest.raises(ValidationError, match="1 through 12"):
182 |           InitialNutritionPlan(
183 | /             **{
184 | |                 **plan.model_dump(),
185 | |                 "weeks": (
186 | |                     plan.weeks[0].model_copy(update={"week": 2}),
187 | |                     *plan.weeks[1:],
188 | |                 ),
189 | |             }
    | |_____________^ Expected `date | None`, found `Unknown | tuple[WeeklyNutritionTarget, *tuple[@Todo, ...]]`
190 |           )
    |
info: Element `tuple[WeeklyNutritionTarget, *tuple[@Todo, ...]]` of this union is not assignable to `date | None`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> dualcoach/profile/tests/test_nutrition_onboarding_calculations.py:183:13
    |
181 |       with pytest.raises(ValidationError, match="1 through 12"):
182 |           InitialNutritionPlan(
183 | /             **{
184 | |                 **plan.model_dump(),
185 | |                 "weeks": (
186 | |                     plan.weeks[0].model_copy(update={"week": 2}),
187 | |                     *plan.weeks[1:],
188 | |                 ),
189 | |             }
    | |_____________^ Expected `tuple[Decimal, ...]`, found `Unknown | tuple[WeeklyNutritionTarget, *tuple[@Todo, ...]]`
190 |           )
    |
info: Element `tuple[WeeklyNutritionTarget, *tuple[@Todo, ...]]` of this union is not assignable to `tuple[Decimal, ...]`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> dualcoach/profile/tests/test_nutrition_onboarding_calculations.py:183:13
    |
181 |       with pytest.raises(ValidationError, match="1 through 12"):
182 |           InitialNutritionPlan(
183 | /             **{
184 | |                 **plan.model_dump(),
185 | |                 "weeks": (
186 | |                     plan.weeks[0].model_copy(update={"week": 2}),
187 | |                     *plan.weeks[1:],
188 | |                 ),
189 | |             }
    | |_____________^ Expected `str`, found `Unknown | tuple[WeeklyNutritionTarget, *tuple[@Todo, ...]]`
190 |           )
    |
info: Element `tuple[WeeklyNutritionTarget, *tuple[@Todo, ...]]` of this union is not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> dualcoach/profile/tests/test_nutrition_onboarding_calculations.py:219:31
    |
218 |     with pytest.raises(ValidationError):
219 |         WeeklyNutritionTarget(**valid)
    |                               ^^^^^^^ Expected `int`, found `object`
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> dualcoach/profile/tests/test_nutrition_onboarding_calculations.py:219:31
    |
218 |     with pytest.raises(ValidationError):
219 |         WeeklyNutritionTarget(**valid)
    |                               ^^^^^^^ Expected `int`, found `object`
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> dualcoach/profile/tests/test_nutrition_onboarding_calculations.py:219:31
    |
218 |     with pytest.raises(ValidationError):
219 |         WeeklyNutritionTarget(**valid)
    |                               ^^^^^^^ Expected `int`, found `object`
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> dualcoach/profile/tests/test_nutrition_onboarding_calculations.py:219:31
    |
218 |     with pytest.raises(ValidationError):
219 |         WeeklyNutritionTarget(**valid)
    |                               ^^^^^^^ Expected `int`, found `object`
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> dualcoach/profile/tests/test_nutrition_onboarding_calculations.py:219:31
    |
218 |     with pytest.raises(ValidationError):
219 |         WeeklyNutritionTarget(**valid)
    |                               ^^^^^^^ Expected `int`, found `object`
    |
info: rule `invalid-argument-type` is enabled by default

error[unsupported-operator]: Unsupported `>` operation
   --> dualcoach/profile/tests/test_nutrition_onboarding_calculations.py:294:12
    |
292 |     assert plan.requested_trajectory_within_guardrail is False
293 |     assert plan.recommended_target_date is not None
294 |     assert plan.recommended_target_date > baseline.target_date
    |            ----------------------------^^^--------------------
    |            |                              |
    |            |                              Has type `date | None`
    |            Has type `date`
295 |     first_week_change = plan.projected_weights_kg[1] - baseline.weight_kg
296 |     assert abs(first_week_change / baseline.weight_kg) <= limit
    |
info: Operation fails because operator `>` is not supported between objects of type `date` and `None`
info: rule `unsupported-operator` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
   --> dualcoach/profile/tests/test_weekly_operations_cutoff.py:125:9
    |
123 |     )
124 |     transaction = CanonicalCheckinCorrelationTransaction(
125 |         fixture.request.bound_customer.store,
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `WeeklyOperationsStore`, found `BoundSidecarStore`
126 |         CorrelationRequest(
127 |             CorrelationScope(
    |
info: Method defined here
   --> dualcoach/profile/checkin_cli/weekly_operations_correlation.py:180:9
    |
178 |     """Linearize canonical correlation and one sidecar append."""
179 |
180 |     def __init__(self, store: WeeklyOperationsStore, request: CorrelationRequest) -> None:
    |         ^^^^^^^^       ---------------------------- Parameter declared here
181 |         self._store: WeeklyOperationsStore = store
182 |         self._request: CorrelationRequest = request
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `<class 'AdaptiveEventStore'>`
   --> gateway/platforms/nutrition_coaching.py:100:5
    |
 98 |     )
 99 | except ImportError:
100 |     AdaptiveEventStore = None
    |     ------------------   ^^^^ Incompatible value of type `None`
    |     |
    |     Declared type `<class 'AdaptiveEventStore'>`
101 |     CustomerRuntime = None
102 |     RegisteredCustomerBinding = None
    |
info: Implicit shadowing of class `AdaptiveEventStore`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `<class 'CustomerRuntime'>`
   --> gateway/platforms/nutrition_coaching.py:101:5
    |
 99 | except ImportError:
100 |     AdaptiveEventStore = None
101 |     CustomerRuntime = None
    |     ---------------   ^^^^ Incompatible value of type `None`
    |     |
    |     Declared type `<class 'CustomerRuntime'>`
102 |     RegisteredCustomerBinding = None
103 |     CanonicalEventTransaction = None
    |
info: Implicit shadowing of class `CustomerRuntime`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `<class 'RegisteredCustomerBinding'>`
   --> gateway/platforms/nutrition_coaching.py:102:5
    |
100 |     AdaptiveEventStore = None
101 |     CustomerRuntime = None
102 |     RegisteredCustomerBinding = None
    |     -------------------------   ^^^^ Incompatible value of type `None`
    |     |
    |     Declared type `<class 'RegisteredCustomerBinding'>`
103 |     CanonicalEventTransaction = None
104 |     CustomerPolicy = None
    |
info: Implicit shadowing of class `RegisteredCustomerBinding`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `<class 'CanonicalEventTransaction'>`
   --> gateway/platforms/nutrition_coaching.py:103:5
    |
101 |     CustomerRuntime = None
102 |     RegisteredCustomerBinding = None
103 |     CanonicalEventTransaction = None
    |     -------------------------   ^^^^ Incompatible value of type `None`
    |     |
    |     Declared type `<class 'CanonicalEventTransaction'>`
104 |     CustomerPolicy = None
105 |     Decision = None
    |
info: Implicit shadowing of class `CanonicalEventTransaction`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `<class 'CustomerPolicy'>`
   --> gateway/platforms/nutrition_coaching.py:104:5
    |
102 |     RegisteredCustomerBinding = None
103 |     CanonicalEventTransaction = None
104 |     CustomerPolicy = None
    |     --------------   ^^^^ Incompatible value of type `None`
    |     |
    |     Declared type `<class 'CustomerPolicy'>`
105 |     Decision = None
106 |     DailyObservation = None
    |
info: Implicit shadowing of class `CustomerPolicy`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `<class 'Decision'>`
   --> gateway/platforms/nutrition_coaching.py:105:5
    |
103 |     CanonicalEventTransaction = None
104 |     CustomerPolicy = None
105 |     Decision = None
    |     --------   ^^^^ Incompatible value of type `None`
    |     |
    |     Declared type `<class 'Decision'>`
106 |     DailyObservation = None
107 |     MacroTarget = None
    |
info: Implicit shadowing of class `Decision`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `<class 'DailyObservation'>`
   --> gateway/platforms/nutrition_coaching.py:106:5
    |
104 |     CustomerPolicy = None
105 |     Decision = None
106 |     DailyObservation = None
    |     ----------------   ^^^^ Incompatible value of type `None`
    |     |
    |     Declared type `<class 'DailyObservation'>`
107 |     MacroTarget = None
108 |     MealConstraints = None
    |
info: Implicit shadowing of class `DailyObservation`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `<class 'MacroTarget'>`
   --> gateway/platforms/nutrition_coaching.py:107:5
    |
105 |     Decision = None
106 |     DailyObservation = None
107 |     MacroTarget = None
    |     -----------   ^^^^ Incompatible value of type `None`
    |     |
    |     Declared type `<class 'MacroTarget'>`
108 |     MealConstraints = None
109 |     TrendSnapshot = None
    |
info: Implicit shadowing of class `MacroTarget`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `<class 'MealConstraints'>`
   --> gateway/platforms/nutrition_coaching.py:108:5
    |
106 |     DailyObservation = None
107 |     MacroTarget = None
108 |     MealConstraints = None
    |     ---------------   ^^^^ Incompatible value of type `None`
    |     |
    |     Declared type `<class 'MealConstraints'>`
109 |     TrendSnapshot = None
110 |     NutritionProposal = None
    |
info: Implicit shadowing of class `MealConstraints`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `<class 'TrendSnapshot'>`
   --> gateway/platforms/nutrition_coaching.py:109:5
    |
107 |     MacroTarget = None
108 |     MealConstraints = None
109 |     TrendSnapshot = None
    |     -------------   ^^^^ Incompatible value of type `None`
    |     |
    |     Declared type `<class 'TrendSnapshot'>`
110 |     NutritionProposal = None
111 |     MealPlan = None
    |
info: Implicit shadowing of class `TrendSnapshot`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `<class 'NutritionProposal'>`
   --> gateway/platforms/nutrition_coaching.py:110:5
    |
108 |     MealConstraints = None
109 |     TrendSnapshot = None
110 |     NutritionProposal = None
    |     -----------------   ^^^^ Incompatible value of type `None`
    |     |
    |     Declared type `<class 'NutritionProposal'>`
111 |     MealPlan = None
112 |     MealSlot = None
    |
info: Implicit shadowing of class `NutritionProposal`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `<class 'MealPlan'>`
   --> gateway/platforms/nutrition_coaching.py:111:5
    |
109 |     TrendSnapshot = None
110 |     NutritionProposal = None
111 |     MealPlan = None
    |     --------   ^^^^ Incompatible value of type `None`
    |     |
    |     Declared type `<class 'MealPlan'>`
112 |     MealSlot = None
113 |     build_snapshot = None
    |
info: Implicit shadowing of class `MealPlan`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `<class 'MealSlot'>`
   --> gateway/platforms/nutrition_coaching.py:112:5
    |
110 |     NutritionProposal = None
111 |     MealPlan = None
112 |     MealSlot = None
    |     --------   ^^^^ Incompatible value of type `None`
    |     |
    |     Declared type `<class 'MealSlot'>`
113 |     build_snapshot = None
114 |     canonical_json = None
    |
info: Implicit shadowing of class `MealSlot`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `def build_snapshot(observations: Iterable[DailyObservation], evaluation_day: date, starts_on: date, *, adherence_tolerance_percent: Decimal | int | str = ..., canonical_projection: bool = False) -> TrendSnapshot`
   --> gateway/platforms/nutrition_coaching.py:113:5
    |
111 |     MealPlan = None
112 |     MealSlot = None
113 |     build_snapshot = None
    |     --------------   ^^^^ Incompatible value of type `None`
    |     |
    |     Declared type `def build_snapshot(observations: Iterable[DailyObservation], evaluation_day: date, starts_on: date, *, adherence_tolerance_percent: Decimal | int | str = ..., canonical_projection: bool = False) -> TrendSnapshot`
114 |     canonical_json = None
115 |     propose = None
    |
info: Implicit shadowing of function `build_snapshot`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `def canonical_json(value: object) -> str`
   --> gateway/platforms/nutrition_coaching.py:114:5
    |
112 |     MealSlot = None
113 |     build_snapshot = None
114 |     canonical_json = None
    |     --------------   ^^^^ Incompatible value of type `None`
    |     |
    |     Declared type `def canonical_json(value: object) -> str`
115 |     propose = None
116 |     reconcile_weekly_nutrition_plan = None
    |
info: Implicit shadowing of function `canonical_json`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `def propose(customer_key: str, snapshot: TrendSnapshot, policy: CustomerPolicy, *, current_target: MacroTarget, protein_g: int, fat_g: int, meal_constraints: MealConstraints | None = None, catalog: VersionedFoodCatalog | Sequence[Food] | None = None, source_digest: str | None = None, policy_digest: str | None = None, planned_sessions: object = None, actual_sessions: object = None, planned_loads: object = None, actual_loads: object = None, overlay_history: object = None, cooldown_history: object = None, explanation: object = None, llm_explanation: object = None, explanation_provider: object = None, **kwargs: object) -> NutritionProposal`
   --> gateway/platforms/nutrition_coaching.py:115:5
    |
113 |     build_snapshot = None
114 |     canonical_json = None
115 |     propose = None
    |     -------   ^^^^ Incompatible value of type `None`
    |     |
    |     Declared type `def propose(customer_key: str, snapshot: TrendSnapshot, policy: CustomerPolicy, *, current_target: MacroTarget, protein_g: int, fat_g: int, meal_constraints: MealConstraints | None = None, catalog: VersionedFoodCatalog | Sequence[Food] | None = None, source_digest: str | None = None, policy_digest: str | None = None, planned_sessions: object = None, actual_sessions: object = None, planned_loads: object = None, actual_loads: object = None, overlay_history: object = None, cooldown_history: object = None, explanation: object = None, llm_explanation: object = None, explanation_provider: object = None, **kwargs: object) -> NutritionProposal`
116 |     reconcile_weekly_nutrition_plan = None
117 |     render_customer_body = None
    |
info: Implicit shadowing of function `propose`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `def reconcile_weekly_nutrition_plan(parent: WeeklyNutritionPlan, effective_cycle: WeeklyCarbCycle, constraints: MealConstraints, catalog: VersionedFoodCatalog, *, actual_day: date, as_of_kst_day: date, exercise_evidence_digest: str) -> WeeklyNutritionPlan | None`
   --> gateway/platforms/nutrition_coaching.py:116:5
    |
114 |     canonical_json = None
115 |     propose = None
116 |     reconcile_weekly_nutrition_plan = None
    |     -------------------------------   ^^^^ Incompatible value of type `None`
    |     |
    |     Declared type `def reconcile_weekly_nutrition_plan(parent: WeeklyNutritionPlan, effective_cycle: WeeklyCarbCycle, constraints: MealConstraints, catalog: VersionedFoodCatalog, *, actual_day: date, as_of_kst_day: date, exercise_evidence_digest: str) -> WeeklyNutritionPlan | None`
117 |     render_customer_body = None
118 |     render_operator_card = None
    |
info: Implicit shadowing of function `reconcile_weekly_nutrition_plan`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `def render_customer_body(proposal: NutritionProposal) -> str`
   --> gateway/platforms/nutrition_coaching.py:117:5
    |
115 |     propose = None
116 |     reconcile_weekly_nutrition_plan = None
117 |     render_customer_body = None
    |     --------------------   ^^^^ Incompatible value of type `None`
    |     |
    |     Declared type `def render_customer_body(proposal: NutritionProposal) -> str`
118 |     render_operator_card = None
119 |     validate_explanation = None
    |
info: Implicit shadowing of function `render_customer_body`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `def render_operator_card(proposal: NutritionProposal) -> str`
   --> gateway/platforms/nutrition_coaching.py:118:5
    |
116 |     reconcile_weekly_nutrition_plan = None
117 |     render_customer_body = None
118 |     render_operator_card = None
    |     --------------------   ^^^^ Incompatible value of type `None`
    |     |
    |     Declared type `def render_operator_card(proposal: NutritionProposal) -> str`
119 |     validate_explanation = None
120 |     ApprovedAdaptiveArtifacts = None
    |
info: Implicit shadowing of function `render_operator_card`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `def validate_explanation(text: object, proposal: NutritionProposal, *, max_length: int = 1000) -> str`
   --> gateway/platforms/nutrition_coaching.py:119:5
    |
117 |     render_customer_body = None
118 |     render_operator_card = None
119 |     validate_explanation = None
    |     --------------------   ^^^^ Incompatible value of type `None`
    |     |
    |     Declared type `def validate_explanation(text: object, proposal: NutritionProposal, *, max_length: int = 1000) -> str`
120 |     ApprovedAdaptiveArtifacts = None
121 |     canonical_event_digest = None
    |
info: Implicit shadowing of function `validate_explanation`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `<class 'ApprovedAdaptiveArtifacts'>`
   --> gateway/platforms/nutrition_coaching.py:120:5
    |
118 |     render_operator_card = None
119 |     validate_explanation = None
120 |     ApprovedAdaptiveArtifacts = None
    |     -------------------------   ^^^^ Incompatible value of type `None`
    |     |
    |     Declared type `<class 'ApprovedAdaptiveArtifacts'>`
121 |     canonical_event_digest = None
122 |     canonical_event_records = None
    |
info: Implicit shadowing of class `ApprovedAdaptiveArtifacts`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `def canonical_event_digest(events: Iterable[object]) -> str`
   --> gateway/platforms/nutrition_coaching.py:121:5
    |
119 |     validate_explanation = None
120 |     ApprovedAdaptiveArtifacts = None
121 |     canonical_event_digest = None
    |     ----------------------   ^^^^ Incompatible value of type `None`
    |     |
    |     Declared type `def canonical_event_digest(events: Iterable[object]) -> str`
122 |     canonical_event_records = None
123 |     compile_meal_plan = None
    |
info: Implicit shadowing of function `canonical_event_digest`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `def canonical_event_records(events: Iterable[object]) -> tuple[Mapping[str, object], ...]`
   --> gateway/platforms/nutrition_coaching.py:122:5
    |
120 |     ApprovedAdaptiveArtifacts = None
121 |     canonical_event_digest = None
122 |     canonical_event_records = None
    |     -----------------------   ^^^^ Incompatible value of type `None`
    |     |
    |     Declared type `def canonical_event_records(events: Iterable[object]) -> tuple[Mapping[str, object], ...]`
123 |     compile_meal_plan = None
124 |     digest = None
    |
info: Implicit shadowing of function `canonical_event_records`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `def compile_meal_plan(target: MacroTarget, constraints: MealConstraints, catalog: VersionedFoodCatalog | Sequence[Food], *, shadow_test_only: bool = False) -> MealPlan | None`
   --> gateway/platforms/nutrition_coaching.py:123:5
    |
121 |     canonical_event_digest = None
122 |     canonical_event_records = None
123 |     compile_meal_plan = None
    |     -----------------   ^^^^ Incompatible value of type `None`
    |     |
    |     Declared type `def compile_meal_plan(target: MacroTarget, constraints: MealConstraints, catalog: VersionedFoodCatalog | Sequence[Food], *, shadow_test_only: bool = False) -> MealPlan | None`
124 |     digest = None
125 |     load_approved_adaptive_artifacts = None
    |
info: Implicit shadowing of function `compile_meal_plan`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `def digest(value: object) -> str`
   --> gateway/platforms/nutrition_coaching.py:124:5
    |
122 |     canonical_event_records = None
123 |     compile_meal_plan = None
124 |     digest = None
    |     ------   ^^^^ Incompatible value of type `None`
    |     |
    |     Declared type `def digest(value: object) -> str`
125 |     load_approved_adaptive_artifacts = None
126 |     load_verified_dual_coach_risk_policy = None
    |
info: Implicit shadowing of function `digest`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `def load_approved_adaptive_artifacts(data_root: Path) -> ApprovedAdaptiveArtifacts`
   --> gateway/platforms/nutrition_coaching.py:125:5
    |
123 |     compile_meal_plan = None
124 |     digest = None
125 |     load_approved_adaptive_artifacts = None
    |     --------------------------------   ^^^^ Incompatible value of type `None`
    |     |
    |     Declared type `def load_approved_adaptive_artifacts(data_root: Path) -> ApprovedAdaptiveArtifacts`
126 |     load_verified_dual_coach_risk_policy = None
127 |     project_canonical_events = None
    |
info: Implicit shadowing of function `load_approved_adaptive_artifacts`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `def load_verified_dual_coach_risk_policy(runtime: CustomerRuntime) -> DualCoachRiskPolicyV1`
   --> gateway/platforms/nutrition_coaching.py:126:5
    |
124 |     digest = None
125 |     load_approved_adaptive_artifacts = None
126 |     load_verified_dual_coach_risk_policy = None
    |     ------------------------------------   ^^^^ Incompatible value of type `None`
    |     |
    |     Declared type `def load_verified_dual_coach_risk_policy(runtime: CustomerRuntime) -> DualCoachRiskPolicyV1`
127 |     project_canonical_events = None
128 |     validate_typed_safety = None
    |
info: Implicit shadowing of function `load_verified_dual_coach_risk_policy`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `def project_canonical_events(events: Iterable[object], evaluation_day: date, starts_on: date) -> TrendSnapshot`
   --> gateway/platforms/nutrition_coaching.py:127:5
    |
125 |     load_approved_adaptive_artifacts = None
126 |     load_verified_dual_coach_risk_policy = None
127 |     project_canonical_events = None
    |     ------------------------   ^^^^ Incompatible value of type `None`
    |     |
    |     Declared type `def project_canonical_events(events: Iterable[object], evaluation_day: date, starts_on: date) -> TrendSnapshot`
128 |     validate_typed_safety = None
129 |     feature_config_digest = None
    |
info: Implicit shadowing of function `project_canonical_events`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `def validate_typed_safety(events: Iterable[object]) -> None`
   --> gateway/platforms/nutrition_coaching.py:128:5
    |
126 |     load_verified_dual_coach_risk_policy = None
127 |     project_canonical_events = None
128 |     validate_typed_safety = None
    |     ---------------------   ^^^^ Incompatible value of type `None`
    |     |
    |     Declared type `def validate_typed_safety(events: Iterable[object]) -> None`
129 |     feature_config_digest = None
130 |     solve_macros = None
    |
info: Implicit shadowing of function `validate_typed_safety`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `def solve_macros(calories: int, protein_g: int, fat_g: int) -> MacroTarget | None`
   --> gateway/platforms/nutrition_coaching.py:130:5
    |
128 |     validate_typed_safety = None
129 |     feature_config_digest = None
130 |     solve_macros = None
    |     ------------   ^^^^ Incompatible value of type `None`
    |     |
    |     Declared type `def solve_macros(calories: int, protein_g: int, fat_g: int) -> MacroTarget | None`
131 | try:
132 |     from checkin_cli.adaptive_nutrition import feature_config_digest
    |
info: Implicit shadowing of function `solve_macros`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `def feature_config_digest(epoch: object, flags: Mapping[str, object]) -> str`
   --> gateway/platforms/nutrition_coaching.py:134:5
    |
132 |     from checkin_cli.adaptive_nutrition import feature_config_digest
133 | except ImportError:
134 |     feature_config_digest = None
    |     ---------------------   ^^^^ Incompatible value of type `None`
    |     |
    |     Declared type `def feature_config_digest(epoch: object, flags: Mapping[str, object]) -> str`
135 | try:
136 |     from checkin_cli.adaptive_nutrition import (
    |
info: Implicit shadowing of function `feature_config_digest`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `<class 'CooldownResult'>`
   --> gateway/platforms/nutrition_coaching.py:144:5
    |
142 |     )
143 | except ImportError:
144 |     CooldownResult = None
    |     --------------   ^^^^ Incompatible value of type `None`
    |     |
    |     Declared type `<class 'CooldownResult'>`
145 |     DailyNutritionPlan = None
146 |     DailyNutritionTarget = None
    |
info: Implicit shadowing of class `CooldownResult`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `<class 'DailyNutritionPlan'>`
   --> gateway/platforms/nutrition_coaching.py:145:5
    |
143 | except ImportError:
144 |     CooldownResult = None
145 |     DailyNutritionPlan = None
    |     ------------------   ^^^^ Incompatible value of type `None`
    |     |
    |     Declared type `<class 'DailyNutritionPlan'>`
146 |     DailyNutritionTarget = None
147 |     WeeklyCarbCycle = None
    |
info: Implicit shadowing of class `DailyNutritionPlan`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `<class 'DailyNutritionTarget'>`
   --> gateway/platforms/nutrition_coaching.py:146:5
    |
144 |     CooldownResult = None
145 |     DailyNutritionPlan = None
146 |     DailyNutritionTarget = None
    |     --------------------   ^^^^ Incompatible value of type `None`
    |     |
    |     Declared type `<class 'DailyNutritionTarget'>`
147 |     WeeklyCarbCycle = None
148 |     WeeklyNutritionPlan = None
    |
info: Implicit shadowing of class `DailyNutritionTarget`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `<class 'WeeklyCarbCycle'>`
   --> gateway/platforms/nutrition_coaching.py:147:5
    |
145 |     DailyNutritionPlan = None
146 |     DailyNutritionTarget = None
147 |     WeeklyCarbCycle = None
    |     ---------------   ^^^^ Incompatible value of type `None`
    |     |
    |     Declared type `<class 'WeeklyCarbCycle'>`
148 |     WeeklyNutritionPlan = None
149 | try:
    |
info: Implicit shadowing of class `WeeklyCarbCycle`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `<class 'WeeklyNutritionPlan'>`
   --> gateway/platforms/nutrition_coaching.py:148:5
    |
146 |     DailyNutritionTarget = None
147 |     WeeklyCarbCycle = None
148 |     WeeklyNutritionPlan = None
    |     -------------------   ^^^^ Incompatible value of type `None`
    |     |
    |     Declared type `<class 'WeeklyNutritionPlan'>`
149 | try:
150 |     from checkin_cli.customer_admin import (
    |
info: Implicit shadowing of class `WeeklyNutritionPlan`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `def approve_dual_coach_risk_policy(profile_root: Path | str, customer_key: str, *, version: str, owner_actor: TelegramAddress, approved_at_kst: str | datetime | None = None) -> dict[str, object]`
   --> gateway/platforms/nutrition_coaching.py:164:5
    |
162 |     )
163 | except ImportError:
164 |     approve_dual_coach_risk_policy = None
    |     ------------------------------   ^^^^ Incompatible value of type `None`
    |     |
    |     Declared type `def approve_dual_coach_risk_policy(profile_root: Path | str, customer_key: str, *, version: str, owner_actor: TelegramAddress, approved_at_kst: str | datetime | None = None) -> dict[str, object]`
165 |     load_approved_adaptive_registration_inputs = None
166 |     reconcile_adaptive_nutrition_journals = None
    |
info: Implicit shadowing of function `approve_dual_coach_risk_policy`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `def load_approved_adaptive_registration_inputs(profile_root: Path, customer_key: str) -> AdaptiveRegistrationInputs`
   --> gateway/platforms/nutrition_coaching.py:165:5
    |
163 | except ImportError:
164 |     approve_dual_coach_risk_policy = None
165 |     load_approved_adaptive_registration_inputs = None
    |     ------------------------------------------   ^^^^ Incompatible value of type `None`
    |     |
    |     Declared type `def load_approved_adaptive_registration_inputs(profile_root: Path, customer_key: str) -> AdaptiveRegistrationInputs`
166 |     reconcile_adaptive_nutrition_journals = None
167 |     profile_authority_lock = None
    |
info: Implicit shadowing of function `load_approved_adaptive_registration_inputs`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `def reconcile_adaptive_nutrition_journals(profile_root: Path, customer_key: str, *, canonical_events: object, registry: object) -> Mapping[str, object]`
   --> gateway/platforms/nutrition_coaching.py:166:5
    |
164 |     approve_dual_coach_risk_policy = None
165 |     load_approved_adaptive_registration_inputs = None
166 |     reconcile_adaptive_nutrition_journals = None
    |     -------------------------------------   ^^^^ Incompatible value of type `None`
    |     |
    |     Declared type `def reconcile_adaptive_nutrition_journals(profile_root: Path, customer_key: str, *, canonical_events: object, registry: object) -> Mapping[str, object]`
167 |     profile_authority_lock = None
168 |     validate_adaptive_registration_reapproval = None
    |
info: Implicit shadowing of function `reconcile_adaptive_nutrition_journals`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `(profile_root: Path | str) -> _GeneratorContextManager[None, None, None]`
   --> gateway/platforms/nutrition_coaching.py:167:5
    |
165 |     load_approved_adaptive_registration_inputs = None
166 |     reconcile_adaptive_nutrition_journals = None
167 |     profile_authority_lock = None
    |     ----------------------   ^^^^ Incompatible value of type `None`
    |     |
    |     Declared type `(profile_root: Path | str) -> _GeneratorContextManager[None, None, None]`
168 |     validate_adaptive_registration_reapproval = None
169 |     validate_review_space_disjoint = None
    |
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `def validate_adaptive_registration_reapproval(profile_root: Path, customer_key: str, predecessor_digest: str) -> bool`
   --> gateway/platforms/nutrition_coaching.py:168:5
    |
166 |     reconcile_adaptive_nutrition_journals = None
167 |     profile_authority_lock = None
168 |     validate_adaptive_registration_reapproval = None
    |     -----------------------------------------   ^^^^ Incompatible value of type `None`
    |     |
    |     Declared type `def validate_adaptive_registration_reapproval(profile_root: Path, customer_key: str, predecessor_digest: str) -> bool`
169 |     validate_review_space_disjoint = None
170 |     AdaptiveRegistrationInputs = None
    |
info: Implicit shadowing of function `validate_adaptive_registration_reapproval`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `def validate_review_space_disjoint(review_operator: object, *, customer_routes: object = ..., owner_scheduled_routes: object = ..., generic_reserved_routes: object = ..., owner_routes: object = None, scheduled_routes: object = None, generic_routes: object = None) -> bool`
   --> gateway/platforms/nutrition_coaching.py:169:5
    |
167 |     profile_authority_lock = None
168 |     validate_adaptive_registration_reapproval = None
169 |     validate_review_space_disjoint = None
    |     ------------------------------   ^^^^ Incompatible value of type `None`
    |     |
    |     Declared type `def validate_review_space_disjoint(review_operator: object, *, customer_routes: object = ..., owner_scheduled_routes: object = ..., generic_reserved_routes: object = ..., owner_routes: object = None, scheduled_routes: object = None, generic_routes: object = None) -> bool`
170 |     AdaptiveRegistrationInputs = None
171 |     CustomerTrainingScheduleEntry = None
    |
info: Implicit shadowing of function `validate_review_space_disjoint`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `<class 'AdaptiveRegistrationInputs'>`
   --> gateway/platforms/nutrition_coaching.py:170:5
    |
168 |     validate_adaptive_registration_reapproval = None
169 |     validate_review_space_disjoint = None
170 |     AdaptiveRegistrationInputs = None
    |     --------------------------   ^^^^ Incompatible value of type `None`
    |     |
    |     Declared type `<class 'AdaptiveRegistrationInputs'>`
171 |     CustomerTrainingScheduleEntry = None
172 |     TelegramAddress = None
    |
info: Implicit shadowing of class `AdaptiveRegistrationInputs`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `<class 'CustomerTrainingScheduleEntry'>`
   --> gateway/platforms/nutrition_coaching.py:171:5
    |
169 |     validate_review_space_disjoint = None
170 |     AdaptiveRegistrationInputs = None
171 |     CustomerTrainingScheduleEntry = None
    |     -----------------------------   ^^^^ Incompatible value of type `None`
    |     |
    |     Declared type `<class 'CustomerTrainingScheduleEntry'>`
172 |     TelegramAddress = None
    |
info: Implicit shadowing of class `CustomerTrainingScheduleEntry`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `<class 'TelegramAddress'>`
   --> gateway/platforms/nutrition_coaching.py:172:5
    |
170 |     AdaptiveRegistrationInputs = None
171 |     CustomerTrainingScheduleEntry = None
172 |     TelegramAddress = None
    |     ---------------   ^^^^ Incompatible value of type `None`
    |     |
    |     Declared type `<class 'TelegramAddress'>`
173 |
174 | if TYPE_CHECKING:
    |
info: Implicit shadowing of class `TelegramAddress`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[unresolved-attribute]: Attribute `user_id` is not defined on `None` in union `Unknown | TrainerAssignment | None`
    --> gateway/platforms/nutrition_coaching.py:3255:17
     |
3253 |             for customer_key, resolved in self._by_key.items()
3254 |             if resolved.trainer_dm_bridge is not None
3255 |             and resolved.customer.spec.trainer.user_id == trainer_id
     |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3256 |         )
3257 |         return CustomerOnboardingCard("담당 고객을 선택해 주세요.", buttons)
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `user_id` is not defined on `None` in union `Unknown | TrainerAssignment | None`
    --> gateway/platforms/nutrition_coaching.py:3317:17
     |
3315 |             if resolved.trainer_dm_bridge is not None
3316 |             and getattr(resolved.customer.spec, "trainer", None) is not None
3317 |             and resolved.customer.spec.trainer.user_id == address.user_id
     |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3318 |             and resolved.trainer_dm_bridge.has_active_binding()
3319 |         )
     |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to function `set_customer_ai_consent` is incorrect
    --> gateway/platforms/nutrition_coaching.py:3603:13
     |
3601 |             return self._customer_consent_result(granted)
3602 |         set_customer_ai_consent(
3603 |             self._registry_path,
     |             ^^^^^^^^^^^^^^^^^^^ Expected `Path`, found `Unknown | Path | None`
3604 |             str(getattr(spec, "customer_key", "")),
3605 |             AiProcessingConsent(
     |
info: Element `None` of this union is not assignable to `Path`
info: Function defined here
   --> dualcoach/profile/checkin_cli/customer_admin.py:767:5
    |
767 | def set_customer_ai_consent(
    |     ^^^^^^^^^^^^^^^^^^^^^^^
768 |     path: Path, customer_key: str, consent: AiProcessingConsent
    |     ---------- Parameter declared here
769 | ) -> CustomerSpec:
770 |     with profile_authority_lock(_registry_profile_root(path)):
    |
info: rule `invalid-argument-type` is enabled by default

error[unresolved-attribute]: Attribute `spec` is not defined on `None` in union `Unknown | CustomerRuntime | None`
    --> gateway/platforms/nutrition_coaching.py:3654:18
     |
3652 |             resolved.customer.spec.customer_key
3653 |             if resolved is not None
3654 |             else pending_customer.spec.customer_key
     |                  ^^^^^^^^^^^^^^^^^^^^^
3655 |         )
3656 |         audit_date = self._transport_kst_date()
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `user_id` is not defined on `None` in union `Unknown | TrainerAssignment | None`
    --> gateway/platforms/nutrition_coaching.py:3868:17
     |
3866 |             if candidate.trainer_dm_bridge is not None
3867 |             and getattr(candidate.customer.spec, "trainer", None) is not None
3868 |             and candidate.customer.spec.trainer.user_id == incoming.address.user_id
     |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3869 |             and candidate.trainer_dm_bridge.has_binding(callback.session_id)
3870 |         )
     |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> gateway/platforms/nutrition_coaching.py:5299:31
     |
5297 |             artifacts = draft.get("coach_artifacts")
5298 |             persisted_receipt = (
5299 |                 artifacts.get("raw_coach_sha256")
     |                               ^^^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["raw_coach_sha256"]`
5300 |                 if isinstance(artifacts, Mapping)
5301 |                 else None
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[no-matching-overload]: No overload of bound method `get` matches arguments
    --> gateway/platforms/nutrition_coaching.py:6909:20
     |
6907 |     def _field(value: object, name: str, default: object = None) -> object:
6908 |         if isinstance(value, Mapping):
6909 |             return value.get(name, default)
     |                    ^^^^^^^^^^^^^^^^^^^^^^^^
6910 |         return getattr(value, name, default)
6911 |     def _current_customer(self, customer_key: str, fallback: CustomerRuntime) -> CustomerRuntime:
     |
info: First overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Possible overloads for bound method `get`:
info:   (self, key: _KT@Mapping, /) -> _VT_co@Mapping | None
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `no-matching-overload` is enabled by default

error[no-matching-overload]: No overload of bound method `get` matches arguments
    --> gateway/platforms/nutrition_coaching.py:7035:20
     |
7033 |     def _event_field(value: object, name: str, default: object = None) -> object:
7034 |         if isinstance(value, Mapping):
7035 |             return value.get(name, default)
     |                    ^^^^^^^^^^^^^^^^^^^^^^^^
7036 |         return getattr(value, name, default)
     |
info: First overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Possible overloads for bound method `get`:
info:   (self, key: _KT@Mapping, /) -> _VT_co@Mapping | None
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `no-matching-overload` is enabled by default

error[unresolved-attribute]: Object of type `~None` has no attribute `event_id`
     --> gateway/platforms/nutrition_coaching.py:10061:13
      |
10059 |             raise AdaptiveWorkflowError("adaptive schedule confirmation reference is unavailable")
10060 |         return ScheduleConfirmationReference(
10061 |             event.event_id,
      |             ^^^^^^^^^^^^^^
10062 |             CanonicalEventTransaction.schedule_reference_digest(event),
10063 |         )
      |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to function `schedule_reference_digest` is incorrect
     --> gateway/platforms/nutrition_coaching.py:10062:65
      |
10060 |         return ScheduleConfirmationReference(
10061 |             event.event_id,
10062 |             CanonicalEventTransaction.schedule_reference_digest(event),
      |                                                                 ^^^^^ Expected `Event`, found `~None`
10063 |         )
      |
info: Function defined here
   --> dualcoach/profile/checkin_cli/store.py:363:9
    |
362 |     @staticmethod
363 |     def schedule_reference_digest(event: Event) -> str:
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^ ------------ Parameter declared here
364 |         if event.event_type not in {EventType.SCHEDULE_REFERENCE, EventType.SCHEDULE_CORRECTION}:
365 |             raise ValueError("event is not a schedule reference")
    |
info: rule `invalid-argument-type` is enabled by default

error[no-matching-overload]: No overload of bound method `get` matches arguments
     --> gateway/platforms/nutrition_coaching.py:10143:22
      |
10141 |     """Map durable delivery outcomes to Korean no-retry-safe operator text."""
10142 |     payload = result if isinstance(result, Mapping) else {}
10143 |     event_type = str(payload.get("event_type", payload.get("status", "")) or "")
      |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10144 |     if event_type == "delivery_preflight_rejected":
10145 |         return "고객 전송 전에 안전하게 중단되었습니다. 최신 검토 카드에서 다시 시도해 주세요."
      |
info: First overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Possible overloads for bound method `get`:
info:   (self, key: _KT@Mapping, /) -> _VT_co@Mapping | None
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `no-matching-overload` is enabled by default

error[no-matching-overload]: No overload of bound method `get` matches arguments
     --> gateway/platforms/nutrition_coaching.py:10143:48
      |
10141 |     """Map durable delivery outcomes to Korean no-retry-safe operator text."""
10142 |     payload = result if isinstance(result, Mapping) else {}
10143 |     event_type = str(payload.get("event_type", payload.get("status", "")) or "")
      |                                                ^^^^^^^^^^^^^^^^^^^^^^^^^
10144 |     if event_type == "delivery_preflight_rejected":
10145 |         return "고객 전송 전에 안전하게 중단되었습니다. 최신 검토 카드에서 다시 시도해 주세요."
      |
info: First overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Possible overloads for bound method `get`:
info:   (self, key: _KT@Mapping, /) -> _VT_co@Mapping | None
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `no-matching-overload` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:10146:69
      |
10144 |     if event_type == "delivery_preflight_rejected":
10145 |         return "고객 전송 전에 안전하게 중단되었습니다. 최신 검토 카드에서 다시 시도해 주세요."
10146 |     if event_type in {"delivery_unknown", "unknown"} or payload.get("unknown") is True:
      |                                                                     ^^^^^^^^^ Expected `Never`, found `Literal["unknown"]`
10147 |         return "전송 결과를 확인할 수 없습니다. 다시 보내지 마세요. 조정이 필요합니다."
10148 |     if event_type in {"audit_pending", "delivered_audit_pending"} or payload.get("audit_pending") is True:
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:10148:82
      |
10146 |     if event_type in {"delivery_unknown", "unknown"} or payload.get("unknown") is True:
10147 |         return "전송 결과를 확인할 수 없습니다. 다시 보내지 마세요. 조정이 필요합니다."
10148 |     if event_type in {"audit_pending", "delivered_audit_pending"} or payload.get("audit_pending") is True:
      |                                                                                  ^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["audit_pending"]`
10149 |         return "고객 전송 영수증은 확인됐습니다. 재전송하지 말고 감사 기록을 복구해 주세요."
10150 |     if event_type in {"duplicate", "already_attempted"} or payload.get("duplicate") is True:
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:10150:72
      |
10148 |     if event_type in {"audit_pending", "delivered_audit_pending"} or payload.get("audit_pending") is True:
10149 |         return "고객 전송 영수증은 확인됐습니다. 재전송하지 말고 감사 기록을 복구해 주세요."
10150 |     if event_type in {"duplicate", "already_attempted"} or payload.get("duplicate") is True:
      |                                                                        ^^^^^^^^^^^ Expected `Never`, found `Literal["duplicate"]`
10151 |         return "이미 처리된 전송입니다."
10152 |     if event_type in {"delivered", "sent_audited", "success"}:
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:10166:40
      |
10164 |             "event_type": "sent_audited",
10165 |             "status": "sent_audited",
10166 |             "delivery_id": payload.get("delivery_id"),
      |                                        ^^^^^^^^^^^^^ Expected `Never`, found `Literal["delivery_id"]`
10167 |             "provider_receipt": payload.get("provider_receipt")
10168 |             or payload.get("message_id"),
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:10167:45
      |
10165 |             "status": "sent_audited",
10166 |             "delivery_id": payload.get("delivery_id"),
10167 |             "provider_receipt": payload.get("provider_receipt")
      |                                             ^^^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["provider_receipt"]`
10168 |             or payload.get("message_id"),
10169 |             "text": adaptive_delivery_result_text({"event_type": "sent_audited"}),
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:10168:28
      |
10166 |             "delivery_id": payload.get("delivery_id"),
10167 |             "provider_receipt": payload.get("provider_receipt")
10168 |             or payload.get("message_id"),
      |                            ^^^^^^^^^^^^ Expected `Never`, found `Literal["message_id"]`
10169 |             "text": adaptive_delivery_result_text({"event_type": "sent_audited"}),
10170 |         }
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-assignment]: Invalid subscript assignment with key of type `str` and value of type `dict[str, str | dict[str, object]]` on object of type `dict[str, dict[str, object]]`
     --> gateway/platforms/nutrition_coaching.py:10290:13
      |
10288 |                     "adaptive Coach authority already exists"
10289 |                 )
10290 |             records[proposal_digest] = record
      |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^------
      |                                        |
      |                                        Expected value of type `dict[str, object]`, got `dict[str, str | dict[str, object]]`
10291 |             self._write_private_json(
10292 |                 self._coach_authority_path,
      |
info: rule `invalid-assignment` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:10507:33
      |
10505 |         raw = getattr(candidate, "key", candidate)
10506 |         if isinstance(raw, Mapping):
10507 |             raw = tuple(raw.get(field) for field in ("user_id", "chat_id", "topic_id"))
      |                                 ^^^^^ Expected `Never`, found `Literal["user_id", "chat_id", "topic_id"]`
10508 |         if not isinstance(raw, (tuple, list)) or len(raw) != 3:
10509 |             raise AdaptiveWorkflowError("adaptive review operator is incomplete")
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-return-type]: Return type does not match returned value
     --> gateway/platforms/nutrition_coaching.py:10513:16
      |
10511 |         if not all(key) or key[2] != str(OPERATOR_REVIEW_TOPIC_ID):
10512 |             raise AdaptiveWorkflowError("adaptive review operator is invalid")
10513 |         return key
      |                ^^^ expected `tuple[str, str, str]`, found `tuple[str, ...]`
10514 |
10515 |     @staticmethod
      |
     ::: gateway/platforms/nutrition_coaching.py:10503:41
      |
10502 |     @staticmethod
10503 |     def _review_tuple(value: object) -> tuple[str, str, str]:
      |                                         -------------------- Expected `tuple[str, str, str]` because of return type
10504 |         candidate = getattr(value, "review_operator", value)
10505 |         raw = getattr(candidate, "key", candidate)
      |
info: rule `invalid-return-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:10520:37
      |
10518 |         version = getattr(candidate, "version", None)
10519 |         if isinstance(candidate, Mapping):
10520 |             version = candidate.get("version")
      |                                     ^^^^^^^^^ Expected `Never`, found `Literal["version"]`
10521 |         if isinstance(version, bool) or not isinstance(version, int) or version < 1:
10522 |             raise AdaptiveWorkflowError("adaptive review operator version is invalid")
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:10529:33
      |
10527 |         raw = getattr(value, "key", value)
10528 |         if isinstance(raw, Mapping):
10529 |             raw = tuple(raw.get(field) for field in ("user_id", "chat_id", "topic_id"))
      |                                 ^^^^^ Expected `Never`, found `Literal["user_id", "chat_id", "topic_id"]`
10530 |         if not isinstance(raw, (tuple, list)) or len(raw) != 3:
10531 |             return None
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-return-type]: Return type does not match returned value
     --> gateway/platforms/nutrition_coaching.py:10533:16
      |
10531 |             return None
10532 |         key = tuple(str(item).strip() for item in raw)
10533 |         return key if all(key) else None
      |                ^^^^^^^^^^^^^^^^^^^^^^^^^ expected `tuple[str, str, str] | None`, found `tuple[str, ...] | None`
10534 |
10535 |     def accepts(self, address: object) -> bool:
      |
     ::: gateway/platforms/nutrition_coaching.py:10526:40
      |
10525 |     @staticmethod
10526 |     def _address_key(value: object) -> tuple[str, str, str] | None:
      |                                        --------------------------- Expected `tuple[str, str, str] | None` because of return type
10527 |         raw = getattr(value, "key", value)
10528 |         if isinstance(raw, Mapping):
      |
info: rule `invalid-return-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:10822:13
      |
10820 |                 scalar=True,
10821 |             ),
10822 |             decision=decision,
      |             ^^^^^^^^^^^^^^^^^ Expected `str`, found `str | None`
10823 |             reason_category_ids=reasons,
10824 |             current_targets=current_targets,
      |
info: Element `None` of this union is not assignable to `str`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:10830:13
      |
10828 |             approval_state=approval_state,
10829 |             delivery_state=delivery_state,
10830 |             proposal_digest=digest_value,
      |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `object`
10831 |             revision=revision,
10832 |             revision_binding_digest="",
      |
info: rule `invalid-argument-type` is enabled by default

error[no-matching-overload]: No overload of function `compare_digest` matches arguments
     --> gateway/platforms/nutrition_coaching.py:10872:16
      |
10870 |           except Exception:
10871 |               return False
10872 |           return hmac.compare_digest(
      |  ________________^
10873 | |             facts.revision_binding_digest,
10874 | |             expected_revision_binding_digest,
10875 | |         )
      | |_________^
10876 |       def _pins(
10877 |           self,
      |
info: First overload defined here
   --> stdlib/_hashlib.pyi:127:5
    |
126 | @overload
127 | def compare_digest(a: ReadableBuffer, b: ReadableBuffer, /) -> bool:
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
128 |     """Return 'a == b'.
    |
info: Possible overloads for function `compare_digest`:
info:   (a: Buffer, b: Buffer, /) -> bool
info:   [AnyStr](a: AnyStr, b: AnyStr, /) -> bool
info: rule `no-matching-overload` is enabled by default

error[invalid-argument-type]: Argument to function `len` is incorrect
     --> gateway/platforms/nutrition_coaching.py:11148:72
      |
11146 |                     if row.get(field) != "":
11147 |                         raise AdaptiveWorkflowError("adaptive operator pre-proposal pin is invalid")
11148 |             if not isinstance(row.get("review_operator"), list) or len(row["review_operator"]) != 3:
      |                                                                        ^^^^^^^^^^^^^^^^^^^^^^ Expected `Sized`, found `object`
11149 |                 raise AdaptiveWorkflowError("adaptive operator session provenance is invalid")
11150 |             review = tuple(str(value).strip() for value in row["review_operator"])
      |
info: Function defined here
    --> stdlib/builtins.pyi:3784:5
     |
3782 |     """
3783 |
3784 | def len(obj: Sized, /) -> int:
     |     ^^^ ---------- Parameter declared here
3785 |     """Return the number of items in a container."""
     |
info: rule `invalid-argument-type` is enabled by default

error[not-iterable]: Object of type `object` is not iterable
     --> gateway/platforms/nutrition_coaching.py:11150:60
      |
11148 |             if not isinstance(row.get("review_operator"), list) or len(row["review_operator"]) != 3:
11149 |                 raise AdaptiveWorkflowError("adaptive operator session provenance is invalid")
11150 |             review = tuple(str(value).strip() for value in row["review_operator"])
      |                                                            ^^^^^^^^^^^^^^^^^^^^^^
11151 |             if review != self.review_operator:
11152 |                 raise AdaptiveWorkflowError("adaptive operator session provenance is stale")
      |
info: It doesn't have an `__iter__` method or a `__getitem__` method
info: rule `not-iterable` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `strip`
     --> gateway/platforms/nutrition_coaching.py:11159:63
      |
11157 |                 raise AdaptiveWorkflowError("adaptive operator session provenance is stale")
11158 |             for field in ("originating_message_id", "originating_chat_id", "originating_topic_id"):
11159 |                 if not isinstance(row.get(field), str) or not row[field].strip():
      |                                                               ^^^^^^^^^^^^^^^^
11160 |                     raise AdaptiveWorkflowError("adaptive operator session provenance is invalid")
11161 |             if (
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `strip`
     --> gateway/platforms/nutrition_coaching.py:11225:80
      |
11223 |                 raise AdaptiveWorkflowError("adaptive review card publication payload is invalid")
11224 |             if state == "published":
11225 |                 if not isinstance(row.get("published_message_id"), str) or not row["published_message_id"].strip():
      |                                                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11226 |                     raise AdaptiveWorkflowError("adaptive review card publication receipt is invalid")
11227 |             if state == "publish_claimed":
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `strip`
     --> gateway/platforms/nutrition_coaching.py:11228:68
      |
11226 |                     raise AdaptiveWorkflowError("adaptive review card publication receipt is invalid")
11227 |             if state == "publish_claimed":
11228 |                 if not isinstance(row.get("claim_id"), str) or not row["claim_id"].strip():
      |                                                                    ^^^^^^^^^^^^^^^^^^^^^
11229 |                     raise AdaptiveWorkflowError("adaptive review card publication claim is invalid")
11230 |             latest_by_session[session_id] = row
      |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to bound method `_issue` is incorrect
     --> gateway/platforms/nutrition_coaching.py:11412:28
      |
11411 |     def issue_session(self, **kwargs: object) -> str:
11412 |         return self._issue(**kwargs)
      |                            ^^^^^^^^ Expected `str`, found `object`
      |
info: Method defined here
     --> gateway/platforms/nutrition_coaching.py:11295:9
      |
11293 |         return hashlib.sha256(os.urandom(32)).hexdigest()[:24]
11294 |
11295 |     def _issue(
      |         ^^^^^^
11296 |         self,
11297 |         *,
11298 |         action: str,
      |         ----------- Parameter declared here
11299 |         customer_key: str,
11300 |         proposal_digest: str | None = None,
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `_issue` is incorrect
     --> gateway/platforms/nutrition_coaching.py:11412:28
      |
11411 |     def issue_session(self, **kwargs: object) -> str:
11412 |         return self._issue(**kwargs)
      |                            ^^^^^^^^ Expected `str`, found `object`
      |
info: Method defined here
     --> gateway/platforms/nutrition_coaching.py:11295:9
      |
11293 |         return hashlib.sha256(os.urandom(32)).hexdigest()[:24]
11294 |
11295 |     def _issue(
      |         ^^^^^^
11296 |         self,
11297 |         *,
11298 |         action: str,
11299 |         customer_key: str,
      |         ----------------- Parameter declared here
11300 |         proposal_digest: str | None = None,
11301 |         revision: int | None = None,
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `_issue` is incorrect
     --> gateway/platforms/nutrition_coaching.py:11412:28
      |
11411 |     def issue_session(self, **kwargs: object) -> str:
11412 |         return self._issue(**kwargs)
      |                            ^^^^^^^^ Expected `str | None`, found `object`
      |
info: Method defined here
     --> gateway/platforms/nutrition_coaching.py:11295:9
      |
11293 |         return hashlib.sha256(os.urandom(32)).hexdigest()[:24]
11294 |
11295 |     def _issue(
      |         ^^^^^^
11296 |         self,
11297 |         *,
11298 |         action: str,
11299 |         customer_key: str,
11300 |         proposal_digest: str | None = None,
      |         ---------------------------------- Parameter declared here
11301 |         revision: int | None = None,
11302 |         source_digest: str = "",
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `_issue` is incorrect
     --> gateway/platforms/nutrition_coaching.py:11412:28
      |
11411 |     def issue_session(self, **kwargs: object) -> str:
11412 |         return self._issue(**kwargs)
      |                            ^^^^^^^^ Expected `int | None`, found `object`
      |
info: Method defined here
     --> gateway/platforms/nutrition_coaching.py:11295:9
      |
11293 |         return hashlib.sha256(os.urandom(32)).hexdigest()[:24]
11294 |
11295 |     def _issue(
      |         ^^^^^^
11296 |         self,
11297 |         *,
      |
     ::: gateway/platforms/nutrition_coaching.py:11301:9
      |
11299 |         customer_key: str,
11300 |         proposal_digest: str | None = None,
11301 |         revision: int | None = None,
      |         --------------------------- Parameter declared here
11302 |         source_digest: str = "",
11303 |         registration_digest: str = "",
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `_issue` is incorrect
     --> gateway/platforms/nutrition_coaching.py:11412:28
      |
11411 |     def issue_session(self, **kwargs: object) -> str:
11412 |         return self._issue(**kwargs)
      |                            ^^^^^^^^ Expected `str`, found `object`
      |
info: Method defined here
     --> gateway/platforms/nutrition_coaching.py:11295:9
      |
11293 |         return hashlib.sha256(os.urandom(32)).hexdigest()[:24]
11294 |
11295 |     def _issue(
      |         ^^^^^^
11296 |         self,
11297 |         *,
      |
     ::: gateway/platforms/nutrition_coaching.py:11302:9
      |
11300 |         proposal_digest: str | None = None,
11301 |         revision: int | None = None,
11302 |         source_digest: str = "",
      |         ----------------------- Parameter declared here
11303 |         registration_digest: str = "",
11304 |         originating_message_id: object = "",
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `_issue` is incorrect
     --> gateway/platforms/nutrition_coaching.py:11412:28
      |
11411 |     def issue_session(self, **kwargs: object) -> str:
11412 |         return self._issue(**kwargs)
      |                            ^^^^^^^^ Expected `str`, found `object`
      |
info: Method defined here
     --> gateway/platforms/nutrition_coaching.py:11295:9
      |
11293 |         return hashlib.sha256(os.urandom(32)).hexdigest()[:24]
11294 |
11295 |     def _issue(
      |         ^^^^^^
11296 |         self,
11297 |         *,
      |
     ::: gateway/platforms/nutrition_coaching.py:11303:9
      |
11301 |         revision: int | None = None,
11302 |         source_digest: str = "",
11303 |         registration_digest: str = "",
      |         ----------------------------- Parameter declared here
11304 |         originating_message_id: object = "",
11305 |         originating_chat_id: object = "",
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `_issue` is incorrect
     --> gateway/platforms/nutrition_coaching.py:11412:28
      |
11411 |     def issue_session(self, **kwargs: object) -> str:
11412 |         return self._issue(**kwargs)
      |                            ^^^^^^^^ Expected `str | None`, found `object`
      |
info: Method defined here
     --> gateway/platforms/nutrition_coaching.py:11295:9
      |
11293 |         return hashlib.sha256(os.urandom(32)).hexdigest()[:24]
11294 |
11295 |     def _issue(
      |         ^^^^^^
11296 |         self,
11297 |         *,
      |
     ::: gateway/platforms/nutrition_coaching.py:11307:9
      |
11305 |         originating_chat_id: object = "",
11306 |         originating_topic_id: object = 59,
11307 |         predecessor: str | None = None,
      |         ------------------------------ Parameter declared here
11308 |         confirmation_group_id: str | None = None,
11309 |     ) -> str:
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `_issue` is incorrect
     --> gateway/platforms/nutrition_coaching.py:11412:28
      |
11411 |     def issue_session(self, **kwargs: object) -> str:
11412 |         return self._issue(**kwargs)
      |                            ^^^^^^^^ Expected `str | None`, found `object`
      |
info: Method defined here
     --> gateway/platforms/nutrition_coaching.py:11295:9
      |
11293 |         return hashlib.sha256(os.urandom(32)).hexdigest()[:24]
11294 |
11295 |     def _issue(
      |         ^^^^^^
11296 |         self,
11297 |         *,
      |
     ::: gateway/platforms/nutrition_coaching.py:11308:9
      |
11306 |         originating_topic_id: object = 59,
11307 |         predecessor: str | None = None,
11308 |         confirmation_group_id: str | None = None,
      |         ---------------------------------------- Parameter declared here
11309 |     ) -> str:
11310 |         if action not in _ADAPTIVE_ACTIONS:
      |
info: rule `invalid-argument-type` is enabled by default

error[no-matching-overload]: No overload of bound method `get` matches arguments
     --> gateway/platforms/nutrition_coaching.py:11422:13
      |
11420 |         payload = result if isinstance(result, Mapping) else {}
11421 |         terminal_state = str(
11422 |             payload.get("event_type", payload.get("status", "")) or ""
      |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11423 |         )
11424 |         if terminal_state not in {
      |
info: First overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Possible overloads for bound method `get`:
info:   (self, key: _KT@Mapping, /) -> _VT_co@Mapping | None
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `no-matching-overload` is enabled by default

error[no-matching-overload]: No overload of bound method `get` matches arguments
     --> gateway/platforms/nutrition_coaching.py:11422:39
      |
11420 |         payload = result if isinstance(result, Mapping) else {}
11421 |         terminal_state = str(
11422 |             payload.get("event_type", payload.get("status", "")) or ""
      |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^
11423 |         )
11424 |         if terminal_state not in {
      |
info: First overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Possible overloads for bound method `get`:
info:   (self, key: _KT@Mapping, /) -> _VT_co@Mapping | None
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `no-matching-overload` is enabled by default

error[invalid-argument-type]: Argument to function `__new__` is incorrect
     --> gateway/platforms/nutrition_coaching.py:11454:42
      |
11452 | …                     customer_key=str(session["customer_key"]),
11453 | …                     proposal_digest=str(session["proposal_digest"]),
11454 | …                     revision=int(session["revision"]),
      |                                    ^^^^^^^^^^^^^^^^^^^ Expected `str | Buffer | SupportsInt | SupportsIndex | SupportsTrunc`, found `object`
11455 | …                     source_digest=str(session.get("source_digest", "") or ""),
11456 | …                     registration_digest=str(
      |
info: Matching overload defined here
   --> stdlib/builtins.pyi:366:9
    |
365 |     @overload
366 |     def __new__(cls, x: ConvertibleToInt = 0, /) -> Self: ...
    |         ^^^^^^^      ----------------------- Parameter declared here
367 |     @overload
368 |     def __new__(cls, x: str | bytes | bytearray, /, base: SupportsIndex) -> Self: ...
    |
info: Non-matching overloads for function `__new__`:
info:   [Self](cls, x: str | bytes | bytearray, /, base: SupportsIndex) -> Self
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:11521:26
      |
11519 |     def _publish_receipt(value: object) -> str:
11520 |         if isinstance(value, Mapping):
11521 |             if value.get("ok") is False or value.get("success") is False:
      |                          ^^^^ Expected `Never`, found `Literal["ok"]`
11522 |                 return ""
11523 |             value = value.get("message_id", value.get("id"))
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:11521:54
      |
11519 |     def _publish_receipt(value: object) -> str:
11520 |         if isinstance(value, Mapping):
11521 |             if value.get("ok") is False or value.get("success") is False:
      |                                                      ^^^^^^^^^ Expected `Never`, found `Literal["success"]`
11522 |                 return ""
11523 |             value = value.get("message_id", value.get("id"))
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[no-matching-overload]: No overload of bound method `get` matches arguments
     --> gateway/platforms/nutrition_coaching.py:11523:21
      |
11521 |             if value.get("ok") is False or value.get("success") is False:
11522 |                 return ""
11523 |             value = value.get("message_id", value.get("id"))
      |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11524 |         else:
11525 |             if getattr(value, "ok", True) is False or getattr(value, "success", True) is False:
      |
info: First overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Possible overloads for bound method `get`:
info:   (self, key: _KT@Mapping, /) -> _VT_co@Mapping | None
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `no-matching-overload` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:11523:55
      |
11521 |             if value.get("ok") is False or value.get("success") is False:
11522 |                 return ""
11523 |             value = value.get("message_id", value.get("id"))
      |                                                       ^^^^ Expected `Never`, found `Literal["id"]`
11524 |         else:
11525 |             if getattr(value, "ok", True) is False or getattr(value, "success", True) is False:
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:11536:26
      |
11534 |         if not isinstance(value, Mapping):
11535 |             raise AdaptiveWorkflowError("adaptive review card payload is invalid")
11536 |         text = value.get("text")
      |                          ^^^^^^ Expected `Never`, found `Literal["text"]`
11537 |         if (
11538 |             not isinstance(text, str)
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:11543:22
      |
11541 |         ):
11542 |             raise AdaptiveWorkflowError("adaptive review card text is invalid")
11543 |         if value.get("status") == "card":
      |                      ^^^^^^^^ Expected `Never`, found `Literal["status"]`
11544 |             envelope = value.get("envelope")
11545 |             if not isinstance(envelope, Mapping):
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:11544:34
      |
11542 |             raise AdaptiveWorkflowError("adaptive review card text is invalid")
11543 |         if value.get("status") == "card":
11544 |             envelope = value.get("envelope")
      |                                  ^^^^^^^^^^ Expected `Never`, found `Literal["envelope"]`
11545 |             if not isinstance(envelope, Mapping):
11546 |                 raise AdaptiveWorkflowError("adaptive review card envelope is invalid")
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:11560:38
      |
11558 |                     "adaptive review card envelope is invalid"
11559 |                 )
11560 |             customer_key = value.get("customer_key")
      |                                      ^^^^^^^^^^^^^^ Expected `Never`, found `Literal["customer_key"]`
11561 |             proposal_digest = value.get("proposal_digest")
11562 |             revision = value.get("revision")
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:11561:41
      |
11559 |                 )
11560 |             customer_key = value.get("customer_key")
11561 |             proposal_digest = value.get("proposal_digest")
      |                                         ^^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["proposal_digest"]`
11562 |             revision = value.get("revision")
11563 |             lifecycle_state = value.get("lifecycle_state")
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:11562:34
      |
11560 |             customer_key = value.get("customer_key")
11561 |             proposal_digest = value.get("proposal_digest")
11562 |             revision = value.get("revision")
      |                                  ^^^^^^^^^^ Expected `Never`, found `Literal["revision"]`
11563 |             lifecycle_state = value.get("lifecycle_state")
11564 |             customer_preview = value.get("customer_preview")
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:11563:41
      |
11561 |             proposal_digest = value.get("proposal_digest")
11562 |             revision = value.get("revision")
11563 |             lifecycle_state = value.get("lifecycle_state")
      |                                         ^^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["lifecycle_state"]`
11564 |             customer_preview = value.get("customer_preview")
11565 |             preview_digest = value.get("customer_preview_digest")
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:11564:42
      |
11562 |             revision = value.get("revision")
11563 |             lifecycle_state = value.get("lifecycle_state")
11564 |             customer_preview = value.get("customer_preview")
      |                                          ^^^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["customer_preview"]`
11565 |             preview_digest = value.get("customer_preview_digest")
11566 |             if (
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:11565:40
      |
11563 |             lifecycle_state = value.get("lifecycle_state")
11564 |             customer_preview = value.get("customer_preview")
11565 |             preview_digest = value.get("customer_preview_digest")
      |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["customer_preview_digest"]`
11566 |             if (
11567 |                 not isinstance(customer_key, str)
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[no-matching-overload]: No overload of bound method `get` matches arguments
     --> gateway/platforms/nutrition_coaching.py:11624:23
      |
11622 |                     "adaptive review card authority is stale"
11623 |                 )
11624 |         raw_buttons = value.get("buttons", [])
      |                       ^^^^^^^^^^^^^^^^^^^^^^^^
11625 |         if not isinstance(raw_buttons, list):
11626 |             raise AdaptiveWorkflowError("adaptive review card buttons are invalid")
      |
info: First overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Possible overloads for bound method `get`:
info:   (self, key: _KT@Mapping, /) -> _VT_co@Mapping | None
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `no-matching-overload` is enabled by default

error[not-iterable]: Object of type `object` is not iterable
     --> gateway/platforms/nutrition_coaching.py:11660:21
      |
11658 |         payload = self._validated_card_payload(card_payload)
11659 |         result: list[tuple[str, str]] = []
11660 |         for item in payload["buttons"]:
      |                     ^^^^^^^^^^^^^^^^^^
11661 |             if isinstance(item, Mapping):
11662 |                 callback_data = str(item["callback_data"])
      |
info: It doesn't have an `__iter__` method or a `__getitem__` method
info: rule `not-iterable` is enabled by default

error[unresolved-attribute]: Object of type `~None` has no attribute `user_id`
     --> gateway/platforms/nutrition_coaching.py:12197:43
      |
12195 |         if (
12196 |             owner is None
12197 |             or self.review_operator[0] != owner.user_id
      |                                           ^^^^^^^^^^^^^
12198 |             or not self._risk_policy_needs_approval(customer_key)
12199 |         ):
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-reference]: Name `SimpleNamespace` used when not defined
     --> gateway/platforms/nutrition_coaching.py:12265:32
      |
12263 |                         else None
12264 |                     )
12265 |                     customer = SimpleNamespace(spec=candidate)
      |                                ^^^^^^^^^^^^^^^
12266 |                 except Exception:
12267 |                     customer = None
      |
info: rule `unresolved-reference` is enabled by default

error[unresolved-attribute]: Object of type `~None` has no attribute `user_id`
     --> gateway/platforms/nutrition_coaching.py:12413:39
      |
12411 |         if owner is None:
12412 |             raise AdaptiveWorkflowError("adaptive risk policy owner is unavailable")
12413 |         if self.review_operator[0] != owner.user_id:
      |                                       ^^^^^^^^^^^^^
12414 |             raise AdaptiveWorkflowError("adaptive risk policy approval requires the owner")
12415 |         try:
      |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to function `approve_dual_coach_risk_policy` is incorrect
     --> gateway/platforms/nutrition_coaching.py:12420:17
      |
12418 |                 customer_key,
12419 |                 version="1.0",
12420 |                 owner_actor=owner,
      |                 ^^^^^^^^^^^^^^^^^ Expected `TelegramAddress`, found `~None`
12421 |                 approved_at_kst=self._now_provider(),
12422 |             )
      |
info: Function defined here
   --> dualcoach/profile/checkin_cli/customer_admin.py:105:5
    |
105 | def approve_dual_coach_risk_policy(
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
106 |     profile_root: Path | str,
107 |     customer_key: str,
108 |     *,
109 |     version: str,
110 |     owner_actor: TelegramAddress,
    |     ---------------------------- Parameter declared here
111 |     approved_at_kst: str | datetime | None = None,
112 | ) -> dict[str, object]:
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `__new__` is incorrect
     --> gateway/platforms/nutrition_coaching.py:12732:26
      |
12730 |             customer_key=str(session["customer_key"]),
12731 |             proposal_digest=str(session["proposal_digest"]),
12732 |             revision=int(session["revision"]),
      |                          ^^^^^^^^^^^^^^^^^^^ Expected `str | Buffer | SupportsInt | SupportsIndex | SupportsTrunc`, found `object`
12733 |             source_digest=str(session.get("source_digest", "") or ""),
12734 |             registration_digest=str(session.get("registration_digest", "") or ""),
      |
info: Matching overload defined here
   --> stdlib/builtins.pyi:366:9
    |
365 |     @overload
366 |     def __new__(cls, x: ConvertibleToInt = 0, /) -> Self: ...
    |         ^^^^^^^      ----------------------- Parameter declared here
367 |     @overload
368 |     def __new__(cls, x: str | bytes | bytearray, /, base: SupportsIndex) -> Self: ...
    |
info: Non-matching overloads for function `__new__`:
info:   [Self](cls, x: str | bytes | bytearray, /, base: SupportsIndex) -> Self
info: rule `invalid-argument-type` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `store`
     --> gateway/platforms/nutrition_coaching.py:12758:20
      |
12756 |         try:
12757 |             reference = self._schedule_reference(customer_key)
12758 |             rows = adaptive.store.read()
      |                    ^^^^^^^^^^^^^^
12759 |         except (AdaptiveWorkflowError, AttributeError, OSError, TypeError, ValueError):
12760 |             return False
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `_proposal_for_digest`
     --> gateway/platforms/nutrition_coaching.py:12777:20
      |
12775 |     ) -> Mapping[str, object]:
12776 |         """Render the exact customer payload and mint one confirmation choice."""
12777 |         proposal = adaptive._proposal_for_digest(proposal_digest)
      |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12778 |         preview = adaptive.preview_registered_daily_projection(proposal)
12779 |         if not isinstance(preview, str) or not preview.strip():
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `preview_registered_daily_projection`
     --> gateway/platforms/nutrition_coaching.py:12778:19
      |
12776 |         """Render the exact customer payload and mint one confirmation choice."""
12777 |         proposal = adaptive._proposal_for_digest(proposal_digest)
12778 |         preview = adaptive.preview_registered_daily_projection(proposal)
      |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12779 |         if not isinstance(preview, str) or not preview.strip():
12780 |             raise AdaptiveWorkflowError(
      |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to function `__new__` is incorrect
     --> gateway/platforms/nutrition_coaching.py:12787:29
      |
12785 |             "customer_key": str(session["customer_key"]),
12786 |             "proposal_digest": proposal_digest,
12787 |             "revision": int(session["revision"]),
      |                             ^^^^^^^^^^^^^^^^^^^ Expected `str | Buffer | SupportsInt | SupportsIndex | SupportsTrunc`, found `object`
12788 |             "source_digest": str(session.get("source_digest", "") or ""),
12789 |             "registration_digest": str(
      |
info: Matching overload defined here
   --> stdlib/builtins.pyi:366:9
    |
365 |     @overload
366 |     def __new__(cls, x: ConvertibleToInt = 0, /) -> Self: ...
    |         ^^^^^^^      ----------------------- Parameter declared here
367 |     @overload
368 |     def __new__(cls, x: str | bytes | bytearray, /, base: SupportsIndex) -> Self: ...
    |
info: Non-matching overloads for function `__new__`:
info:   [Self](cls, x: str | bytes | bytearray, /, base: SupportsIndex) -> Self
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `_issue` is incorrect
     --> gateway/platforms/nutrition_coaching.py:12807:25
      |
12805 |                     "callback_data": self._issue(
12806 |                         action="confirm_send",
12807 |                         **common,
      |                         ^^^^^^^^ Expected `str`, found `object`
12808 |                     ),
12809 |                 },
      |
info: Method defined here
     --> gateway/platforms/nutrition_coaching.py:11295:9
      |
11293 |         return hashlib.sha256(os.urandom(32)).hexdigest()[:24]
11294 |
11295 |     def _issue(
      |         ^^^^^^
11296 |         self,
11297 |         *,
11298 |         action: str,
11299 |         customer_key: str,
      |         ----------------- Parameter declared here
11300 |         proposal_digest: str | None = None,
11301 |         revision: int | None = None,
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `_issue` is incorrect
     --> gateway/platforms/nutrition_coaching.py:12807:25
      |
12805 |                     "callback_data": self._issue(
12806 |                         action="confirm_send",
12807 |                         **common,
      |                         ^^^^^^^^ Expected `str | None`, found `object`
12808 |                     ),
12809 |                 },
      |
info: Method defined here
     --> gateway/platforms/nutrition_coaching.py:11295:9
      |
11293 |         return hashlib.sha256(os.urandom(32)).hexdigest()[:24]
11294 |
11295 |     def _issue(
      |         ^^^^^^
11296 |         self,
11297 |         *,
11298 |         action: str,
11299 |         customer_key: str,
11300 |         proposal_digest: str | None = None,
      |         ---------------------------------- Parameter declared here
11301 |         revision: int | None = None,
11302 |         source_digest: str = "",
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `_issue` is incorrect
     --> gateway/platforms/nutrition_coaching.py:12807:25
      |
12805 |                     "callback_data": self._issue(
12806 |                         action="confirm_send",
12807 |                         **common,
      |                         ^^^^^^^^ Expected `int | None`, found `object`
12808 |                     ),
12809 |                 },
      |
info: Method defined here
     --> gateway/platforms/nutrition_coaching.py:11295:9
      |
11293 |         return hashlib.sha256(os.urandom(32)).hexdigest()[:24]
11294 |
11295 |     def _issue(
      |         ^^^^^^
11296 |         self,
11297 |         *,
      |
     ::: gateway/platforms/nutrition_coaching.py:11301:9
      |
11299 |         customer_key: str,
11300 |         proposal_digest: str | None = None,
11301 |         revision: int | None = None,
      |         --------------------------- Parameter declared here
11302 |         source_digest: str = "",
11303 |         registration_digest: str = "",
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `_issue` is incorrect
     --> gateway/platforms/nutrition_coaching.py:12807:25
      |
12805 |                     "callback_data": self._issue(
12806 |                         action="confirm_send",
12807 |                         **common,
      |                         ^^^^^^^^ Expected `str`, found `object`
12808 |                     ),
12809 |                 },
      |
info: Method defined here
     --> gateway/platforms/nutrition_coaching.py:11295:9
      |
11293 |         return hashlib.sha256(os.urandom(32)).hexdigest()[:24]
11294 |
11295 |     def _issue(
      |         ^^^^^^
11296 |         self,
11297 |         *,
      |
     ::: gateway/platforms/nutrition_coaching.py:11302:9
      |
11300 |         proposal_digest: str | None = None,
11301 |         revision: int | None = None,
11302 |         source_digest: str = "",
      |         ----------------------- Parameter declared here
11303 |         registration_digest: str = "",
11304 |         originating_message_id: object = "",
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `_issue` is incorrect
     --> gateway/platforms/nutrition_coaching.py:12807:25
      |
12805 |                     "callback_data": self._issue(
12806 |                         action="confirm_send",
12807 |                         **common,
      |                         ^^^^^^^^ Expected `str`, found `object`
12808 |                     ),
12809 |                 },
      |
info: Method defined here
     --> gateway/platforms/nutrition_coaching.py:11295:9
      |
11293 |         return hashlib.sha256(os.urandom(32)).hexdigest()[:24]
11294 |
11295 |     def _issue(
      |         ^^^^^^
11296 |         self,
11297 |         *,
      |
     ::: gateway/platforms/nutrition_coaching.py:11303:9
      |
11301 |         revision: int | None = None,
11302 |         source_digest: str = "",
11303 |         registration_digest: str = "",
      |         ----------------------------- Parameter declared here
11304 |         originating_message_id: object = "",
11305 |         originating_chat_id: object = "",
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `_issue` is incorrect
     --> gateway/platforms/nutrition_coaching.py:12807:25
      |
12805 |                     "callback_data": self._issue(
12806 |                         action="confirm_send",
12807 |                         **common,
      |                         ^^^^^^^^ Expected `str | None`, found `object`
12808 |                     ),
12809 |                 },
      |
info: Method defined here
     --> gateway/platforms/nutrition_coaching.py:11295:9
      |
11293 |         return hashlib.sha256(os.urandom(32)).hexdigest()[:24]
11294 |
11295 |     def _issue(
      |         ^^^^^^
11296 |         self,
11297 |         *,
      |
     ::: gateway/platforms/nutrition_coaching.py:11307:9
      |
11305 |         originating_chat_id: object = "",
11306 |         originating_topic_id: object = 59,
11307 |         predecessor: str | None = None,
      |         ------------------------------ Parameter declared here
11308 |         confirmation_group_id: str | None = None,
11309 |     ) -> str:
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `_issue` is incorrect
     --> gateway/platforms/nutrition_coaching.py:12807:25
      |
12805 |                     "callback_data": self._issue(
12806 |                         action="confirm_send",
12807 |                         **common,
      |                         ^^^^^^^^ Expected `str | None`, found `object`
12808 |                     ),
12809 |                 },
      |
info: Method defined here
     --> gateway/platforms/nutrition_coaching.py:11295:9
      |
11293 |         return hashlib.sha256(os.urandom(32)).hexdigest()[:24]
11294 |
11295 |     def _issue(
      |         ^^^^^^
11296 |         self,
11297 |         *,
      |
     ::: gateway/platforms/nutrition_coaching.py:11308:9
      |
11306 |         originating_topic_id: object = 59,
11307 |         predecessor: str | None = None,
11308 |         confirmation_group_id: str | None = None,
      |         ---------------------------------------- Parameter declared here
11309 |     ) -> str:
11310 |         if action not in _ADAPTIVE_ACTIONS:
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `_issue` is incorrect
     --> gateway/platforms/nutrition_coaching.py:12814:25
      |
12812 |                     "callback_data": self._issue(
12813 |                         action="cancel_send",
12814 |                         **common,
      |                         ^^^^^^^^ Expected `str | None`, found `object`
12815 |                     ),
12816 |                 },
      |
info: Method defined here
     --> gateway/platforms/nutrition_coaching.py:11295:9
      |
11293 |         return hashlib.sha256(os.urandom(32)).hexdigest()[:24]
11294 |
11295 |     def _issue(
      |         ^^^^^^
11296 |         self,
11297 |         *,
11298 |         action: str,
11299 |         customer_key: str,
11300 |         proposal_digest: str | None = None,
      |         ---------------------------------- Parameter declared here
11301 |         revision: int | None = None,
11302 |         source_digest: str = "",
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `_issue` is incorrect
     --> gateway/platforms/nutrition_coaching.py:12814:25
      |
12812 |                     "callback_data": self._issue(
12813 |                         action="cancel_send",
12814 |                         **common,
      |                         ^^^^^^^^ Expected `str`, found `object`
12815 |                     ),
12816 |                 },
      |
info: Method defined here
     --> gateway/platforms/nutrition_coaching.py:11295:9
      |
11293 |         return hashlib.sha256(os.urandom(32)).hexdigest()[:24]
11294 |
11295 |     def _issue(
      |         ^^^^^^
11296 |         self,
11297 |         *,
      |
     ::: gateway/platforms/nutrition_coaching.py:11303:9
      |
11301 |         revision: int | None = None,
11302 |         source_digest: str = "",
11303 |         registration_digest: str = "",
      |         ----------------------------- Parameter declared here
11304 |         originating_message_id: object = "",
11305 |         originating_chat_id: object = "",
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `_issue` is incorrect
     --> gateway/platforms/nutrition_coaching.py:12814:25
      |
12812 |                     "callback_data": self._issue(
12813 |                         action="cancel_send",
12814 |                         **common,
      |                         ^^^^^^^^ Expected `str | None`, found `object`
12815 |                     ),
12816 |                 },
      |
info: Method defined here
     --> gateway/platforms/nutrition_coaching.py:11295:9
      |
11293 |         return hashlib.sha256(os.urandom(32)).hexdigest()[:24]
11294 |
11295 |     def _issue(
      |         ^^^^^^
11296 |         self,
11297 |         *,
      |
     ::: gateway/platforms/nutrition_coaching.py:11307:9
      |
11305 |         originating_chat_id: object = "",
11306 |         originating_topic_id: object = 59,
11307 |         predecessor: str | None = None,
      |         ------------------------------ Parameter declared here
11308 |         confirmation_group_id: str | None = None,
11309 |     ) -> str:
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `_issue` is incorrect
     --> gateway/platforms/nutrition_coaching.py:12814:25
      |
12812 |                     "callback_data": self._issue(
12813 |                         action="cancel_send",
12814 |                         **common,
      |                         ^^^^^^^^ Expected `str | None`, found `object`
12815 |                     ),
12816 |                 },
      |
info: Method defined here
     --> gateway/platforms/nutrition_coaching.py:11295:9
      |
11293 |         return hashlib.sha256(os.urandom(32)).hexdigest()[:24]
11294 |
11295 |     def _issue(
      |         ^^^^^^
11296 |         self,
11297 |         *,
      |
     ::: gateway/platforms/nutrition_coaching.py:11308:9
      |
11306 |         originating_topic_id: object = 59,
11307 |         predecessor: str | None = None,
11308 |         confirmation_group_id: str | None = None,
      |         ---------------------------------------- Parameter declared here
11309 |     ) -> str:
11310 |         if action not in _ADAPTIVE_ACTIONS:
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `_issue` is incorrect
     --> gateway/platforms/nutrition_coaching.py:12814:25
      |
12812 |                     "callback_data": self._issue(
12813 |                         action="cancel_send",
12814 |                         **common,
      |                         ^^^^^^^^ Expected `str`, found `object`
12815 |                     ),
12816 |                 },
      |
info: Method defined here
     --> gateway/platforms/nutrition_coaching.py:11295:9
      |
11293 |         return hashlib.sha256(os.urandom(32)).hexdigest()[:24]
11294 |
11295 |     def _issue(
      |         ^^^^^^
11296 |         self,
11297 |         *,
      |
     ::: gateway/platforms/nutrition_coaching.py:11302:9
      |
11300 |         proposal_digest: str | None = None,
11301 |         revision: int | None = None,
11302 |         source_digest: str = "",
      |         ----------------------- Parameter declared here
11303 |         registration_digest: str = "",
11304 |         originating_message_id: object = "",
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `_issue` is incorrect
     --> gateway/platforms/nutrition_coaching.py:12814:25
      |
12812 |                     "callback_data": self._issue(
12813 |                         action="cancel_send",
12814 |                         **common,
      |                         ^^^^^^^^ Expected `str`, found `object`
12815 |                     ),
12816 |                 },
      |
info: Method defined here
     --> gateway/platforms/nutrition_coaching.py:11295:9
      |
11293 |         return hashlib.sha256(os.urandom(32)).hexdigest()[:24]
11294 |
11295 |     def _issue(
      |         ^^^^^^
11296 |         self,
11297 |         *,
11298 |         action: str,
11299 |         customer_key: str,
      |         ----------------- Parameter declared here
11300 |         proposal_digest: str | None = None,
11301 |         revision: int | None = None,
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `_issue` is incorrect
     --> gateway/platforms/nutrition_coaching.py:12814:25
      |
12812 |                     "callback_data": self._issue(
12813 |                         action="cancel_send",
12814 |                         **common,
      |                         ^^^^^^^^ Expected `int | None`, found `object`
12815 |                     ),
12816 |                 },
      |
info: Method defined here
     --> gateway/platforms/nutrition_coaching.py:11295:9
      |
11293 |         return hashlib.sha256(os.urandom(32)).hexdigest()[:24]
11294 |
11295 |     def _issue(
      |         ^^^^^^
11296 |         self,
11297 |         *,
      |
     ::: gateway/platforms/nutrition_coaching.py:11301:9
      |
11299 |         customer_key: str,
11300 |         proposal_digest: str | None = None,
11301 |         revision: int | None = None,
      |         --------------------------- Parameter declared here
11302 |         source_digest: str = "",
11303 |         registration_digest: str = "",
      |
info: rule `invalid-argument-type` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `_proposal_for_digest`
     --> gateway/platforms/nutrition_coaching.py:12831:13
      |
12829 |         state = self._proposal_card_state(
12830 |             adaptive,
12831 |             adaptive._proposal_for_digest(proposal_digest),
      |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12832 |         )
12833 |         if state in {"proposed", "edited", "released"}:
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `approve_latest`
     --> gateway/platforms/nutrition_coaching.py:12871:13
      |
12869 |                     ),
12870 |                 }
12871 |             adaptive.approve_latest(
      |             ^^^^^^^^^^^^^^^^^^^^^^^
12872 |                 proposal_digest,
12873 |                 operator_id=self._transition_capability(session, action="approve"),
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `activate_latest`
     --> gateway/platforms/nutrition_coaching.py:12882:13
      |
12880 |             state = "approved"
12881 |         if state == "approved":
12882 |             adaptive.activate_latest(
      |             ^^^^^^^^^^^^^^^^^^^^^^^^
12883 |                 proposal_digest,
12884 |                 operator_id=self._transition_capability(session, action="activate"),
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `set_adaptive_delivery`
     --> gateway/platforms/nutrition_coaching.py:12890:13
      |
12888 |             getattr(adaptive, "delivery_enabled", False)
12889 |         ):
12890 |             self.coordinator.set_adaptive_delivery(
      |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12891 |                 customer_key,
12892 |                 True,
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `deliver_latest_once`
     --> gateway/platforms/nutrition_coaching.py:12895:16
      |
12893 |                 operator_id=self._transition_capability(session, action="delivery_enable"),
12894 |             )
12895 |         return adaptive.deliver_latest_once(
      |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12896 |             proposal_digest,
12897 |             operator_id=self._transition_capability(session, action="send"),
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `_proposal_for_digest`
     --> gateway/platforms/nutrition_coaching.py:12915:20
      |
12913 |             )
12914 |         review, _artifacts = authority
12915 |         proposal = adaptive._proposal_for_digest(proposal_digest)
      |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12916 |         if not self.current_coaching_facts_match_binding(
12917 |             customer_key,
      |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to class `tuple` is incorrect
     --> gateway/platforms/nutrition_coaching.py:12936:27
      |
12934 |                 and row.get("session_id") == token
12935 |                 and row.get("action") == action
12936 |                 and tuple(row.get("action_allowlist", ())) == (action,)
      |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `Iterable[Unknown]`, found `object`
12937 |             ):
12938 |                 latest = row
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to class `tuple` is incorrect
     --> gateway/platforms/nutrition_coaching.py:12956:31
      |
12954 |                     and row.get("session_id") == token
12955 |                     and row.get("action") == action
12956 |                     and tuple(row.get("action_allowlist", ())) == (action,)
      |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `Iterable[Unknown]`, found `object`
12957 |                 ):
12958 |                     latest = row
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to class `tuple` is incorrect
     --> gateway/platforms/nutrition_coaching.py:13002:22
      |
13000 |         if (
13001 |             session.get("action") != action
13002 |             or tuple(session.get("action_allowlist", ())) != (action,)
      |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `Iterable[Unknown]`, found `object`
13003 |             or not hmac.compare_digest(str(session.get("token_hash", "")), token_hash)
13004 |             or not hmac.compare_digest(str(session.get("nonce_digest", "")), token_hash)
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to class `tuple` is incorrect
     --> gateway/platforms/nutrition_coaching.py:13024:34
      |
13022 |             self._consume(session, state="revoked")
13023 |             raise AdaptiveWorkflowError("adaptive operator session expiry is invalid") from exc
13024 |         persisted_review = tuple(session.get("review_operator", ()))
      |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `Iterable[Unknown]`, found `object`
13025 |         if persisted_review != self.review_operator:
13026 |             self._consume(session, state="revoked")
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to class `tuple` is incorrect
     --> gateway/platforms/nutrition_coaching.py:13047:18
      |
13045 |             raise AdaptiveWorkflowError("adaptive operator session provenance is stale")
13046 |         owner, owner_version = self._owner()
13047 |         if tuple(session.get("canonical_owner_snapshot", ())) != owner:
      |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `Iterable[Unknown]`, found `object`
13048 |             self._consume(session, state="revoked")
13049 |             raise AdaptiveWorkflowError("adaptive operator session authority is stale")
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:13151:13
      |
13149 |             action=action,
13150 |             proposal_digest=proposal_digest,
13151 |             revision=revision,
      |             ^^^^^^^^^^^^^^^^^ Expected `int | None`, found `object`
13152 |             schedule_event_id=(
13153 |                 str(session["schedule_event_id"])
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-assignment]: Object of type `dict[str, object] | None` is not assignable to `Mapping[str, object]`
     --> gateway/platforms/nutrition_coaching.py:13245:17
      |
13243 |             replay_safe = action in {"view", "back"}
13244 |             if replay_safe:
13245 |                 session = self._find_session(token, action)
      |                 -------   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Incompatible value of type `dict[str, object] | None`
      |                 |
      |                 Declared type `Mapping[str, object]`
13246 |                 if session is None:
13247 |                     raise AdaptiveWorkflowError("adaptive operator session is stale")
      |
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `dict[str, object] | None` is not assignable to `Mapping[str, object]`
     --> gateway/platforms/nutrition_coaching.py:13250:17
      |
13248 |                 claim_winner = False
13249 |             else:
13250 |                 session = self._claim_issued_callback(token, action)
      |                 -------   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Incompatible value of type `dict[str, object] | None`
      |                 |
      |                 Declared type `Mapping[str, object]`
13251 |                 if session is None:
13252 |                     raise AdaptiveWorkflowError("adaptive operator session is stale")
      |
info: rule `invalid-assignment` is enabled by default

error[unresolved-attribute]: Object of type `Mapping[str, object]` has no attribute `pop`
     --> gateway/platforms/nutrition_coaching.py:13253:32
      |
13251 |                 if session is None:
13252 |                     raise AdaptiveWorkflowError("adaptive operator session is stale")
13253 |                 claim_winner = session.pop("_claim_winner", False) is True
      |                                ^^^^^^^^^^^
13254 |             if replay_safe:
13255 |                 if session.get("state") != "issued":
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `set_adaptive_delivery`
     --> gateway/platforms/nutrition_coaching.py:13515:26
      |
13513 |                 result = adaptive.activate_latest(digest_value, operator_id=capability)
13514 |             elif action in {"delivery_enable", "delivery_revoke"}:
13515 |                 result = self.coordinator.set_adaptive_delivery(
      |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
13516 |                     key,
13517 |                     action == "delivery_enable",
      |
info: rule `unresolved-attribute` is enabled by default

error[invalid-assignment]: Cannot assign to a subscript on an object of type `Mapping[str, object]`
     --> gateway/platforms/nutrition_coaching.py:13569:17
      |
13567 |                 response.setdefault("status", action)
13568 |             if action in {"confirm_send", "send", "reconcile"}:
13569 |                 response["text"] = adaptive_delivery_result_text(response)
      |                 ^^^^^^^^^^^^^^^^
13570 |             return response
13571 |         except AdaptiveWorkflowError as exc:
      |
info: The full type of the subscripted object is `Mapping[str, object] | dict[Unknown, Unknown]`
info: `Mapping[str, object]` does not have a `__setitem__` method.
info: rule `invalid-assignment` is enabled by default

error[invalid-argument-type]: Argument to class `tuple` is incorrect
     --> gateway/platforms/nutrition_coaching.py:13610:31
      |
13608 |                     for row in reversed(self._read_rows())
13609 |                     if row.get("state") == "awaiting_input"
13610 |                     and tuple(row.get("action_allowlist", ())) == ("edit_note",)
      |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `Iterable[Unknown]`, found `object`
13611 |                     and str(row.get("originating_message_id", "") or "") == str(message_id or "")
13612 |                 ),
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
     --> gateway/platforms/nutrition_coaching.py:13729:13
      |
13727 |             raise AdaptiveWorkflowError("adaptive shadow construction is sealed")
13728 |         return cls(
13729 |             **kwargs,
      |             ^^^^^^^^ Expected `str`, found `object`
13730 |             _shadow_factory_token=_ADAPTIVE_SHADOW_FACTORY_TOKEN,
13731 |         )
      |
info: Method defined here
     --> gateway/platforms/nutrition_coaching.py:13733:9
      |
13731 |         )
13732 |
13733 |     def __init__(
      |         ^^^^^^^^
13734 |         self,
13735 |         *,
13736 |         customer_key: str,
      |         ----------------- Parameter declared here
13737 |         starts_on: date | None = None,
13738 |         event_path: Path | str | None = None,
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
     --> gateway/platforms/nutrition_coaching.py:13729:13
      |
13727 |             raise AdaptiveWorkflowError("adaptive shadow construction is sealed")
13728 |         return cls(
13729 |             **kwargs,
      |             ^^^^^^^^ Expected `date | None`, found `object`
13730 |             _shadow_factory_token=_ADAPTIVE_SHADOW_FACTORY_TOKEN,
13731 |         )
      |
info: Method defined here
     --> gateway/platforms/nutrition_coaching.py:13733:9
      |
13731 |         )
13732 |
13733 |     def __init__(
      |         ^^^^^^^^
13734 |         self,
13735 |         *,
13736 |         customer_key: str,
13737 |         starts_on: date | None = None,
      |         ----------------------------- Parameter declared here
13738 |         event_path: Path | str | None = None,
13739 |         operator_topic_id: int = OPERATOR_REVIEW_TOPIC_ID,
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
     --> gateway/platforms/nutrition_coaching.py:13729:13
      |
13727 |             raise AdaptiveWorkflowError("adaptive shadow construction is sealed")
13728 |         return cls(
13729 |             **kwargs,
      |             ^^^^^^^^ Expected `Path | str | None`, found `object`
13730 |             _shadow_factory_token=_ADAPTIVE_SHADOW_FACTORY_TOKEN,
13731 |         )
      |
info: Method defined here
     --> gateway/platforms/nutrition_coaching.py:13733:9
      |
13731 |         )
13732 |
13733 |     def __init__(
      |         ^^^^^^^^
13734 |         self,
13735 |         *,
13736 |         customer_key: str,
13737 |         starts_on: date | None = None,
13738 |         event_path: Path | str | None = None,
      |         ------------------------------------ Parameter declared here
13739 |         operator_topic_id: int = OPERATOR_REVIEW_TOPIC_ID,
13740 |         store: object | None = None,
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
     --> gateway/platforms/nutrition_coaching.py:13729:13
      |
13727 |             raise AdaptiveWorkflowError("adaptive shadow construction is sealed")
13728 |         return cls(
13729 |             **kwargs,
      |             ^^^^^^^^ Expected `int`, found `object`
13730 |             _shadow_factory_token=_ADAPTIVE_SHADOW_FACTORY_TOKEN,
13731 |         )
      |
info: Method defined here
     --> gateway/platforms/nutrition_coaching.py:13733:9
      |
13731 |         )
13732 |
13733 |     def __init__(
      |         ^^^^^^^^
13734 |         self,
13735 |         *,
      |
     ::: gateway/platforms/nutrition_coaching.py:13739:9
      |
13737 |         starts_on: date | None = None,
13738 |         event_path: Path | str | None = None,
13739 |         operator_topic_id: int = OPERATOR_REVIEW_TOPIC_ID,
      |         ------------------------------------------------- Parameter declared here
13740 |         store: object | None = None,
13741 |         profile_root: Path | str | None = None,
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
     --> gateway/platforms/nutrition_coaching.py:13729:13
      |
13727 |             raise AdaptiveWorkflowError("adaptive shadow construction is sealed")
13728 |         return cls(
13729 |             **kwargs,
      |             ^^^^^^^^ Expected `Path | str | None`, found `object`
13730 |             _shadow_factory_token=_ADAPTIVE_SHADOW_FACTORY_TOKEN,
13731 |         )
      |
info: Method defined here
     --> gateway/platforms/nutrition_coaching.py:13733:9
      |
13731 |         )
13732 |
13733 |     def __init__(
      |         ^^^^^^^^
13734 |         self,
13735 |         *,
      |
     ::: gateway/platforms/nutrition_coaching.py:13741:9
      |
13739 |         operator_topic_id: int = OPERATOR_REVIEW_TOPIC_ID,
13740 |         store: object | None = None,
13741 |         profile_root: Path | str | None = None,
      |         -------------------------------------- Parameter declared here
13742 |         registry_path: Path | str | None = None,
13743 |         canonical_event_source: object | None = None,
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
     --> gateway/platforms/nutrition_coaching.py:13729:13
      |
13727 |             raise AdaptiveWorkflowError("adaptive shadow construction is sealed")
13728 |         return cls(
13729 |             **kwargs,
      |             ^^^^^^^^ Expected `Path | str | None`, found `object`
13730 |             _shadow_factory_token=_ADAPTIVE_SHADOW_FACTORY_TOKEN,
13731 |         )
      |
info: Method defined here
     --> gateway/platforms/nutrition_coaching.py:13733:9
      |
13731 |         )
13732 |
13733 |     def __init__(
      |         ^^^^^^^^
13734 |         self,
13735 |         *,
      |
     ::: gateway/platforms/nutrition_coaching.py:13742:9
      |
13740 |         store: object | None = None,
13741 |         profile_root: Path | str | None = None,
13742 |         registry_path: Path | str | None = None,
      |         --------------------------------------- Parameter declared here
13743 |         canonical_event_source: object | None = None,
13744 |         customer_runtime: object | None = None,
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
     --> gateway/platforms/nutrition_coaching.py:13729:13
      |
13727 |             raise AdaptiveWorkflowError("adaptive shadow construction is sealed")
13728 |         return cls(
13729 |             **kwargs,
      |             ^^^^^^^^ Expected `bool`, found `object`
13730 |             _shadow_factory_token=_ADAPTIVE_SHADOW_FACTORY_TOKEN,
13731 |         )
      |
info: Method defined here
     --> gateway/platforms/nutrition_coaching.py:13733:9
      |
13731 |         )
13732 |
13733 |     def __init__(
      |         ^^^^^^^^
13734 |         self,
13735 |         *,
      |
     ::: gateway/platforms/nutrition_coaching.py:13747:9
      |
13745 |         authority: object | None = None,
13746 |         customer_transport: object | None = None,
13747 |         delivery_enabled: bool = False,
      |         ------------------------------ Parameter declared here
13748 |         _shadow_factory_token: object | None = None,
13749 |     ) -> None:
      |
info: rule `invalid-argument-type` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `data_root`
     --> gateway/platforms/nutrition_coaching.py:13795:36
      |
13793 |                     and isinstance(getattr(customer_runtime, "data_root", None), Path)
13794 |                 ):
13795 |                     runtime_root = customer_runtime.data_root
      |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^
13796 |                     transaction = CanonicalEventTransaction(
13797 |                         runtime_root / "wizard" / "events.jsonl",
      |
info: rule `unresolved-attribute` is enabled by default

error[not-subscriptable]: Cannot subscript object of type `None` with no `__getitem__` method
     --> gateway/platforms/nutrition_coaching.py:13951:55
      |
13949 |                         latest_enable = self._latest_committed_delivery_enable_locked()
13950 |                         if latest_enable is None or any(
13951 |                             latest_enable.get(key) != risk_policy[key]
      |                                                       ^^^^^^^^^^^^^^^^
13952 |                             for key in (
13953 |                                 "risk_policy_version",
      |
info: rule `not-subscriptable` is enabled by default

error[not-subscriptable]: Cannot subscript object of type `None` with no `__getitem__` method
     --> gateway/platforms/nutrition_coaching.py:13951:55
      |
13949 |                         latest_enable = self._latest_committed_delivery_enable_locked()
13950 |                         if latest_enable is None or any(
13951 |                             latest_enable.get(key) != risk_policy[key]
      |                                                       ^^^^^^^^^^^^^^^^
13952 |                             for key in (
13953 |                                 "risk_policy_version",
      |
info: rule `not-subscriptable` is enabled by default

error[not-subscriptable]: Cannot subscript object of type `None` with no `__getitem__` method
     --> gateway/platforms/nutrition_coaching.py:13951:55
      |
13949 |                         latest_enable = self._latest_committed_delivery_enable_locked()
13950 |                         if latest_enable is None or any(
13951 |                             latest_enable.get(key) != risk_policy[key]
      |                                                       ^^^^^^^^^^^^^^^^
13952 |                             for key in (
13953 |                                 "risk_policy_version",
      |
info: rule `not-subscriptable` is enabled by default

error[invalid-argument-type]: Argument to function `__new__` is incorrect
     --> gateway/platforms/nutrition_coaching.py:13964:40
      |
13962 |                 customer_keys = self._enabled_customer_keys()
13963 |                 updated = dict(prior)
13964 |                 updated["epoch"] = int(prior["epoch"]) + 1
      |                                        ^^^^^^^^^^^^^^ Expected `str | Buffer | SupportsInt | SupportsIndex | SupportsTrunc`, found `object`
13965 |                 updated["delivery"] = enabled
13966 |                 updated = self._with_feature_config_digest(updated)
      |
info: Matching overload defined here
   --> stdlib/builtins.pyi:366:9
    |
365 |     @overload
366 |     def __new__(cls, x: ConvertibleToInt = 0, /) -> Self: ...
    |         ^^^^^^^      ----------------------- Parameter declared here
367 |     @overload
368 |     def __new__(cls, x: str | bytes | bytearray, /, base: SupportsIndex) -> Self: ...
    |
info: Non-matching overloads for function `__new__`:
info:   [Self](cls, x: str | bytes | bytearray, /, base: SupportsIndex) -> Self
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `__new__` is incorrect
     --> gateway/platforms/nutrition_coaching.py:13969:25
      |
13967 |                 self._assert_owner_snapshot(operator_id, owner_snapshot, owner_version)
13968 |                 self._append_config_epoch_locked(
13969 |                     int(updated["epoch"]),
      |                         ^^^^^^^^^^^^^^^^ Expected `str | Buffer | SupportsInt | SupportsIndex | SupportsTrunc`, found `object`
13970 |                     str(updated["config_digest"]),
13971 |                     customer_keys,
      |
info: Matching overload defined here
   --> stdlib/builtins.pyi:366:9
    |
365 |     @overload
366 |     def __new__(cls, x: ConvertibleToInt = 0, /) -> Self: ...
    |         ^^^^^^^      ----------------------- Parameter declared here
367 |     @overload
368 |     def __new__(cls, x: str | bytes | bytearray, /, base: SupportsIndex) -> Self: ...
    |
info: Non-matching overloads for function `__new__`:
info:   [Self](cls, x: str | bytes | bytearray, /, base: SupportsIndex) -> Self
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `__new__` is incorrect
     --> gateway/platforms/nutrition_coaching.py:13982:29
      |
13980 |                     self._assert_owner_snapshot(operator_id, owner_snapshot, owner_version)
13981 |                     self._append_config_epoch_locked(
13982 |                         int(updated["epoch"]),
      |                             ^^^^^^^^^^^^^^^^ Expected `str | Buffer | SupportsInt | SupportsIndex | SupportsTrunc`, found `object`
13983 |                         str(updated["config_digest"]),
13984 |                         customer_keys,
      |
info: Matching overload defined here
   --> stdlib/builtins.pyi:366:9
    |
365 |     @overload
366 |     def __new__(cls, x: ConvertibleToInt = 0, /) -> Self: ...
    |         ^^^^^^^      ----------------------- Parameter declared here
367 |     @overload
368 |     def __new__(cls, x: str | bytes | bytearray, /, base: SupportsIndex) -> Self: ...
    |
info: Non-matching overloads for function `__new__`:
info:   [Self](cls, x: str | bytes | bytearray, /, base: SupportsIndex) -> Self
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `__new__` is incorrect
     --> gateway/platforms/nutrition_coaching.py:13994:33
      |
13992 |                         self._write_feature_epoch(epoch_path, prior)
13993 |                         self._append_config_epoch_locked(
13994 |                             int(updated["epoch"]),
      |                                 ^^^^^^^^^^^^^^^^ Expected `str | Buffer | SupportsInt | SupportsIndex | SupportsTrunc`, found `object`
13995 |                             str(updated["config_digest"]),
13996 |                             customer_keys,
      |
info: Matching overload defined here
   --> stdlib/builtins.pyi:366:9
    |
365 |     @overload
366 |     def __new__(cls, x: ConvertibleToInt = 0, /) -> Self: ...
    |         ^^^^^^^      ----------------------- Parameter declared here
367 |     @overload
368 |     def __new__(cls, x: str | bytes | bytearray, /, base: SupportsIndex) -> Self: ...
    |
info: Non-matching overloads for function `__new__`:
info:   [Self](cls, x: str | bytes | bytearray, /, base: SupportsIndex) -> Self
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:14035:33
      |
14033 |         raw = getattr(value, "key", value)
14034 |         if isinstance(raw, Mapping):
14035 |             raw = tuple(raw.get(field) for field in ("user_id", "chat_id", "topic_id"))
      |                                 ^^^^^ Expected `Never`, found `Literal["user_id", "chat_id", "topic_id"]`
14036 |         if not isinstance(raw, (tuple, list)) or len(raw) != 3:
14037 |             return None
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-return-type]: Return type does not match returned value
     --> gateway/platforms/nutrition_coaching.py:14039:16
      |
14037 |             return None
14038 |         values = tuple(str(item).strip() if isinstance(item, str) else "" for item in raw)
14039 |         return values if all(values) else None
      |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `tuple[str, str, str] | None`, found `tuple[str, ...] | None`
14040 |
14041 |     def _live_owner_key(self) -> tuple[str, str, str]:
      |
     ::: gateway/platforms/nutrition_coaching.py:14031:38
      |
14030 |     @staticmethod
14031 |     def _owner_key(value: object) -> tuple[str, str, str] | None:
      |                                      --------------------------- Expected `tuple[str, str, str] | None` because of return type
14032 |         """Normalize one owner address without accepting a user id alone."""
14033 |         raw = getattr(value, "key", value)
      |
info: rule `invalid-return-type` is enabled by default

error[invalid-argument-type]: Argument to class `tuple` is incorrect
     --> gateway/platforms/nutrition_coaching.py:14231:28
      |
14229 |         ):
14230 |             raise AdaptiveWorkflowError("adaptive operator capability session is not authorized")
14231 |         row_review = tuple(session.get("review_operator", ()))
      |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `Iterable[Unknown]`, found `object`
14232 |         row_owner = tuple(session.get("canonical_owner_snapshot", ()))
14233 |         if (
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to class `tuple` is incorrect
     --> gateway/platforms/nutrition_coaching.py:14232:27
      |
14230 |             raise AdaptiveWorkflowError("adaptive operator capability session is not authorized")
14231 |         row_review = tuple(session.get("review_operator", ()))
14232 |         row_owner = tuple(session.get("canonical_owner_snapshot", ()))
      |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `Iterable[Unknown]`, found `object`
14233 |         if (
14234 |             row_review != capability.review_operator
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to class `tuple` is incorrect
     --> gateway/platforms/nutrition_coaching.py:14265:19
      |
14263 |                 raise AdaptiveWorkflowError("adaptive operator capability session does not match")
14264 |         if (
14265 |             tuple(session.get("action_allowlist", ())) != (capability.action,)
      |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `Iterable[Unknown]`, found `object`
14266 |             or required_action is not None
14267 |             and capability.action != required_action
      |
info: rule `invalid-argument-type` is enabled by default

error[unsupported-operator]: Unsupported `/` operation
     --> gateway/platforms/nutrition_coaching.py:14428:17
      |
14426 |             resolved_root = data_root.resolve()
14427 |             expected_root = (
14428 |                 self.profile_root / "data" / "customers" / self.customer_key
      |                 -----------------^^^------
      |                 |                   |
      |                 |                   Has type `Literal["data"]`
      |                 Has type `Unknown | Path | None`
14429 |             ).resolve()
14430 |         except (OSError, RuntimeError) as exc:
      |
info: rule `unsupported-operator` is enabled by default

error[unsupported-operator]: Unsupported `/` operation
     --> gateway/platforms/nutrition_coaching.py:14446:17
      |
14444 |         if registry_path is None:
14445 |             for candidate in (
14446 |                 self.profile_root / "customers" / "registry.json",
      |                 -----------------^^^-----------
      |                 |                   |
      |                 |                   Has type `Literal["customers"]`
      |                 Has type `Unknown | Path | None`
14447 |                 self.profile_root / "registry.json",
14448 |             ):
      |
info: rule `unsupported-operator` is enabled by default

error[unsupported-operator]: Unsupported `/` operation
     --> gateway/platforms/nutrition_coaching.py:14447:17
      |
14445 |             for candidate in (
14446 |                 self.profile_root / "customers" / "registry.json",
14447 |                 self.profile_root / "registry.json",
      |                 -----------------^^^---------------
      |                 |                   |
      |                 |                   Has type `Literal["registry.json"]`
      |                 Has type `Unknown | Path | None`
14448 |             ):
14449 |                 if candidate.exists():
      |
info: rule `unsupported-operator` is enabled by default

error[invalid-argument-type]: Argument to function `validate_committed_activation` is incorrect
     --> gateway/platforms/nutrition_coaching.py:14458:17
      |
14457 |             validate_committed_activation(
14458 |                 self.profile_root,
      |                 ^^^^^^^^^^^^^^^^^ Expected `Path`, found `Unknown | Path | None`
14459 |                 registry_path,
14460 |                 self.customer_key,
      |
info: Element `None` of this union is not assignable to `Path`
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_admin.py:2004:5
     |
2004 | def validate_committed_activation(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2005 |     profile_root: Path,
     |     ------------------ Parameter declared here
2006 |     registry_path: Path | None = None,
2007 |     customer_id: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-return-type]: Return type does not match returned value
     --> gateway/platforms/nutrition_coaching.py:14480:56
      |
14479 |     @staticmethod
14480 |     def _journal_payload(row: Mapping[str, object]) -> Mapping[str, object]:
      |                                                        -------------------- Expected `Mapping[str, object]` because of return type
14481 |         payload = row.get("payload")
14482 |         return payload if isinstance(payload, Mapping) else row
      |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Mapping[str, object]`, found `Top[Mapping[Unknown, object]]`
14483 |
14484 |     @classmethod
      |
info: rule `invalid-return-type` is enabled by default

error[invalid-return-type]: Return type does not match returned value
     --> gateway/platforms/nutrition_coaching.py:14496:16
      |
14494 |         if len(rows) != len(raw):
14495 |             raise AdaptiveWorkflowError(f"adaptive {key} journal is invalid")
14496 |         return rows
      |                ^^^^ expected `tuple[Mapping[str, object], ...]`, found `tuple[Top[Mapping[Unknown, object]], ...]`
14497 |
14498 |     @staticmethod
      |
     ::: gateway/platforms/nutrition_coaching.py:14489:10
      |
14487 |         result: Mapping[str, object],
14488 |         key: str,
14489 |     ) -> tuple[Mapping[str, object], ...]:
      |          -------------------------------- Expected `tuple[Mapping[str, object], ...]` because of return type
14490 |         raw = result.get(key)
14491 |         if not isinstance(raw, (tuple, list)) or not raw:
      |
info: rule `invalid-return-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:14564:33
      |
14562 |         source = self.canonical_event_source
14563 |         if isinstance(source, Mapping):
14564 |             source = source.get(self.customer_key)
      |                                 ^^^^^^^^^^^^^^^^^ Expected `Never`, found `Unknown | (str & ~AlwaysFalsy)`
14565 |         else:
14566 |             resolver = getattr(source, "events_for", None)
      |
info: Element `str & ~AlwaysFalsy` of this union is not assignable to `Never`
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[unresolved-attribute]: Object of type `~None` has no attribute `model_dump`
     --> gateway/platforms/nutrition_coaching.py:14643:26
      |
14641 |                 raise AdaptiveWorkflowError("canonical sequence does not match EventStore")
14642 |             try:
14643 |                 record = event.model_dump(mode="json")
      |                          ^^^^^^^^^^^^^^^^
14644 |             except TypeError:
14645 |                 record = event.model_dump()
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `~None` has no attribute `model_dump`
     --> gateway/platforms/nutrition_coaching.py:14645:26
      |
14643 |                 record = event.model_dump(mode="json")
14644 |             except TypeError:
14645 |                 record = event.model_dump()
      |                          ^^^^^^^^^^^^^^^^
14646 |             if not isinstance(record, Mapping) or record.get("event_id") != event_id:
14647 |                 raise AdaptiveWorkflowError("canonical sequence does not match EventStore")
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `model_dump_json`
     --> gateway/platforms/nutrition_coaching.py:14659:29
      |
14657 |                     if callable(getattr(canonical_event, "model_dump_json", None)):
14658 |                         canonical_json_line = (
14659 |                             canonical_event.model_dump_json(exclude_none=True) + "\n"
      |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14660 |                         )
14661 |                         accepted_digests.add(
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `~None` has no attribute `model_dump`
     --> gateway/platforms/nutrition_coaching.py:14664:38
      |
14662 |                             hashlib.sha256(canonical_json_line.encode("utf-8")).hexdigest()
14663 |                         )
14664 |                     compact_record = event.model_dump(mode="json", exclude_none=True)
      |                                      ^^^^^^^^^^^^^^^^
14665 |                     if isinstance(compact_record, Mapping):
14666 |                         accepted_digests.add(digest(dict(compact_record)))
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `model_dump` is not defined on `None` in union `Any | None`
     --> gateway/platforms/nutrition_coaching.py:14669:39
      |
14667 |                     base = getattr(event, "_event", None)
14668 |                     if callable(getattr(base, "model_dump", None)):
14669 |                         base_record = base.model_dump(mode="json")
      |                                       ^^^^^^^^^^^^^^^
14670 |                         if isinstance(base_record, Mapping):
14671 |                             accepted_digests.add(digest(dict(base_record)))
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `model_dump` is not defined on `None` in union `Any | None`
     --> gateway/platforms/nutrition_coaching.py:14672:40
      |
14670 |                         if isinstance(base_record, Mapping):
14671 |                             accepted_digests.add(digest(dict(base_record)))
14672 |                         compact_base = base.model_dump(mode="json", exclude_none=True)
      |                                        ^^^^^^^^^^^^^^^
14673 |                         if isinstance(compact_base, Mapping):
14674 |                             accepted_digests.add(digest(dict(compact_base)))
      |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to function `feature_config_digest` is incorrect
     --> gateway/platforms/nutrition_coaching.py:14730:53
      |
14728 |               except (TypeError, ValueError):
14729 |                   try:
14730 |                       value = helper(fields["epoch"], **{
      |  _____________________________________________________^
14731 | |                         key: fields[key]
14732 | |                         for key in (
14733 | |                             "analytics_shadow",
14734 | |                             "operator_candidates",
14735 | |                             "activation",
14736 | |                             "delivery",
14737 | |                         )
14738 | |                     })
      | |_____________________^ Expected `Mapping[str, object]`, found `object`
14739 |                   except (TypeError, ValueError) as exc:
14740 |                       raise AdaptiveWorkflowError("adaptive feature config digest is invalid") from exc
      |
info: Function defined here
    --> dualcoach/profile/checkin_cli/adaptive_nutrition.py:1374:5
     |
1374 | def feature_config_digest(epoch: object, flags: Mapping[str, object]) -> str:
     |     ^^^^^^^^^^^^^^^^^^^^^                --------------------------- Parameter declared here
1375 |     """Digest the canonical feature-config preimage."""
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to class `tuple` is incorrect
     --> gateway/platforms/nutrition_coaching.py:14895:44
      |
14893 |             for row in journal_rows["config_epoch"]
14894 |             if isinstance(row.get("customer_keys"), (tuple, list))
14895 |             and self.customer_key in tuple(row.get("customer_keys", ()))
      |                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `Iterable[Unknown]`, found `object`
14896 |         )
14897 |         if allow_prepared_config_epoch:
      |
info: rule `invalid-argument-type` is enabled by default

error[unresolved-attribute]: Attribute `validate_canonical_prefix` is not defined on `~None` in union `Unknown | ~None`
     --> gateway/platforms/nutrition_coaching.py:14928:13
      |
14926 |                 raise AdaptiveWorkflowError("adaptive canonical sequence prefix is forked")
14927 |         try:
14928 |             self.store.validate_canonical_prefix()
      |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14929 |         except (OSError, TypeError, ValueError) as exc:
14930 |             raise AdaptiveWorkflowError("adaptive canonical sequence binding is invalid") from exc
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `read` is not defined on `~None` in union `Unknown | ~None`
     --> gateway/platforms/nutrition_coaching.py:14932:47
      |
14930 |             raise AdaptiveWorkflowError("adaptive canonical sequence binding is invalid") from exc
14931 |         try:
14932 |             result["adaptive_events"] = tuple(self.store.read())
      |                                               ^^^^^^^^^^^^^^^
14933 |         except (OSError, TypeError, ValueError) as exc:
14934 |             raise AdaptiveWorkflowError("adaptive production ledger is invalid") from exc
      |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[Mapping[Unknown, object]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["calories"]` on object of type `Top[Mapping[Unknown, object]]`
     --> gateway/platforms/nutrition_coaching.py:14982:30
      |
14980 |         try:
14981 |             return MacroTarget(
14982 |                 calories=int(raw["calories"]),
      |                              ^^^
14983 |                 carbs_g=int(raw["carbs_g"]),
14984 |                 protein_g=int(raw["protein_g"]),
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `__new__` is incorrect
     --> gateway/platforms/nutrition_coaching.py:14982:30
      |
14980 |         try:
14981 |             return MacroTarget(
14982 |                 calories=int(raw["calories"]),
      |                              ^^^^^^^^^^^^^^^ Expected `str | Buffer | SupportsInt | SupportsIndex | SupportsTrunc`, found `object`
14983 |                 carbs_g=int(raw["carbs_g"]),
14984 |                 protein_g=int(raw["protein_g"]),
      |
info: Matching overload defined here
   --> stdlib/builtins.pyi:366:9
    |
365 |     @overload
366 |     def __new__(cls, x: ConvertibleToInt = 0, /) -> Self: ...
    |         ^^^^^^^      ----------------------- Parameter declared here
367 |     @overload
368 |     def __new__(cls, x: str | bytes | bytearray, /, base: SupportsIndex) -> Self: ...
    |
info: Non-matching overloads for function `__new__`:
info:   [Self](cls, x: str | bytes | bytearray, /, base: SupportsIndex) -> Self
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[Mapping[Unknown, object]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["carbs_g"]` on object of type `Top[Mapping[Unknown, object]]`
     --> gateway/platforms/nutrition_coaching.py:14983:29
      |
14981 |             return MacroTarget(
14982 |                 calories=int(raw["calories"]),
14983 |                 carbs_g=int(raw["carbs_g"]),
      |                             ^^^
14984 |                 protein_g=int(raw["protein_g"]),
14985 |                 fat_g=int(raw["fat_g"]),
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `__new__` is incorrect
     --> gateway/platforms/nutrition_coaching.py:14983:29
      |
14981 |             return MacroTarget(
14982 |                 calories=int(raw["calories"]),
14983 |                 carbs_g=int(raw["carbs_g"]),
      |                             ^^^^^^^^^^^^^^ Expected `str | Buffer | SupportsInt | SupportsIndex | SupportsTrunc`, found `object`
14984 |                 protein_g=int(raw["protein_g"]),
14985 |                 fat_g=int(raw["fat_g"]),
      |
info: Matching overload defined here
   --> stdlib/builtins.pyi:366:9
    |
365 |     @overload
366 |     def __new__(cls, x: ConvertibleToInt = 0, /) -> Self: ...
    |         ^^^^^^^      ----------------------- Parameter declared here
367 |     @overload
368 |     def __new__(cls, x: str | bytes | bytearray, /, base: SupportsIndex) -> Self: ...
    |
info: Non-matching overloads for function `__new__`:
info:   [Self](cls, x: str | bytes | bytearray, /, base: SupportsIndex) -> Self
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[Mapping[Unknown, object]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["protein_g"]` on object of type `Top[Mapping[Unknown, object]]`
     --> gateway/platforms/nutrition_coaching.py:14984:31
      |
14982 |                 calories=int(raw["calories"]),
14983 |                 carbs_g=int(raw["carbs_g"]),
14984 |                 protein_g=int(raw["protein_g"]),
      |                               ^^^
14985 |                 fat_g=int(raw["fat_g"]),
14986 |             )
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `__new__` is incorrect
     --> gateway/platforms/nutrition_coaching.py:14984:31
      |
14982 |                 calories=int(raw["calories"]),
14983 |                 carbs_g=int(raw["carbs_g"]),
14984 |                 protein_g=int(raw["protein_g"]),
      |                               ^^^^^^^^^^^^^^^^ Expected `str | Buffer | SupportsInt | SupportsIndex | SupportsTrunc`, found `object`
14985 |                 fat_g=int(raw["fat_g"]),
14986 |             )
      |
info: Matching overload defined here
   --> stdlib/builtins.pyi:366:9
    |
365 |     @overload
366 |     def __new__(cls, x: ConvertibleToInt = 0, /) -> Self: ...
    |         ^^^^^^^      ----------------------- Parameter declared here
367 |     @overload
368 |     def __new__(cls, x: str | bytes | bytearray, /, base: SupportsIndex) -> Self: ...
    |
info: Non-matching overloads for function `__new__`:
info:   [Self](cls, x: str | bytes | bytearray, /, base: SupportsIndex) -> Self
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[Mapping[Unknown, object]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["fat_g"]` on object of type `Top[Mapping[Unknown, object]]`
     --> gateway/platforms/nutrition_coaching.py:14985:27
      |
14983 |                 carbs_g=int(raw["carbs_g"]),
14984 |                 protein_g=int(raw["protein_g"]),
14985 |                 fat_g=int(raw["fat_g"]),
      |                           ^^^
14986 |             )
14987 |         except (ArithmeticError, KeyError, TypeError, ValueError) as exc:
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `__new__` is incorrect
     --> gateway/platforms/nutrition_coaching.py:14985:27
      |
14983 |                 carbs_g=int(raw["carbs_g"]),
14984 |                 protein_g=int(raw["protein_g"]),
14985 |                 fat_g=int(raw["fat_g"]),
      |                           ^^^^^^^^^^^^ Expected `str | Buffer | SupportsInt | SupportsIndex | SupportsTrunc`, found `object`
14986 |             )
14987 |         except (ArithmeticError, KeyError, TypeError, ValueError) as exc:
      |
info: Matching overload defined here
   --> stdlib/builtins.pyi:366:9
    |
365 |     @overload
366 |     def __new__(cls, x: ConvertibleToInt = 0, /) -> Self: ...
    |         ^^^^^^^      ----------------------- Parameter declared here
367 |     @overload
368 |     def __new__(cls, x: str | bytes | bytearray, /, base: SupportsIndex) -> Self: ...
    |
info: Non-matching overloads for function `__new__`:
info:   [Self](cls, x: str | bytes | bytearray, /, base: SupportsIndex) -> Self
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[Mapping[Unknown, object]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["slots"]` on object of type `Top[Mapping[Unknown, object]]`
     --> gateway/platforms/nutrition_coaching.py:14998:29
      |
14996 |         try:
14997 |             slots = []
14998 |             for slot_raw in raw["slots"]:
      |                             ^^^
14999 |                 if not isinstance(slot_raw, Mapping):
15000 |                     raise ValueError("meal slot is invalid")
      |
info: rule `invalid-argument-type` is enabled by default

error[not-iterable]: Object of type `object` is not iterable
     --> gateway/platforms/nutrition_coaching.py:14998:29
      |
14996 |         try:
14997 |             slots = []
14998 |             for slot_raw in raw["slots"]:
      |                             ^^^^^^^^^^^^
14999 |                 if not isinstance(slot_raw, Mapping):
15000 |                     raise ValueError("meal slot is invalid")
      |
info: It doesn't have an `__iter__` method or a `__getitem__` method
info: rule `not-iterable` is enabled by default

error[no-matching-overload]: No overload of bound method `get` matches arguments
     --> gateway/platforms/nutrition_coaching.py:15016:53
      |
15014 |             return MealPlan(
15015 |                 slots=tuple(slots),
15016 |                 swaps=tuple(str(value) for value in raw.get("swaps", ())),
      |                                                     ^^^^^^^^^^^^^^^^^^^^
15017 |                 fallback=tuple(str(value) for value in raw.get("fallback", ())),
15018 |                 target=cls._decode_target(raw.get("target")),
      |
info: First overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Possible overloads for bound method `get`:
info:   (self, key: _KT@Mapping, /) -> _VT_co@Mapping | None
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `no-matching-overload` is enabled by default

error[no-matching-overload]: No overload of bound method `get` matches arguments
     --> gateway/platforms/nutrition_coaching.py:15017:56
      |
15015 |                 slots=tuple(slots),
15016 |                 swaps=tuple(str(value) for value in raw.get("swaps", ())),
15017 |                 fallback=tuple(str(value) for value in raw.get("fallback", ())),
      |                                                        ^^^^^^^^^^^^^^^^^^^^^^^
15018 |                 target=cls._decode_target(raw.get("target")),
15019 |                 exact=bool(raw.get("exact", True)),
      |
info: First overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Possible overloads for bound method `get`:
info:   (self, key: _KT@Mapping, /) -> _VT_co@Mapping | None
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `no-matching-overload` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:15018:51
      |
15016 |                 swaps=tuple(str(value) for value in raw.get("swaps", ())),
15017 |                 fallback=tuple(str(value) for value in raw.get("fallback", ())),
15018 |                 target=cls._decode_target(raw.get("target")),
      |                                                   ^^^^^^^^ Expected `Never`, found `Literal["target"]`
15019 |                 exact=bool(raw.get("exact", True)),
15020 |                 compiler_version=str(raw.get("compiler_version", "1.0")),
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[no-matching-overload]: No overload of bound method `get` matches arguments
     --> gateway/platforms/nutrition_coaching.py:15019:28
      |
15017 |                 fallback=tuple(str(value) for value in raw.get("fallback", ())),
15018 |                 target=cls._decode_target(raw.get("target")),
15019 |                 exact=bool(raw.get("exact", True)),
      |                            ^^^^^^^^^^^^^^^^^^^^^^
15020 |                 compiler_version=str(raw.get("compiler_version", "1.0")),
15021 |             )
      |
info: First overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Possible overloads for bound method `get`:
info:   (self, key: _KT@Mapping, /) -> _VT_co@Mapping | None
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `no-matching-overload` is enabled by default

error[no-matching-overload]: No overload of bound method `get` matches arguments
     --> gateway/platforms/nutrition_coaching.py:15020:38
      |
15018 |                 target=cls._decode_target(raw.get("target")),
15019 |                 exact=bool(raw.get("exact", True)),
15020 |                 compiler_version=str(raw.get("compiler_version", "1.0")),
      |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15021 |             )
15022 |         except (ArithmeticError, KeyError, TypeError, ValueError) as exc:
      |
info: First overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Possible overloads for bound method `get`:
info:   (self, key: _KT@Mapping, /) -> _VT_co@Mapping | None
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `no-matching-overload` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[Mapping[Unknown, object]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["targets"]` on object of type `Top[Mapping[Unknown, object]]`
     --> gateway/platforms/nutrition_coaching.py:15036:31
      |
15034 |         try:
15035 |             targets = []
15036 |             for target_raw in raw["targets"]:
      |                               ^^^
15037 |                 if not isinstance(target_raw, Mapping):
15038 |                     raise ValueError("weekly carb target is invalid")
      |
info: rule `invalid-argument-type` is enabled by default

error[not-iterable]: Object of type `object` is not iterable
     --> gateway/platforms/nutrition_coaching.py:15036:31
      |
15034 |         try:
15035 |             targets = []
15036 |             for target_raw in raw["targets"]:
      |                               ^^^^^^^^^^^^^^
15037 |                 if not isinstance(target_raw, Mapping):
15038 |                     raise ValueError("weekly carb target is invalid")
      |
info: It doesn't have an `__iter__` method or a `__getitem__` method
info: rule `not-iterable` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[Mapping[Unknown, object]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["base_target"]` on object of type `Top[Mapping[Unknown, object]]`
     --> gateway/platforms/nutrition_coaching.py:15049:46
      |
15047 |                     )
15048 |                 )
15049 |             base_target = cls._decode_target(raw["base_target"])
      |                                              ^^^
15050 |             if base_target is None:
15051 |                 raise ValueError("weekly carb base target is invalid")
      |
info: rule `invalid-argument-type` is enabled by default

error[no-matching-overload]: No overload of bound method `get` matches arguments
     --> gateway/platforms/nutrition_coaching.py:15052:24
      |
15050 |             if base_target is None:
15051 |                 raise ValueError("weekly carb base target is invalid")
15052 |             feasible = raw.get("feasible", True)
      |                        ^^^^^^^^^^^^^^^^^^^^^^^^^
15053 |             if type(feasible) is not bool:
15054 |                 raise ValueError("weekly carb feasibility is invalid")
      |
info: First overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Possible overloads for bound method `get`:
info:   (self, key: _KT@Mapping, /) -> _VT_co@Mapping | None
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `no-matching-overload` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:15055:30
      |
15053 |             if type(feasible) is not bool:
15054 |                 raise ValueError("weekly carb feasibility is invalid")
15055 |             reason = raw.get("reason")
      |                              ^^^^^^^^ Expected `Never`, found `Literal["reason"]`
15056 |             if reason is not None and not isinstance(reason, str):
15057 |                 raise ValueError("weekly carb reason is invalid")
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[no-matching-overload]: No overload of bound method `get` matches arguments
     --> gateway/platforms/nutrition_coaching.py:15058:23
      |
15056 |             if reason is not None and not isinstance(reason, str):
15057 |                 raise ValueError("weekly carb reason is invalid")
15058 |             version = raw.get("version", "1.0")
      |                       ^^^^^^^^^^^^^^^^^^^^^^^^^
15059 |             if not isinstance(version, str):
15060 |                 raise ValueError("weekly carb version is invalid")
      |
info: First overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Possible overloads for bound method `get`:
info:   (self, key: _KT@Mapping, /) -> _VT_co@Mapping | None
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `no-matching-overload` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[Mapping[Unknown, object]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["weekly_calories"]` on object of type `Top[Mapping[Unknown, object]]`
     --> gateway/platforms/nutrition_coaching.py:15064:37
      |
15062 |                 targets=tuple(targets),
15063 |                 base_target=base_target,
15064 |                 weekly_calories=int(raw["weekly_calories"]),
      |                                     ^^^
15065 |                 weekly_carbs_g=int(raw["weekly_carbs_g"]),
15066 |                 weekly_protein_g=int(raw["weekly_protein_g"]),
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `__new__` is incorrect
     --> gateway/platforms/nutrition_coaching.py:15064:37
      |
15062 |                 targets=tuple(targets),
15063 |                 base_target=base_target,
15064 |                 weekly_calories=int(raw["weekly_calories"]),
      |                                     ^^^^^^^^^^^^^^^^^^^^^^ Expected `str | Buffer | SupportsInt | SupportsIndex | SupportsTrunc`, found `object`
15065 |                 weekly_carbs_g=int(raw["weekly_carbs_g"]),
15066 |                 weekly_protein_g=int(raw["weekly_protein_g"]),
      |
info: Matching overload defined here
   --> stdlib/builtins.pyi:366:9
    |
365 |     @overload
366 |     def __new__(cls, x: ConvertibleToInt = 0, /) -> Self: ...
    |         ^^^^^^^      ----------------------- Parameter declared here
367 |     @overload
368 |     def __new__(cls, x: str | bytes | bytearray, /, base: SupportsIndex) -> Self: ...
    |
info: Non-matching overloads for function `__new__`:
info:   [Self](cls, x: str | bytes | bytearray, /, base: SupportsIndex) -> Self
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[Mapping[Unknown, object]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["weekly_carbs_g"]` on object of type `Top[Mapping[Unknown, object]]`
     --> gateway/platforms/nutrition_coaching.py:15065:36
      |
15063 |                 base_target=base_target,
15064 |                 weekly_calories=int(raw["weekly_calories"]),
15065 |                 weekly_carbs_g=int(raw["weekly_carbs_g"]),
      |                                    ^^^
15066 |                 weekly_protein_g=int(raw["weekly_protein_g"]),
15067 |                 weekly_fat_g=int(raw["weekly_fat_g"]),
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `__new__` is incorrect
     --> gateway/platforms/nutrition_coaching.py:15065:36
      |
15063 |                 base_target=base_target,
15064 |                 weekly_calories=int(raw["weekly_calories"]),
15065 |                 weekly_carbs_g=int(raw["weekly_carbs_g"]),
      |                                    ^^^^^^^^^^^^^^^^^^^^^ Expected `str | Buffer | SupportsInt | SupportsIndex | SupportsTrunc`, found `object`
15066 |                 weekly_protein_g=int(raw["weekly_protein_g"]),
15067 |                 weekly_fat_g=int(raw["weekly_fat_g"]),
      |
info: Matching overload defined here
   --> stdlib/builtins.pyi:366:9
    |
365 |     @overload
366 |     def __new__(cls, x: ConvertibleToInt = 0, /) -> Self: ...
    |         ^^^^^^^      ----------------------- Parameter declared here
367 |     @overload
368 |     def __new__(cls, x: str | bytes | bytearray, /, base: SupportsIndex) -> Self: ...
    |
info: Non-matching overloads for function `__new__`:
info:   [Self](cls, x: str | bytes | bytearray, /, base: SupportsIndex) -> Self
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[Mapping[Unknown, object]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["weekly_protein_g"]` on object of type `Top[Mapping[Unknown, object]]`
     --> gateway/platforms/nutrition_coaching.py:15066:38
      |
15064 |                 weekly_calories=int(raw["weekly_calories"]),
15065 |                 weekly_carbs_g=int(raw["weekly_carbs_g"]),
15066 |                 weekly_protein_g=int(raw["weekly_protein_g"]),
      |                                      ^^^
15067 |                 weekly_fat_g=int(raw["weekly_fat_g"]),
15068 |                 feasible=feasible,
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `__new__` is incorrect
     --> gateway/platforms/nutrition_coaching.py:15066:38
      |
15064 |                 weekly_calories=int(raw["weekly_calories"]),
15065 |                 weekly_carbs_g=int(raw["weekly_carbs_g"]),
15066 |                 weekly_protein_g=int(raw["weekly_protein_g"]),
      |                                      ^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | Buffer | SupportsInt | SupportsIndex | SupportsTrunc`, found `object`
15067 |                 weekly_fat_g=int(raw["weekly_fat_g"]),
15068 |                 feasible=feasible,
      |
info: Matching overload defined here
   --> stdlib/builtins.pyi:366:9
    |
365 |     @overload
366 |     def __new__(cls, x: ConvertibleToInt = 0, /) -> Self: ...
    |         ^^^^^^^      ----------------------- Parameter declared here
367 |     @overload
368 |     def __new__(cls, x: str | bytes | bytearray, /, base: SupportsIndex) -> Self: ...
    |
info: Non-matching overloads for function `__new__`:
info:   [Self](cls, x: str | bytes | bytearray, /, base: SupportsIndex) -> Self
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[Mapping[Unknown, object]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["weekly_fat_g"]` on object of type `Top[Mapping[Unknown, object]]`
     --> gateway/platforms/nutrition_coaching.py:15067:34
      |
15065 |                 weekly_carbs_g=int(raw["weekly_carbs_g"]),
15066 |                 weekly_protein_g=int(raw["weekly_protein_g"]),
15067 |                 weekly_fat_g=int(raw["weekly_fat_g"]),
      |                                  ^^^
15068 |                 feasible=feasible,
15069 |                 reason=reason,
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `__new__` is incorrect
     --> gateway/platforms/nutrition_coaching.py:15067:34
      |
15065 |                 weekly_carbs_g=int(raw["weekly_carbs_g"]),
15066 |                 weekly_protein_g=int(raw["weekly_protein_g"]),
15067 |                 weekly_fat_g=int(raw["weekly_fat_g"]),
      |                                  ^^^^^^^^^^^^^^^^^^^ Expected `str | Buffer | SupportsInt | SupportsIndex | SupportsTrunc`, found `object`
15068 |                 feasible=feasible,
15069 |                 reason=reason,
      |
info: Matching overload defined here
   --> stdlib/builtins.pyi:366:9
    |
365 |     @overload
366 |     def __new__(cls, x: ConvertibleToInt = 0, /) -> Self: ...
    |         ^^^^^^^      ----------------------- Parameter declared here
367 |     @overload
368 |     def __new__(cls, x: str | bytes | bytearray, /, base: SupportsIndex) -> Self: ...
    |
info: Non-matching overloads for function `__new__`:
info:   [Self](cls, x: str | bytes | bytearray, /, base: SupportsIndex) -> Self
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:15086:45
      |
15084 |                 "persisted adaptive daily nutrition plan is invalid"
15085 |             )
15086 |         target = cls._decode_target(raw.get("target"))
      |                                             ^^^^^^^^ Expected `Never`, found `Literal["target"]`
15087 |         meal_plan = cls._decode_meal_plan(raw.get("meal_plan"))
15088 |         if target is None or meal_plan is None:
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:15087:51
      |
15085 |             )
15086 |         target = cls._decode_target(raw.get("target"))
15087 |         meal_plan = cls._decode_meal_plan(raw.get("meal_plan"))
      |                                                   ^^^^^^^^^^^ Expected `Never`, found `Literal["meal_plan"]`
15088 |         if target is None or meal_plan is None:
15089 |             raise AdaptiveWorkflowError(
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[Mapping[Unknown, object]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["kst_day"]` on object of type `Top[Mapping[Unknown, object]]`
     --> gateway/platforms/nutrition_coaching.py:15094:48
      |
15092 |         try:
15093 |             return DailyNutritionPlan(
15094 |                 kst_day=date.fromisoformat(str(raw["kst_day"])),
      |                                                ^^^
15095 |                 category=str(raw["category"]),
15096 |                 target=target,
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[Mapping[Unknown, object]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["category"]` on object of type `Top[Mapping[Unknown, object]]`
     --> gateway/platforms/nutrition_coaching.py:15095:30
      |
15093 |             return DailyNutritionPlan(
15094 |                 kst_day=date.fromisoformat(str(raw["kst_day"])),
15095 |                 category=str(raw["category"]),
      |                              ^^^
15096 |                 target=target,
15097 |                 meal_plan=meal_plan,
      |
info: rule `invalid-argument-type` is enabled by default

error[no-matching-overload]: No overload of bound method `get` matches arguments
     --> gateway/platforms/nutrition_coaching.py:15098:37
      |
15096 |                 target=target,
15097 |                 meal_plan=meal_plan,
15098 |                 nutrition_basis=str(raw.get("nutrition_basis", "initial")),
      |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15099 |                 parent_daily_digest=(
15100 |                     str(raw["parent_daily_digest"])
      |
info: First overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Possible overloads for bound method `get`:
info:   (self, key: _KT@Mapping, /) -> _VT_co@Mapping | None
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `no-matching-overload` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[Mapping[Unknown, object]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["parent_daily_digest"]` on object of type `Top[Mapping[Unknown, object]]`
     --> gateway/platforms/nutrition_coaching.py:15100:25
      |
15098 |                 nutrition_basis=str(raw.get("nutrition_basis", "initial")),
15099 |                 parent_daily_digest=(
15100 |                     str(raw["parent_daily_digest"])
      |                         ^^^
15101 |                     if raw.get("parent_daily_digest") is not None
15102 |                     else None
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:15101:32
      |
15099 |                 parent_daily_digest=(
15100 |                     str(raw["parent_daily_digest"])
15101 |                     if raw.get("parent_daily_digest") is not None
      |                                ^^^^^^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["parent_daily_digest"]`
15102 |                     else None
15103 |                 ),
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:15121:50
      |
15119 |                 "persisted adaptive weekly nutrition plan is invalid"
15120 |             )
15121 |         base_target = cls._decode_target(raw.get("base_target"))
      |                                                  ^^^^^^^^^^^^^ Expected `Never`, found `Literal["base_target"]`
15122 |         if base_target is None:
15123 |             raise AdaptiveWorkflowError(
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[Mapping[Unknown, object]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["days"]` on object of type `Top[Mapping[Unknown, object]]`
     --> gateway/platforms/nutrition_coaching.py:15127:24
      |
15125 |             )
15126 |         try:
15127 |             days_raw = raw["days"]
      |                        ^^^
15128 |             if not isinstance(days_raw, Sequence) or isinstance(
15129 |                 days_raw, (str, bytes, bytearray)
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[Mapping[Unknown, object]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["horizon_start"]` on object of type `Top[Mapping[Unknown, object]]`
     --> gateway/platforms/nutrition_coaching.py:15133:57
      |
15131 |                 raise ValueError("weekly nutrition days are invalid")
15132 |             values: dict[str, object] = {
15133 |                 "horizon_start": date.fromisoformat(str(raw["horizon_start"])),
      |                                                         ^^^
15134 |                 "as_of_kst_day": date.fromisoformat(str(raw["as_of_kst_day"])),
15135 |                 "frozen_through": (
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[Mapping[Unknown, object]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["as_of_kst_day"]` on object of type `Top[Mapping[Unknown, object]]`
     --> gateway/platforms/nutrition_coaching.py:15134:57
      |
15132 |             values: dict[str, object] = {
15133 |                 "horizon_start": date.fromisoformat(str(raw["horizon_start"])),
15134 |                 "as_of_kst_day": date.fromisoformat(str(raw["as_of_kst_day"])),
      |                                                         ^^^
15135 |                 "frozen_through": (
15136 |                     date.fromisoformat(str(raw["frozen_through"]))
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[Mapping[Unknown, object]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["frozen_through"]` on object of type `Top[Mapping[Unknown, object]]`
     --> gateway/platforms/nutrition_coaching.py:15136:44
      |
15134 |                 "as_of_kst_day": date.fromisoformat(str(raw["as_of_kst_day"])),
15135 |                 "frozen_through": (
15136 |                     date.fromisoformat(str(raw["frozen_through"]))
      |                                            ^^^
15137 |                     if raw.get("frozen_through") is not None
15138 |                     else None
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:15137:32
      |
15135 |                 "frozen_through": (
15136 |                     date.fromisoformat(str(raw["frozen_through"]))
15137 |                     if raw.get("frozen_through") is not None
      |                                ^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["frozen_through"]`
15138 |                     else None
15139 |                 ),
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[Mapping[Unknown, object]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["parent_plan_digest"]` on object of type `Top[Mapping[Unknown, object]]`
     --> gateway/platforms/nutrition_coaching.py:15145:25
      |
15143 |                 ),
15144 |                 "parent_plan_digest": (
15145 |                     str(raw["parent_plan_digest"])
      |                         ^^^
15146 |                     if raw.get("parent_plan_digest") is not None
15147 |                     else None
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:15146:32
      |
15144 |                 "parent_plan_digest": (
15145 |                     str(raw["parent_plan_digest"])
15146 |                     if raw.get("parent_plan_digest") is not None
      |                                ^^^^^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["parent_plan_digest"]`
15147 |                     else None
15148 |                 ),
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[Mapping[Unknown, object]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["planned_schedule_digest"]` on object of type `Top[Mapping[Unknown, object]]`
     --> gateway/platforms/nutrition_coaching.py:15150:25
      |
15148 |                 ),
15149 |                 "planned_schedule_digest": (
15150 |                     str(raw["planned_schedule_digest"])
      |                         ^^^
15151 |                     if raw.get("planned_schedule_digest") is not None
15152 |                     else None
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:15151:32
      |
15149 |                 "planned_schedule_digest": (
15150 |                     str(raw["planned_schedule_digest"])
15151 |                     if raw.get("planned_schedule_digest") is not None
      |                                ^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["planned_schedule_digest"]`
15152 |                     else None
15153 |                 ),
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[Mapping[Unknown, object]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["effective_schedule_digest"]` on object of type `Top[Mapping[Unknown, object]]`
     --> gateway/platforms/nutrition_coaching.py:15155:25
      |
15153 |                 ),
15154 |                 "effective_schedule_digest": (
15155 |                     str(raw["effective_schedule_digest"])
      |                         ^^^
15156 |                     if raw.get("effective_schedule_digest") is not None
15157 |                     else None
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:15156:32
      |
15154 |                 "effective_schedule_digest": (
15155 |                     str(raw["effective_schedule_digest"])
15156 |                     if raw.get("effective_schedule_digest") is not None
      |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["effective_schedule_digest"]`
15157 |                     else None
15158 |                 ),
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[no-matching-overload]: No overload of bound method `get` matches arguments
     --> gateway/platforms/nutrition_coaching.py:15159:32
      |
15157 |                     else None
15158 |                 ),
15159 |                 "version": str(raw.get("version", "weekly-nutrition-plan-v1")),
      |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15160 |                 "compiler_version": str(raw.get("compiler_version", "1.0")),
15161 |             }
      |
info: First overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Possible overloads for bound method `get`:
info:   (self, key: _KT@Mapping, /) -> _VT_co@Mapping | None
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `no-matching-overload` is enabled by default

error[no-matching-overload]: No overload of bound method `get` matches arguments
     --> gateway/platforms/nutrition_coaching.py:15160:41
      |
15158 |                 ),
15159 |                 "version": str(raw.get("version", "weekly-nutrition-plan-v1")),
15160 |                 "compiler_version": str(raw.get("compiler_version", "1.0")),
      |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15161 |             }
15162 |             fields_by_name = getattr(WeeklyNutritionPlan, "__dataclass_fields__", {})
      |
info: First overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Possible overloads for bound method `get`:
info:   (self, key: _KT@Mapping, /) -> _VT_co@Mapping | None
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `no-matching-overload` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15166:40
      |
15164 |                 if name not in values and name in raw:
15165 |                     values[name] = raw[name]
15166 |             return WeeklyNutritionPlan(**values)
      |                                        ^^^^^^^^ Expected `date`, found `object`
15167 |         except (ArithmeticError, KeyError, TypeError, ValueError) as exc:
15168 |             raise AdaptiveWorkflowError(
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15166:40
      |
15164 |                 if name not in values and name in raw:
15165 |                     values[name] = raw[name]
15166 |             return WeeklyNutritionPlan(**values)
      |                                        ^^^^^^^^ Expected `date`, found `object`
15167 |         except (ArithmeticError, KeyError, TypeError, ValueError) as exc:
15168 |             raise AdaptiveWorkflowError(
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15166:40
      |
15164 |                 if name not in values and name in raw:
15165 |                     values[name] = raw[name]
15166 |             return WeeklyNutritionPlan(**values)
      |                                        ^^^^^^^^ Expected `date | None`, found `object`
15167 |         except (ArithmeticError, KeyError, TypeError, ValueError) as exc:
15168 |             raise AdaptiveWorkflowError(
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15166:40
      |
15164 |                 if name not in values and name in raw:
15165 |                     values[name] = raw[name]
15166 |             return WeeklyNutritionPlan(**values)
      |                                        ^^^^^^^^ Expected `MacroTarget`, found `object`
15167 |         except (ArithmeticError, KeyError, TypeError, ValueError) as exc:
15168 |             raise AdaptiveWorkflowError(
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15166:40
      |
15164 |                 if name not in values and name in raw:
15165 |                     values[name] = raw[name]
15166 |             return WeeklyNutritionPlan(**values)
      |                                        ^^^^^^^^ Expected `tuple[DailyNutritionPlan, ...]`, found `object`
15167 |         except (ArithmeticError, KeyError, TypeError, ValueError) as exc:
15168 |             raise AdaptiveWorkflowError(
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15166:40
      |
15164 |                 if name not in values and name in raw:
15165 |                     values[name] = raw[name]
15166 |             return WeeklyNutritionPlan(**values)
      |                                        ^^^^^^^^ Expected `str | None`, found `object`
15167 |         except (ArithmeticError, KeyError, TypeError, ValueError) as exc:
15168 |             raise AdaptiveWorkflowError(
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15166:40
      |
15164 |                 if name not in values and name in raw:
15165 |                     values[name] = raw[name]
15166 |             return WeeklyNutritionPlan(**values)
      |                                        ^^^^^^^^ Expected `str | None`, found `object`
15167 |         except (ArithmeticError, KeyError, TypeError, ValueError) as exc:
15168 |             raise AdaptiveWorkflowError(
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15166:40
      |
15164 |                 if name not in values and name in raw:
15165 |                     values[name] = raw[name]
15166 |             return WeeklyNutritionPlan(**values)
      |                                        ^^^^^^^^ Expected `str | None`, found `object`
15167 |         except (ArithmeticError, KeyError, TypeError, ValueError) as exc:
15168 |             raise AdaptiveWorkflowError(
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15166:40
      |
15164 |                 if name not in values and name in raw:
15165 |                     values[name] = raw[name]
15166 |             return WeeklyNutritionPlan(**values)
      |                                        ^^^^^^^^ Expected `str | None`, found `object`
15167 |         except (ArithmeticError, KeyError, TypeError, ValueError) as exc:
15168 |             raise AdaptiveWorkflowError(
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15166:40
      |
15164 |                 if name not in values and name in raw:
15165 |                     values[name] = raw[name]
15166 |             return WeeklyNutritionPlan(**values)
      |                                        ^^^^^^^^ Expected `str`, found `object`
15167 |         except (ArithmeticError, KeyError, TypeError, ValueError) as exc:
15168 |             raise AdaptiveWorkflowError(
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15166:40
      |
15164 |                 if name not in values and name in raw:
15165 |                     values[name] = raw[name]
15166 |             return WeeklyNutritionPlan(**values)
      |                                        ^^^^^^^^ Expected `str`, found `object`
15167 |         except (ArithmeticError, KeyError, TypeError, ValueError) as exc:
15168 |             raise AdaptiveWorkflowError(
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[Mapping[Unknown, object]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["active"]` on object of type `Top[Mapping[Unknown, object]]`
     --> gateway/platforms/nutrition_coaching.py:15180:22
      |
15178 |             raise AdaptiveWorkflowError("persisted adaptive cooldown is invalid")
15179 |         try:
15180 |             active = raw["active"]
      |                      ^^^
15181 |             if type(active) is not bool:
15182 |                 raise ValueError("cooldown active flag is invalid")
      |
info: rule `invalid-argument-type` is enabled by default

error[no-matching-overload]: No overload of bound method `get` matches arguments
     --> gateway/platforms/nutrition_coaching.py:15183:22
      |
15181 |             if type(active) is not bool:
15182 |                 raise ValueError("cooldown active flag is invalid")
15183 |             reason = raw.get("reason", "")
      |                      ^^^^^^^^^^^^^^^^^^^^^
15184 |             if not isinstance(reason, str):
15185 |                 raise ValueError("cooldown reason is invalid")
      |
info: First overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Possible overloads for bound method `get`:
info:   (self, key: _KT@Mapping, /) -> _VT_co@Mapping | None
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `no-matching-overload` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:15192:33
      |
15190 |                 "source_revision_id",
15191 |             ):
15192 |                 value = raw.get(field)
      |                                 ^^^^^ Expected `Never`, found `Literal["anchor_kst", "cooldown_until_kst", "source_revision_id"]`
15193 |                 if value is not None and not isinstance(value, str):
15194 |                     raise ValueError("cooldown metadata is invalid")
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[no-matching-overload]: No overload of bound method `get` matches arguments
     --> gateway/platforms/nutrition_coaching.py:15196:30
      |
15194 |                     raise ValueError("cooldown metadata is invalid")
15195 |                 optional_strings[field] = value
15196 |             days_remaining = raw.get("days_remaining", 0)
      |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15197 |             if (
15198 |                 isinstance(days_remaining, bool)
      |
info: First overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Possible overloads for bound method `get`:
info:   (self, key: _KT@Mapping, /) -> _VT_co@Mapping | None
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `no-matching-overload` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:15266:38
      |
15264 |                     raise AdaptiveWorkflowError("adaptive canonical event is invalid")
15265 |                 raw_event = dump(mode="json")
15266 |             event_id = raw_event.get("event_id") if isinstance(raw_event, Mapping) else None
      |                                      ^^^^^^^^^^ Expected `Never`, found `Literal["event_id"]`
15267 |             if not isinstance(event_id, str) or not event_id or event_id in event_ids:
15268 |                 raise AdaptiveWorkflowError("adaptive canonical event identity is invalid")
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `len` is incorrect
     --> gateway/platforms/nutrition_coaching.py:15319:20
      |
15317 |         if any(
15318 |             not isinstance(authority_fields[field], str)
15319 |             or len(authority_fields[field]) != 64
      |                    ^^^^^^^^^^^^^^^^^^^^^^^ Expected `Sized`, found `object`
15320 |             for field in (
15321 |                 "registry_digest",
      |
info: Function defined here
    --> stdlib/builtins.pyi:3784:5
     |
3782 |     """
3783 |
3784 | def len(obj: Sized, /) -> int:
     |     ^^^ ---------- Parameter declared here
3785 |     """Return the number of items in a container."""
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to class `tuple` is incorrect
     --> gateway/platforms/nutrition_coaching.py:15338:26
      |
15336 |                 and isinstance(self._journal_payload(row).get("customer_keys"), (tuple, list))
15337 |                 and self.customer_key
15338 |                 in tuple(self._journal_payload(row).get("customer_keys", ()))
      |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `Iterable[Unknown]`, found `object`
15339 |             )
15340 |         ]
      |
info: rule `invalid-argument-type` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `strip`
     --> gateway/platforms/nutrition_coaching.py:15368:17
      |
15366 |             not isinstance(states, Mapping)
15367 |             or any(not isinstance(key, str) or not key.strip() for key in states)
15368 |             or {key.strip() for key in states} != canonical_keys
      |                 ^^^^^^^^^
15369 |             or any(states[key] != "committed" for key in states)
15370 |         ):
      |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[Mapping[Unknown, object]].__getitem__(key: Never, /) -> object` cannot be called with key of type `object` on object of type `Top[Mapping[Unknown, object]]`
     --> gateway/platforms/nutrition_coaching.py:15369:20
      |
15367 |             or any(not isinstance(key, str) or not key.strip() for key in states)
15368 |             or {key.strip() for key in states} != canonical_keys
15369 |             or any(states[key] != "committed" for key in states)
      |                    ^^^^^^
15370 |         ):
15371 |             raise AdaptiveWorkflowError("adaptive config epoch customer is not committed")
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:15538:39
      |
15536 |         if not isinstance(raw, Mapping):
15537 |             raise AdaptiveWorkflowError("persisted adaptive proposal is invalid")
15538 |         registration_digest = raw.get("registration_digest")
      |                                       ^^^^^^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["registration_digest"]`
15539 |         if registration_digest is not None and (
15540 |             not isinstance(registration_digest, str)
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:15545:32
      |
15543 |         ):
15544 |             raise AdaptiveWorkflowError("persisted adaptive registration pin is invalid")
15545 |         snapshot_raw = raw.get("snapshot")
      |                                ^^^^^^^^^^ Expected `Never`, found `Literal["snapshot"]`
15546 |         if not isinstance(snapshot_raw, Mapping):
15547 |             raise AdaptiveWorkflowError("persisted adaptive snapshot is invalid")
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15590:38
      |
15588 |                 else:
15589 |                     values[name] = value
15590 |             snapshot = TrendSnapshot(**values)
      |                                      ^^^^^^^^ Expected `date`, found `object`
15591 |             target = AdaptiveNutritionCoordinator._decode_target(raw.get("target"))
15592 |             meal_plan = AdaptiveNutritionCoordinator._decode_meal_plan(raw.get("meal_plan"))
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15590:38
      |
15588 |                 else:
15589 |                     values[name] = value
15590 |             snapshot = TrendSnapshot(**values)
      |                                      ^^^^^^^^ Expected `int`, found `object`
15591 |             target = AdaptiveNutritionCoordinator._decode_target(raw.get("target"))
15592 |             meal_plan = AdaptiveNutritionCoordinator._decode_meal_plan(raw.get("meal_plan"))
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15590:38
      |
15588 |                 else:
15589 |                     values[name] = value
15590 |             snapshot = TrendSnapshot(**values)
      |                                      ^^^^^^^^ Expected `int`, found `object`
15591 |             target = AdaptiveNutritionCoordinator._decode_target(raw.get("target"))
15592 |             meal_plan = AdaptiveNutritionCoordinator._decode_meal_plan(raw.get("meal_plan"))
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15590:38
      |
15588 |                 else:
15589 |                     values[name] = value
15590 |             snapshot = TrendSnapshot(**values)
      |                                      ^^^^^^^^ Expected `int`, found `object`
15591 |             target = AdaptiveNutritionCoordinator._decode_target(raw.get("target"))
15592 |             meal_plan = AdaptiveNutritionCoordinator._decode_meal_plan(raw.get("meal_plan"))
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15590:38
      |
15588 |                 else:
15589 |                     values[name] = value
15590 |             snapshot = TrendSnapshot(**values)
      |                                      ^^^^^^^^ Expected `Decimal | None`, found `object`
15591 |             target = AdaptiveNutritionCoordinator._decode_target(raw.get("target"))
15592 |             meal_plan = AdaptiveNutritionCoordinator._decode_meal_plan(raw.get("meal_plan"))
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15590:38
      |
15588 |                 else:
15589 |                     values[name] = value
15590 |             snapshot = TrendSnapshot(**values)
      |                                      ^^^^^^^^ Expected `Decimal | None`, found `object`
15591 |             target = AdaptiveNutritionCoordinator._decode_target(raw.get("target"))
15592 |             meal_plan = AdaptiveNutritionCoordinator._decode_meal_plan(raw.get("meal_plan"))
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15590:38
      |
15588 |                 else:
15589 |                     values[name] = value
15590 |             snapshot = TrendSnapshot(**values)
      |                                      ^^^^^^^^ Expected `Decimal | None`, found `object`
15591 |             target = AdaptiveNutritionCoordinator._decode_target(raw.get("target"))
15592 |             meal_plan = AdaptiveNutritionCoordinator._decode_meal_plan(raw.get("meal_plan"))
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15590:38
      |
15588 |                 else:
15589 |                     values[name] = value
15590 |             snapshot = TrendSnapshot(**values)
      |                                      ^^^^^^^^ Expected `int`, found `object`
15591 |             target = AdaptiveNutritionCoordinator._decode_target(raw.get("target"))
15592 |             meal_plan = AdaptiveNutritionCoordinator._decode_meal_plan(raw.get("meal_plan"))
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15590:38
      |
15588 |                 else:
15589 |                     values[name] = value
15590 |             snapshot = TrendSnapshot(**values)
      |                                      ^^^^^^^^ Expected `bool`, found `object`
15591 |             target = AdaptiveNutritionCoordinator._decode_target(raw.get("target"))
15592 |             meal_plan = AdaptiveNutritionCoordinator._decode_meal_plan(raw.get("meal_plan"))
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15590:38
      |
15588 |                 else:
15589 |                     values[name] = value
15590 |             snapshot = TrendSnapshot(**values)
      |                                      ^^^^^^^^ Expected `tuple[tuple[date, str], ...]`, found `object`
15591 |             target = AdaptiveNutritionCoordinator._decode_target(raw.get("target"))
15592 |             meal_plan = AdaptiveNutritionCoordinator._decode_meal_plan(raw.get("meal_plan"))
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15590:38
      |
15588 |                 else:
15589 |                     values[name] = value
15590 |             snapshot = TrendSnapshot(**values)
      |                                      ^^^^^^^^ Expected `tuple[tuple[date, bool | None, str | None], ...]`, found `object`
15591 |             target = AdaptiveNutritionCoordinator._decode_target(raw.get("target"))
15592 |             meal_plan = AdaptiveNutritionCoordinator._decode_meal_plan(raw.get("meal_plan"))
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15590:38
      |
15588 |                 else:
15589 |                     values[name] = value
15590 |             snapshot = TrendSnapshot(**values)
      |                                      ^^^^^^^^ Expected `int`, found `object`
15591 |             target = AdaptiveNutritionCoordinator._decode_target(raw.get("target"))
15592 |             meal_plan = AdaptiveNutritionCoordinator._decode_meal_plan(raw.get("meal_plan"))
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15590:38
      |
15588 |                 else:
15589 |                     values[name] = value
15590 |             snapshot = TrendSnapshot(**values)
      |                                      ^^^^^^^^ Expected `int`, found `object`
15591 |             target = AdaptiveNutritionCoordinator._decode_target(raw.get("target"))
15592 |             meal_plan = AdaptiveNutritionCoordinator._decode_meal_plan(raw.get("meal_plan"))
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15590:38
      |
15588 |                 else:
15589 |                     values[name] = value
15590 |             snapshot = TrendSnapshot(**values)
      |                                      ^^^^^^^^ Expected `int`, found `object`
15591 |             target = AdaptiveNutritionCoordinator._decode_target(raw.get("target"))
15592 |             meal_plan = AdaptiveNutritionCoordinator._decode_meal_plan(raw.get("meal_plan"))
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15590:38
      |
15588 |                 else:
15589 |                     values[name] = value
15590 |             snapshot = TrendSnapshot(**values)
      |                                      ^^^^^^^^ Expected `int`, found `object`
15591 |             target = AdaptiveNutritionCoordinator._decode_target(raw.get("target"))
15592 |             meal_plan = AdaptiveNutritionCoordinator._decode_meal_plan(raw.get("meal_plan"))
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15590:38
      |
15588 |                 else:
15589 |                     values[name] = value
15590 |             snapshot = TrendSnapshot(**values)
      |                                      ^^^^^^^^ Expected `str`, found `object`
15591 |             target = AdaptiveNutritionCoordinator._decode_target(raw.get("target"))
15592 |             meal_plan = AdaptiveNutritionCoordinator._decode_meal_plan(raw.get("meal_plan"))
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15590:38
      |
15588 |                 else:
15589 |                     values[name] = value
15590 |             snapshot = TrendSnapshot(**values)
      |                                      ^^^^^^^^ Expected `str | None`, found `object`
15591 |             target = AdaptiveNutritionCoordinator._decode_target(raw.get("target"))
15592 |             meal_plan = AdaptiveNutritionCoordinator._decode_meal_plan(raw.get("meal_plan"))
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15590:38
      |
15588 |                 else:
15589 |                     values[name] = value
15590 |             snapshot = TrendSnapshot(**values)
      |                                      ^^^^^^^^ Expected `str`, found `object`
15591 |             target = AdaptiveNutritionCoordinator._decode_target(raw.get("target"))
15592 |             meal_plan = AdaptiveNutritionCoordinator._decode_meal_plan(raw.get("meal_plan"))
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15590:38
      |
15588 |                 else:
15589 |                     values[name] = value
15590 |             snapshot = TrendSnapshot(**values)
      |                                      ^^^^^^^^ Expected `bool`, found `object`
15591 |             target = AdaptiveNutritionCoordinator._decode_target(raw.get("target"))
15592 |             meal_plan = AdaptiveNutritionCoordinator._decode_meal_plan(raw.get("meal_plan"))
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15590:38
      |
15588 |                 else:
15589 |                     values[name] = value
15590 |             snapshot = TrendSnapshot(**values)
      |                                      ^^^^^^^^ Expected `bool`, found `object`
15591 |             target = AdaptiveNutritionCoordinator._decode_target(raw.get("target"))
15592 |             meal_plan = AdaptiveNutritionCoordinator._decode_meal_plan(raw.get("meal_plan"))
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:15591:74
      |
15589 |                     values[name] = value
15590 |             snapshot = TrendSnapshot(**values)
15591 |             target = AdaptiveNutritionCoordinator._decode_target(raw.get("target"))
      |                                                                          ^^^^^^^^ Expected `Never`, found `Literal["target"]`
15592 |             meal_plan = AdaptiveNutritionCoordinator._decode_meal_plan(raw.get("meal_plan"))
15593 |             weekly_carb_cycle = AdaptiveNutritionCoordinator._decode_weekly_carb_cycle(
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:15592:80
      |
15590 |             snapshot = TrendSnapshot(**values)
15591 |             target = AdaptiveNutritionCoordinator._decode_target(raw.get("target"))
15592 |             meal_plan = AdaptiveNutritionCoordinator._decode_meal_plan(raw.get("meal_plan"))
      |                                                                                ^^^^^^^^^^^ Expected `Never`, found `Literal["meal_plan"]`
15593 |             weekly_carb_cycle = AdaptiveNutritionCoordinator._decode_weekly_carb_cycle(
15594 |                 raw.get("weekly_carb_cycle")
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:15594:25
      |
15592 |             meal_plan = AdaptiveNutritionCoordinator._decode_meal_plan(raw.get("meal_plan"))
15593 |             weekly_carb_cycle = AdaptiveNutritionCoordinator._decode_weekly_carb_cycle(
15594 |                 raw.get("weekly_carb_cycle")
      |                         ^^^^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["weekly_carb_cycle"]`
15595 |             )
15596 |             weekly_nutrition_plan = (
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:15598:29
      |
15596 |             weekly_nutrition_plan = (
15597 |                 AdaptiveNutritionCoordinator._decode_weekly_nutrition_plan(
15598 |                     raw.get("weekly_nutrition_plan")
      |                             ^^^^^^^^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["weekly_nutrition_plan"]`
15599 |                 )
15600 |             )
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:15601:78
      |
15599 |                 )
15600 |             )
15601 |             cooldown = AdaptiveNutritionCoordinator._decode_cooldown(raw.get("cooldown"))
      |                                                                              ^^^^^^^^^^ Expected `Never`, found `Literal["cooldown"]`
15602 |             explanation = raw.get("explanation")
15603 |             if explanation is not None and not isinstance(explanation, str):
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:15602:35
      |
15600 |             )
15601 |             cooldown = AdaptiveNutritionCoordinator._decode_cooldown(raw.get("cooldown"))
15602 |             explanation = raw.get("explanation")
      |                                   ^^^^^^^^^^^^^ Expected `Never`, found `Literal["explanation"]`
15603 |             if explanation is not None and not isinstance(explanation, str):
15604 |                 raise ValueError("persisted adaptive explanation is invalid")
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[no-matching-overload]: No overload of bound method `get` matches arguments
     --> gateway/platforms/nutrition_coaching.py:15607:29
      |
15605 |             carb_days = tuple(
15606 |                 (date.fromisoformat(str(item[0])), str(item[1]))
15607 |                 for item in raw.get("carb_days", ())
      |                             ^^^^^^^^^^^^^^^^^^^^^^^^
15608 |             )
15609 |             goal_mode = raw.get("goal_mode")
      |
info: First overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Possible overloads for bound method `get`:
info:   (self, key: _KT@Mapping, /) -> _VT_co@Mapping | None
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `no-matching-overload` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:15609:33
      |
15607 |                 for item in raw.get("carb_days", ())
15608 |             )
15609 |             goal_mode = raw.get("goal_mode")
      |                                 ^^^^^^^^^^^ Expected `Never`, found `Literal["goal_mode"]`
15610 |             if goal_mode is not None and not isinstance(goal_mode, str):
15611 |                 raise ValueError("persisted adaptive goal mode is invalid")
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[Mapping[Unknown, object]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["weekly_rate_min"]` on object of type `Top[Mapping[Unknown, object]]`
     --> gateway/platforms/nutrition_coaching.py:15613:29
      |
15611 |                 raise ValueError("persisted adaptive goal mode is invalid")
15612 |             weekly_rate_min = (
15613 |                 Decimal(str(raw["weekly_rate_min"]))
      |                             ^^^
15614 |                 if raw.get("weekly_rate_min") is not None
15615 |                 else None
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:15614:28
      |
15612 |             weekly_rate_min = (
15613 |                 Decimal(str(raw["weekly_rate_min"]))
15614 |                 if raw.get("weekly_rate_min") is not None
      |                            ^^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["weekly_rate_min"]`
15615 |                 else None
15616 |             )
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[Mapping[Unknown, object]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["weekly_rate_max"]` on object of type `Top[Mapping[Unknown, object]]`
     --> gateway/platforms/nutrition_coaching.py:15618:29
      |
15616 |             )
15617 |             weekly_rate_max = (
15618 |                 Decimal(str(raw["weekly_rate_max"]))
      |                             ^^^
15619 |                 if raw.get("weekly_rate_max") is not None
15620 |                 else None
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:15619:28
      |
15617 |             weekly_rate_max = (
15618 |                 Decimal(str(raw["weekly_rate_max"]))
15619 |                 if raw.get("weekly_rate_max") is not None
      |                            ^^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["weekly_rate_max"]`
15620 |                 else None
15621 |             )
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[Mapping[Unknown, object]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["customer_key"]` on object of type `Top[Mapping[Unknown, object]]`
     --> gateway/platforms/nutrition_coaching.py:15623:37
      |
15621 |             )
15622 |             values = {
15623 |                 "customer_key": str(raw["customer_key"]),
      |                                     ^^^
15624 |                 "snapshot": snapshot,
15625 |                 "decision": Decision(str(raw["decision"])),
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[Mapping[Unknown, object]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["decision"]` on object of type `Top[Mapping[Unknown, object]]`
     --> gateway/platforms/nutrition_coaching.py:15625:42
      |
15623 |                 "customer_key": str(raw["customer_key"]),
15624 |                 "snapshot": snapshot,
15625 |                 "decision": Decision(str(raw["decision"])),
      |                                          ^^^
15626 |                 "reasons": tuple(str(reason) for reason in raw.get("reasons", ())),
15627 |                 "target": target,
      |
info: rule `invalid-argument-type` is enabled by default

error[no-matching-overload]: No overload of bound method `get` matches arguments
     --> gateway/platforms/nutrition_coaching.py:15626:60
      |
15624 |                 "snapshot": snapshot,
15625 |                 "decision": Decision(str(raw["decision"])),
15626 |                 "reasons": tuple(str(reason) for reason in raw.get("reasons", ())),
      |                                                            ^^^^^^^^^^^^^^^^^^^^^^
15627 |                 "target": target,
15628 |                 "carb_days": carb_days,
      |
info: First overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Possible overloads for bound method `get`:
info:   (self, key: _KT@Mapping, /) -> _VT_co@Mapping | None
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `no-matching-overload` is enabled by default

error[no-matching-overload]: No overload of bound method `get` matches arguments
     --> gateway/platforms/nutrition_coaching.py:15629:33
      |
15627 |                 "target": target,
15628 |                 "carb_days": carb_days,
15629 |                 "revision": int(raw.get("revision", 1)),
      |                                 ^^^^^^^^^^^^^^^^^^^^^^
15630 |                 "parent_digest": str(raw["parent_digest"]) if raw.get("parent_digest") is not None else None,
15631 |                 "operator_note": str(raw.get("operator_note", "")),
      |
info: First overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Possible overloads for bound method `get`:
info:   (self, key: _KT@Mapping, /) -> _VT_co@Mapping | None
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `no-matching-overload` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[Mapping[Unknown, object]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["parent_digest"]` on object of type `Top[Mapping[Unknown, object]]`
     --> gateway/platforms/nutrition_coaching.py:15630:38
      |
15628 |                 "carb_days": carb_days,
15629 |                 "revision": int(raw.get("revision", 1)),
15630 |                 "parent_digest": str(raw["parent_digest"]) if raw.get("parent_digest") is not None else None,
      |                                      ^^^
15631 |                 "operator_note": str(raw.get("operator_note", "")),
15632 |                 "source_digest": str(raw["source_digest"]) if raw.get("source_digest") is not None else None,
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:15630:71
      |
15628 |                 "carb_days": carb_days,
15629 |                 "revision": int(raw.get("revision", 1)),
15630 |                 "parent_digest": str(raw["parent_digest"]) if raw.get("parent_digest") is not None else None,
      |                                                                       ^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["parent_digest"]`
15631 |                 "operator_note": str(raw.get("operator_note", "")),
15632 |                 "source_digest": str(raw["source_digest"]) if raw.get("source_digest") is not None else None,
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[no-matching-overload]: No overload of bound method `get` matches arguments
     --> gateway/platforms/nutrition_coaching.py:15631:38
      |
15629 |                 "revision": int(raw.get("revision", 1)),
15630 |                 "parent_digest": str(raw["parent_digest"]) if raw.get("parent_digest") is not None else None,
15631 |                 "operator_note": str(raw.get("operator_note", "")),
      |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15632 |                 "source_digest": str(raw["source_digest"]) if raw.get("source_digest") is not None else None,
15633 |                 "policy_digest": str(raw["policy_digest"]) if raw.get("policy_digest") is not None else None,
      |
info: First overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Possible overloads for bound method `get`:
info:   (self, key: _KT@Mapping, /) -> _VT_co@Mapping | None
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `no-matching-overload` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[Mapping[Unknown, object]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["source_digest"]` on object of type `Top[Mapping[Unknown, object]]`
     --> gateway/platforms/nutrition_coaching.py:15632:38
      |
15630 | …     "parent_digest": str(raw["parent_digest"]) if raw.get("parent_digest") is not None else None,
15631 | …     "operator_note": str(raw.get("operator_note", "")),
15632 | …     "source_digest": str(raw["source_digest"]) if raw.get("source_digest") is not None else None,
      |                            ^^^
15633 | …     "policy_digest": str(raw["policy_digest"]) if raw.get("policy_digest") is not None else None,
15634 | …     "meal_constraints_digest": str(raw["meal_constraints_digest"]) if raw.get("meal_constraints_digest") is not None else None,
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:15632:71
      |
15630 | …     "parent_digest": str(raw["parent_digest"]) if raw.get("parent_digest") is not None else None,
15631 | …     "operator_note": str(raw.get("operator_note", "")),
15632 | …     "source_digest": str(raw["source_digest"]) if raw.get("source_digest") is not None else None,
      |                                                             ^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["source_digest"]`
15633 | …     "policy_digest": str(raw["policy_digest"]) if raw.get("policy_digest") is not None else None,
15634 | …     "meal_constraints_digest": str(raw["meal_constraints_digest"]) if raw.get("meal_constraints_digest") is not None else None,
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[Mapping[Unknown, object]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["policy_digest"]` on object of type `Top[Mapping[Unknown, object]]`
     --> gateway/platforms/nutrition_coaching.py:15633:38
      |
15631 | …     "operator_note": str(raw.get("operator_note", "")),
15632 | …     "source_digest": str(raw["source_digest"]) if raw.get("source_digest") is not None else None,
15633 | …     "policy_digest": str(raw["policy_digest"]) if raw.get("policy_digest") is not None else None,
      |                            ^^^
15634 | …     "meal_constraints_digest": str(raw["meal_constraints_digest"]) if raw.get("meal_constraints_digest") is not None else None,
15635 | …     "catalog_digest": str(raw["catalog_digest"]) if raw.get("catalog_digest") is not None else None,
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:15633:71
      |
15631 | …     "operator_note": str(raw.get("operator_note", "")),
15632 | …     "source_digest": str(raw["source_digest"]) if raw.get("source_digest") is not None else None,
15633 | …     "policy_digest": str(raw["policy_digest"]) if raw.get("policy_digest") is not None else None,
      |                                                             ^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["policy_digest"]`
15634 | …     "meal_constraints_digest": str(raw["meal_constraints_digest"]) if raw.get("meal_constraints_digest") is not None else None,
15635 | …     "catalog_digest": str(raw["catalog_digest"]) if raw.get("catalog_digest") is not None else None,
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[Mapping[Unknown, object]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["meal_constraints_digest"]` on object of type `Top[Mapping[Unknown, object]]`
     --> gateway/platforms/nutrition_coaching.py:15634:48
      |
15632 | …     "source_digest": str(raw["source_digest"]) if raw.get("source_digest") is not None else None,
15633 | …     "policy_digest": str(raw["policy_digest"]) if raw.get("policy_digest") is not None else None,
15634 | …     "meal_constraints_digest": str(raw["meal_constraints_digest"]) if raw.get("meal_constraints_digest") is not None else None,
      |                                      ^^^
15635 | …     "catalog_digest": str(raw["catalog_digest"]) if raw.get("catalog_digest") is not None else None,
15636 | …     "meal_plan": meal_plan,
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:15634:91
      |
15632 | …t("source_digest") is not None else None,
15633 | …t("policy_digest") is not None else None,
15634 | …_digest"]) if raw.get("meal_constraints_digest") is not None else None,
      |                        ^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["meal_constraints_digest"]`
15635 | …get("catalog_digest") is not None else None,
15636 | …
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[Mapping[Unknown, object]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["catalog_digest"]` on object of type `Top[Mapping[Unknown, object]]`
     --> gateway/platforms/nutrition_coaching.py:15635:39
      |
15633 | …     "policy_digest": str(raw["policy_digest"]) if raw.get("policy_digest") is not None else None,
15634 | …     "meal_constraints_digest": str(raw["meal_constraints_digest"]) if raw.get("meal_constraints_digest") is not None else None,
15635 | …     "catalog_digest": str(raw["catalog_digest"]) if raw.get("catalog_digest") is not None else None,
      |                             ^^^
15636 | …     "meal_plan": meal_plan,
15637 | …     "operator_body": str(raw["operator_body"]) if raw.get("operator_body") is not None else None,
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:15635:73
      |
15633 | …"policy_digest"]) if raw.get("policy_digest") is not None else None,
15634 | …: str(raw["meal_constraints_digest"]) if raw.get("meal_constraints_digest") is not None else None,
15635 | …["catalog_digest"]) if raw.get("catalog_digest") is not None else None,
      |                                 ^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["catalog_digest"]`
15636 | …
15637 | …"operator_body"]) if raw.get("operator_body") is not None else None,
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[Mapping[Unknown, object]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["operator_body"]` on object of type `Top[Mapping[Unknown, object]]`
     --> gateway/platforms/nutrition_coaching.py:15637:38
      |
15635 |                 "catalog_digest": str(raw["catalog_digest"]) if raw.get("catalog_digest") is not None else None,
15636 |                 "meal_plan": meal_plan,
15637 |                 "operator_body": str(raw["operator_body"]) if raw.get("operator_body") is not None else None,
      |                                      ^^^
15638 |                 "customer_body": str(raw["customer_body"]) if raw.get("customer_body") is not None else None,
15639 |                 "operator_body_digest": str(raw["operator_body_digest"]) if raw.get("operator_body_digest") is not None else None,
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:15637:71
      |
15635 |                 "catalog_digest": str(raw["catalog_digest"]) if raw.get("catalog_digest") is not None else None,
15636 |                 "meal_plan": meal_plan,
15637 |                 "operator_body": str(raw["operator_body"]) if raw.get("operator_body") is not None else None,
      |                                                                       ^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["operator_body"]`
15638 |                 "customer_body": str(raw["customer_body"]) if raw.get("customer_body") is not None else None,
15639 |                 "operator_body_digest": str(raw["operator_body_digest"]) if raw.get("operator_body_digest") is not None else None,
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[Mapping[Unknown, object]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["customer_body"]` on object of type `Top[Mapping[Unknown, object]]`
     --> gateway/platforms/nutrition_coaching.py:15638:38
      |
15636 |                 "meal_plan": meal_plan,
15637 |                 "operator_body": str(raw["operator_body"]) if raw.get("operator_body") is not None else None,
15638 |                 "customer_body": str(raw["customer_body"]) if raw.get("customer_body") is not None else None,
      |                                      ^^^
15639 |                 "operator_body_digest": str(raw["operator_body_digest"]) if raw.get("operator_body_digest") is not None else None,
15640 |                 "customer_body_digest": str(raw["customer_body_digest"]) if raw.get("customer_body_digest") is not None else None,
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:15638:71
      |
15636 |                 "meal_plan": meal_plan,
15637 |                 "operator_body": str(raw["operator_body"]) if raw.get("operator_body") is not None else None,
15638 |                 "customer_body": str(raw["customer_body"]) if raw.get("customer_body") is not None else None,
      |                                                                       ^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["customer_body"]`
15639 |                 "operator_body_digest": str(raw["operator_body_digest"]) if raw.get("operator_body_digest") is not None else None,
15640 |                 "customer_body_digest": str(raw["customer_body_digest"]) if raw.get("customer_body_digest") is not None else None,
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[Mapping[Unknown, object]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["operator_body_digest"]` on object of type `Top[Mapping[Unknown, object]]`
     --> gateway/platforms/nutrition_coaching.py:15639:45
      |
15637 | …     "operator_body": str(raw["operator_body"]) if raw.get("operator_body") is not None else None,
15638 | …     "customer_body": str(raw["customer_body"]) if raw.get("customer_body") is not None else None,
15639 | …     "operator_body_digest": str(raw["operator_body_digest"]) if raw.get("operator_body_digest") is not None else None,
      |                                   ^^^
15640 | …     "customer_body_digest": str(raw["customer_body_digest"]) if raw.get("customer_body_digest") is not None else None,
15641 | …     "adherence_signal_digest": str(raw["adherence_signal_digest"]) if raw.get("adherence_signal_digest") is not None else None,
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:15639:85
      |
15637 | …if raw.get("operator_body") is not None else None,
15638 | …if raw.get("customer_body") is not None else None,
15639 | …ody_digest"]) if raw.get("operator_body_digest") is not None else None,
      |                           ^^^^^^^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["operator_body_digest"]`
15640 | …ody_digest"]) if raw.get("customer_body_digest") is not None else None,
15641 | …ce_signal_digest"]) if raw.get("adherence_signal_digest") is not None else None,
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[Mapping[Unknown, object]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["customer_body_digest"]` on object of type `Top[Mapping[Unknown, object]]`
     --> gateway/platforms/nutrition_coaching.py:15640:45
      |
15638 | …         "customer_body": str(raw["customer_body"]) if raw.get("customer_body") is not None else None,
15639 | …         "operator_body_digest": str(raw["operator_body_digest"]) if raw.get("operator_body_digest") is not None else None,
15640 | …         "customer_body_digest": str(raw["customer_body_digest"]) if raw.get("customer_body_digest") is not None else None,
      |                                       ^^^
15641 | …         "adherence_signal_digest": str(raw["adherence_signal_digest"]) if raw.get("adherence_signal_digest") is not None else Non…
15642 | …     }
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:15640:85
      |
15638 | …if raw.get("customer_body") is not None else None,
15639 | …ody_digest"]) if raw.get("operator_body_digest") is not None else None,
15640 | …ody_digest"]) if raw.get("customer_body_digest") is not None else None,
      |                           ^^^^^^^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["customer_body_digest"]`
15641 | …ce_signal_digest"]) if raw.get("adherence_signal_digest") is not None else None,
15642 | …
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[Mapping[Unknown, object]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["adherence_signal_digest"]` on object of type `Top[Mapping[Unknown, object]]`
     --> gateway/platforms/nutrition_coaching.py:15641:48
      |
15639 | …         "operator_body_digest": str(raw["operator_body_digest"]) if raw.get("operator_body_digest") is not None else None,
15640 | …         "customer_body_digest": str(raw["customer_body_digest"]) if raw.get("customer_body_digest") is not None else None,
15641 | …         "adherence_signal_digest": str(raw["adherence_signal_digest"]) if raw.get("adherence_signal_digest") is not None else Non…
      |                                          ^^^
15642 | …     }
15643 | …     optional = {
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:15641:91
      |
15639 | …t"]) if raw.get("operator_body_digest") is not None else None,
15640 | …t"]) if raw.get("customer_body_digest") is not None else None,
15641 | …_digest"]) if raw.get("adherence_signal_digest") is not None else None,
      |                        ^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["adherence_signal_digest"]`
15642 | …
15643 | …
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15654:42
      |
15652 |             proposal_fields = getattr(NutritionProposal, "__dataclass_fields__", {})
15653 |             values.update({name: value for name, value in optional.items() if name in proposal_fields})
15654 |             proposal = NutritionProposal(**values)
      |                                          ^^^^^^^^ Expected `tuple[tuple[date, str], ...]`, found `object`
15655 |         except (ArithmeticError, KeyError, TypeError, ValueError) as exc:
15656 |             raise AdaptiveWorkflowError("persisted adaptive proposal is invalid") from exc
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15654:42
      |
15652 |             proposal_fields = getattr(NutritionProposal, "__dataclass_fields__", {})
15653 |             values.update({name: value for name, value in optional.items() if name in proposal_fields})
15654 |             proposal = NutritionProposal(**values)
      |                                          ^^^^^^^^ Expected `tuple[str, ...]`, found `object`
15655 |         except (ArithmeticError, KeyError, TypeError, ValueError) as exc:
15656 |             raise AdaptiveWorkflowError("persisted adaptive proposal is invalid") from exc
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15654:42
      |
15652 |             proposal_fields = getattr(NutritionProposal, "__dataclass_fields__", {})
15653 |             values.update({name: value for name, value in optional.items() if name in proposal_fields})
15654 |             proposal = NutritionProposal(**values)
      |                                          ^^^^^^^^ Expected `MacroTarget | None`, found `object`
15655 |         except (ArithmeticError, KeyError, TypeError, ValueError) as exc:
15656 |             raise AdaptiveWorkflowError("persisted adaptive proposal is invalid") from exc
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15654:42
      |
15652 |             proposal_fields = getattr(NutritionProposal, "__dataclass_fields__", {})
15653 |             values.update({name: value for name, value in optional.items() if name in proposal_fields})
15654 |             proposal = NutritionProposal(**values)
      |                                          ^^^^^^^^ Expected `str`, found `object`
15655 |         except (ArithmeticError, KeyError, TypeError, ValueError) as exc:
15656 |             raise AdaptiveWorkflowError("persisted adaptive proposal is invalid") from exc
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15654:42
      |
15652 |             proposal_fields = getattr(NutritionProposal, "__dataclass_fields__", {})
15653 |             values.update({name: value for name, value in optional.items() if name in proposal_fields})
15654 |             proposal = NutritionProposal(**values)
      |                                          ^^^^^^^^ Expected `int`, found `object`
15655 |         except (ArithmeticError, KeyError, TypeError, ValueError) as exc:
15656 |             raise AdaptiveWorkflowError("persisted adaptive proposal is invalid") from exc
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15654:42
      |
15652 |             proposal_fields = getattr(NutritionProposal, "__dataclass_fields__", {})
15653 |             values.update({name: value for name, value in optional.items() if name in proposal_fields})
15654 |             proposal = NutritionProposal(**values)
      |                                          ^^^^^^^^ Expected `str | None`, found `object`
15655 |         except (ArithmeticError, KeyError, TypeError, ValueError) as exc:
15656 |             raise AdaptiveWorkflowError("persisted adaptive proposal is invalid") from exc
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15654:42
      |
15652 |             proposal_fields = getattr(NutritionProposal, "__dataclass_fields__", {})
15653 |             values.update({name: value for name, value in optional.items() if name in proposal_fields})
15654 |             proposal = NutritionProposal(**values)
      |                                          ^^^^^^^^ Expected `str`, found `object`
15655 |         except (ArithmeticError, KeyError, TypeError, ValueError) as exc:
15656 |             raise AdaptiveWorkflowError("persisted adaptive proposal is invalid") from exc
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15654:42
      |
15652 |             proposal_fields = getattr(NutritionProposal, "__dataclass_fields__", {})
15653 |             values.update({name: value for name, value in optional.items() if name in proposal_fields})
15654 |             proposal = NutritionProposal(**values)
      |                                          ^^^^^^^^ Expected `str | None`, found `object`
15655 |         except (ArithmeticError, KeyError, TypeError, ValueError) as exc:
15656 |             raise AdaptiveWorkflowError("persisted adaptive proposal is invalid") from exc
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15654:42
      |
15652 |             proposal_fields = getattr(NutritionProposal, "__dataclass_fields__", {})
15653 |             values.update({name: value for name, value in optional.items() if name in proposal_fields})
15654 |             proposal = NutritionProposal(**values)
      |                                          ^^^^^^^^ Expected `str | None`, found `object`
15655 |         except (ArithmeticError, KeyError, TypeError, ValueError) as exc:
15656 |             raise AdaptiveWorkflowError("persisted adaptive proposal is invalid") from exc
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15654:42
      |
15652 |             proposal_fields = getattr(NutritionProposal, "__dataclass_fields__", {})
15653 |             values.update({name: value for name, value in optional.items() if name in proposal_fields})
15654 |             proposal = NutritionProposal(**values)
      |                                          ^^^^^^^^ Expected `str | None`, found `object`
15655 |         except (ArithmeticError, KeyError, TypeError, ValueError) as exc:
15656 |             raise AdaptiveWorkflowError("persisted adaptive proposal is invalid") from exc
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15654:42
      |
15652 |             proposal_fields = getattr(NutritionProposal, "__dataclass_fields__", {})
15653 |             values.update({name: value for name, value in optional.items() if name in proposal_fields})
15654 |             proposal = NutritionProposal(**values)
      |                                          ^^^^^^^^ Expected `str | None`, found `object`
15655 |         except (ArithmeticError, KeyError, TypeError, ValueError) as exc:
15656 |             raise AdaptiveWorkflowError("persisted adaptive proposal is invalid") from exc
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15654:42
      |
15652 |             proposal_fields = getattr(NutritionProposal, "__dataclass_fields__", {})
15653 |             values.update({name: value for name, value in optional.items() if name in proposal_fields})
15654 |             proposal = NutritionProposal(**values)
      |                                          ^^^^^^^^ Expected `MealPlan | None`, found `object`
15655 |         except (ArithmeticError, KeyError, TypeError, ValueError) as exc:
15656 |             raise AdaptiveWorkflowError("persisted adaptive proposal is invalid") from exc
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15654:42
      |
15652 |             proposal_fields = getattr(NutritionProposal, "__dataclass_fields__", {})
15653 |             values.update({name: value for name, value in optional.items() if name in proposal_fields})
15654 |             proposal = NutritionProposal(**values)
      |                                          ^^^^^^^^ Expected `str | None`, found `object`
15655 |         except (ArithmeticError, KeyError, TypeError, ValueError) as exc:
15656 |             raise AdaptiveWorkflowError("persisted adaptive proposal is invalid") from exc
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15654:42
      |
15652 |             proposal_fields = getattr(NutritionProposal, "__dataclass_fields__", {})
15653 |             values.update({name: value for name, value in optional.items() if name in proposal_fields})
15654 |             proposal = NutritionProposal(**values)
      |                                          ^^^^^^^^ Expected `str | None`, found `object`
15655 |         except (ArithmeticError, KeyError, TypeError, ValueError) as exc:
15656 |             raise AdaptiveWorkflowError("persisted adaptive proposal is invalid") from exc
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15654:42
      |
15652 |             proposal_fields = getattr(NutritionProposal, "__dataclass_fields__", {})
15653 |             values.update({name: value for name, value in optional.items() if name in proposal_fields})
15654 |             proposal = NutritionProposal(**values)
      |                                          ^^^^^^^^ Expected `str | None`, found `object`
15655 |         except (ArithmeticError, KeyError, TypeError, ValueError) as exc:
15656 |             raise AdaptiveWorkflowError("persisted adaptive proposal is invalid") from exc
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15654:42
      |
15652 |             proposal_fields = getattr(NutritionProposal, "__dataclass_fields__", {})
15653 |             values.update({name: value for name, value in optional.items() if name in proposal_fields})
15654 |             proposal = NutritionProposal(**values)
      |                                          ^^^^^^^^ Expected `str | None`, found `object`
15655 |         except (ArithmeticError, KeyError, TypeError, ValueError) as exc:
15656 |             raise AdaptiveWorkflowError("persisted adaptive proposal is invalid") from exc
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15654:42
      |
15652 |             proposal_fields = getattr(NutritionProposal, "__dataclass_fields__", {})
15653 |             values.update({name: value for name, value in optional.items() if name in proposal_fields})
15654 |             proposal = NutritionProposal(**values)
      |                                          ^^^^^^^^ Expected `str | None`, found `object`
15655 |         except (ArithmeticError, KeyError, TypeError, ValueError) as exc:
15656 |             raise AdaptiveWorkflowError("persisted adaptive proposal is invalid") from exc
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15654:42
      |
15652 |             proposal_fields = getattr(NutritionProposal, "__dataclass_fields__", {})
15653 |             values.update({name: value for name, value in optional.items() if name in proposal_fields})
15654 |             proposal = NutritionProposal(**values)
      |                                          ^^^^^^^^ Expected `WeeklyCarbCycle | None`, found `object`
15655 |         except (ArithmeticError, KeyError, TypeError, ValueError) as exc:
15656 |             raise AdaptiveWorkflowError("persisted adaptive proposal is invalid") from exc
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15654:42
      |
15652 |             proposal_fields = getattr(NutritionProposal, "__dataclass_fields__", {})
15653 |             values.update({name: value for name, value in optional.items() if name in proposal_fields})
15654 |             proposal = NutritionProposal(**values)
      |                                          ^^^^^^^^ Expected `WeeklyNutritionPlan | None`, found `object`
15655 |         except (ArithmeticError, KeyError, TypeError, ValueError) as exc:
15656 |             raise AdaptiveWorkflowError("persisted adaptive proposal is invalid") from exc
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15654:42
      |
15652 |             proposal_fields = getattr(NutritionProposal, "__dataclass_fields__", {})
15653 |             values.update({name: value for name, value in optional.items() if name in proposal_fields})
15654 |             proposal = NutritionProposal(**values)
      |                                          ^^^^^^^^ Expected `CooldownResult | None`, found `object`
15655 |         except (ArithmeticError, KeyError, TypeError, ValueError) as exc:
15656 |             raise AdaptiveWorkflowError("persisted adaptive proposal is invalid") from exc
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15654:42
      |
15652 |             proposal_fields = getattr(NutritionProposal, "__dataclass_fields__", {})
15653 |             values.update({name: value for name, value in optional.items() if name in proposal_fields})
15654 |             proposal = NutritionProposal(**values)
      |                                          ^^^^^^^^ Expected `str | None`, found `object`
15655 |         except (ArithmeticError, KeyError, TypeError, ValueError) as exc:
15656 |             raise AdaptiveWorkflowError("persisted adaptive proposal is invalid") from exc
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15654:42
      |
15652 |             proposal_fields = getattr(NutritionProposal, "__dataclass_fields__", {})
15653 |             values.update({name: value for name, value in optional.items() if name in proposal_fields})
15654 |             proposal = NutritionProposal(**values)
      |                                          ^^^^^^^^ Expected `TrendSnapshot`, found `object`
15655 |         except (ArithmeticError, KeyError, TypeError, ValueError) as exc:
15656 |             raise AdaptiveWorkflowError("persisted adaptive proposal is invalid") from exc
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
     --> gateway/platforms/nutrition_coaching.py:15654:42
      |
15652 |             proposal_fields = getattr(NutritionProposal, "__dataclass_fields__", {})
15653 |             values.update({name: value for name, value in optional.items() if name in proposal_fields})
15654 |             proposal = NutritionProposal(**values)
      |                                          ^^^^^^^^ Expected `Decision`, found `object`
15655 |         except (ArithmeticError, KeyError, TypeError, ValueError) as exc:
15656 |             raise AdaptiveWorkflowError("persisted adaptive proposal is invalid") from exc
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:15673:42
      |
15671 |         if not isinstance(source, Mapping):
15672 |             raise AdaptiveWorkflowError("persisted adaptive proposal is invalid")
15673 |         registration_digest = source.get("registration_digest")
      |                                          ^^^^^^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["registration_digest"]`
15674 |         if registration_digest is not None:
15675 |             cls._registration_digest(registration_digest, "registration digest")
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
     --> gateway/platforms/nutrition_coaching.py:15676:67
      |
15674 |         if registration_digest is not None:
15675 |             cls._registration_digest(registration_digest, "registration digest")
15676 |         return cls._decode_proposal(source), registration_digest  # type: ignore[return-value]
      |                                                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15677 |
15678 |     def _remember_registration_pin(
      |
help: Remove the unused suppression comment
15673 |         registration_digest = source.get("registration_digest")
15674 |         if registration_digest is not None:
15675 |             cls._registration_digest(registration_digest, "registration digest")
      -         return cls._decode_proposal(source), registration_digest  # type: ignore[return-value]
15676 +         return cls._decode_proposal(source), registration_digest
15677 | 
15678 |     def _remember_registration_pin(
15679 |         self,

error[unresolved-attribute]: Attribute `read` is not defined on `~None` in union `Unknown | ~None`
     --> gateway/platforms/nutrition_coaching.py:15702:24
      |
15700 |         if pin is None:
15701 |             try:
15702 |                 rows = self.store.read()
      |                        ^^^^^^^^^^^^^^^
15703 |             except (OSError, TypeError, ValueError) as exc:
15704 |                 raise AdaptiveWorkflowError("adaptive event store is unreadable") from exc
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `read` is not defined on `~None` in union `Unknown | ~None`
     --> gateway/platforms/nutrition_coaching.py:15735:20
      |
15733 |     def _latest_production_proposal(self) -> NutritionProposal:
15734 |         try:
15735 |             rows = self.store.read()
      |                    ^^^^^^^^^^^^^^^
15736 |         except (OSError, TypeError, ValueError) as exc:
15737 |             raise AdaptiveWorkflowError("adaptive event store is unreadable") from exc
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `read` is not defined on `~None` in union `Unknown | ~None`
     --> gateway/platforms/nutrition_coaching.py:15773:20
      |
15771 |             raise AdaptiveWorkflowError("adaptive callback proposal is invalid")
15772 |         try:
15773 |             rows = self.store.read()
      |                    ^^^^^^^^^^^^^^^
15774 |         except (OSError, TypeError, ValueError) as exc:
15775 |             raise AdaptiveWorkflowError("adaptive event store is unreadable") from exc
      |
info: rule `unresolved-attribute` is enabled by default

error[invalid-return-type]: Return type does not match returned value
     --> gateway/platforms/nutrition_coaching.py:15869:16
      |
15867 |           meal_digest = proposal.meal_plan.digest if proposal.meal_plan is not None else ""
15868 |           weekly_nutrition_digest = self._weekly_nutrition_digest(proposal) or ""
15869 |           return {
      |  ________________^
15870 | |             "operator_body_digest": proposal.operator_body_digest,
15871 | |             "customer_body_digest": proposal.customer_body_digest,
15872 | |             "meal_plan_digest": meal_digest,
15873 | |             "meal_digest": meal_digest,
15874 | |             "weekly_nutrition_plan_digest": weekly_nutrition_digest,
15875 | |             "authority_digest": self._authority_digest(spec),
15876 | |         }
      | |_________^ expected `Mapping[str, str]`, found `dict[str, str | None]`
15877 |
15878 |       def _risk_policy_evidence(self) -> dict[str, str]:
      |
     ::: gateway/platforms/nutrition_coaching.py:15834:10
      |
15832 |           proposal: NutritionProposal,
15833 |           spec: object,
15834 |       ) -> Mapping[str, str]:
      |            ----------------- Expected `Mapping[str, str]` because of return type
15835 |           body_values = (
15836 |               proposal.operator_body,
      |
info: rule `invalid-return-type` is enabled by default

error[invalid-argument-type]: Argument to function `load_verified_dual_coach_risk_policy` is incorrect
     --> gateway/platforms/nutrition_coaching.py:15884:59
      |
15882 |         customer, _data_root, _spec = self._live_customer()
15883 |         try:
15884 |             policy = load_verified_dual_coach_risk_policy(customer)
      |                                                           ^^^^^^^^ Expected `CustomerRuntime`, found `object`
15885 |         except (OSError, TypeError, ValueError) as exc:
15886 |             raise AdaptiveWorkflowError("adaptive risk policy is unavailable") from exc
      |
info: Function defined here
   --> dualcoach/profile/checkin_cli/adaptive_nutrition.py:242:5
    |
242 | def load_verified_dual_coach_risk_policy(runtime: CustomerRuntime) -> DualCoachRiskPolicyV1:
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ------------------------ Parameter declared here
243 |     """Load only the current customer-private, owner-approved risk policy."""
244 |     if not isinstance(runtime, CustomerRuntime):
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to class `tuple` is incorrect
     --> gateway/platforms/nutrition_coaching.py:15902:48
      |
15900 |                 row.get("state") == "committed"
15901 |                 and row.get("delivery") is True
15902 |                 and self.customer_key in tuple(row.get("customer_keys", ()))
      |                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `Iterable[Unknown]`, found `object`
15903 |             ):
15904 |                 latest = row
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:15969:29
      |
15967 |             if (
15968 |                 isinstance(row, Mapping)
15969 |                 and row.get("event_type") == event_type
      |                             ^^^^^^^^^^^^ Expected `Never`, found `Literal["event_type"]`
15970 |                 and isinstance(row.get("payload"), Mapping)
15971 |                 and row["payload"].get("proposal_digest") == proposal_digest
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:15970:40
      |
15968 |                 isinstance(row, Mapping)
15969 |                 and row.get("event_type") == event_type
15970 |                 and isinstance(row.get("payload"), Mapping)
      |                                        ^^^^^^^^^ Expected `Never`, found `Literal["payload"]`
15971 |                 and row["payload"].get("proposal_digest") == proposal_digest
15972 |             ):
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Method `__getitem__` of type `bound method Top[Mapping[Unknown, object]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["payload"]` on object of type `Top[Mapping[Unknown, object]]`
     --> gateway/platforms/nutrition_coaching.py:15971:21
      |
15969 |                 and row.get("event_type") == event_type
15970 |                 and isinstance(row.get("payload"), Mapping)
15971 |                 and row["payload"].get("proposal_digest") == proposal_digest
      |                     ^^^
15972 |             ):
15973 |                 latest = row
      |
info: rule `invalid-argument-type` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `get`
     --> gateway/platforms/nutrition_coaching.py:15971:21
      |
15969 |                 and row.get("event_type") == event_type
15970 |                 and isinstance(row.get("payload"), Mapping)
15971 |                 and row["payload"].get("proposal_digest") == proposal_digest
      |                     ^^^^^^^^^^^^^^^^^^
15972 |             ):
15973 |                 latest = row
      |
info: rule `unresolved-attribute` is enabled by default

error[invalid-assignment]: Object of type `Top[Mapping[Unknown, object]]` is not assignable to `Mapping[str, object] | None`
     --> gateway/platforms/nutrition_coaching.py:15973:17
      |
15971 |                 and row["payload"].get("proposal_digest") == proposal_digest
15972 |             ):
15973 |                 latest = row
      |                 ------   ^^^ Incompatible value of type `Top[Mapping[Unknown, object]]`
      |                 |
      |                 Declared type `Mapping[str, object] | None`
15974 |         return latest
      |
info: rule `invalid-assignment` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:16092:27
      |
16090 |         if not isinstance(row, Mapping):
16091 |             return None
16092 |         payload = row.get("payload")
      |                           ^^^^^^^^^ Expected `Never`, found `Literal["payload"]`
16093 |         return payload if isinstance(payload, Mapping) else None
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-return-type]: Return type does not match returned value
     --> gateway/platforms/nutrition_coaching.py:16102:10
      |
16100 |           event_type: str,
16101 |           transaction_id: str,
16102 |       ) -> tuple[Mapping[str, object], ...]:
      |            -------------------------------- Expected `tuple[Mapping[str, object], ...]` because of return type
16103 |           return tuple(
      |  ________________^
16104 | |             row
16105 | |             for row in rows
16106 | |             if isinstance(row, Mapping)
16107 | |             and row.get("event_type") == event_type
16108 | |             and cls._transition_payload(row) is not None
16109 | |             and cls._transition_payload(row).get("transaction_id") == transaction_id
16110 | |         )
      | |_________^ expected `tuple[Mapping[str, object], ...]`, found `tuple[Top[Mapping[Unknown, object]], ...]`
16111 |
16112 |       @classmethod
      |
info: rule `invalid-return-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:16107:25
      |
16105 |             for row in rows
16106 |             if isinstance(row, Mapping)
16107 |             and row.get("event_type") == event_type
      |                         ^^^^^^^^^^^^ Expected `Never`, found `Literal["event_type"]`
16108 |             and cls._transition_payload(row) is not None
16109 |             and cls._transition_payload(row).get("transaction_id") == transaction_id
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[unresolved-attribute]: Attribute `get` is not defined on `None` in union `Mapping[str, object] | None`
     --> gateway/platforms/nutrition_coaching.py:16109:17
      |
16107 |             and row.get("event_type") == event_type
16108 |             and cls._transition_payload(row) is not None
16109 |             and cls._transition_payload(row).get("transaction_id") == transaction_id
      |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
16110 |         )
      |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:16126:29
      |
16124 |             if (
16125 |                 isinstance(row, Mapping)
16126 |                 and row.get("event_type") == "transition_committed"
      |                             ^^^^^^^^^^^^ Expected `Never`, found `Literal["event_type"]`
16127 |                 and payload is not None
16128 |                 and payload.get("action") in {action, aliases.get(action)}
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-assignment]: Object of type `Top[Mapping[Unknown, object]]` is not assignable to `Mapping[str, object] | None`
     --> gateway/platforms/nutrition_coaching.py:16131:17
      |
16129 |                 and payload.get("proposal_digest", payload.get("revision_id")) == proposal_digest
16130 |             ):
16131 |                 latest = row
      |                 ------   ^^^ Incompatible value of type `Top[Mapping[Unknown, object]]`
      |                 |
      |                 Declared type `Mapping[str, object] | None`
16132 |         return latest
      |
info: rule `invalid-assignment` is enabled by default

error[unresolved-attribute]: Attribute `read` is not defined on `~None` in union `Unknown | ~None`
     --> gateway/platforms/nutrition_coaching.py:16221:25
      |
16219 |         """Resolve only the newest overlay backed by a committed lifecycle row."""
16220 |         try:
16221 |             rows = list(self.store.read())
      |                         ^^^^^^^^^^^^^^^
16222 |         except (OSError, TypeError, ValueError) as exc:
16223 |             raise AdaptiveWorkflowError("adaptive event store is unreadable") from exc
      |
info: rule `unresolved-attribute` is enabled by default

error[invalid-assignment]: Object of type `object` is not assignable to `Mapping[str, object] | None`
     --> gateway/platforms/nutrition_coaching.py:16278:17
      |
16276 |             _index, payload = latest_prepared
16277 |             if payload.get("action") == "activate":
16278 |                 expected = payload.get("prior_overlay")
      |                 --------   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Incompatible value of type `object`
      |                 |
      |                 Declared type `Mapping[str, object] | None`
16279 |         if expected is None and candidates:
16280 |             _index, commit, prepared = max(candidates, key=lambda item: item[0])
      |
info: rule `invalid-assignment` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:16361:29
      |
16359 |             if (
16360 |                 isinstance(row, Mapping)
16361 |                 and row.get("event_type") == event_type
      |                             ^^^^^^^^^^^^ Expected `Never`, found `Literal["event_type"]`
16362 |                 and payload is not None
16363 |                 and payload.get("transaction_id") == transaction_id
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-return-type]: Return type does not match returned value
     --> gateway/platforms/nutrition_coaching.py:16365:24
      |
16363 |                 and payload.get("transaction_id") == transaction_id
16364 |             ):
16365 |                 return row
      |                        ^^^ expected `Mapping[str, object] | None`, found `Top[Mapping[Unknown, object]]`
16366 |         return None
      |
     ::: gateway/platforms/nutrition_coaching.py:16356:10
      |
16354 |         event_type: str,
16355 |         transaction_id: str,
16356 |     ) -> Mapping[str, object] | None:
      |          --------------------------- Expected `Mapping[str, object] | None` because of return type
16357 |         for row in rows:
16358 |             payload = self._transition_payload(row)
      |
info: rule `invalid-return-type` is enabled by default

error[unresolved-attribute]: Attribute `get` is not defined on `None` in union `Mapping[str, object] | None`
     --> gateway/platforms/nutrition_coaching.py:16461:28
      |
16459 |         )
16460 |         if self._overlay_strict_identity(new_overlay, current_overlay):
16461 |             new_revision = self._overlay_mapping(new_overlay).get("revision_id")
      |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
16462 |             rollback = getattr(self.store, "rollback_overlay", None)
16463 |             if not callable(rollback):
      |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to function `_write_feature_epoch` is incorrect
     --> gateway/platforms/nutrition_coaching.py:16485:47
      |
16483 |         if not isinstance(prior_epoch, Mapping):
16484 |             raise AdaptiveWorkflowError("adaptive lifecycle recovery is required")
16485 |         self._write_feature_epoch(epoch_path, prior_epoch)
      |                                               ^^^^^^^^^^^ Expected `Mapping[str, object]`, found `Top[Mapping[Unknown, object]]`
16486 |         _path, restored = self._feature_epoch(epoch_path)
16487 |         if not self._same_json_mapping(prior_epoch, restored):
      |
info: Function defined here
     --> gateway/platforms/nutrition_coaching.py:18567:9
      |
18566 |     @staticmethod
18567 |     def _write_feature_epoch(path: Path, payload: Mapping[str, object]) -> None:
      |         ^^^^^^^^^^^^^^^^^^^^             ----------------------------- Parameter declared here
18568 |         if path.is_symlink():
18569 |             raise AdaptiveWorkflowError("adaptive feature epoch symlink is not allowed")
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `_append_locked` is incorrect
     --> gateway/platforms/nutrition_coaching.py:16558:21
      |
16556 |                     self.store,
16557 |                     receipt_type,
16558 |                     receipt_payload,
      |                     ^^^^^^^^^^^^^^^ Expected `Mapping[str, object]`, found `Top[Mapping[Unknown, object]]`
16559 |                     dedupe_key=str(payload["receipt_dedupe_key"]),
16560 |                 )
      |
info: Function defined here
     --> gateway/platforms/nutrition_coaching.py:20471:9
      |
20470 |     @staticmethod
20471 |     def _append_locked(
      |         ^^^^^^^^^^^^^^
20472 |         store: object,
20473 |         event_type: str,
20474 |         payload: Mapping[str, object],
      |         ----------------------------- Parameter declared here
20475 |         *,
20476 |         dedupe_key: str,
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `_write_feature_epoch` is incorrect
     --> gateway/platforms/nutrition_coaching.py:16685:47
      |
16683 |         if not isinstance(prior_epoch, Mapping):
16684 |             raise AdaptiveWorkflowError("adaptive lifecycle recovery is required")
16685 |         self._write_feature_epoch(epoch_path, prior_epoch)
      |                                               ^^^^^^^^^^^ Expected `Mapping[str, object]`, found `Top[Mapping[Unknown, object]]`
16686 |         _path, restored = self._feature_epoch(epoch_path)
16687 |         if not self._same_json_mapping(prior_epoch, restored):
      |
info: Function defined here
     --> gateway/platforms/nutrition_coaching.py:18567:9
      |
18566 |     @staticmethod
18567 |     def _write_feature_epoch(path: Path, payload: Mapping[str, object]) -> None:
      |         ^^^^^^^^^^^^^^^^^^^^             ----------------------------- Parameter declared here
18568 |         if path.is_symlink():
18569 |             raise AdaptiveWorkflowError("adaptive feature epoch symlink is not allowed")
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `_write_feature_epoch` is incorrect
     --> gateway/platforms/nutrition_coaching.py:16740:51
      |
16738 |             if not self._same_json_mapping(payload.get("prior_epoch"), current_epoch):
16739 |                 raise AdaptiveWorkflowError("adaptive lifecycle recovery is required")
16740 |             self._write_feature_epoch(epoch_path, new_epoch)
      |                                                   ^^^^^^^^^ Expected `Mapping[str, object]`, found `Top[Mapping[Unknown, object]]`
16741 |             _path, restored_epoch = self._feature_epoch(epoch_path)
16742 |             if not self._same_json_mapping(new_epoch, restored_epoch):
      |
info: Function defined here
     --> gateway/platforms/nutrition_coaching.py:18567:9
      |
18566 |     @staticmethod
18567 |     def _write_feature_epoch(path: Path, payload: Mapping[str, object]) -> None:
      |         ^^^^^^^^^^^^^^^^^^^^             ----------------------------- Parameter declared here
18568 |         if path.is_symlink():
18569 |             raise AdaptiveWorkflowError("adaptive feature epoch symlink is not allowed")
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `_write_feature_epoch` is incorrect
     --> gateway/platforms/nutrition_coaching.py:16771:59
      |
16769 |                     if not isinstance(new_epoch, Mapping):
16770 |                         raise AdaptiveWorkflowError("adaptive lifecycle recovery is required")
16771 |                     self._write_feature_epoch(epoch_path, new_epoch)
      |                                                           ^^^^^^^^^ Expected `Mapping[str, object]`, found `Top[Mapping[Unknown, object]]`
16772 |                     _path, restored_epoch = self._feature_epoch(epoch_path)
16773 |                     if not self._same_json_mapping(new_epoch, restored_epoch):
      |
info: Function defined here
     --> gateway/platforms/nutrition_coaching.py:18567:9
      |
18566 |     @staticmethod
18567 |     def _write_feature_epoch(path: Path, payload: Mapping[str, object]) -> None:
      |         ^^^^^^^^^^^^^^^^^^^^             ----------------------------- Parameter declared here
18568 |         if path.is_symlink():
18569 |             raise AdaptiveWorkflowError("adaptive feature epoch symlink is not allowed")
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `_append_locked` is incorrect
     --> gateway/platforms/nutrition_coaching.py:16782:21
      |
16780 |                     self.store,
16781 |                     "adaptive_plan_rolled_back",
16782 |                     receipt_payload,
      |                     ^^^^^^^^^^^^^^^ Expected `Mapping[str, object]`, found `Top[Mapping[Unknown, object]]`
16783 |                     dedupe_key=str(payload["receipt_dedupe_key"]),
16784 |                 )
      |
info: Function defined here
     --> gateway/platforms/nutrition_coaching.py:20471:9
      |
20470 |     @staticmethod
20471 |     def _append_locked(
      |         ^^^^^^^^^^^^^^
20472 |         store: object,
20473 |         event_type: str,
20474 |         payload: Mapping[str, object],
      |         ----------------------------- Parameter declared here
20475 |         *,
20476 |         dedupe_key: str,
      |
info: rule `invalid-argument-type` is enabled by default

error[unresolved-attribute]: Attribute `read` is not defined on `~None` in union `Unknown | ~None`
     --> gateway/platforms/nutrition_coaching.py:16844:37
      |
16842 |                     self._adaptive_store_lock_held = True
16843 |                     try:
16844 |                         rows = list(self.store.read())
      |                                     ^^^^^^^^^^^^^^^
16845 |                         for row in tuple(rows):
16846 |                             payload = self._transition_payload(row)
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `read` is not defined on `~None` in union `Unknown | ~None`
     --> gateway/platforms/nutrition_coaching.py:16912:20
      |
16910 |             if proposal.meal_plan is None:
16911 |                 raise AdaptiveWorkflowError("adaptive proposal meal plan is unavailable")
16912 |             rows = self.store.read()
      |                    ^^^^^^^^^^^^^^^
16913 |             if action in {"activate", "deliver"}:
16914 |                 approval = self._matching_event(rows, "plan_approved", proposal.digest)
      |
info: rule `unresolved-attribute` is enabled by default

error[no-matching-overload]: No overload of bound method `get` matches arguments
     --> gateway/platforms/nutrition_coaching.py:16923:25
      |
16921 |                     proposal,
16922 |                     spec,
16923 |                     str(approval_payload.get("operator_id", "")),
      |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
16924 |                 )
16925 |                 for key in (
      |
info: First overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Possible overloads for bound method `get`:
info:   (self, key: _KT@Mapping, /) -> _VT_co@Mapping | None
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `no-matching-overload` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:16946:62
      |
16944 |                 ):
16945 |                     if (
16946 |                         self._owner_key(approval_payload.get(key))
      |                                                              ^^^ Expected `Never`, found `Literal["operator_address"]`
16947 |                         != self._owner_key(expected_approval.get(key))
16948 |                         if key == "operator_address"
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:16949:51
      |
16947 |                         != self._owner_key(expected_approval.get(key))
16948 |                         if key == "operator_address"
16949 |                         else approval_payload.get(key) != expected_approval.get(key)
      |                                                   ^^^ Expected `Never`, found `Literal["source_digest", "policy_digest", "meal_constraints_digest", "registration_digest", "catalog_digest", ... omitted 12 literals]`
16950 |                     ):
16951 |                         raise AdaptiveWorkflowError("adaptive approval pins are stale")
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:16984:64
      |
16982 |                 ):
16983 |                     if (
16984 |                         self._owner_key(activation_payload.get(key))
      |                                                                ^^^ Expected `Never`, found `Literal["operator_address"]`
16985 |                         != self._owner_key(expected_approval.get(key))
16986 |                         if key == "operator_address"
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:16987:53
      |
16985 |                         != self._owner_key(expected_approval.get(key))
16986 |                         if key == "operator_address"
16987 |                         else activation_payload.get(key) != expected_approval.get(key)
      |                                                     ^^^ Expected `Never`, found `Literal["source_digest", "policy_digest", "meal_constraints_digest", "registration_digest", "catalog_digest", ... omitted 12 literals]`
16988 |                     ):
16989 |                         raise AdaptiveWorkflowError("adaptive activation pins are stale")
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[unresolved-attribute]: Attribute `read` is not defined on `~None` in union `Unknown | ~None`
     --> gateway/platforms/nutrition_coaching.py:16993:20
      |
16991 |     def _latest_identity(self) -> tuple[str, int] | None:
16992 |         try:
16993 |             rows = self.store.read()
      |                    ^^^^^^^^^^^^^^^
16994 |         except (OSError, TypeError, ValueError) as exc:
16995 |             raise AdaptiveWorkflowError("adaptive event store is unreadable") from exc
      |
info: rule `unresolved-attribute` is enabled by default

error[no-matching-overload]: No overload of bound method `get` matches arguments
     --> gateway/platforms/nutrition_coaching.py:17309:25
      |
17307 |             get_value = lambda name, default=None: getattr(value, name, default)
17308 |         fields = {
17309 |             "calories": get_value("calories_kcal", get_value("calories")),
      |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
17310 |             "protein_g": get_value("protein_g"),
17311 |             "fat_g": get_value("fat_g"),
      |
info: First overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Possible overloads for bound method `get`:
info:   (self, key: _KT@Mapping, /) -> _VT_co@Mapping | None
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: Union variant `Overload[(key: Never, /) -> object, (key: Never, default: object, /) -> object, [_T](key: Never, default: _T, /) -> object]` is incompatible with this call site
info: Attempted to call union type `(Overload[(key: Never, /) -> object, (key: Never, default: object, /) -> object, [_T](key: Never, default: _T, /) -> object]) | ((name, default=None) -> Unknown)`
info: rule `no-matching-overload` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:17309:62
      |
17307 |             get_value = lambda name, default=None: getattr(value, name, default)
17308 |         fields = {
17309 |             "calories": get_value("calories_kcal", get_value("calories")),
      |                                                              ^^^^^^^^^^ Expected `Never`, found `Literal["calories"]`
17310 |             "protein_g": get_value("protein_g"),
17311 |             "fat_g": get_value("fat_g"),
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: Union variant `Overload[(key: Never, /) -> object, (key: Never, default: object, /) -> object, [_T](key: Never, default: _T, /) -> object]` is incompatible with this call site
info: Attempted to call union type `(Overload[(key: Never, /) -> object, (key: Never, default: object, /) -> object, [_T](key: Never, default: _T, /) -> object]) | ((name, default=None) -> Unknown)`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:17310:36
      |
17308 |         fields = {
17309 |             "calories": get_value("calories_kcal", get_value("calories")),
17310 |             "protein_g": get_value("protein_g"),
      |                                    ^^^^^^^^^^^ Expected `Never`, found `Literal["protein_g"]`
17311 |             "fat_g": get_value("fat_g"),
17312 |             "carbs_g": get_value("carbs_g", get_value("carbohydrate_g")),
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: Union variant `Overload[(key: Never, /) -> object, (key: Never, default: object, /) -> object, [_T](key: Never, default: _T, /) -> object]` is incompatible with this call site
info: Attempted to call union type `(Overload[(key: Never, /) -> object, (key: Never, default: object, /) -> object, [_T](key: Never, default: _T, /) -> object]) | ((name, default=None) -> Unknown)`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:17311:32
      |
17309 |             "calories": get_value("calories_kcal", get_value("calories")),
17310 |             "protein_g": get_value("protein_g"),
17311 |             "fat_g": get_value("fat_g"),
      |                                ^^^^^^^ Expected `Never`, found `Literal["fat_g"]`
17312 |             "carbs_g": get_value("carbs_g", get_value("carbohydrate_g")),
17313 |         }
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: Union variant `Overload[(key: Never, /) -> object, (key: Never, default: object, /) -> object, [_T](key: Never, default: _T, /) -> object]` is incompatible with this call site
info: Attempted to call union type `(Overload[(key: Never, /) -> object, (key: Never, default: object, /) -> object, [_T](key: Never, default: _T, /) -> object]) | ((name, default=None) -> Unknown)`
info: rule `invalid-argument-type` is enabled by default

error[no-matching-overload]: No overload of bound method `get` matches arguments
     --> gateway/platforms/nutrition_coaching.py:17312:24
      |
17310 |             "protein_g": get_value("protein_g"),
17311 |             "fat_g": get_value("fat_g"),
17312 |             "carbs_g": get_value("carbs_g", get_value("carbohydrate_g")),
      |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
17313 |         }
17314 |         if any(item is None for item in (fields["calories"], fields["protein_g"], fields["fat_g"])):
      |
info: First overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Possible overloads for bound method `get`:
info:   (self, key: _KT@Mapping, /) -> _VT_co@Mapping | None
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: Union variant `Overload[(key: Never, /) -> object, (key: Never, default: object, /) -> object, [_T](key: Never, default: _T, /) -> object]` is incompatible with this call site
info: Attempted to call union type `(Overload[(key: Never, /) -> object, (key: Never, default: object, /) -> object, [_T](key: Never, default: _T, /) -> object]) | ((name, default=None) -> Unknown)`
info: rule `no-matching-overload` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:17312:55
      |
17310 |             "protein_g": get_value("protein_g"),
17311 |             "fat_g": get_value("fat_g"),
17312 |             "carbs_g": get_value("carbs_g", get_value("carbohydrate_g")),
      |                                                       ^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["carbohydrate_g"]`
17313 |         }
17314 |         if any(item is None for item in (fields["calories"], fields["protein_g"], fields["fat_g"])):
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: Union variant `Overload[(key: Never, /) -> object, (key: Never, default: object, /) -> object, [_T](key: Never, default: _T, /) -> object]` is incompatible with this call site
info: Attempted to call union type `(Overload[(key: Never, /) -> object, (key: Never, default: object, /) -> object, [_T](key: Never, default: _T, /) -> object]) | ((name, default=None) -> Unknown)`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:17354:46
      |
17352 |             overlay_digest = getattr(overlay, "proposal_digest", None)
17353 |             if overlay_digest is None and isinstance(overlay, Mapping):
17354 |                 overlay_digest = overlay.get("proposal_digest")
      |                                              ^^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["proposal_digest"]`
17355 |             prior = self._proposal_for_digest(overlay_digest)
17356 |             if prior.target is None:
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `plan`
     --> gateway/platforms/nutrition_coaching.py:17365:22
      |
17363 |                 week_loader(evaluation_day)
17364 |                 if callable(week_loader)
17365 |                 else spec.plan.weeks[
      |                      ^^^^^^^^^
17366 |                     min(11, max(0, (evaluation_day - starts_on).days // 7))
17367 |                 ]
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `plan`
     --> gateway/platforms/nutrition_coaching.py:17712:51
      |
17710 |                 registration_binding,
17711 |             ) = self._production_context()
17712 |             starts_on = self.starts_on or getattr(spec.plan, "starts_on", None)
      |                                                   ^^^^^^^^^
17713 |             if not isinstance(starts_on, date) or artifacts.policy.starts_on != starts_on:
17714 |                 raise AdaptiveWorkflowError("adaptive policy start does not match customer plan")
      |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to function `propose` is incorrect
     --> gateway/platforms/nutrition_coaching.py:17798:25
      |
17796 |                         protein_g=target.protein_g,
17797 |                         fat_g=target.fat_g,
17798 |                         meal_constraints=registration_binding.meal_constraints,
      |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `MealConstraints | None`, found `object`
17799 |                         catalog=artifacts.catalog,
17800 |                         source_digest=source_digest,
      |
info: Function defined here
    --> dualcoach/profile/checkin_cli/adaptive_nutrition.py:4136:5
     |
4136 | def propose(
     |     ^^^^^^^
4137 |     customer_key: str,
4138 |     snapshot: TrendSnapshot,
     |
    ::: dualcoach/profile/checkin_cli/adaptive_nutrition.py:4144:5
     |
4142 |     protein_g: int,
4143 |     fat_g: int,
4144 |     meal_constraints: MealConstraints | None = None,
     |     ----------------------------------------------- Parameter declared here
4145 |     catalog: VersionedFoodCatalog | Sequence[Food] | None = None,
4146 |     source_digest: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[unresolved-attribute]: Attribute `read` is not defined on `~None` in union `Unknown | ~None`
     --> gateway/platforms/nutrition_coaching.py:18131:16
      |
18129 |         proposal = self._proposal_for_digest(proposal_digest)
18130 |         self.hold_proposal(proposal, topic_id=topic_id, operator_id=operator_id)
18131 |         return self.store.read()[-1]
      |                ^^^^^^^^^^^^^^^
18132 |
18133 |     def release_latest(
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `read` is not defined on `~None` in union `Unknown | ~None`
     --> gateway/platforms/nutrition_coaching.py:18142:16
      |
18140 |         proposal = self._proposal_for_digest(proposal_digest)
18141 |         self.release_proposal(proposal, topic_id=topic_id, operator_id=operator_id)
18142 |         return self.store.read()[-1]
      |                ^^^^^^^^^^^^^^^
18143 |
18144 |     # Compatibility names for operator lifecycle callers.
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `read` is not defined on `~None` in union `Unknown | ~None`
     --> gateway/platforms/nutrition_coaching.py:18228:24
      |
18226 |         existing_approval_times = {
18227 |             str(payload.get("approved_at_kst"))
18228 |             for row in self.store.read()
      |                        ^^^^^^^^^^^^^^^
18229 |             if isinstance(row, Mapping)
18230 |             and row.get("event_type") == "customer_action_continuity"
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `append_customer_action_continuity` is not defined on `~None` in union `Unknown | ~None`
     --> gateway/platforms/nutrition_coaching.py:18283:17
      |
18281 |                 )
18282 |             else:
18283 |                 self.store.append_customer_action_continuity(continuity)
      |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18284 |     def _registered_customer_runtime(self) -> object:
18285 |         from checkin_cli.customer_admin import load_runtime_customer_registry
      |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to function `load_runtime_customer_registry` is incorrect
     --> gateway/platforms/nutrition_coaching.py:18288:55
      |
18287 |         try:
18288 |             registry = load_runtime_customer_registry(self.profile_root)
      |                                                       ^^^^^^^^^^^^^^^^^ Expected `Path`, found `Unknown | Path | None`
18289 |             matches = tuple(
18290 |                 runtime
      |
info: Element `None` of this union is not assignable to `Path`
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_admin.py:2057:5
     |
2057 | def load_runtime_customer_registry(profile_root: Path) -> CustomerRegistry:
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ------------------ Parameter declared here
2058 |     """Load the registry only when enabled entries have committed activation receipts."""
2059 |     root = _resolve_profile_root(profile_root)
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `build_registered_daily_customer_projection` is incorrect
     --> gateway/platforms/nutrition_coaching.py:18344:13
      |
18342 |         )
18343 |         return build_registered_daily_customer_projection(
18344 |             self._registered_customer_runtime(),
      |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `CustomerRuntime`, found `object`
18345 |             proposal,
18346 |             actions=actions,
      |
info: Function defined here
  --> dualcoach/profile/checkin_cli/customer_coaching.py:69:5
   |
69 | def build_registered_daily_customer_projection(
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
70 |     runtime: CustomerRuntime,
   |     ------------------------ Parameter declared here
71 |     proposal: object,
72 |     *,
   |
info: rule `invalid-argument-type` is enabled by default

error[unresolved-attribute]: Attribute `read` is not defined on `~None` in union `Unknown | ~None`
     --> gateway/platforms/nutrition_coaching.py:18362:20
      |
18360 |             raise AdaptiveWorkflowError("registered daily projection API is unavailable") from exc
18361 |         actions = []
18362 |         for row in self.store.read():
      |                    ^^^^^^^^^^^^^^^
18363 |             payload = row.get("payload") if isinstance(row, Mapping) else None
18364 |             if (
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `project_customer_action_outcomes` is not defined on `~None` in union `Unknown | ~None`
     --> gateway/platforms/nutrition_coaching.py:18392:9
      |
18390 |         if not selected:
18391 |             raise AdaptiveWorkflowError("approved customer actions are unavailable")
18392 |         self.store.project_customer_action_outcomes(
      |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18393 |             customer_key=proposal.customer_key,
18394 |             canonical_events=canonical_events,
      |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to function `build_registered_daily_customer_projection` is incorrect
     --> gateway/platforms/nutrition_coaching.py:18398:13
      |
18396 |         )
18397 |         return build_registered_daily_customer_projection(
18398 |             self._registered_customer_runtime(),
      |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `CustomerRuntime`, found `object`
18399 |             proposal,
18400 |             actions=selected,
      |
info: Function defined here
  --> dualcoach/profile/checkin_cli/customer_coaching.py:69:5
   |
69 | def build_registered_daily_customer_projection(
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
70 |     runtime: CustomerRuntime,
   |     ------------------------ Parameter declared here
71 |     proposal: object,
72 |     *,
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to class `tuple` is incorrect
     --> gateway/platforms/nutrition_coaching.py:18759:26
      |
18757 |                 prepared.get("epoch") != epoch
18758 |                 or prepared.get("config_digest") != config_digest
18759 |                 or tuple(prepared.get("customer_keys", ())) != customer_keys
      |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `Iterable[Unknown]`, found `object`
18760 |                 or prepared.get("approved_by") != body.get("approved_by")
18761 |                 or any(
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:18839:30
      |
18837 |                 "delivery",
18838 |             }
18839 |             or new_epoch.get("epoch") != config_epoch
      |                              ^^^^^^^ Expected `Never`, found `Literal["epoch"]`
18840 |             or new_epoch.get("config_digest") != config_digest
18841 |             or self._feature_config_digest(new_epoch) != config_digest
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:18840:30
      |
18838 |             }
18839 |             or new_epoch.get("epoch") != config_epoch
18840 |             or new_epoch.get("config_digest") != config_digest
      |                              ^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["config_digest"]`
18841 |             or self._feature_config_digest(new_epoch) != config_digest
18842 |         ):
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `_feature_config_digest` is incorrect
     --> gateway/platforms/nutrition_coaching.py:18841:44
      |
18839 |             or new_epoch.get("epoch") != config_epoch
18840 |             or new_epoch.get("config_digest") != config_digest
18841 |             or self._feature_config_digest(new_epoch) != config_digest
      |                                            ^^^^^^^^^ Expected `Mapping[str, object]`, found `Top[Mapping[Unknown, object]]`
18842 |         ):
18843 |             raise AdaptiveWorkflowError("adaptive lifecycle recovery is required")
      |
info: Method defined here
     --> gateway/platforms/nutrition_coaching.py:14714:9
      |
14713 |     @classmethod
14714 |     def _feature_config_digest(cls, epoch: Mapping[str, object]) -> str:
      |         ^^^^^^^^^^^^^^^^^^^^^^      --------------------------- Parameter declared here
14715 |         fields = cls._feature_config_fields(epoch)
14716 |         helper = feature_config_digest
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to class `tuple` is incorrect
     --> gateway/platforms/nutrition_coaching.py:18853:27
      |
18851 |                 and row.get("epoch") == config_epoch
18852 |                 and row.get("config_digest") == config_digest
18853 |                 and tuple(row.get("customer_keys", ())) == customer_keys
      |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `Iterable[Unknown]`, found `object`
18854 |                 and self.customer_key in tuple(row.get("customer_keys", ()))
18855 |             )
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to class `tuple` is incorrect
     --> gateway/platforms/nutrition_coaching.py:18854:48
      |
18852 |                 and row.get("config_digest") == config_digest
18853 |                 and tuple(row.get("customer_keys", ())) == customer_keys
18854 |                 and self.customer_key in tuple(row.get("customer_keys", ()))
      |                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `Iterable[Unknown]`, found `object`
18855 |             )
18856 |         ]
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `_append_config_epoch_locked` is incorrect
     --> gateway/platforms/nutrition_coaching.py:18863:17
      |
18861 |                 config_epoch,
18862 |                 config_digest,
18863 |                 customer_keys,
      |                 ^^^^^^^^^^^^^ Expected `tuple[str, ...]`, found `tuple[object, ...]`
18864 |                 state="committed",
18865 |                 approved_by=self._live_owner_key(),
      |
info: Method defined here
     --> gateway/platforms/nutrition_coaching.py:18652:9
      |
18650 |         return rows
18651 |
18652 |     def _append_config_epoch_locked(
      |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
18653 |         self,
18654 |         epoch: int,
18655 |         config_digest: str,
18656 |         customer_keys: tuple[str, ...],
      |         ------------------------------ Parameter declared here
18657 |         *,
18658 |         state: str,
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `_append_config_epoch_locked` is incorrect
     --> gateway/platforms/nutrition_coaching.py:18871:17
      |
18869 |                 config_epoch,
18870 |                 config_digest,
18871 |                 customer_keys,
      |                 ^^^^^^^^^^^^^ Expected `tuple[str, ...]`, found `tuple[object, ...]`
18872 |                 state="abandoned",
18873 |                 approved_by=self._live_owner_key(),
      |
info: Method defined here
     --> gateway/platforms/nutrition_coaching.py:18652:9
      |
18650 |         return rows
18651 |
18652 |     def _append_config_epoch_locked(
      |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
18653 |         self,
18654 |         epoch: int,
18655 |         config_digest: str,
18656 |         customer_keys: tuple[str, ...],
      |         ------------------------------ Parameter declared here
18657 |         *,
18658 |         state: str,
      |
info: rule `invalid-argument-type` is enabled by default

error[unresolved-attribute]: Attribute `read` is not defined on `~None` in union `Unknown | ~None`
     --> gateway/platforms/nutrition_coaching.py:18907:33
      |
18905 |             try:
18906 |                 with locked():
18907 |                     rows = list(self.store.read())
      |                                 ^^^^^^^^^^^^^^^
18908 |                     for row in tuple(rows):
18909 |                         prepared_payload = self._transition_payload(row)
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `read` is not defined on `~None` in union `Unknown | ~None`
     --> gateway/platforms/nutrition_coaching.py:18919:45
      |
18917 | …                     if action == "activate":
18918 | …                         self._recover_activation_locked(row, rows)
18919 | …                         rows = list(self.store.read())
      |                                       ^^^^^^^^^^^^^^^
18920 | …                     elif action == "rollback":
18921 | …                         self._recover_rollback_locked(row, rows)
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `read` is not defined on `~None` in union `Unknown | ~None`
     --> gateway/platforms/nutrition_coaching.py:18922:45
      |
18920 |                             elif action == "rollback":
18921 |                                 self._recover_rollback_locked(row, rows)
18922 |                                 rows = list(self.store.read())
      |                                             ^^^^^^^^^^^^^^^
18923 |                     existing = self._matching_event(
18924 |                         rows,
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `read` is not defined on `~None` in union `Unknown | ~None`
     --> gateway/platforms/nutrition_coaching.py:18949:33
      |
18947 |                         self._adaptive_store_lock_held = False
18948 |                     self._assert_owner_snapshot(operator_id, owner_snapshot, owner_version)
18949 |                     rows = list(self.store.read())
      |                                 ^^^^^^^^^^^^^^^
18950 |                     existing = self._matching_event(
18951 |                         rows,
      |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to function `__new__` is incorrect
     --> gateway/platforms/nutrition_coaching.py:19007:44
      |
19005 |                     config_customer_keys = self._enabled_customer_keys()
19006 |                     updated = dict(epoch)
19007 |                     updated["epoch"] = int(epoch.get("epoch", 0)) + 1
      |                                            ^^^^^^^^^^^^^^^^^^^^^ Expected `str | Buffer | SupportsInt | SupportsIndex | SupportsTrunc`, found `object`
19008 |                     updated["activation"] = True
19009 |                     new_epoch = self._with_feature_config_digest(updated)
      |
info: Matching overload defined here
   --> stdlib/builtins.pyi:366:9
    |
365 |     @overload
366 |     def __new__(cls, x: ConvertibleToInt = 0, /) -> Self: ...
    |         ^^^^^^^      ----------------------- Parameter declared here
367 |     @overload
368 |     def __new__(cls, x: str | bytes | bytearray, /, base: SupportsIndex) -> Self: ...
    |
info: Non-matching overloads for function `__new__`:
info:   [Self](cls, x: str | bytes | bytearray, /, base: SupportsIndex) -> Self
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `__new__` is incorrect
     --> gateway/platforms/nutrition_coaching.py:19082:29
      |
19080 |                     self._assert_owner_snapshot(operator_id, owner_snapshot, owner_version)
19081 |                     self._append_config_epoch_locked(
19082 |                         int(new_epoch["epoch"]),
      |                             ^^^^^^^^^^^^^^^^^^ Expected `str | Buffer | SupportsInt | SupportsIndex | SupportsTrunc`, found `object`
19083 |                         str(new_epoch["config_digest"]),
19084 |                         config_customer_keys,
      |
info: Matching overload defined here
   --> stdlib/builtins.pyi:366:9
    |
365 |     @overload
366 |     def __new__(cls, x: ConvertibleToInt = 0, /) -> Self: ...
    |         ^^^^^^^      ----------------------- Parameter declared here
367 |     @overload
368 |     def __new__(cls, x: str | bytes | bytearray, /, base: SupportsIndex) -> Self: ...
    |
info: Non-matching overloads for function `__new__`:
info:   [Self](cls, x: str | bytes | bytearray, /, base: SupportsIndex) -> Self
info: rule `invalid-argument-type` is enabled by default

error[unresolved-attribute]: Attribute `append_overlay` is not defined on `~None` in union `Unknown | ~None`
     --> gateway/platforms/nutrition_coaching.py:19095:29
      |
19093 |                             )
19094 |                         elif prior_overlay is None:
19095 |                             self.store.append_overlay(overlay_payload)
      |                             ^^^^^^^^^^^^^^^^^^^^^^^^^
19096 |                         self._assert_owner_snapshot(operator_id, owner_snapshot, owner_version)
19097 |                         self._write_feature_epoch(epoch_path, new_epoch)
      |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to function `__new__` is incorrect
     --> gateway/platforms/nutrition_coaching.py:19107:33
      |
19105 |                         self._assert_owner_snapshot(operator_id, owner_snapshot, owner_version)
19106 |                         self._append_config_epoch_locked(
19107 |                             int(new_epoch["epoch"]),
      |                                 ^^^^^^^^^^^^^^^^^^ Expected `str | Buffer | SupportsInt | SupportsIndex | SupportsTrunc`, found `object`
19108 |                             str(new_epoch["config_digest"]),
19109 |                             config_customer_keys,
      |
info: Matching overload defined here
   --> stdlib/builtins.pyi:366:9
    |
365 |     @overload
366 |     def __new__(cls, x: ConvertibleToInt = 0, /) -> Self: ...
    |         ^^^^^^^      ----------------------- Parameter declared here
367 |     @overload
368 |     def __new__(cls, x: str | bytes | bytearray, /, base: SupportsIndex) -> Self: ...
    |
info: Non-matching overloads for function `__new__`:
info:   [Self](cls, x: str | bytes | bytearray, /, base: SupportsIndex) -> Self
info: rule `invalid-argument-type` is enabled by default

error[unresolved-attribute]: Attribute `read` is not defined on `~None` in union `Unknown | ~None`
     --> gateway/platforms/nutrition_coaching.py:19166:33
      |
19164 |             try:
19165 |                 with locked():
19166 |                     rows = list(self.store.read())
      |                                 ^^^^^^^^^^^^^^^
19167 |                     for row in tuple(rows):
19168 |                         prepared_payload = self._transition_payload(row)
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `read` is not defined on `~None` in union `Unknown | ~None`
     --> gateway/platforms/nutrition_coaching.py:19178:45
      |
19176 | …                     if action == "activate":
19177 | …                         self._recover_activation_locked(row, rows)
19178 | …                         rows = list(self.store.read())
      |                                       ^^^^^^^^^^^^^^^
19179 | …                     elif action == "rollback":
19180 | …                         self._recover_rollback_locked(row, rows)
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `read` is not defined on `~None` in union `Unknown | ~None`
     --> gateway/platforms/nutrition_coaching.py:19181:45
      |
19179 |                             elif action == "rollback":
19180 |                                 self._recover_rollback_locked(row, rows)
19181 |                                 rows = list(self.store.read())
      |                                             ^^^^^^^^^^^^^^^
19182 |                     existing = self._matching_event(
19183 |                         rows,
      |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to function `validate_adaptive_registration_reapproval` is incorrect
     --> gateway/platforms/nutrition_coaching.py:19267:37
      |
19265 | …                             self.profile_root,
19266 | …                             self.customer_key,
19267 | …                             proposal_registration,
      |                               ^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `str | None`
19268 | …                         )
19269 | …                     )
      |
info: Element `None` of this union is not assignable to `str`
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_admin.py:4391:5
     |
4391 | def validate_adaptive_registration_reapproval(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4392 |     profile_root: Path,
4393 |     customer_key: str,
4394 |     predecessor_digest: str,
     |     ----------------------- Parameter declared here
4395 | ) -> bool:
4396 |     """Prove the current registration is an authority-only child revision."""
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `__new__` is incorrect
     --> gateway/platforms/nutrition_coaching.py:19298:44
      |
19296 |                     config_customer_keys = self._enabled_customer_keys()
19297 |                     updated = dict(epoch)
19298 |                     updated["epoch"] = int(epoch.get("epoch", 0)) + 1
      |                                            ^^^^^^^^^^^^^^^^^^^^^ Expected `str | Buffer | SupportsInt | SupportsIndex | SupportsTrunc`, found `object`
19299 |                     for key in (
19300 |                         "analytics_shadow",
      |
info: Matching overload defined here
   --> stdlib/builtins.pyi:366:9
    |
365 |     @overload
366 |     def __new__(cls, x: ConvertibleToInt = 0, /) -> Self: ...
    |         ^^^^^^^      ----------------------- Parameter declared here
367 |     @overload
368 |     def __new__(cls, x: str | bytes | bytearray, /, base: SupportsIndex) -> Self: ...
    |
info: Non-matching overloads for function `__new__`:
info:   [Self](cls, x: str | bytes | bytearray, /, base: SupportsIndex) -> Self
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `__new__` is incorrect
     --> gateway/platforms/nutrition_coaching.py:19381:29
      |
19379 |                     self._assert_owner_snapshot(operator_id, owner_snapshot, owner_version)
19380 |                     self._append_config_epoch_locked(
19381 |                         int(new_epoch["epoch"]),
      |                             ^^^^^^^^^^^^^^^^^^ Expected `str | Buffer | SupportsInt | SupportsIndex | SupportsTrunc`, found `object`
19382 |                         str(new_epoch["config_digest"]),
19383 |                         config_customer_keys,
      |
info: Matching overload defined here
   --> stdlib/builtins.pyi:366:9
    |
365 |     @overload
366 |     def __new__(cls, x: ConvertibleToInt = 0, /) -> Self: ...
    |         ^^^^^^^      ----------------------- Parameter declared here
367 |     @overload
368 |     def __new__(cls, x: str | bytes | bytearray, /, base: SupportsIndex) -> Self: ...
    |
info: Non-matching overloads for function `__new__`:
info:   [Self](cls, x: str | bytes | bytearray, /, base: SupportsIndex) -> Self
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `__new__` is incorrect
     --> gateway/platforms/nutrition_coaching.py:19410:33
      |
19408 |                         self._assert_owner_snapshot(operator_id, owner_snapshot, owner_version)
19409 |                         self._append_config_epoch_locked(
19410 |                             int(new_epoch["epoch"]),
      |                                 ^^^^^^^^^^^^^^^^^^ Expected `str | Buffer | SupportsInt | SupportsIndex | SupportsTrunc`, found `object`
19411 |                             str(new_epoch["config_digest"]),
19412 |                             config_customer_keys,
      |
info: Matching overload defined here
   --> stdlib/builtins.pyi:366:9
    |
365 |     @overload
366 |     def __new__(cls, x: ConvertibleToInt = 0, /) -> Self: ...
    |         ^^^^^^^      ----------------------- Parameter declared here
367 |     @overload
368 |     def __new__(cls, x: str | bytes | bytearray, /, base: SupportsIndex) -> Self: ...
    |
info: Non-matching overloads for function `__new__`:
info:   [Self](cls, x: str | bytes | bytearray, /, base: SupportsIndex) -> Self
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:19448:60
      |
19446 |     @staticmethod
19447 |     def _receipt_message_id(receipt: object) -> str:
19448 |         if not isinstance(receipt, Mapping) or receipt.get("ok") is not True:
      |                                                            ^^^^ Expected `Never`, found `Literal["ok"]`
19449 |             return ""
19450 |         value = receipt.get("message_id")
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:19450:29
      |
19448 |         if not isinstance(receipt, Mapping) or receipt.get("ok") is not True:
19449 |             return ""
19450 |         value = receipt.get("message_id")
      |                             ^^^^^^^^^^^^ Expected `Never`, found `Literal["message_id"]`
19451 |         if isinstance(value, bool) or not isinstance(value, (str, int)):
19452 |             return ""
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:19530:48
      |
19528 |             not isinstance(destination, Mapping)
19529 |             or any(
19530 |                 not isinstance(destination.get(field), str)
      |                                                ^^^^^ Expected `Never`, found `Literal["user_id", "chat_id", "topic_id"]`
19531 |                 or not str(destination.get(field)).strip()
19532 |                 for field in ("user_id", "chat_id", "topic_id")
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:19531:44
      |
19529 |             or any(
19530 |                 not isinstance(destination.get(field), str)
19531 |                 or not str(destination.get(field)).strip()
      |                                            ^^^^^ Expected `Never`, found `Literal["user_id", "chat_id", "topic_id"]`
19532 |                 for field in ("user_id", "chat_id", "topic_id")
19533 |             )
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `get`
     --> gateway/platforms/nutrition_coaching.py:19580:21
      |
19578 |                 and row.get("event_type") == "delivery_attempt_started"
19579 |                 and isinstance(row.get("payload"), Mapping)
19580 |                 and row["payload"].get("delivery_id") == attempt_payload.get("delivery_id")
      |                     ^^^^^^^^^^^^^^^^^^
19581 |                 and row["payload"].get("provider_receipt") is None
19582 |                 and row["payload"].get("message_id") is None
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `get`
     --> gateway/platforms/nutrition_coaching.py:19581:21
      |
19579 |                 and isinstance(row.get("payload"), Mapping)
19580 |                 and row["payload"].get("delivery_id") == attempt_payload.get("delivery_id")
19581 |                 and row["payload"].get("provider_receipt") is None
      |                     ^^^^^^^^^^^^^^^^^^
19582 |                 and row["payload"].get("message_id") is None
19583 |             )
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `get`
     --> gateway/platforms/nutrition_coaching.py:19582:21
      |
19580 |                 and row["payload"].get("delivery_id") == attempt_payload.get("delivery_id")
19581 |                 and row["payload"].get("provider_receipt") is None
19582 |                 and row["payload"].get("message_id") is None
      |                     ^^^^^^^^^^^^^^^^^^
19583 |             )
19584 |         ]
      |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:19599:37
      |
19597 |             values: list[str] = []
19598 |             for field in ("provider_receipt", "message_id"):
19599 |                 value = payload.get(field)
      |                                     ^^^^^ Expected `Never`, found `Literal["provider_receipt", "message_id"]`
19600 |                 if value is None:
19601 |                     continue
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:19618:64
      |
19616 |                 continue
19617 |             payload = row.get("payload")
19618 |             if not isinstance(payload, Mapping) or payload.get("delivery_id") != delivery_id:
      |                                                                ^^^^^^^^^^^^^ Expected `Never`, found `Literal["delivery_id"]`
19619 |                 continue
19620 |             event_type = row.get("event_type")
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:19622:29
      |
19620 |             event_type = row.get("event_type")
19621 |             if event_type in {"delivery_receipt_recorded", "delivery_attempt_started"} and (
19622 |                 payload.get("provider_receipt") is not None
      |                             ^^^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["provider_receipt"]`
19623 |                 or payload.get("message_id") is not None
19624 |             ):
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:19623:32
      |
19621 |             if event_type in {"delivery_receipt_recorded", "delivery_attempt_started"} and (
19622 |                 payload.get("provider_receipt") is not None
19623 |                 or payload.get("message_id") is not None
      |                                ^^^^^^^^^^^^ Expected `Never`, found `Literal["message_id"]`
19624 |             ):
19625 |                 provider_rows.append(row)
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `get`
     --> gateway/platforms/nutrition_coaching.py:19663:17
      |
19661 |             pending_receipts.add(pending_id)
19662 |             if any(
19663 |                 payload.get(field) != attempt_payload.get(field)
      |                 ^^^^^^^^^^^
19664 |                 for field in (
19665 |                     "customer_key",
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `get`
     --> gateway/platforms/nutrition_coaching.py:19689:17
      |
19687 |             provider_receipts.add(provider_id)
19688 |             if any(
19689 |                 payload.get(field) != attempt_payload.get(field)
      |                 ^^^^^^^^^^^
19690 |                 for field in immutable_fields
19691 |             ):
      |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:19714:29
      |
19712 |                 raise AdaptiveWorkflowError("adaptive delivery receipt conflict")
19713 |             if any(
19714 |                 payload.get(field) != attempt_payload.get(field)
      |                             ^^^^^ Expected `Never`, found `Literal["customer_key", "delivery_id", "reservation_id", "proposal_digest", "customer_body_digest", ... omitted 10 literals]`
19715 |                 for field in (
19716 |                     "customer_key",
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:19741:29
      |
19739 |                 raise AdaptiveWorkflowError("adaptive delivery receipt conflict")
19740 |             if any(
19741 |                 payload.get(field) != attempt_payload.get(field)
      |                             ^^^^^ Expected `Never`, found `Literal["customer_key", "delivery_id", "reservation_id", "registration_digest", "source_digest", ... omitted 4 literals]`
19742 |                 for field in (
19743 |                     "customer_key",
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:19758:33
      |
19756 |             if (
19757 |                 "proposal_digest" in payload
19758 |                 and payload.get("proposal_digest") != proposal.digest
      |                                 ^^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["proposal_digest"]`
19759 |             ):
19760 |                 raise AdaptiveWorkflowError("adaptive delivery receipt pins are stale")
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:19792:34
      |
19790 |         provider_id = receipt_id(provider_payload)
19791 |         if provider_id != persisted_message_id or any(
19792 |             provider_payload.get(field) != attempt_payload.get(field)
      |                                  ^^^^^ Expected `Never`, found `Literal["customer_key", "delivery_id", "reservation_id", "proposal_digest", "customer_body_digest", ... omitted 15 literals]`
19793 |             for field in immutable_fields
19794 |         ):
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:19821:53
      |
19819 |                 ),
19820 |                 "destination": dict(destination_payload),
19821 |                 "topic_id": destination_payload.get("topic_id"),
      |                                                     ^^^^^^^^^^ Expected `Never`, found `Literal["topic_id"]`
19822 |                 "attempt_event_id": attempt_payload.get("attempt_event_id"),
19823 |             }
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:19837:39
      |
19835 |             receipt_id(delivered_payload) != persisted_message_id
19836 |             or any(
19837 |                 delivered_payload.get(field) != attempt_payload.get(field)
      |                                       ^^^^^ Expected `Never`, found `Literal["customer_key", "delivery_id", "reservation_id", "proposal_digest", "customer_body_digest", ... omitted 10 literals]`
19838 |                 for field in (
19839 |                     "customer_key",
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `get`
     --> gateway/platforms/nutrition_coaching.py:19865:17
      |
19863 |                 raise AdaptiveWorkflowError("adaptive delivery receipt conflict")
19864 |             if any(
19865 |                 payload.get(field) != attempt_payload.get(field)
      |                 ^^^^^^^^^^^
19866 |                 for field in (
19867 |                     "customer_key",
      |
info: rule `unresolved-attribute` is enabled by default

error[unsupported-operator]: Unsupported `in` operation
     --> gateway/platforms/nutrition_coaching.py:19877:20
      |
19875 |                     "authority_digest",
19876 |                 )
19877 |                 if field in payload
      |                    -----^^^^-------
      |                    |        |
      |                    |        Has type `object`
      |                    Has type `Literal["customer_key", "delivery_id", "reservation_id", "registration_digest", "source_digest", ... omitted 4 literals]`
19878 |             ):
19879 |                 raise AdaptiveWorkflowError("adaptive delivery receipt pins are stale")
      |
info: Operation fails because operator `in` is not supported between objects of type `Literal["customer_key"]` and `object`
info: rule `unsupported-operator` is enabled by default

error[unsupported-operator]: Unsupported `in` operation
     --> gateway/platforms/nutrition_coaching.py:19881:17
      |
19879 |                 raise AdaptiveWorkflowError("adaptive delivery receipt pins are stale")
19880 |             if (
19881 |                 "proposal_digest" in payload
      |                 -----------------^^^^-------
      |                 |                    |
      |                 |                    Has type `object`
      |                 Has type `Literal["proposal_digest"]`
19882 |                 and payload.get("proposal_digest") != proposal.digest
19883 |             ):
      |
info: rule `unsupported-operator` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `get`
     --> gateway/platforms/nutrition_coaching.py:19882:21
      |
19880 |             if (
19881 |                 "proposal_digest" in payload
19882 |                 and payload.get("proposal_digest") != proposal.digest
      |                     ^^^^^^^^^^^
19883 |             ):
19884 |                 raise AdaptiveWorkflowError("adaptive delivery receipt pins are stale")
      |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to bound method `_append_delivery_audit_pending` is incorrect
     --> gateway/platforms/nutrition_coaching.py:19915:25
      |
19913 |                         proposal_digest=proposal.digest,
19914 |                         attempt_payload=attempt_payload,
19915 |                         provider_payload=provider_payload,
      |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `Mapping[str, object]`, found `Top[Mapping[Unknown, object]]`
19916 |                         delivered_event_id=delivered.get("event_id"),
19917 |                         _under_store_lock=True,
      |
info: Method defined here
     --> gateway/platforms/nutrition_coaching.py:20336:9
      |
20334 |             self._require_operator_owner(operator_id, required_action="reconcile")
20335 |         return self._reconcile_delivery_receipts_authorized(proposal_digest)
20336 |     def _append_delivery_audit_pending(
      |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20337 |         self,
20338 |         *,
      |
     ::: gateway/platforms/nutrition_coaching.py:20342:9
      |
20340 |         proposal_digest: str,
20341 |         attempt_payload: Mapping[str, object],
20342 |         provider_payload: Mapping[str, object],
      |         -------------------------------------- Parameter declared here
20343 |         delivered_event_id: object = None,
20344 |         reason: str = "audit_persistence_failed",
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:19954:39
      |
19952 |             payload = row.get("payload")
19953 |             payload = payload if isinstance(payload, Mapping) else {}
19954 |             delivery_id = payload.get("delivery_id")
      |                                       ^^^^^^^^^^^^^ Expected `Never`, found `Literal["delivery_id"]`
19955 |             if isinstance(delivery_id, str) and delivery_id:
19956 |                 delivery_ids.add(delivery_id)
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:19960:33
      |
19958 |                 projection.append("reservation-started")
19959 |                 if (
19960 |                     payload.get("provider_receipt") is not None
      |                                 ^^^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["provider_receipt"]`
19961 |                     or payload.get("message_id") is not None
19962 |                 ):
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:19961:36
      |
19959 |                 if (
19960 |                     payload.get("provider_receipt") is not None
19961 |                     or payload.get("message_id") is not None
      |                                    ^^^^^^^^^^^^ Expected `Never`, found `Literal["message_id"]`
19962 |                 ):
19963 |                     projection.append("receipt-started")
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[not-subscriptable]: Cannot subscript object of type `object` with no `__getitem__` method
     --> gateway/platforms/nutrition_coaching.py:20067:17
      |
20065 |         normalized_rows = tuple(row for row in rows if isinstance(row, Mapping))
20066 |         delivery_ids = {
20067 |             str(row["payload"]["delivery_id"])
      |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20068 |             for row in normalized_rows
20069 |             if isinstance(row.get("payload"), Mapping)
      |
info: rule `not-subscriptable` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `get`
     --> gateway/platforms/nutrition_coaching.py:20070:17
      |
20068 |             for row in normalized_rows
20069 |             if isinstance(row.get("payload"), Mapping)
20070 |             and row["payload"].get("proposal_digest") == proposal_digest
      |                 ^^^^^^^^^^^^^^^^^^
20071 |             and isinstance(row["payload"].get("delivery_id"), str)
20072 |             and row["payload"].get("delivery_id")
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `get`
     --> gateway/platforms/nutrition_coaching.py:20071:28
      |
20069 |             if isinstance(row.get("payload"), Mapping)
20070 |             and row["payload"].get("proposal_digest") == proposal_digest
20071 |             and isinstance(row["payload"].get("delivery_id"), str)
      |                            ^^^^^^^^^^^^^^^^^^
20072 |             and row["payload"].get("delivery_id")
20073 |         }
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `get`
     --> gateway/platforms/nutrition_coaching.py:20072:17
      |
20070 |             and row["payload"].get("proposal_digest") == proposal_digest
20071 |             and isinstance(row["payload"].get("delivery_id"), str)
20072 |             and row["payload"].get("delivery_id")
      |                 ^^^^^^^^^^^^^^^^^^
20073 |         }
20074 |         if not delivery_ids:
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `get`
     --> gateway/platforms/nutrition_coaching.py:20080:17
      |
20078 |             for row in normalized_rows
20079 |             if isinstance(row.get("payload"), Mapping)
20080 |             and row["payload"].get("delivery_id") in delivery_ids
      |                 ^^^^^^^^^^^^^^^^^^
20081 |         )
20082 |         audited = next(
      |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:20094:44
      |
20092 |                 "status": "duplicate",
20093 |                 "duplicate": True,
20094 |                 "delivery_id": payload.get("delivery_id"),
      |                                            ^^^^^^^^^^^^^ Expected `Never`, found `Literal["delivery_id"]`
20095 |                 "provider_receipt": payload.get("provider_receipt") or payload.get("message_id"),
20096 |                 "text": adaptive_delivery_result_text({"event_type": "duplicate"}),
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:20095:49
      |
20093 |                 "duplicate": True,
20094 |                 "delivery_id": payload.get("delivery_id"),
20095 |                 "provider_receipt": payload.get("provider_receipt") or payload.get("message_id"),
      |                                                 ^^^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["provider_receipt"]`
20096 |                 "text": adaptive_delivery_result_text({"event_type": "duplicate"}),
20097 |             }
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:20095:84
      |
20093 |                 "duplicate": True,
20094 |                 "delivery_id": payload.get("delivery_id"),
20095 |                 "provider_receipt": payload.get("provider_receipt") or payload.get("message_id"),
      |                                                                                    ^^^^^^^^^^^^ Expected `Never`, found `Literal["message_id"]`
20096 |                 "text": adaptive_delivery_result_text({"event_type": "duplicate"}),
20097 |             }
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `get`
     --> gateway/platforms/nutrition_coaching.py:20110:25
      |
20108 |                     row.get("event_type") in {"delivery_receipt_recorded", "delivery_attempt_started"}
20109 |                     and isinstance(row.get("payload"), Mapping)
20110 |                     and row["payload"].get("provider_receipt") is not None
      |                         ^^^^^^^^^^^^^^^^^^
20111 |                 )
20112 |             ),
      |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:20124:40
      |
20122 |             "event_type": "audit_pending",
20123 |             "status": "audit_pending",
20124 |             "delivery_id": payload.get("delivery_id"),
      |                                        ^^^^^^^^^^^^^ Expected `Never`, found `Literal["delivery_id"]`
20125 |             "provider_receipt": payload.get("provider_receipt") or payload.get("message_id"),
20126 |             "text": adaptive_delivery_result_text({"event_type": "audit_pending"}),
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:20125:45
      |
20123 |             "status": "audit_pending",
20124 |             "delivery_id": payload.get("delivery_id"),
20125 |             "provider_receipt": payload.get("provider_receipt") or payload.get("message_id"),
      |                                             ^^^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["provider_receipt"]`
20126 |             "text": adaptive_delivery_result_text({"event_type": "audit_pending"}),
20127 |         }
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:20125:80
      |
20123 |             "status": "audit_pending",
20124 |             "delivery_id": payload.get("delivery_id"),
20125 |             "provider_receipt": payload.get("provider_receipt") or payload.get("message_id"),
      |                                                                                ^^^^^^^^^^^^ Expected `Never`, found `Literal["message_id"]`
20126 |             "text": adaptive_delivery_result_text({"event_type": "audit_pending"}),
20127 |         }
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[unresolved-attribute]: Attribute `read` is not defined on `~None` in union `Unknown | ~None`
     --> gateway/platforms/nutrition_coaching.py:20138:17
      |
20136 |         with self._authority_lock(), self._lifecycle_lock, locked():
20137 |             return self._delivery_status_without_reconciliation(
20138 |                 self.store.read(),
      |                 ^^^^^^^^^^^^^^^
20139 |                 proposal_digest,
20140 |             )
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `read` is not defined on `~None` in union `Unknown | ~None`
     --> gateway/platforms/nutrition_coaching.py:20175:29
      |
20173 |                 }
20174 |             with locked():
20175 |                 rows = list(self.store.read())
      |                             ^^^^^^^^^^^^^^^
20176 |                 audited_ids = {
20177 |                     str(row["payload"].get("delivery_id"))
      |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:20198:45
      |
20196 |                     values: list[str] = []
20197 |                     for field in ("provider_receipt", "message_id"):
20198 |                         value = payload.get(field)
      |                                             ^^^^^ Expected `Never`, found `Literal["provider_receipt", "message_id"]`
20199 |                         if value is None:
20200 |                             continue
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[unresolved-attribute]: Attribute `read` is not defined on `~None` in union `Unknown | ~None`
     --> gateway/platforms/nutrition_coaching.py:20364:25
      |
20362 |                 )
20363 |         with (locked() if not _under_store_lock else nullcontext()):
20364 |             rows = list(self.store.read())
      |                         ^^^^^^^^^^^^^^^
20365 |             for row in rows:
20366 |                 payload = row.get("payload") if isinstance(row, Mapping) else None
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `read` is not defined on `~None` in union `Unknown | ~None`
     --> gateway/platforms/nutrition_coaching.py:20444:25
      |
20442 |             raise AdaptiveWorkflowError("adaptive event store lock is unavailable")
20443 |         with self._authority_lock(), self._lifecycle_lock, locked():
20444 |             rows = list(self.store.read())
      |                         ^^^^^^^^^^^^^^^
20445 |             for row in rows:
20446 |                 payload = row.get("payload") if isinstance(row, Mapping) else None
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `append`
     --> gateway/platforms/nutrition_coaching.py:20487:20
      |
20485 |         path_value = getattr(store, "path", None)
20486 |         if not isinstance(path_value, (str, Path)):
20487 |             return store.append(event_type, payload, dedupe_key=dedupe_key)
      |                    ^^^^^^^^^^^^
20488 |         path = Path(path_value)
20489 |         try:
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `read`
     --> gateway/platforms/nutrition_coaching.py:20491:29
      |
20489 |         try:
20490 |             normalized_payload = json.loads(canonical_json(dict(payload)))
20491 |             existing_rows = store.read()
      |                             ^^^^^^^^^^
20492 |             for existing in existing_rows:
20493 |                 if (
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `read` is not defined on `~None` in union `Unknown | ~None`
     --> gateway/platforms/nutrition_coaching.py:20672:33
      |
20670 |             try:
20671 |                 with locked():
20672 |                     rows = list(self.store.read())
      |                                 ^^^^^^^^^^^^^^^
20673 |                     if self._committed_transition(
20674 |                         rows,
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `get`
     --> gateway/platforms/nutrition_coaching.py:20794:25
      |
20792 |                 )
20793 |                 reserved_key = tuple(
20794 |                     str(attempt_payload["destination"].get(field, "") or "").strip()
      |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20795 |                     for field in ("user_id", "chat_id", "topic_id")
20796 |                 )
      |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to bound method `_append_delivery_preflight_rejected` is incorrect
     --> gateway/platforms/nutrition_coaching.py:20823:17
      |
20821 |                 delivery_id=delivery_id,
20822 |                 proposal_digest=proposal.digest,
20823 |                 registration_digest=attempt_payload.get("registration_digest"),
      |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
20824 |                 attempt_event_id=reservation_event_id,
20825 |                 reason=reason,
      |
info: Method defined here
     --> gateway/platforms/nutrition_coaching.py:20400:9
      |
20398 |                 dedupe_key=f"production-audit-pending:{delivery_id}",
20399 |             )
20400 |     def _append_delivery_preflight_rejected(
      |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20401 |         self,
20402 |         *,
      |
     ::: gateway/platforms/nutrition_coaching.py:20406:9
      |
20404 |         proposal_digest: str,
20405 |         reason: str,
20406 |         registration_digest: str | None = None,
      |         -------------------------------------- Parameter declared here
20407 |         attempt_event_id: str | None = None,
20408 |     ) -> Mapping[str, object]:
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `_append_delivery_preflight_rejected` is incorrect
     --> gateway/platforms/nutrition_coaching.py:20824:17
      |
20822 |                 proposal_digest=proposal.digest,
20823 |                 registration_digest=attempt_payload.get("registration_digest"),
20824 |                 attempt_event_id=reservation_event_id,
      |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
20825 |                 reason=reason,
20826 |             )
      |
info: Method defined here
     --> gateway/platforms/nutrition_coaching.py:20400:9
      |
20398 |                 dedupe_key=f"production-audit-pending:{delivery_id}",
20399 |             )
20400 |     def _append_delivery_preflight_rejected(
      |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20401 |         self,
20402 |         *,
      |
     ::: gateway/platforms/nutrition_coaching.py:20407:9
      |
20405 |         reason: str,
20406 |         registration_digest: str | None = None,
20407 |         attempt_event_id: str | None = None,
      |         ----------------------------------- Parameter declared here
20408 |     ) -> Mapping[str, object]:
20409 |         self._require_non_diagnostic_delivery_runtime()
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `_append_delivery_preflight_rejected` is incorrect
     --> gateway/platforms/nutrition_coaching.py:20840:17
      |
20838 |                 delivery_id=delivery_id,
20839 |                 proposal_digest=proposal.digest,
20840 |                 registration_digest=attempt_payload.get("registration_digest"),
      |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
20841 |                 attempt_event_id=reservation_event_id,
20842 |                 reason="transport_unavailable",
      |
info: Method defined here
     --> gateway/platforms/nutrition_coaching.py:20400:9
      |
20398 |                 dedupe_key=f"production-audit-pending:{delivery_id}",
20399 |             )
20400 |     def _append_delivery_preflight_rejected(
      |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20401 |         self,
20402 |         *,
      |
     ::: gateway/platforms/nutrition_coaching.py:20406:9
      |
20404 |         proposal_digest: str,
20405 |         reason: str,
20406 |         registration_digest: str | None = None,
      |         -------------------------------------- Parameter declared here
20407 |         attempt_event_id: str | None = None,
20408 |     ) -> Mapping[str, object]:
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `_append_delivery_preflight_rejected` is incorrect
     --> gateway/platforms/nutrition_coaching.py:20841:17
      |
20839 |                 proposal_digest=proposal.digest,
20840 |                 registration_digest=attempt_payload.get("registration_digest"),
20841 |                 attempt_event_id=reservation_event_id,
      |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
20842 |                 reason="transport_unavailable",
20843 |             )
      |
info: Method defined here
     --> gateway/platforms/nutrition_coaching.py:20400:9
      |
20398 |                 dedupe_key=f"production-audit-pending:{delivery_id}",
20399 |             )
20400 |     def _append_delivery_preflight_rejected(
      |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20401 |         self,
20402 |         *,
      |
     ::: gateway/platforms/nutrition_coaching.py:20407:9
      |
20405 |         reason: str,
20406 |         registration_digest: str | None = None,
20407 |         attempt_event_id: str | None = None,
      |         ----------------------------------- Parameter declared here
20408 |     ) -> Mapping[str, object]:
20409 |         self._require_non_diagnostic_delivery_runtime()
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `_append_delivery_preflight_rejected` is incorrect
     --> gateway/platforms/nutrition_coaching.py:20856:17
      |
20854 |                 delivery_id=delivery_id,
20855 |                 proposal_digest=proposal.digest,
20856 |                 registration_digest=attempt_payload.get("registration_digest"),
      |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
20857 |                 attempt_event_id=reservation_event_id,
20858 |                 reason=str(exc)[:160] or "transport_preflight_rejected",
      |
info: Method defined here
     --> gateway/platforms/nutrition_coaching.py:20400:9
      |
20398 |                 dedupe_key=f"production-audit-pending:{delivery_id}",
20399 |             )
20400 |     def _append_delivery_preflight_rejected(
      |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20401 |         self,
20402 |         *,
      |
     ::: gateway/platforms/nutrition_coaching.py:20406:9
      |
20404 |         proposal_digest: str,
20405 |         reason: str,
20406 |         registration_digest: str | None = None,
      |         -------------------------------------- Parameter declared here
20407 |         attempt_event_id: str | None = None,
20408 |     ) -> Mapping[str, object]:
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `_append_delivery_preflight_rejected` is incorrect
     --> gateway/platforms/nutrition_coaching.py:20857:17
      |
20855 |                 proposal_digest=proposal.digest,
20856 |                 registration_digest=attempt_payload.get("registration_digest"),
20857 |                 attempt_event_id=reservation_event_id,
      |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
20858 |                 reason=str(exc)[:160] or "transport_preflight_rejected",
20859 |             )
      |
info: Method defined here
     --> gateway/platforms/nutrition_coaching.py:20400:9
      |
20398 |                 dedupe_key=f"production-audit-pending:{delivery_id}",
20399 |             )
20400 |     def _append_delivery_preflight_rejected(
      |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20401 |         self,
20402 |         *,
      |
     ::: gateway/platforms/nutrition_coaching.py:20407:9
      |
20405 |         reason: str,
20406 |         registration_digest: str | None = None,
20407 |         attempt_event_id: str | None = None,
      |         ----------------------------------- Parameter declared here
20408 |     ) -> Mapping[str, object]:
20409 |         self._require_non_diagnostic_delivery_runtime()
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `_append_delivery_unknown` is incorrect
     --> gateway/platforms/nutrition_coaching.py:20864:17
      |
20862 |                 delivery_id=delivery_id,
20863 |                 proposal_digest=proposal.digest,
20864 |                 registration_digest=attempt_payload.get("registration_digest"),
      |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
20865 |                 attempt_event_id=reservation_event_id,
20866 |                 reason="cancelled",
      |
info: Method defined here
     --> gateway/platforms/nutrition_coaching.py:20430:9
      |
20428 |                 dedupe_key=f"production-preflight-rejected:{delivery_id}:{reason}",
20429 |             )
20430 |     def _append_delivery_unknown(
      |         ^^^^^^^^^^^^^^^^^^^^^^^^
20431 |         self,
20432 |         *,
      |
     ::: gateway/platforms/nutrition_coaching.py:20436:9
      |
20434 |         proposal_digest: str,
20435 |         reason: str,
20436 |         registration_digest: str | None = None,
      |         -------------------------------------- Parameter declared here
20437 |         attempt_event_id: str | None = None,
20438 |     ) -> Mapping[str, object]:
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `_append_delivery_unknown` is incorrect
     --> gateway/platforms/nutrition_coaching.py:20865:17
      |
20863 |                 proposal_digest=proposal.digest,
20864 |                 registration_digest=attempt_payload.get("registration_digest"),
20865 |                 attempt_event_id=reservation_event_id,
      |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
20866 |                 reason="cancelled",
20867 |             )
      |
info: Method defined here
     --> gateway/platforms/nutrition_coaching.py:20430:9
      |
20428 |                 dedupe_key=f"production-preflight-rejected:{delivery_id}:{reason}",
20429 |             )
20430 |     def _append_delivery_unknown(
      |         ^^^^^^^^^^^^^^^^^^^^^^^^
20431 |         self,
20432 |         *,
      |
     ::: gateway/platforms/nutrition_coaching.py:20437:9
      |
20435 |         reason: str,
20436 |         registration_digest: str | None = None,
20437 |         attempt_event_id: str | None = None,
      |         ----------------------------------- Parameter declared here
20438 |     ) -> Mapping[str, object]:
20439 |         self._require_non_diagnostic_delivery_runtime()
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `_append_delivery_unknown` is incorrect
     --> gateway/platforms/nutrition_coaching.py:20872:17
      |
20870 |                 delivery_id=delivery_id,
20871 |                 proposal_digest=proposal.digest,
20872 |                 registration_digest=attempt_payload.get("registration_digest"),
      |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
20873 |                 attempt_event_id=reservation_event_id,
20874 |                 reason=type(exc).__name__,
      |
info: Method defined here
     --> gateway/platforms/nutrition_coaching.py:20430:9
      |
20428 |                 dedupe_key=f"production-preflight-rejected:{delivery_id}:{reason}",
20429 |             )
20430 |     def _append_delivery_unknown(
      |         ^^^^^^^^^^^^^^^^^^^^^^^^
20431 |         self,
20432 |         *,
      |
     ::: gateway/platforms/nutrition_coaching.py:20436:9
      |
20434 |         proposal_digest: str,
20435 |         reason: str,
20436 |         registration_digest: str | None = None,
      |         -------------------------------------- Parameter declared here
20437 |         attempt_event_id: str | None = None,
20438 |     ) -> Mapping[str, object]:
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `_append_delivery_unknown` is incorrect
     --> gateway/platforms/nutrition_coaching.py:20873:17
      |
20871 |                 proposal_digest=proposal.digest,
20872 |                 registration_digest=attempt_payload.get("registration_digest"),
20873 |                 attempt_event_id=reservation_event_id,
      |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
20874 |                 reason=type(exc).__name__,
20875 |             )
      |
info: Method defined here
     --> gateway/platforms/nutrition_coaching.py:20430:9
      |
20428 |                 dedupe_key=f"production-preflight-rejected:{delivery_id}:{reason}",
20429 |             )
20430 |     def _append_delivery_unknown(
      |         ^^^^^^^^^^^^^^^^^^^^^^^^
20431 |         self,
20432 |         *,
      |
     ::: gateway/platforms/nutrition_coaching.py:20437:9
      |
20435 |         reason: str,
20436 |         registration_digest: str | None = None,
20437 |         attempt_event_id: str | None = None,
      |         ----------------------------------- Parameter declared here
20438 |     ) -> Mapping[str, object]:
20439 |         self._require_non_diagnostic_delivery_runtime()
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `_append_delivery_unknown` is incorrect
     --> gateway/platforms/nutrition_coaching.py:20881:17
      |
20879 |                 delivery_id=delivery_id,
20880 |                 proposal_digest=proposal.digest,
20881 |                 registration_digest=attempt_payload.get("registration_digest"),
      |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
20882 |                 attempt_event_id=reservation_event_id,
20883 |                 reason="invalid_provider_receipt",
      |
info: Method defined here
     --> gateway/platforms/nutrition_coaching.py:20430:9
      |
20428 |                 dedupe_key=f"production-preflight-rejected:{delivery_id}:{reason}",
20429 |             )
20430 |     def _append_delivery_unknown(
      |         ^^^^^^^^^^^^^^^^^^^^^^^^
20431 |         self,
20432 |         *,
      |
     ::: gateway/platforms/nutrition_coaching.py:20436:9
      |
20434 |         proposal_digest: str,
20435 |         reason: str,
20436 |         registration_digest: str | None = None,
      |         -------------------------------------- Parameter declared here
20437 |         attempt_event_id: str | None = None,
20438 |     ) -> Mapping[str, object]:
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `_append_delivery_unknown` is incorrect
     --> gateway/platforms/nutrition_coaching.py:20882:17
      |
20880 |                 proposal_digest=proposal.digest,
20881 |                 registration_digest=attempt_payload.get("registration_digest"),
20882 |                 attempt_event_id=reservation_event_id,
      |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `object`
20883 |                 reason="invalid_provider_receipt",
20884 |             )
      |
info: Method defined here
     --> gateway/platforms/nutrition_coaching.py:20430:9
      |
20428 |                 dedupe_key=f"production-preflight-rejected:{delivery_id}:{reason}",
20429 |             )
20430 |     def _append_delivery_unknown(
      |         ^^^^^^^^^^^^^^^^^^^^^^^^
20431 |         self,
20432 |         *,
      |
     ::: gateway/platforms/nutrition_coaching.py:20437:9
      |
20435 |         reason: str,
20436 |         registration_digest: str | None = None,
20437 |         attempt_event_id: str | None = None,
      |         ----------------------------------- Parameter declared here
20438 |     ) -> Mapping[str, object]:
20439 |         self._require_non_diagnostic_delivery_runtime()
      |
info: rule `invalid-argument-type` is enabled by default

error[unresolved-attribute]: Attribute `read` is not defined on `~None` in union `Unknown | ~None`
     --> gateway/platforms/nutrition_coaching.py:20919:29
      |
20917 |         try:
20918 |             with self._authority_lock(), self._lifecycle_lock, locked():
20919 |                 rows = list(self.store.read())
      |                             ^^^^^^^^^^^^^^^
20920 |                 return self._reconcile_delivery_locked(
20921 |                     rows=rows,
      |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to bound method `deliver_latest_once` is incorrect
     --> gateway/platforms/nutrition_coaching.py:20937:57
      |
20935 |             asyncio.get_running_loop()
20936 |         except RuntimeError:
20937 |             return asyncio.run(self.deliver_latest_once(*args, **kwargs))
      |                                                         ^^^^^ Expected `str | None`, found `object`
20938 |         raise AdaptiveWorkflowError("sync adaptive delivery cannot run in an event loop")
20939 |     def _approval_exists(self, proposal: NutritionProposal) -> bool:
      |
info: Method defined here
     --> gateway/platforms/nutrition_coaching.py:20519:15
      |
20517 |         except (OSError, TypeError, ValueError) as exc:
20518 |             raise AdaptiveWorkflowError("adaptive delivery reservation failed") from exc
20519 |     async def deliver_latest_once(
      |               ^^^^^^^^^^^^^^^^^^^
20520 |         self,
20521 |         proposal_digest: str | None = None,
      |         ---------------------------------- Parameter declared here
20522 |         *,
20523 |         expected_digest: str | None = None,
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `deliver_latest_once` is incorrect
     --> gateway/platforms/nutrition_coaching.py:20937:64
      |
20935 |             asyncio.get_running_loop()
20936 |         except RuntimeError:
20937 |             return asyncio.run(self.deliver_latest_once(*args, **kwargs))
      |                                                                ^^^^^^^^ Expected `str`, found `object`
20938 |         raise AdaptiveWorkflowError("sync adaptive delivery cannot run in an event loop")
20939 |     def _approval_exists(self, proposal: NutritionProposal) -> bool:
      |
info: Method defined here
     --> gateway/platforms/nutrition_coaching.py:20519:15
      |
20517 |         except (OSError, TypeError, ValueError) as exc:
20518 |             raise AdaptiveWorkflowError("adaptive delivery reservation failed") from exc
20519 |     async def deliver_latest_once(
      |               ^^^^^^^^^^^^^^^^^^^
20520 |         self,
20521 |         proposal_digest: str | None = None,
      |
     ::: gateway/platforms/nutrition_coaching.py:20525:9
      |
20523 |         expected_digest: str | None = None,
20524 |         topic_id: object = OPERATOR_REVIEW_TOPIC_ID,
20525 |         operator_id: str = "richard",
      |         ---------------------------- Parameter declared here
20526 |         strict_sender: Callable[[str, str, str], object] | None = None,
20527 |         destination: object | None = None,
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `deliver_latest_once` is incorrect
     --> gateway/platforms/nutrition_coaching.py:20937:64
      |
20935 |             asyncio.get_running_loop()
20936 |         except RuntimeError:
20937 |             return asyncio.run(self.deliver_latest_once(*args, **kwargs))
      |                                                                ^^^^^^^^ Expected `((str, str, str, /) -> object) | None`, found `object`
20938 |         raise AdaptiveWorkflowError("sync adaptive delivery cannot run in an event loop")
20939 |     def _approval_exists(self, proposal: NutritionProposal) -> bool:
      |
info: Method defined here
     --> gateway/platforms/nutrition_coaching.py:20519:15
      |
20517 |         except (OSError, TypeError, ValueError) as exc:
20518 |             raise AdaptiveWorkflowError("adaptive delivery reservation failed") from exc
20519 |     async def deliver_latest_once(
      |               ^^^^^^^^^^^^^^^^^^^
20520 |         self,
20521 |         proposal_digest: str | None = None,
      |
     ::: gateway/platforms/nutrition_coaching.py:20526:9
      |
20524 |         topic_id: object = OPERATOR_REVIEW_TOPIC_ID,
20525 |         operator_id: str = "richard",
20526 |         strict_sender: Callable[[str, str, str], object] | None = None,
      |         -------------------------------------------------------------- Parameter declared here
20527 |         destination: object | None = None,
20528 |         chat_id: str | None = None,
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `deliver_latest_once` is incorrect
     --> gateway/platforms/nutrition_coaching.py:20937:64
      |
20935 |             asyncio.get_running_loop()
20936 |         except RuntimeError:
20937 |             return asyncio.run(self.deliver_latest_once(*args, **kwargs))
      |                                                                ^^^^^^^^ Expected `str | None`, found `object`
20938 |         raise AdaptiveWorkflowError("sync adaptive delivery cannot run in an event loop")
20939 |     def _approval_exists(self, proposal: NutritionProposal) -> bool:
      |
info: Method defined here
     --> gateway/platforms/nutrition_coaching.py:20519:15
      |
20517 |         except (OSError, TypeError, ValueError) as exc:
20518 |             raise AdaptiveWorkflowError("adaptive delivery reservation failed") from exc
20519 |     async def deliver_latest_once(
      |               ^^^^^^^^^^^^^^^^^^^
20520 |         self,
20521 |         proposal_digest: str | None = None,
      |
     ::: gateway/platforms/nutrition_coaching.py:20528:9
      |
20526 |         strict_sender: Callable[[str, str, str], object] | None = None,
20527 |         destination: object | None = None,
20528 |         chat_id: str | None = None,
      |         -------------------------- Parameter declared here
20529 |     ) -> Mapping[str, object]:
20530 |         """Deliver once through the registered customer transport.
      |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `deliver_latest_once` is incorrect
     --> gateway/platforms/nutrition_coaching.py:20937:64
      |
20935 |             asyncio.get_running_loop()
20936 |         except RuntimeError:
20937 |             return asyncio.run(self.deliver_latest_once(*args, **kwargs))
      |                                                                ^^^^^^^^ Expected `str | None`, found `object`
20938 |         raise AdaptiveWorkflowError("sync adaptive delivery cannot run in an event loop")
20939 |     def _approval_exists(self, proposal: NutritionProposal) -> bool:
      |
info: Method defined here
     --> gateway/platforms/nutrition_coaching.py:20519:15
      |
20517 |         except (OSError, TypeError, ValueError) as exc:
20518 |             raise AdaptiveWorkflowError("adaptive delivery reservation failed") from exc
20519 |     async def deliver_latest_once(
      |               ^^^^^^^^^^^^^^^^^^^
20520 |         self,
20521 |         proposal_digest: str | None = None,
20522 |         *,
20523 |         expected_digest: str | None = None,
      |         ---------------------------------- Parameter declared here
20524 |         topic_id: object = OPERATOR_REVIEW_TOPIC_ID,
20525 |         operator_id: str = "richard",
      |
info: rule `invalid-argument-type` is enabled by default

error[unresolved-attribute]: Attribute `read` is not defined on `~None` in union `Unknown | ~None`
     --> gateway/platforms/nutrition_coaching.py:20940:20
      |
20938 |         raise AdaptiveWorkflowError("sync adaptive delivery cannot run in an event loop")
20939 |     def _approval_exists(self, proposal: NutritionProposal) -> bool:
20940 |         for row in self.store.read():
      |                    ^^^^^^^^^^^^^^^
20941 |             if row.get("event_type") != "plan_approved":
20942 |                 continue
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `read` is not defined on `~None` in union `Unknown | ~None`
     --> gateway/platforms/nutrition_coaching.py:21003:20
      |
21001 |         }
21002 |         with self._authority_lock(), self._lifecycle_lock, locked():
21003 |             rows = self.store.read()
      |                    ^^^^^^^^^^^^^^^
21004 |             for row in rows:
21005 |                 payload = row.get("payload")
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `read` is not defined on `~None` in union `Unknown | ~None`
     --> gateway/platforms/nutrition_coaching.py:21173:20
      |
21171 |         token, action = match.groups()
21172 |         issued = None
21173 |         for row in self.store.read():
      |                    ^^^^^^^^^^^^^^^
21174 |             payload = row.get("payload")
21175 |             if (
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `read` is not defined on `~None` in union `Unknown | ~None`
     --> gateway/platforms/nutrition_coaching.py:21221:16
      |
21219 |         if str(decision) == "human_review":
21220 |             raise AdaptiveWorkflowError("safety hold requires human review")
21221 |         rows = self.store.read()
      |                ^^^^^^^^^^^^^^^
21222 |         if not self._has_event(rows, "plan_approved", proposal.digest):
21223 |             raise AdaptiveWorkflowError("adaptive proposal is not approved")
      |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to function `__new__` is incorrect
     --> gateway/platforms/nutrition_coaching.py:21293:32
      |
21291 |         actual_home = getattr(source, "_home", None)
21292 |         try:
21293 |             actual_path = Path(actual_home).resolve()
      |                                ^^^^^^^^^^^ Expected `str | PathLike[str]`, found `Any | None`
21294 |         except (TypeError, OSError, RuntimeError) as exc:
21295 |             raise ValueError("canonical EventStore root is unavailable") from exc
      |
info: Element `None` of this union is not assignable to `str | PathLike[str]`
info: Function defined here
   --> stdlib/pathlib/__init__.pyi:308:13
    |
307 |     if sys.version_info >= (3, 12):
308 |         def __new__(cls, *args: StrPath, **kwargs: Unused) -> Self: ...  # pyright: ignore[reportInconsistentConstructor]
    |             ^^^^^^^      -------------- Parameter declared here
309 |     else:
310 |         def __new__(cls, *args: StrPath, **kwargs: Unused) -> Self: ...
    |
info: Union variant `def __new__[Self](cls, *args: str | PathLike[str], **kwargs: object) -> Self` is incompatible with this call site
info: Attempted to call union type `(def __new__[Self](cls, *args: str | PathLike[str], **kwargs: object) -> Self) | (bound method Path.__init__(*args: str | PathLike[str]) -> None)`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
     --> gateway/platforms/nutrition_coaching.py:21293:32
      |
21291 |         actual_home = getattr(source, "_home", None)
21292 |         try:
21293 |             actual_path = Path(actual_home).resolve()
      |                                ^^^^^^^^^^^ Expected `str | PathLike[str]`, found `Any | None`
21294 |         except (TypeError, OSError, RuntimeError) as exc:
21295 |             raise ValueError("canonical EventStore root is unavailable") from exc
      |
info: Element `None` of this union is not assignable to `str | PathLike[str]`
info: Method defined here
   --> stdlib/pathlib/__init__.pyi:130:13
    |
128 |             """
129 |
130 |         def __init__(self, *args: StrPath) -> None: ...  # pyright: ignore[reportInconsistentConstructor]
    |             ^^^^^^^^       -------------- Parameter declared here
131 |     else:
132 |         def __new__(cls, *args: StrPath) -> Self:
    |
info: Union variant `bound method Path.__init__(*args: str | PathLike[str]) -> None` is incompatible with this call site
info: Attempted to call union type `(def __new__[Self](cls, *args: str | PathLike[str], **kwargs: object) -> Self) | (bound method Path.__init__(*args: str | PathLike[str]) -> None)`
info: rule `invalid-argument-type` is enabled by default

error[no-matching-overload]: No overload of bound method `get` matches arguments
     --> gateway/platforms/nutrition_coaching.py:21333:16
      |
21331 |     @staticmethod
21332 |     def _value(row: object, name: str, default: object = None) -> object:
21333 |         return row.get(name, default) if isinstance(row, Mapping) else getattr(row, name, default)
      |                ^^^^^^^^^^^^^^^^^^^^^^
21334 |
21335 |     @classmethod
      |
info: First overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Possible overloads for bound method `get`:
info:   (self, key: _KT@Mapping, /) -> _VT_co@Mapping | None
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `no-matching-overload` is enabled by default

error[invalid-return-type]: Return type does not match returned value
     --> gateway/platforms/nutrition_coaching.py:21349:16
      |
21347 |         ):
21348 |             return None
21349 |         return event_type, payload, event_id
      |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `tuple[str, Mapping[str, object], str] | None`, found `tuple[str, Top[Mapping[Unknown, object]], str & ~AlwaysFalsy]`
21350 |
21351 |     @classmethod
      |
     ::: gateway/platforms/nutrition_coaching.py:21336:43
      |
21335 |     @classmethod
21336 |     def _event_parts(cls, row: object) -> tuple[str, Mapping[str, object], str] | None:
      |                                           -------------------------------------------- Expected `tuple[str, Mapping[str, object], str] | None` because of return type
21337 |         event_type = cls._value(row, "event_type")
21338 |         event_type = getattr(event_type, "value", event_type)
      |
info: rule `invalid-return-type` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `_read_events`
     --> gateway/platforms/nutrition_coaching.py:21437:21
      |
21435 |                 reviews = tuple(RegisteredCustomerDualCoachCoordinator(customer).adaptive_store.read())
21436 |                 events = tuple(
21437 |                     CoordinatorEventSource(self._coordinator, customer_key).events_for(customer_key)._read_events()
      |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
21438 |                 )
21439 |             except Exception:
      |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:21538:24
      |
21536 |         """Extract one Telegram receipt without accepting a customer transport result."""
21537 |         value = (
21538 |             result.get("message_id")
      |                        ^^^^^^^^^^^^ Expected `Never`, found `Literal["message_id"]`
21539 |             if isinstance(result, Mapping)
21540 |             else getattr(result, "message_id", None)
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `_thread_kwargs_for_send`
     --> gateway/platforms/nutrition_coaching.py:21619:25
      |
21617 |         if not callable(strict_sender):
21618 |             raise RuntimeError("Telegram strict topic sender is unavailable")
21619 |         thread_kwargs = self._adapter._thread_kwargs_for_send(
      |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
21620 |             chat_id,
21621 |             topic_id,
      |
info: rule `unresolved-attribute` is enabled by default

error[invalid-return-type]: Return type does not match returned value
     --> gateway/platforms/nutrition_coaching.py:21690:50
      |
21689 |       @staticmethod
21690 |       def _reservation_key(destination: object) -> tuple[str, str, str]:
      |                                                    -------------------- Expected `tuple[str, str, str]` because of return type
21691 |           return tuple(
      |  ________________^
21692 | |             str(getattr(destination, field, "") or "").strip()
21693 | |             for field in ("user_id", "chat_id", "topic_id")
21694 | |         )
      | |_________^ expected `tuple[str, str, str]`, found `tuple[str, ...]`
21695 |
21696 |       async def send_adaptive_customer(
      |
info: rule `invalid-return-type` is enabled by default

error[unresolved-attribute]: Attribute `read` is not defined on `~None` in union `Unknown | ~None`
     --> gateway/platforms/nutrition_coaching.py:21750:29
      |
21748 |         with adaptive._authority_lock(), adaptive._lifecycle_lock, locked():
21749 |             try:
21750 |                 rows = list(store.read())
      |                             ^^^^^^^^^^
21751 |                 live_delivery_pins = {
21752 |                     **live_delivery_pins,
      |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:21923:23
      |
21921 |         raise RuntimeError("Telegram customer transport rejected delivery")
21922 |     if isinstance(result, Mapping):
21923 |         if result.get("ok") is not True:
      |                       ^^^^ Expected `Never`, found `Literal["ok"]`
21924 |             raise RuntimeError("Telegram customer transport rejected delivery")
21925 |         message_id = result.get("message_id")
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:21925:33
      |
21923 |         if result.get("ok") is not True:
21924 |             raise RuntimeError("Telegram customer transport rejected delivery")
21925 |         message_id = result.get("message_id")
      |                                 ^^^^^^^^^^^^ Expected `Never`, found `Literal["message_id"]`
21926 |         raw_response = result.get("raw_response")
21927 |     else:
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/nutrition_coaching.py:21926:35
      |
21924 |             raise RuntimeError("Telegram customer transport rejected delivery")
21925 |         message_id = result.get("message_id")
21926 |         raw_response = result.get("raw_response")
      |                                   ^^^^^^^^^^^^^^ Expected `Never`, found `Literal["raw_response"]`
21927 |     else:
21928 |         if getattr(result, "success", True) is False or getattr(result, "ok", True) is False:
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `create_production_operator_console_server` is incorrect
     --> gateway/platforms/nutrition_coaching.py:22028:13
      |
22026 |             canonical_event_source=event_source,
22027 |             coordinator=coordinator,
22028 |             customer_transport=customer_transport,
      |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `CustomerTransport | None`, found `object`
22029 |             port=port,
22030 |             bind_host=bind_host,
      |
info: Function defined here
   --> dualcoach/profile/checkin_cli/operator_console.py:795:5
    |
793 |         events_path=events_path,
794 |     ).create_server()
795 | def create_production_operator_console_server(
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
796 |     *,
797 |     token_path: str | Path,
    |
   ::: dualcoach/profile/checkin_cli/operator_console.py:802:5
    |
800 |     lifecycle_service: Any | None = None,
801 |     coordinator: Any | None = None,
802 |     customer_transport: CustomerTransport | None = None,
    |     --------------------------------------------------- Parameter declared here
803 |     port: int = 0,
804 |     bind_host: str = "127.0.0.1",
    |
info: rule `invalid-argument-type` is enabled by default

error[unresolved-attribute]: Attribute `_storage` is not defined on `_WizardService` in union `Unknown | _WizardService`
   --> gateway/platforms/physique_checkin.py:840:19
    |
838 |             binding.session_id, binding.step, binding.version, action
839 |         ).encode()
840 |         session = self._service._storage.load(binding.session_id)
    |                   ^^^^^^^^^^^^^^^^^^^^^^
841 |         answers = dict(getattr(session, "answers", {}) or {})
842 |         digestion = {
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `_storage` is not defined on `_WizardService` in union `Unknown | _WizardService`
   --> gateway/platforms/physique_checkin.py:921:23
    |
919 |             return WizardPrompt(f"{label}의 일정을 직접 확인했나요?", buttons, (buttons,))
920 |         if binding.step == "summary":
921 |             session = self._service._storage.load(binding.session_id)
    |                       ^^^^^^^^^^^^^^^^^^^^^^
922 |             answers = dict(getattr(session, "answers", {}) or {})
923 |             buttons = (("저장", callback("a0")),)
    |
info: rule `unresolved-attribute` is enabled by default

error[invalid-assignment]: Object of type `<special-form 'typing.Any'>` is not assignable to `<class 'Update'>`
  --> gateway/platforms/telegram.py:93:5
   |
91 | except ImportError:
92 |     TELEGRAM_AVAILABLE = False
93 |     Update = Any
   |     ------   ^^^ Incompatible value of type `<special-form 'typing.Any'>`
   |     |
   |     Declared type `<class 'Update'>`
94 |     Bot = Any
95 |     Message = Any
   |
info: Implicit shadowing of class `Update`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `<special-form 'typing.Any'>` is not assignable to `<class 'Bot'>`
  --> gateway/platforms/telegram.py:94:5
   |
92 |     TELEGRAM_AVAILABLE = False
93 |     Update = Any
94 |     Bot = Any
   |     ---   ^^^ Incompatible value of type `<special-form 'typing.Any'>`
   |     |
   |     Declared type `<class 'Bot'>`
95 |     Message = Any
96 |     InlineKeyboardButton = Any
   |
info: Implicit shadowing of class `Bot`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `<special-form 'typing.Any'>` is not assignable to `<class 'Message'>`
  --> gateway/platforms/telegram.py:95:5
   |
93 |     Update = Any
94 |     Bot = Any
95 |     Message = Any
   |     -------   ^^^ Incompatible value of type `<special-form 'typing.Any'>`
   |     |
   |     Declared type `<class 'Message'>`
96 |     InlineKeyboardButton = Any
97 |     InlineKeyboardMarkup = Any
   |
info: Implicit shadowing of class `Message`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `<special-form 'typing.Any'>` is not assignable to `<class 'InlineKeyboardButton'>`
  --> gateway/platforms/telegram.py:96:5
   |
94 |     Bot = Any
95 |     Message = Any
96 |     InlineKeyboardButton = Any
   |     --------------------   ^^^ Incompatible value of type `<special-form 'typing.Any'>`
   |     |
   |     Declared type `<class 'InlineKeyboardButton'>`
97 |     InlineKeyboardMarkup = Any
98 |     ReplyKeyboardMarkup = Any
   |
info: Implicit shadowing of class `InlineKeyboardButton`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `<special-form 'typing.Any'>` is not assignable to `<class 'InlineKeyboardMarkup'>`
  --> gateway/platforms/telegram.py:97:5
   |
95 |     Message = Any
96 |     InlineKeyboardButton = Any
97 |     InlineKeyboardMarkup = Any
   |     --------------------   ^^^ Incompatible value of type `<special-form 'typing.Any'>`
   |     |
   |     Declared type `<class 'InlineKeyboardMarkup'>`
98 |     ReplyKeyboardMarkup = Any
99 |     KeyboardButton = Any
   |
info: Implicit shadowing of class `InlineKeyboardMarkup`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `<special-form 'typing.Any'>` is not assignable to `<class 'Application'>`
   --> gateway/platforms/telegram.py:103:5
    |
101 |     ReplyParameters = Any
102 |     LinkPreviewOptions = None
103 |     Application = Any
    |     -----------   ^^^ Incompatible value of type `<special-form 'typing.Any'>`
    |     |
    |     Declared type `<class 'Application'>`
104 |     CommandHandler = Any
105 |     CallbackQueryHandler = Any
    |
info: Implicit shadowing of class `Application`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `<special-form 'typing.Any'>` is not assignable to `<class 'CommandHandler'>`
   --> gateway/platforms/telegram.py:104:5
    |
102 |     LinkPreviewOptions = None
103 |     Application = Any
104 |     CommandHandler = Any
    |     --------------   ^^^ Incompatible value of type `<special-form 'typing.Any'>`
    |     |
    |     Declared type `<class 'CommandHandler'>`
105 |     CallbackQueryHandler = Any
106 |     TelegramMessageHandler = Any
    |
info: Implicit shadowing of class `CommandHandler`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `<special-form 'typing.Any'>` is not assignable to `<class 'CallbackQueryHandler'>`
   --> gateway/platforms/telegram.py:105:5
    |
103 |     Application = Any
104 |     CommandHandler = Any
105 |     CallbackQueryHandler = Any
    |     --------------------   ^^^ Incompatible value of type `<special-form 'typing.Any'>`
    |     |
    |     Declared type `<class 'CallbackQueryHandler'>`
106 |     TelegramMessageHandler = Any
107 |     TypeHandler = Any
    |
info: Implicit shadowing of class `CallbackQueryHandler`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `<special-form 'typing.Any'>` is not assignable to `<class 'MessageHandler'>`
   --> gateway/platforms/telegram.py:106:5
    |
104 |     CommandHandler = Any
105 |     CallbackQueryHandler = Any
106 |     TelegramMessageHandler = Any
    |     ----------------------   ^^^ Incompatible value of type `<special-form 'typing.Any'>`
    |     |
    |     Declared type `<class 'MessageHandler'>`
107 |     TypeHandler = Any
108 |     ChatMemberHandler = Any
    |
info: Implicit shadowing of class `MessageHandler`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `<class 'RuntimeError'>` is not assignable to `<class 'BadRequest'>`
   --> gateway/platforms/telegram.py:110:5
    |
108 |     ChatMemberHandler = Any
109 |     ApplicationHandlerStop = RuntimeError
110 |     BadRequest = RuntimeError
    |     ----------   ^^^^^^^^^^^^ Incompatible value of type `<class 'RuntimeError'>`
    |     |
    |     Declared type `<class 'BadRequest'>`
111 |     NetworkError = RuntimeError
112 |     HTTPXRequest = Any
    |
info: Implicit shadowing of class `BadRequest`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `<class 'RuntimeError'>` is not assignable to `<class 'NetworkError'>`
   --> gateway/platforms/telegram.py:111:5
    |
109 |     ApplicationHandlerStop = RuntimeError
110 |     BadRequest = RuntimeError
111 |     NetworkError = RuntimeError
    |     ------------   ^^^^^^^^^^^^ Incompatible value of type `<class 'RuntimeError'>`
    |     |
    |     Declared type `<class 'NetworkError'>`
112 |     HTTPXRequest = Any
113 |     filters = None
    |
info: Implicit shadowing of class `NetworkError`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `<special-form 'typing.Any'>` is not assignable to `<class 'HTTPXRequest'>`
   --> gateway/platforms/telegram.py:112:5
    |
110 |     BadRequest = RuntimeError
111 |     NetworkError = RuntimeError
112 |     HTTPXRequest = Any
    |     ------------   ^^^ Incompatible value of type `<special-form 'typing.Any'>`
    |     |
    |     Declared type `<class 'HTTPXRequest'>`
113 |     filters = None
114 |     ParseMode = None
    |
info: Implicit shadowing of class `HTTPXRequest`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `<module 'telegram.ext.filters'>`
   --> gateway/platforms/telegram.py:113:5
    |
111 |     NetworkError = RuntimeError
112 |     HTTPXRequest = Any
113 |     filters = None
    |     -------   ^^^^ Incompatible value of type `None`
    |     |
    |     Declared type `<module 'telegram.ext.filters'>`
114 |     ParseMode = None
115 |     ChatType = None
    |
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `<class 'ParseMode'>`
   --> gateway/platforms/telegram.py:114:5
    |
112 |     HTTPXRequest = Any
113 |     filters = None
114 |     ParseMode = None
    |     ---------   ^^^^ Incompatible value of type `None`
    |     |
    |     Declared type `<class 'ParseMode'>`
115 |     ChatType = None
    |
info: Implicit shadowing of class `ParseMode`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `<class 'ChatType'>`
   --> gateway/platforms/telegram.py:115:5
    |
113 |     filters = None
114 |     ParseMode = None
115 |     ChatType = None
    |     --------   ^^^^ Incompatible value of type `None`
    |     |
    |     Declared type `<class 'ChatType'>`
116 |
117 |     # Mock ContextTypes so type annotations using ContextTypes.DEFAULT_TYPE
    |
info: Implicit shadowing of class `ChatType`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `<class '_MockContextTypes'>` is not assignable to `<class 'ContextTypes'>`
   --> gateway/platforms/telegram.py:122:5
    |
120 |         DEFAULT_TYPE = Any
121 |
122 |     ContextTypes = _MockContextTypes
    |     ------------   ^^^^^^^^^^^^^^^^^ Incompatible value of type `<class '_MockContextTypes'>`
    |     |
    |     Declared type `<class 'ContextTypes'>`
    |
info: Implicit shadowing of class `ContextTypes`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[unresolved-attribute]: Unresolved attribute `_diagnostic_production_bot_identity` on type `object`
   --> gateway/platforms/telegram.py:315:5
    |
313 |         cast(AuthenticatedTelegramBot, bot),
314 |     )
315 |     adapter._diagnostic_production_bot_identity = bot
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
316 |     adapter._diagnostic_production_bot_digest = digest
317 |     adapter._diagnostic_production_adapter_token = _DIAGNOSTIC_PRODUCTION_ADAPTER_TOKEN
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Unresolved attribute `_diagnostic_production_bot_digest` on type `object`
   --> gateway/platforms/telegram.py:316:5
    |
314 |     )
315 |     adapter._diagnostic_production_bot_identity = bot
316 |     adapter._diagnostic_production_bot_digest = digest
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
317 |     adapter._diagnostic_production_adapter_token = _DIAGNOSTIC_PRODUCTION_ADAPTER_TOKEN
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Unresolved attribute `_diagnostic_production_adapter_token` on type `object`
   --> gateway/platforms/telegram.py:317:5
    |
315 |     adapter._diagnostic_production_bot_identity = bot
316 |     adapter._diagnostic_production_bot_digest = digest
317 |     adapter._diagnostic_production_adapter_token = _DIAGNOSTIC_PRODUCTION_ADAPTER_TOKEN
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
info: rule `unresolved-attribute` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `<class 'LinkPreviewOptions'>`
   --> gateway/platforms/telegram.py:351:13
    |
349 |             from telegram import LinkPreviewOptions as _LPO
350 |         except ImportError:
351 |             _LPO = None
    |             ----   ^^^^ Incompatible value of type `None`
    |             |
    |             Declared type `<class 'LinkPreviewOptions'>`
352 |         from telegram.ext import (
353 |             Application as _App, CommandHandler as _CH,
    |
info: Implicit shadowing of class `LinkPreviewOptions`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[unresolved-attribute]: Object of type `TelegramTextEditor | None` has no attribute `do_api_request`
    --> gateway/platforms/telegram.py:1488:25
     |
1486 |             # response shape it does not fully model yet; a post-delivery parse
1487 |             # error must not be mistaken for a sendable failure.
1488 |             msg = await self._bot.do_api_request(
     |                         ^^^^^^^^^^^^^^^^^^^^^^^^
1489 |                 "sendRichMessage", api_kwargs=payload
1490 |             )
     |
info: rule `unresolved-attribute` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `<class 'TimedOut'>`
    --> gateway/platforms/telegram.py:1509:17
     |
1507 |                 from telegram.error import TimedOut as _TimedOut
1508 |             except (ImportError, AttributeError):
1509 |                 _TimedOut = None
     |                 ---------   ^^^^ Incompatible value of type `None`
     |                 |
     |                 Declared type `<class 'TimedOut'>`
1510 |             is_timeout = (_TimedOut and isinstance(exc, _TimedOut)) or "timed out" in err_str
1511 |             is_connect_timeout = self._looks_like_connect_timeout(exc)
     |
info: Implicit shadowing of class `TimedOut`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[unresolved-attribute]: Object of type `TelegramTextEditor | None` has no attribute `do_api_request`
    --> gateway/platforms/telegram.py:1572:19
     |
1570 |             # not fully model the 10.1 response shape yet — a post-edit parse
1571 |             # error must not be mistaken for a failed edit).
1572 |             await self._bot.do_api_request("editMessageText", api_kwargs=payload)
     |                   ^^^^^^^^^^^^^^^^^^^^^^^^
1573 |         except Exception as exc:
1574 |             if self._is_rich_fallback_error(exc):
     |
info: rule `unresolved-attribute` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `<class 'TimedOut'>`
    --> gateway/platforms/telegram.py:1593:17
     |
1591 |                 from telegram.error import TimedOut as _TimedOut
1592 |             except (ImportError, AttributeError):
1593 |                 _TimedOut = None
     |                 ---------   ^^^^ Incompatible value of type `None`
     |                 |
     |                 Declared type `<class 'TimedOut'>`
1594 |             is_timeout = (_TimedOut and isinstance(exc, _TimedOut)) or "timed out" in err_str
1595 |             is_connect_timeout = self._looks_like_connect_timeout(exc)
     |
info: Implicit shadowing of class `TimedOut`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[unresolved-attribute]: Object of type `TelegramTextEditor | None` has no attribute `do_api_request`
    --> gateway/platforms/telegram.py:1643:24
     |
1641 |             payload["message_thread_id"] = int(thread_id)
1642 |         try:
1643 |             ok = await self._bot.do_api_request("sendRichMessageDraft", api_kwargs=payload)
     |                        ^^^^^^^^^^^^^^^^^^^^^^^^
1644 |             return bool(ok)
1645 |         except Exception as exc:
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `updater` is not defined on `None` in union `Application[Unknown, Unknown, Unknown, Unknown, Unknown, Unknown] | None`
    --> gateway/platforms/telegram.py:1752:23
     |
1750 |         try:
1751 |             with self._authorize_task26_service_network_start() as snapshot:
1752 |                 await self._app.updater.start_polling(
     |                       ^^^^^^^^^^^^^^^^^
1753 |                     allowed_updates=Update.ALL_TYPES,
1754 |                     drop_pending_updates=False,
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `start_polling` is not defined on `None` in union `Updater | None`
    --> gateway/platforms/telegram.py:1752:23
     |
1750 |         try:
1751 |             with self._authorize_task26_service_network_start() as snapshot:
1752 |                 await self._app.updater.start_polling(
     |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1753 |                     allowed_updates=Update.ALL_TYPES,
1754 |                     drop_pending_updates=False,
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `updater` is not defined on `None` in union `Application[Unknown, Unknown, Unknown, Unknown, Unknown, Unknown] | None`
    --> gateway/platforms/telegram.py:1881:27
     |
1879 |             try:
1880 |                 with self._authorize_task26_service_network_start() as snapshot:
1881 |                     await self._app.updater.start_polling(
     |                           ^^^^^^^^^^^^^^^^^
1882 |                         allowed_updates=Update.ALL_TYPES,
1883 |                         drop_pending_updates=False,
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `start_polling` is not defined on `None` in union `Updater | None`
    --> gateway/platforms/telegram.py:1881:27
     |
1879 |             try:
1880 |                 with self._authorize_task26_service_network_start() as snapshot:
1881 |                     await self._app.updater.start_polling(
     |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1882 |                         allowed_updates=Update.ALL_TYPES,
1883 |                         drop_pending_updates=False,
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `TelegramTextEditor & ~AlwaysFalsy` has no attribute `create_forum_topic`
    --> gateway/platforms/telegram.py:1965:27
     |
1963 |                 kwargs["icon_custom_emoji_id"] = icon_custom_emoji_id
1964 |
1965 |             topic = await self._bot.create_forum_topic(**kwargs)
     |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1966 |             thread_id = topic.message_thread_id
1967 |             logger.info(
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `TelegramTextEditor & ~AlwaysFalsy` has no attribute `edit_forum_topic`
    --> gateway/platforms/telegram.py:2079:15
     |
2077 |         except (TypeError, ValueError):
2078 |             chat_id_arg = chat_id
2079 |         await self._bot.edit_forum_topic(
     |               ^^^^^^^^^^^^^^^^^^^^^^^^^^
2080 |             chat_id=chat_id_arg,
2081 |             message_thread_id=int(thread_id),
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `TelegramTextEditor | None` has no attribute `send_message`
    --> gateway/platforms/telegram.py:2245:31
     |
2243 |                     # Empty topics are hidden by the client UI until they contain a message.
2244 |                     try:
2245 |                         await self._bot.send_message(
     |                               ^^^^^^^^^^^^^^^^^^^^^^
2246 |                             chat_id=int(chat_id),
2247 |                             message_thread_id=thread_id,
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `encode` is not defined on `None` in union `Unknown | str | None`
    --> gateway/platforms/telegram.py:2373:13
     |
2372 |         token_digest = hashlib.sha256(
2373 |             self.config.token.encode("utf-8")
     |             ^^^^^^^^^^^^^^^^^^^^^^^^
2374 |         ).hexdigest()[:16]
2375 |         store = TelegramIngressReceiptStore(
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `add_handler` is not defined on `None` in union `Application[Unknown, Unknown, Unknown, Unknown, Unknown, Unknown] | None`
    --> gateway/platforms/telegram.py:2382:9
     |
2380 |         gate = TelegramPollingReceiptGate(store, on_blocked=_blocked)
2381 |         self._telegram_polling_receipt_gate = gate
2382 |         self._app.add_handler(
     |         ^^^^^^^^^^^^^^^^^^^^^
2383 |             TypeHandler(object, self._begin_polling_receipt),
2384 |             group=-999,
     |
info: rule `unresolved-attribute` is enabled by default

error[call-non-callable]: Object of type `<special-form 'typing.Any'>` is not callable
    --> gateway/platforms/telegram.py:2383:13
     |
2381 |         self._telegram_polling_receipt_gate = gate
2382 |         self._app.add_handler(
2383 |             TypeHandler(object, self._begin_polling_receipt),
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2384 |             group=-999,
2385 |         )
     |
info: Union variant `<special-form 'typing.Any'>` is incompatible with this call site
info: Attempted to call union type `Any | <special-form 'typing.Any'>`
info: rule `call-non-callable` is enabled by default

error[unresolved-attribute]: Attribute `add_handler` is not defined on `None` in union `Application[Unknown, Unknown, Unknown, Unknown, Unknown, Unknown] | None`
    --> gateway/platforms/telegram.py:2386:9
     |
2384 |             group=-999,
2385 |         )
2386 |         self._app.add_handler(
     |         ^^^^^^^^^^^^^^^^^^^^^
2387 |             TypeHandler(object, self._complete_polling_receipt),
2388 |             group=999,
     |
info: rule `unresolved-attribute` is enabled by default

error[call-non-callable]: Object of type `<special-form 'typing.Any'>` is not callable
    --> gateway/platforms/telegram.py:2387:13
     |
2385 |         )
2386 |         self._app.add_handler(
2387 |             TypeHandler(object, self._complete_polling_receipt),
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2388 |             group=999,
2389 |         )
     |
info: Union variant `<special-form 'typing.Any'>` is incompatible with this call site
info: Attempted to call union type `Any | <special-form 'typing.Any'>`
info: rule `call-non-callable` is enabled by default

error[invalid-assignment]: Object of type `ReceiptGatedTelegramBot` is not assignable to attribute `bot` on type `Updater | None`
    --> gateway/platforms/telegram.py:2390:9
     |
2388 |             group=999,
2389 |         )
2390 |         updater.bot = ReceiptGatedTelegramBot(
     |         ^^^^^^^^^^^
2391 |             getattr(updater, "bot", self._bot),
2392 |             gate,
     |
info: rule `invalid-assignment` is enabled by default

error[invalid-argument-type]: Argument to function `verify_subscription_readiness` is incorrect
    --> gateway/platforms/telegram.py:2416:45
     |
2414 |             {"telegram": {"extra": self.config.extra}},
2415 |         )
2416 |         await verify_subscription_readiness(self._bot, inventory)
     |                                             ^^^^^^^^^ Expected `ReadOnlyMembershipBot`, found `TelegramTextEditor`
2417 |         customers = registry.get("customers")
2418 |         if not isinstance(customers, list):
     |
info: Function defined here
   --> gateway/platforms/telegram_staff_membership_gate.py:277:11
    |
277 | async def verify_subscription_readiness(
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
278 |     bot: ReadOnlyMembershipBot,
    |     -------------------------- Parameter declared here
279 |     inventory: StaffChatInventory,
280 | ) -> int:
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
    --> gateway/platforms/telegram.py:2700:13
     |
2698 |         loop = asyncio.get_running_loop()
2699 |         watcher = ExternalAuthorityWatcher(
2700 |             source,
     |             ^^^^^^ Expected `FileCandidateAuthoritySource`, found `object`
2701 |             candidate,
2702 |             snapshot,
     |
info: Method defined here
   --> gateway/platforms/task26_runtime_authority.py:235:9
    |
233 |     """One-resource, event-driven monitor for the paired external authority."""
234 |
235 |     def __init__(
    |         ^^^^^^^^
236 |         self,
237 |         source: FileCandidateAuthoritySource,
    |         ------------------------------------ Parameter declared here
238 |         candidate: str,
239 |         predecessor: Mapping[str, object],
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
    --> gateway/platforms/telegram.py:2955:21
     |
2953 |                 # polling reconnect + bot API bootstrap/delete_webhook calls.
2954 |                 request = HTTPXRequest(
2955 |                     **request_kwargs,
     |                     ^^^^^^^^^^^^^^^^ Expected `Collection[tuple[int, int, int] | tuple[int, int, bytes | bytearray] | tuple[int, int, None, int]] | None`, found `int | float`
2956 |                     httpx_kwargs={"transport": TelegramFallbackTransport(fallback_ips)},
2957 |                 )
     |
info: Method defined here
   --> .venv/lib/python3.12/site-packages/telegram/request/_httpxrequest.py:145:9
    |
143 |     __slots__ = ("_client", "_client_kwargs", "_http_version", "_media_write_timeout")
144 |
145 |     def __init__(
    |         ^^^^^^^^
146 |         self,
147 |         connection_pool_size: int = 256,
    |
   ::: .venv/lib/python3.12/site-packages/telegram/request/_httpxrequest.py:153:9
    |
151 |         pool_timeout: float | None = 1.0,
152 |         http_version: HTTPVersion = "1.1",
153 |         socket_options: Collection[SocketOpt] | None = None,
    |         --------------------------------------------------- Parameter declared here
154 |         proxy: str | httpx.Proxy | httpx.URL | None = None,
155 |         media_write_timeout: float | None = 20.0,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
    --> gateway/platforms/telegram.py:2955:21
     |
2953 |                 # polling reconnect + bot API bootstrap/delete_webhook calls.
2954 |                 request = HTTPXRequest(
2955 |                     **request_kwargs,
     |                     ^^^^^^^^^^^^^^^^ Expected `str | Proxy | URL | None`, found `int | float`
2956 |                     httpx_kwargs={"transport": TelegramFallbackTransport(fallback_ips)},
2957 |                 )
     |
info: Method defined here
   --> .venv/lib/python3.12/site-packages/telegram/request/_httpxrequest.py:145:9
    |
143 |     __slots__ = ("_client", "_client_kwargs", "_http_version", "_media_write_timeout")
144 |
145 |     def __init__(
    |         ^^^^^^^^
146 |         self,
147 |         connection_pool_size: int = 256,
    |
   ::: .venv/lib/python3.12/site-packages/telegram/request/_httpxrequest.py:154:9
    |
152 |         http_version: HTTPVersion = "1.1",
153 |         socket_options: Collection[SocketOpt] | None = None,
154 |         proxy: str | httpx.Proxy | httpx.URL | None = None,
    |         -------------------------------------------------- Parameter declared here
155 |         media_write_timeout: float | None = 20.0,
156 |         httpx_kwargs: dict[str, Any] | None = None,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
    --> gateway/platforms/telegram.py:2955:21
     |
2953 |                 # polling reconnect + bot API bootstrap/delete_webhook calls.
2954 |                 request = HTTPXRequest(
2955 |                     **request_kwargs,
     |                     ^^^^^^^^^^^^^^^^ Expected `Literal["1.1", "2.0", "2"]`, found `int | float`
2956 |                     httpx_kwargs={"transport": TelegramFallbackTransport(fallback_ips)},
2957 |                 )
     |
info: Method defined here
   --> .venv/lib/python3.12/site-packages/telegram/request/_httpxrequest.py:145:9
    |
143 |     __slots__ = ("_client", "_client_kwargs", "_http_version", "_media_write_timeout")
144 |
145 |     def __init__(
    |         ^^^^^^^^
146 |         self,
147 |         connection_pool_size: int = 256,
    |
   ::: .venv/lib/python3.12/site-packages/telegram/request/_httpxrequest.py:152:9
    |
150 |         connect_timeout: float | None = 5.0,
151 |         pool_timeout: float | None = 1.0,
152 |         http_version: HTTPVersion = "1.1",
    |         --------------------------------- Parameter declared here
153 |         socket_options: Collection[SocketOpt] | None = None,
154 |         proxy: str | httpx.Proxy | httpx.URL | None = None,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
    --> gateway/platforms/telegram.py:2955:21
     |
2953 |                 # polling reconnect + bot API bootstrap/delete_webhook calls.
2954 |                 request = HTTPXRequest(
2955 |                     **request_kwargs,
     |                     ^^^^^^^^^^^^^^^^ Expected `int`, found `int | float`
2956 |                     httpx_kwargs={"transport": TelegramFallbackTransport(fallback_ips)},
2957 |                 )
     |
info: Element `float` of this union is not assignable to `int`
info: Method defined here
   --> .venv/lib/python3.12/site-packages/telegram/request/_httpxrequest.py:145:9
    |
143 |     __slots__ = ("_client", "_client_kwargs", "_http_version", "_media_write_timeout")
144 |
145 |     def __init__(
    |         ^^^^^^^^
146 |         self,
147 |         connection_pool_size: int = 256,
    |         ------------------------------- Parameter declared here
148 |         read_timeout: float | None = 5.0,
149 |         write_timeout: float | None = 5.0,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
    --> gateway/platforms/telegram.py:2959:21
     |
2957 |                 )
2958 |                 get_updates_request = HTTPXRequest(
2959 |                     **request_kwargs,
     |                     ^^^^^^^^^^^^^^^^ Expected `int`, found `int | float`
2960 |                     httpx_kwargs={"transport": TelegramFallbackTransport(fallback_ips)},
2961 |                 )
     |
info: Element `float` of this union is not assignable to `int`
info: Method defined here
   --> .venv/lib/python3.12/site-packages/telegram/request/_httpxrequest.py:145:9
    |
143 |     __slots__ = ("_client", "_client_kwargs", "_http_version", "_media_write_timeout")
144 |
145 |     def __init__(
    |         ^^^^^^^^
146 |         self,
147 |         connection_pool_size: int = 256,
    |         ------------------------------- Parameter declared here
148 |         read_timeout: float | None = 5.0,
149 |         write_timeout: float | None = 5.0,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
    --> gateway/platforms/telegram.py:2959:21
     |
2957 |                 )
2958 |                 get_updates_request = HTTPXRequest(
2959 |                     **request_kwargs,
     |                     ^^^^^^^^^^^^^^^^ Expected `Literal["1.1", "2.0", "2"]`, found `int | float`
2960 |                     httpx_kwargs={"transport": TelegramFallbackTransport(fallback_ips)},
2961 |                 )
     |
info: Method defined here
   --> .venv/lib/python3.12/site-packages/telegram/request/_httpxrequest.py:145:9
    |
143 |     __slots__ = ("_client", "_client_kwargs", "_http_version", "_media_write_timeout")
144 |
145 |     def __init__(
    |         ^^^^^^^^
146 |         self,
147 |         connection_pool_size: int = 256,
    |
   ::: .venv/lib/python3.12/site-packages/telegram/request/_httpxrequest.py:152:9
    |
150 |         connect_timeout: float | None = 5.0,
151 |         pool_timeout: float | None = 1.0,
152 |         http_version: HTTPVersion = "1.1",
    |         --------------------------------- Parameter declared here
153 |         socket_options: Collection[SocketOpt] | None = None,
154 |         proxy: str | httpx.Proxy | httpx.URL | None = None,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
    --> gateway/platforms/telegram.py:2959:21
     |
2957 |                 )
2958 |                 get_updates_request = HTTPXRequest(
2959 |                     **request_kwargs,
     |                     ^^^^^^^^^^^^^^^^ Expected `Collection[tuple[int, int, int] | tuple[int, int, bytes | bytearray] | tuple[int, int, None, int]] | None`, found `int | float`
2960 |                     httpx_kwargs={"transport": TelegramFallbackTransport(fallback_ips)},
2961 |                 )
     |
info: Method defined here
   --> .venv/lib/python3.12/site-packages/telegram/request/_httpxrequest.py:145:9
    |
143 |     __slots__ = ("_client", "_client_kwargs", "_http_version", "_media_write_timeout")
144 |
145 |     def __init__(
    |         ^^^^^^^^
146 |         self,
147 |         connection_pool_size: int = 256,
    |
   ::: .venv/lib/python3.12/site-packages/telegram/request/_httpxrequest.py:153:9
    |
151 |         pool_timeout: float | None = 1.0,
152 |         http_version: HTTPVersion = "1.1",
153 |         socket_options: Collection[SocketOpt] | None = None,
    |         --------------------------------------------------- Parameter declared here
154 |         proxy: str | httpx.Proxy | httpx.URL | None = None,
155 |         media_write_timeout: float | None = 20.0,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
    --> gateway/platforms/telegram.py:2959:21
     |
2957 |                 )
2958 |                 get_updates_request = HTTPXRequest(
2959 |                     **request_kwargs,
     |                     ^^^^^^^^^^^^^^^^ Expected `str | Proxy | URL | None`, found `int | float`
2960 |                     httpx_kwargs={"transport": TelegramFallbackTransport(fallback_ips)},
2961 |                 )
     |
info: Method defined here
   --> .venv/lib/python3.12/site-packages/telegram/request/_httpxrequest.py:145:9
    |
143 |     __slots__ = ("_client", "_client_kwargs", "_http_version", "_media_write_timeout")
144 |
145 |     def __init__(
    |         ^^^^^^^^
146 |         self,
147 |         connection_pool_size: int = 256,
    |
   ::: .venv/lib/python3.12/site-packages/telegram/request/_httpxrequest.py:154:9
    |
152 |         http_version: HTTPVersion = "1.1",
153 |         socket_options: Collection[SocketOpt] | None = None,
154 |         proxy: str | httpx.Proxy | httpx.URL | None = None,
    |         -------------------------------------------------- Parameter declared here
155 |         media_write_timeout: float | None = 20.0,
156 |         httpx_kwargs: dict[str, Any] | None = None,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
    --> gateway/platforms/telegram.py:2964:40
     |
2962 |             elif proxy_url:
2963 |                 logger.info("[%s] Proxy detected; passing explicitly to HTTPXRequest: %s", self.name, proxy_url)
2964 |                 request = HTTPXRequest(**request_kwargs, proxy=proxy_url)
     |                                        ^^^^^^^^^^^^^^^^ Expected `int`, found `int | float`
2965 |                 get_updates_request = HTTPXRequest(**request_kwargs, proxy=proxy_url)
2966 |             else:
     |
info: Element `float` of this union is not assignable to `int`
info: Method defined here
   --> .venv/lib/python3.12/site-packages/telegram/request/_httpxrequest.py:145:9
    |
143 |     __slots__ = ("_client", "_client_kwargs", "_http_version", "_media_write_timeout")
144 |
145 |     def __init__(
    |         ^^^^^^^^
146 |         self,
147 |         connection_pool_size: int = 256,
    |         ------------------------------- Parameter declared here
148 |         read_timeout: float | None = 5.0,
149 |         write_timeout: float | None = 5.0,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
    --> gateway/platforms/telegram.py:2964:40
     |
2962 |             elif proxy_url:
2963 |                 logger.info("[%s] Proxy detected; passing explicitly to HTTPXRequest: %s", self.name, proxy_url)
2964 |                 request = HTTPXRequest(**request_kwargs, proxy=proxy_url)
     |                                        ^^^^^^^^^^^^^^^^ Expected `Literal["1.1", "2.0", "2"]`, found `int | float`
2965 |                 get_updates_request = HTTPXRequest(**request_kwargs, proxy=proxy_url)
2966 |             else:
     |
info: Method defined here
   --> .venv/lib/python3.12/site-packages/telegram/request/_httpxrequest.py:145:9
    |
143 |     __slots__ = ("_client", "_client_kwargs", "_http_version", "_media_write_timeout")
144 |
145 |     def __init__(
    |         ^^^^^^^^
146 |         self,
147 |         connection_pool_size: int = 256,
    |
   ::: .venv/lib/python3.12/site-packages/telegram/request/_httpxrequest.py:152:9
    |
150 |         connect_timeout: float | None = 5.0,
151 |         pool_timeout: float | None = 1.0,
152 |         http_version: HTTPVersion = "1.1",
    |         --------------------------------- Parameter declared here
153 |         socket_options: Collection[SocketOpt] | None = None,
154 |         proxy: str | httpx.Proxy | httpx.URL | None = None,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
    --> gateway/platforms/telegram.py:2964:40
     |
2962 |             elif proxy_url:
2963 |                 logger.info("[%s] Proxy detected; passing explicitly to HTTPXRequest: %s", self.name, proxy_url)
2964 |                 request = HTTPXRequest(**request_kwargs, proxy=proxy_url)
     |                                        ^^^^^^^^^^^^^^^^ Expected `Collection[tuple[int, int, int] | tuple[int, int, bytes | bytearray] | tuple[int, int, None, int]] | None`, found `int | float`
2965 |                 get_updates_request = HTTPXRequest(**request_kwargs, proxy=proxy_url)
2966 |             else:
     |
info: Method defined here
   --> .venv/lib/python3.12/site-packages/telegram/request/_httpxrequest.py:145:9
    |
143 |     __slots__ = ("_client", "_client_kwargs", "_http_version", "_media_write_timeout")
144 |
145 |     def __init__(
    |         ^^^^^^^^
146 |         self,
147 |         connection_pool_size: int = 256,
    |
   ::: .venv/lib/python3.12/site-packages/telegram/request/_httpxrequest.py:153:9
    |
151 |         pool_timeout: float | None = 1.0,
152 |         http_version: HTTPVersion = "1.1",
153 |         socket_options: Collection[SocketOpt] | None = None,
    |         --------------------------------------------------- Parameter declared here
154 |         proxy: str | httpx.Proxy | httpx.URL | None = None,
155 |         media_write_timeout: float | None = 20.0,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
    --> gateway/platforms/telegram.py:2964:40
     |
2962 |             elif proxy_url:
2963 |                 logger.info("[%s] Proxy detected; passing explicitly to HTTPXRequest: %s", self.name, proxy_url)
2964 |                 request = HTTPXRequest(**request_kwargs, proxy=proxy_url)
     |                                        ^^^^^^^^^^^^^^^^ Expected `dict[str, Any] | None`, found `int | float`
2965 |                 get_updates_request = HTTPXRequest(**request_kwargs, proxy=proxy_url)
2966 |             else:
     |
info: Method defined here
   --> .venv/lib/python3.12/site-packages/telegram/request/_httpxrequest.py:145:9
    |
143 |     __slots__ = ("_client", "_client_kwargs", "_http_version", "_media_write_timeout")
144 |
145 |     def __init__(
    |         ^^^^^^^^
146 |         self,
147 |         connection_pool_size: int = 256,
    |
   ::: .venv/lib/python3.12/site-packages/telegram/request/_httpxrequest.py:156:9
    |
154 |         proxy: str | httpx.Proxy | httpx.URL | None = None,
155 |         media_write_timeout: float | None = 20.0,
156 |         httpx_kwargs: dict[str, Any] | None = None,
    |         ------------------------------------------ Parameter declared here
157 |     ):
158 |         self._http_version = http_version
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
    --> gateway/platforms/telegram.py:2965:52
     |
2963 |                 logger.info("[%s] Proxy detected; passing explicitly to HTTPXRequest: %s", self.name, proxy_url)
2964 |                 request = HTTPXRequest(**request_kwargs, proxy=proxy_url)
2965 |                 get_updates_request = HTTPXRequest(**request_kwargs, proxy=proxy_url)
     |                                                    ^^^^^^^^^^^^^^^^ Expected `int`, found `int | float`
2966 |             else:
2967 |                 if disable_fallback:
     |
info: Element `float` of this union is not assignable to `int`
info: Method defined here
   --> .venv/lib/python3.12/site-packages/telegram/request/_httpxrequest.py:145:9
    |
143 |     __slots__ = ("_client", "_client_kwargs", "_http_version", "_media_write_timeout")
144 |
145 |     def __init__(
    |         ^^^^^^^^
146 |         self,
147 |         connection_pool_size: int = 256,
    |         ------------------------------- Parameter declared here
148 |         read_timeout: float | None = 5.0,
149 |         write_timeout: float | None = 5.0,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
    --> gateway/platforms/telegram.py:2965:52
     |
2963 |                 logger.info("[%s] Proxy detected; passing explicitly to HTTPXRequest: %s", self.name, proxy_url)
2964 |                 request = HTTPXRequest(**request_kwargs, proxy=proxy_url)
2965 |                 get_updates_request = HTTPXRequest(**request_kwargs, proxy=proxy_url)
     |                                                    ^^^^^^^^^^^^^^^^ Expected `Literal["1.1", "2.0", "2"]`, found `int | float`
2966 |             else:
2967 |                 if disable_fallback:
     |
info: Method defined here
   --> .venv/lib/python3.12/site-packages/telegram/request/_httpxrequest.py:145:9
    |
143 |     __slots__ = ("_client", "_client_kwargs", "_http_version", "_media_write_timeout")
144 |
145 |     def __init__(
    |         ^^^^^^^^
146 |         self,
147 |         connection_pool_size: int = 256,
    |
   ::: .venv/lib/python3.12/site-packages/telegram/request/_httpxrequest.py:152:9
    |
150 |         connect_timeout: float | None = 5.0,
151 |         pool_timeout: float | None = 1.0,
152 |         http_version: HTTPVersion = "1.1",
    |         --------------------------------- Parameter declared here
153 |         socket_options: Collection[SocketOpt] | None = None,
154 |         proxy: str | httpx.Proxy | httpx.URL | None = None,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
    --> gateway/platforms/telegram.py:2965:52
     |
2963 |                 logger.info("[%s] Proxy detected; passing explicitly to HTTPXRequest: %s", self.name, proxy_url)
2964 |                 request = HTTPXRequest(**request_kwargs, proxy=proxy_url)
2965 |                 get_updates_request = HTTPXRequest(**request_kwargs, proxy=proxy_url)
     |                                                    ^^^^^^^^^^^^^^^^ Expected `Collection[tuple[int, int, int] | tuple[int, int, bytes | bytearray] | tuple[int, int, None, int]] | None`, found `int | float`
2966 |             else:
2967 |                 if disable_fallback:
     |
info: Method defined here
   --> .venv/lib/python3.12/site-packages/telegram/request/_httpxrequest.py:145:9
    |
143 |     __slots__ = ("_client", "_client_kwargs", "_http_version", "_media_write_timeout")
144 |
145 |     def __init__(
    |         ^^^^^^^^
146 |         self,
147 |         connection_pool_size: int = 256,
    |
   ::: .venv/lib/python3.12/site-packages/telegram/request/_httpxrequest.py:153:9
    |
151 |         pool_timeout: float | None = 1.0,
152 |         http_version: HTTPVersion = "1.1",
153 |         socket_options: Collection[SocketOpt] | None = None,
    |         --------------------------------------------------- Parameter declared here
154 |         proxy: str | httpx.Proxy | httpx.URL | None = None,
155 |         media_write_timeout: float | None = 20.0,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
    --> gateway/platforms/telegram.py:2965:52
     |
2963 |                 logger.info("[%s] Proxy detected; passing explicitly to HTTPXRequest: %s", self.name, proxy_url)
2964 |                 request = HTTPXRequest(**request_kwargs, proxy=proxy_url)
2965 |                 get_updates_request = HTTPXRequest(**request_kwargs, proxy=proxy_url)
     |                                                    ^^^^^^^^^^^^^^^^ Expected `dict[str, Any] | None`, found `int | float`
2966 |             else:
2967 |                 if disable_fallback:
     |
info: Method defined here
   --> .venv/lib/python3.12/site-packages/telegram/request/_httpxrequest.py:145:9
    |
143 |     __slots__ = ("_client", "_client_kwargs", "_http_version", "_media_write_timeout")
144 |
145 |     def __init__(
    |         ^^^^^^^^
146 |         self,
147 |         connection_pool_size: int = 256,
    |
   ::: .venv/lib/python3.12/site-packages/telegram/request/_httpxrequest.py:156:9
    |
154 |         proxy: str | httpx.Proxy | httpx.URL | None = None,
155 |         media_write_timeout: float | None = 20.0,
156 |         httpx_kwargs: dict[str, Any] | None = None,
    |         ------------------------------------------ Parameter declared here
157 |     ):
158 |         self._http_version = http_version
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
    --> gateway/platforms/telegram.py:2969:40
     |
2967 |                 if disable_fallback:
2968 |                     logger.info("[%s] Telegram fallback-IP transport disabled via env", self.name)
2969 |                 request = HTTPXRequest(**request_kwargs)
     |                                        ^^^^^^^^^^^^^^^^ Expected `int`, found `int | float`
2970 |                 get_updates_request = HTTPXRequest(**request_kwargs)
     |
info: Element `float` of this union is not assignable to `int`
info: Method defined here
   --> .venv/lib/python3.12/site-packages/telegram/request/_httpxrequest.py:145:9
    |
143 |     __slots__ = ("_client", "_client_kwargs", "_http_version", "_media_write_timeout")
144 |
145 |     def __init__(
    |         ^^^^^^^^
146 |         self,
147 |         connection_pool_size: int = 256,
    |         ------------------------------- Parameter declared here
148 |         read_timeout: float | None = 5.0,
149 |         write_timeout: float | None = 5.0,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
    --> gateway/platforms/telegram.py:2969:40
     |
2967 |                 if disable_fallback:
2968 |                     logger.info("[%s] Telegram fallback-IP transport disabled via env", self.name)
2969 |                 request = HTTPXRequest(**request_kwargs)
     |                                        ^^^^^^^^^^^^^^^^ Expected `Literal["1.1", "2.0", "2"]`, found `int | float`
2970 |                 get_updates_request = HTTPXRequest(**request_kwargs)
     |
info: Method defined here
   --> .venv/lib/python3.12/site-packages/telegram/request/_httpxrequest.py:145:9
    |
143 |     __slots__ = ("_client", "_client_kwargs", "_http_version", "_media_write_timeout")
144 |
145 |     def __init__(
    |         ^^^^^^^^
146 |         self,
147 |         connection_pool_size: int = 256,
    |
   ::: .venv/lib/python3.12/site-packages/telegram/request/_httpxrequest.py:152:9
    |
150 |         connect_timeout: float | None = 5.0,
151 |         pool_timeout: float | None = 1.0,
152 |         http_version: HTTPVersion = "1.1",
    |         --------------------------------- Parameter declared here
153 |         socket_options: Collection[SocketOpt] | None = None,
154 |         proxy: str | httpx.Proxy | httpx.URL | None = None,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
    --> gateway/platforms/telegram.py:2969:40
     |
2967 |                 if disable_fallback:
2968 |                     logger.info("[%s] Telegram fallback-IP transport disabled via env", self.name)
2969 |                 request = HTTPXRequest(**request_kwargs)
     |                                        ^^^^^^^^^^^^^^^^ Expected `Collection[tuple[int, int, int] | tuple[int, int, bytes | bytearray] | tuple[int, int, None, int]] | None`, found `int | float`
2970 |                 get_updates_request = HTTPXRequest(**request_kwargs)
     |
info: Method defined here
   --> .venv/lib/python3.12/site-packages/telegram/request/_httpxrequest.py:145:9
    |
143 |     __slots__ = ("_client", "_client_kwargs", "_http_version", "_media_write_timeout")
144 |
145 |     def __init__(
    |         ^^^^^^^^
146 |         self,
147 |         connection_pool_size: int = 256,
    |
   ::: .venv/lib/python3.12/site-packages/telegram/request/_httpxrequest.py:153:9
    |
151 |         pool_timeout: float | None = 1.0,
152 |         http_version: HTTPVersion = "1.1",
153 |         socket_options: Collection[SocketOpt] | None = None,
    |         --------------------------------------------------- Parameter declared here
154 |         proxy: str | httpx.Proxy | httpx.URL | None = None,
155 |         media_write_timeout: float | None = 20.0,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
    --> gateway/platforms/telegram.py:2969:40
     |
2967 |                 if disable_fallback:
2968 |                     logger.info("[%s] Telegram fallback-IP transport disabled via env", self.name)
2969 |                 request = HTTPXRequest(**request_kwargs)
     |                                        ^^^^^^^^^^^^^^^^ Expected `str | Proxy | URL | None`, found `int | float`
2970 |                 get_updates_request = HTTPXRequest(**request_kwargs)
     |
info: Method defined here
   --> .venv/lib/python3.12/site-packages/telegram/request/_httpxrequest.py:145:9
    |
143 |     __slots__ = ("_client", "_client_kwargs", "_http_version", "_media_write_timeout")
144 |
145 |     def __init__(
    |         ^^^^^^^^
146 |         self,
147 |         connection_pool_size: int = 256,
    |
   ::: .venv/lib/python3.12/site-packages/telegram/request/_httpxrequest.py:154:9
    |
152 |         http_version: HTTPVersion = "1.1",
153 |         socket_options: Collection[SocketOpt] | None = None,
154 |         proxy: str | httpx.Proxy | httpx.URL | None = None,
    |         -------------------------------------------------- Parameter declared here
155 |         media_write_timeout: float | None = 20.0,
156 |         httpx_kwargs: dict[str, Any] | None = None,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
    --> gateway/platforms/telegram.py:2969:40
     |
2967 |                 if disable_fallback:
2968 |                     logger.info("[%s] Telegram fallback-IP transport disabled via env", self.name)
2969 |                 request = HTTPXRequest(**request_kwargs)
     |                                        ^^^^^^^^^^^^^^^^ Expected `dict[str, Any] | None`, found `int | float`
2970 |                 get_updates_request = HTTPXRequest(**request_kwargs)
     |
info: Method defined here
   --> .venv/lib/python3.12/site-packages/telegram/request/_httpxrequest.py:145:9
    |
143 |     __slots__ = ("_client", "_client_kwargs", "_http_version", "_media_write_timeout")
144 |
145 |     def __init__(
    |         ^^^^^^^^
146 |         self,
147 |         connection_pool_size: int = 256,
    |
   ::: .venv/lib/python3.12/site-packages/telegram/request/_httpxrequest.py:156:9
    |
154 |         proxy: str | httpx.Proxy | httpx.URL | None = None,
155 |         media_write_timeout: float | None = 20.0,
156 |         httpx_kwargs: dict[str, Any] | None = None,
    |         ------------------------------------------ Parameter declared here
157 |     ):
158 |         self._http_version = http_version
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
    --> gateway/platforms/telegram.py:2970:52
     |
2968 |                     logger.info("[%s] Telegram fallback-IP transport disabled via env", self.name)
2969 |                 request = HTTPXRequest(**request_kwargs)
2970 |                 get_updates_request = HTTPXRequest(**request_kwargs)
     |                                                    ^^^^^^^^^^^^^^^^ Expected `int`, found `int | float`
2971 |
2972 |             builder = builder.request(request).get_updates_request(get_updates_request)
     |
info: Element `float` of this union is not assignable to `int`
info: Method defined here
   --> .venv/lib/python3.12/site-packages/telegram/request/_httpxrequest.py:145:9
    |
143 |     __slots__ = ("_client", "_client_kwargs", "_http_version", "_media_write_timeout")
144 |
145 |     def __init__(
    |         ^^^^^^^^
146 |         self,
147 |         connection_pool_size: int = 256,
    |         ------------------------------- Parameter declared here
148 |         read_timeout: float | None = 5.0,
149 |         write_timeout: float | None = 5.0,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
    --> gateway/platforms/telegram.py:2970:52
     |
2968 |                     logger.info("[%s] Telegram fallback-IP transport disabled via env", self.name)
2969 |                 request = HTTPXRequest(**request_kwargs)
2970 |                 get_updates_request = HTTPXRequest(**request_kwargs)
     |                                                    ^^^^^^^^^^^^^^^^ Expected `Literal["1.1", "2.0", "2"]`, found `int | float`
2971 |
2972 |             builder = builder.request(request).get_updates_request(get_updates_request)
     |
info: Method defined here
   --> .venv/lib/python3.12/site-packages/telegram/request/_httpxrequest.py:145:9
    |
143 |     __slots__ = ("_client", "_client_kwargs", "_http_version", "_media_write_timeout")
144 |
145 |     def __init__(
    |         ^^^^^^^^
146 |         self,
147 |         connection_pool_size: int = 256,
    |
   ::: .venv/lib/python3.12/site-packages/telegram/request/_httpxrequest.py:152:9
    |
150 |         connect_timeout: float | None = 5.0,
151 |         pool_timeout: float | None = 1.0,
152 |         http_version: HTTPVersion = "1.1",
    |         --------------------------------- Parameter declared here
153 |         socket_options: Collection[SocketOpt] | None = None,
154 |         proxy: str | httpx.Proxy | httpx.URL | None = None,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
    --> gateway/platforms/telegram.py:2970:52
     |
2968 |                     logger.info("[%s] Telegram fallback-IP transport disabled via env", self.name)
2969 |                 request = HTTPXRequest(**request_kwargs)
2970 |                 get_updates_request = HTTPXRequest(**request_kwargs)
     |                                                    ^^^^^^^^^^^^^^^^ Expected `Collection[tuple[int, int, int] | tuple[int, int, bytes | bytearray] | tuple[int, int, None, int]] | None`, found `int | float`
2971 |
2972 |             builder = builder.request(request).get_updates_request(get_updates_request)
     |
info: Method defined here
   --> .venv/lib/python3.12/site-packages/telegram/request/_httpxrequest.py:145:9
    |
143 |     __slots__ = ("_client", "_client_kwargs", "_http_version", "_media_write_timeout")
144 |
145 |     def __init__(
    |         ^^^^^^^^
146 |         self,
147 |         connection_pool_size: int = 256,
    |
   ::: .venv/lib/python3.12/site-packages/telegram/request/_httpxrequest.py:153:9
    |
151 |         pool_timeout: float | None = 1.0,
152 |         http_version: HTTPVersion = "1.1",
153 |         socket_options: Collection[SocketOpt] | None = None,
    |         --------------------------------------------------- Parameter declared here
154 |         proxy: str | httpx.Proxy | httpx.URL | None = None,
155 |         media_write_timeout: float | None = 20.0,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
    --> gateway/platforms/telegram.py:2970:52
     |
2968 |                     logger.info("[%s] Telegram fallback-IP transport disabled via env", self.name)
2969 |                 request = HTTPXRequest(**request_kwargs)
2970 |                 get_updates_request = HTTPXRequest(**request_kwargs)
     |                                                    ^^^^^^^^^^^^^^^^ Expected `str | Proxy | URL | None`, found `int | float`
2971 |
2972 |             builder = builder.request(request).get_updates_request(get_updates_request)
     |
info: Method defined here
   --> .venv/lib/python3.12/site-packages/telegram/request/_httpxrequest.py:145:9
    |
143 |     __slots__ = ("_client", "_client_kwargs", "_http_version", "_media_write_timeout")
144 |
145 |     def __init__(
    |         ^^^^^^^^
146 |         self,
147 |         connection_pool_size: int = 256,
    |
   ::: .venv/lib/python3.12/site-packages/telegram/request/_httpxrequest.py:154:9
    |
152 |         http_version: HTTPVersion = "1.1",
153 |         socket_options: Collection[SocketOpt] | None = None,
154 |         proxy: str | httpx.Proxy | httpx.URL | None = None,
    |         -------------------------------------------------- Parameter declared here
155 |         media_write_timeout: float | None = 20.0,
156 |         httpx_kwargs: dict[str, Any] | None = None,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
    --> gateway/platforms/telegram.py:2970:52
     |
2968 |                     logger.info("[%s] Telegram fallback-IP transport disabled via env", self.name)
2969 |                 request = HTTPXRequest(**request_kwargs)
2970 |                 get_updates_request = HTTPXRequest(**request_kwargs)
     |                                                    ^^^^^^^^^^^^^^^^ Expected `dict[str, Any] | None`, found `int | float`
2971 |
2972 |             builder = builder.request(request).get_updates_request(get_updates_request)
     |
info: Method defined here
   --> .venv/lib/python3.12/site-packages/telegram/request/_httpxrequest.py:145:9
    |
143 |     __slots__ = ("_client", "_client_kwargs", "_http_version", "_media_write_timeout")
144 |
145 |     def __init__(
    |         ^^^^^^^^
146 |         self,
147 |         connection_pool_size: int = 256,
    |
   ::: .venv/lib/python3.12/site-packages/telegram/request/_httpxrequest.py:156:9
    |
154 |         proxy: str | httpx.Proxy | httpx.URL | None = None,
155 |         media_write_timeout: float | None = 20.0,
156 |         httpx_kwargs: dict[str, Any] | None = None,
    |         ------------------------------------------ Parameter declared here
157 |     ):
158 |         self._http_version = http_version
    |
info: rule `invalid-argument-type` is enabled by default

error[call-non-callable]: Object of type `<special-form 'typing.Any'>` is not callable
    --> gateway/platforms/telegram.py:2979:17
     |
2977 |             webhook_url = os.getenv("TELEGRAM_WEBHOOK_URL", "").strip()
2978 |             self._app.add_handler(
2979 |                 TypeHandler(object, self._capture_telegram_update_context),
     |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2980 |                 group=-1000,
2981 |             )
     |
info: Union variant `<special-form 'typing.Any'>` is incompatible with this call site
info: Attempted to call union type `Any | <special-form 'typing.Any'>`
info: rule `call-non-callable` is enabled by default

error[call-non-callable]: Object of type `<special-form 'typing.Any'>` is not callable
    --> gateway/platforms/telegram.py:2985:17
     |
2983 |                   self._configure_polling_receipt_boundary()
2984 |               self._app.add_handler(
2985 | /                 ChatMemberHandler(
2986 | |                     self._handle_staff_membership_transition,
2987 | |                     ChatMemberHandler.CHAT_MEMBER,
2988 | |                 ),
     | |_________________^
2989 |                   group=-500,
2990 |               )
     |
info: Union variant `<special-form 'typing.Any'>` is incompatible with this call site
info: Attempted to call union type `Any | <special-form 'typing.Any'>`
info: rule `call-non-callable` is enabled by default

error[unresolved-attribute]: Attribute `CHAT_MEMBER` is not defined on `<special-form 'typing.Any'>` in union `Any | <special-form 'typing.Any'>`
    --> gateway/platforms/telegram.py:2987:21
     |
2985 |                 ChatMemberHandler(
2986 |                     self._handle_staff_membership_transition,
2987 |                     ChatMemberHandler.CHAT_MEMBER,
     |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2988 |                 ),
2989 |                 group=-500,
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `start_webhook` is not defined on `None` in union `Updater | None`
    --> gateway/platforms/telegram.py:3099:23
     |
3097 |                 webhook_path = urlparse(webhook_url).path or "/telegram"
3098 |
3099 |                 await self._app.updater.start_webhook(
     |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3100 |                     listen="0.0.0.0",
3101 |                     port=webhook_port,
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `start_polling` is not defined on `None` in union `Updater | None`
    --> gateway/platforms/telegram.py:3137:23
     |
3135 |                 self._polling_error_callback_ref = _polling_error_callback
3136 |
3137 |                 await self._app.updater.start_polling(
     |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3138 |                     allowed_updates=Update.ALL_TYPES,
3139 |                     drop_pending_updates=False,
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `TelegramTextEditor` has no attribute `set_my_short_description`
    --> gateway/platforms/telegram.py:3264:19
     |
3262 |         text = text[:120]
3263 |         try:
3264 |             await bot.set_my_short_description(short_description=text)
     |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3265 |             logger.info("[%s] Set bot status indicator to %r", self.name, text)
3266 |         except Exception as e:
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `TelegramTextEditor & ~AlwaysFalsy` has no attribute `send_message`
    --> gateway/platforms/telegram.py:3488:41
     |
3486 |                         # Try Markdown first, fall back to plain text if it fails
3487 |                         try:
3488 |                             msg = await self._bot.send_message(
     |                                         ^^^^^^^^^^^^^^^^^^^^^^
3489 |                                 chat_id=int(chat_id),
3490 |                                 text=chunk,
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `TelegramTextEditor & ~AlwaysFalsy` has no attribute `send_message`
    --> gateway/platforms/telegram.py:3502:45
     |
3500 | …                     logger.warning("[%s] MarkdownV2 parse failed, falling back to plain text: %s", self.name, md_error)
3501 | …                     plain_chunk = _strip_mdv2(chunk)
3502 | …                     msg = await self._bot.send_message(
     |                                   ^^^^^^^^^^^^^^^^^^^^^^
3503 | …                         chat_id=int(chat_id),
3504 | …                         text=plain_chunk,
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `message_id` is not defined on `None` in union `None | Unknown`
    --> gateway/platforms/telegram.py:3619:40
     |
3617 |                                 continue
3618 |                         raise
3619 |                 message_ids.append(str(msg.message_id))
     |                                        ^^^^^^^^^^^^^^
3620 |
3621 |             # Re-trigger typing indicator after sending a message.
     |
info: rule `unresolved-attribute` is enabled by default

warning[unknown-argument]: Argument `parse_mode` does not match any known parameter of bound method `edit_message_text`
    --> gateway/platforms/telegram.py:3757:21
     |
3755 |                     message_id=int(message_id),
3756 |                     text=formatted,
3757 |                     parse_mode=ParseMode.MARKDOWN_V2,
     |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3758 |                 )
3759 |             except Exception as fmt_err:
     |
info: Method signature here
  --> gateway/platforms/telegram_edit_transport.py:14:15
   |
13 |   class TelegramTextEditor(Protocol):
14 |       async def edit_message_text(
   |  _______________^
15 | |         self, *, chat_id: int, message_id: int, text: str,
16 | |     ) -> Message | bool: ...
   | |_______________________^
   |
info: rule `unknown-argument` was selected in the configuration file

error[unresolved-attribute]: Attribute `edit_message_text` is not defined on `None` in union `TelegramTextEditor | None`
    --> gateway/platforms/telegram.py:3893:27
     |
3891 |                 formatted = self.format_message(first_chunk)
3892 |                 try:
3893 |                     await self._bot.edit_message_text(
     |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
3894 |                         chat_id=int(chat_id),
3895 |                         message_id=int(message_id),
     |
info: rule `unresolved-attribute` is enabled by default

warning[unknown-argument]: Argument `parse_mode` does not match any known parameter of bound method `edit_message_text`
    --> gateway/platforms/telegram.py:3897:25
     |
3895 |                         message_id=int(message_id),
3896 |                         text=formatted,
3897 |                         parse_mode=ParseMode.MARKDOWN_V2,
     |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3898 |                     )
3899 |                 except Exception as fmt_err:
     |
info: Method signature here
  --> gateway/platforms/telegram_edit_transport.py:14:15
   |
13 |   class TelegramTextEditor(Protocol):
14 |       async def edit_message_text(
   |  _______________^
15 | |         self, *, chat_id: int, message_id: int, text: str,
16 | |     ) -> Message | bool: ...
   | |_______________________^
   |
info: rule `unknown-argument` was selected in the configuration file

error[unresolved-attribute]: Attribute `edit_message_text` is not defined on `None` in union `TelegramTextEditor | None`
    --> gateway/platforms/telegram.py:3906:31
     |
3904 |                             self.name, fmt_err,
3905 |                         )
3906 |                         await self._bot.edit_message_text(
     |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
3907 |                             chat_id=int(chat_id),
3908 |                             message_id=int(message_id),
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `edit_message_text` is not defined on `None` in union `TelegramTextEditor | None`
    --> gateway/platforms/telegram.py:3912:23
     |
3910 |                         )
3911 |             else:
3912 |                 await self._bot.edit_message_text(
     |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
3913 |                     chat_id=int(chat_id),
3914 |                     message_id=int(message_id),
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `TelegramTextEditor | None` has no attribute `send_message`
    --> gateway/platforms/telegram.py:3959:38
     |
3957 |                         # literally); streaming previews stay raw.
3958 |                         text = _strip_mdv2(chunk) if finalize else chunk
3959 |                     sent_msg = await self._bot.send_message(
     |                                      ^^^^^^^^^^^^^^^^^^^^^^
3960 |                         chat_id=int(chat_id),
3961 |                         text=text,
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `TelegramTextEditor | None` has no attribute `send_message`
    --> gateway/platforms/telegram.py:3982:46
     |
3980 |                         )
3981 |                         try:
3982 |                             sent_msg = await self._bot.send_message(
     |                                              ^^^^^^^^^^^^^^^^^^^^^^
3983 |                                 chat_id=int(chat_id),
3984 |                                 text=_strip_mdv2(chunk) if finalize else chunk,
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `TelegramTextEditor & ~AlwaysFalsy` has no attribute `delete_message`
    --> gateway/platforms/telegram.py:4065:19
     |
4063 |             return False
4064 |         try:
4065 |             await self._bot.delete_message(
     |                   ^^^^^^^^^^^^^^^^^^^^^^^^
4066 |                 chat_id=int(chat_id),
4067 |                 message_id=int(message_id),
     |
info: rule `unresolved-attribute` is enabled by default

error[call-non-callable]: Object of type `object` is not callable
    --> gateway/platforms/telegram.py:4158:28
     |
4157 |             try:
4158 |                 ok = await self._bot.send_message_draft(**kwargs)
     |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4159 |                 if ok:
4160 |                     # Drafts have no message_id; we report success without one
     |
info: rule `call-non-callable` is enabled by default

error[unresolved-attribute]: Object of type `TelegramTextEditor & ~AlwaysFalsy` has no attribute `send_message`
    --> gateway/platforms/telegram.py:4200:26
     |
4198 |         message_thread_id = kwargs.get("message_thread_id")
4199 |         try:
4200 |             return await self._bot.send_message(**kwargs)
     |                          ^^^^^^^^^^^^^^^^^^^^^^
4201 |         except Exception as send_err:
4202 |             if (
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `TelegramTextEditor & ~AlwaysFalsy` has no attribute `send_message`
    --> gateway/platforms/telegram.py:4214:30
     |
4212 |                 retry_kwargs = dict(kwargs)
4213 |                 retry_kwargs.pop("message_thread_id", None)
4214 |                 return await self._bot.send_message(**retry_kwargs)
     |                              ^^^^^^^^^^^^^^^^^^^^^^
4215 |             raise
4216 |     async def _send_message_strict_topic(self, **kwargs):
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `TelegramTextEditor & ~AlwaysFalsy` has no attribute `send_message`
    --> gateway/platforms/telegram.py:4222:22
     |
4220 |         if kwargs.get("message_thread_id") is None:
4221 |             raise RuntimeError("strict topic delivery requires message_thread_id")
4222 |         return await self._bot.send_message(**kwargs)
     |                      ^^^^^^^^^^^^^^^^^^^^^^
4223 |
4224 |     async def _send_message_with_strict_topic(self, **kwargs):
     |
info: rule `unresolved-attribute` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `def group_providers(slugs) -> Unknown`
    --> gateway/platforms/telegram.py:4559:13
     |
4557 |             from hermes_cli.models import group_providers
4558 |         except Exception:
4559 |             group_providers = None
     |             ---------------   ^^^^ Incompatible value of type `None`
     |             |
     |             Declared type `def group_providers(slugs) -> Unknown`
4560 |
4561 |         by_slug = {p.get("slug"): p for p in providers}
     |
info: Implicit shadowing of function `group_providers`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[call-non-callable]: Object of type `None` is not callable
    --> gateway/platforms/telegram.py:5380:20
     |
5378 |                 break
5379 |             if durable:
5380 |                 if claim(card) is not True:
     |                    ^^^^^^^^^^^
5381 |                     continue
5382 |             elif card.card_id in published:
     |
info: Union variant `None` is incompatible with this call site
info: Attempted to call union type `Any | None`
info: rule `call-non-callable` is enabled by default

error[call-non-callable]: Object of type `None` is not callable
    --> gateway/platforms/telegram.py:5390:17
     |
5388 |             )
5389 |             if durable:
5390 |                 record(card, receipt_for(result))
     |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5391 |             published.add(card.card_id)
5392 |             sent += 1
     |
info: Union variant `None` is incompatible with this call site
info: Attempted to call union type `Any | None`
info: rule `call-non-callable` is enabled by default

error[call-non-callable]: Object of type `None` is not callable
    --> gateway/platforms/telegram.py:5390:30
     |
5388 |             )
5389 |             if durable:
5390 |                 record(card, receipt_for(result))
     |                              ^^^^^^^^^^^^^^^^^^^
5391 |             published.add(card.card_id)
5392 |             sent += 1
     |
info: Union variant `None` is incompatible with this call site
info: Attempted to call union type `Any | None`
info: rule `call-non-callable` is enabled by default

error[call-non-callable]: Object of type `<special-form 'typing.Any'>` is not callable
    --> gateway/platforms/telegram.py:5756:38
     |
5754 |                       "preview question requires a triggering message"
5755 |                   )
5756 |               kwargs["reply_markup"] = ForceReply(
     |  ______________________________________^
5757 | |                 selective=True,
5758 | |                 input_field_placeholder="답변을 입력하세요",
5759 | |             )
     | |_____________^
5760 |               kwargs["reply_parameters"] = ReplyParameters(
5761 |                   message_id=int(reply_to_message_id),
     |
info: Union variant `<special-form 'typing.Any'>` is incompatible with this call site
info: Attempted to call union type `Any | <special-form 'typing.Any'>`
info: rule `call-non-callable` is enabled by default

error[call-non-callable]: Object of type `<special-form 'typing.Any'>` is not callable
    --> gateway/platforms/telegram.py:5760:42
     |
5758 |                   input_field_placeholder="답변을 입력하세요",
5759 |               )
5760 |               kwargs["reply_parameters"] = ReplyParameters(
     |  __________________________________________^
5761 | |                 message_id=int(reply_to_message_id),
5762 | |             )
     | |_____________^
5763 |           elif action == "confirm":
5764 |               kwargs["reply_markup"] = InlineKeyboardMarkup(
     |
info: Union variant `<special-form 'typing.Any'>` is incompatible with this call site
info: Attempted to call union type `Any | <special-form 'typing.Any'>`
info: rule `call-non-callable` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `answer`
    --> gateway/platforms/telegram.py:5798:19
     |
5796 |                 logger=logger,
5797 |             )
5798 |             await query.answer(text="영양 온보딩 기능을 사용할 수 없습니다.")
     |                   ^^^^^^^^^^^^
5799 |             return
5800 |         await runtime.handle_callback(
     |
info: rule `unresolved-attribute` is enabled by default

error[no-matching-overload]: No overload of bound method `get` matches arguments
    --> gateway/platforms/telegram.py:6040:30
     |
6038 |     async def _send_adaptive_operator_result(self, message: object, result: object) -> None:
6039 |         payload = result if isinstance(result, dict) else {}
6040 |         canonical_text = str(payload.get("text", "") or "처리할 수 없습니다.")
     |                              ^^^^^^^^^^^^^^^^^^^^^^^
6041 |         text = canonical_text
6042 |         coach_failed = False
     |
info: First overload defined here
    --> stdlib/builtins.pyi:3015:9
     |
3013 |     # Positional-only in dict, but not in MutableMapping
3014 |     @overload  # type: ignore[override]
3015 |     def get(self, key: _KT, default: None = None, /) -> _VT | None:
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3016 |         """Return the value for key if key is in the dictionary, else default."""
     |
info: Possible overloads for bound method `get`:
info:   (self, key: _KT@dict, default: None = None, /) -> _VT@dict | None
info:   (self, key: _KT@dict, default: _VT@dict, /) -> _VT@dict
info:   [_T](self, key: _KT@dict, default: _T, /) -> _VT@dict | _T
info: rule `no-matching-overload` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> gateway/platforms/telegram.py:6045:24
     |
6043 |         grounding_input = None
6044 |         current_supplier = None
6045 |         if payload.get("status") == "card":
     |                        ^^^^^^^^ Expected `Never`, found `Literal["status"]`
6046 |             grounding_input = self._adaptive_grounding_input(payload)
6047 |             if grounding_input is not None:
     |
info: Matching overload defined here
    --> stdlib/builtins.pyi:3015:9
     |
3013 |     # Positional-only in dict, but not in MutableMapping
3014 |     @overload  # type: ignore[override]
3015 |     def get(self, key: _KT, default: None = None, /) -> _VT | None:
     |         ^^^       -------- Parameter declared here
3016 |         """Return the value for key if key is in the dictionary, else default."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@dict, default: _VT@dict, /) -> _VT@dict
info:   [_T](self, key: _KT@dict, default: _T, /) -> _VT@dict | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `_adaptive_coach_card_text` is incorrect
    --> gateway/platforms/telegram.py:6068:21
     |
6066 |                     self,
6067 |                     canonical_text,
6068 |                     payload,
     |                     ^^^^^^^ Expected `Mapping[str, object]`, found `Top[dict[Unknown, Unknown]]`
6069 |                     grounding_input,
6070 |                 )
     |
info: Function defined here
    --> gateway/platforms/telegram.py:8686:15
     |
8684 |         except Exception as exc:
8685 |             logger.warning("[%s] physique feedback replay delivery failed: %s", self.name, type(exc).__name__)
8686 |     async def _adaptive_coach_card_text(
     |               ^^^^^^^^^^^^^^^^^^^^^^^^^
8687 |         self,
8688 |         canonical_text: str,
8689 |         payload: Mapping[str, object],
     |         ----------------------------- Parameter declared here
8690 |         grounding_input: AdaptiveGroundingInput,
8691 |     ) -> str | None:
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> gateway/platforms/telegram.py:6077:55
     |
6075 |                     coach_failed = True
6076 |                     text = "Coach 권한을 생성하지 못해 승인할 수 없습니다."
6077 |         buttons = [] if coach_failed else payload.get("buttons")
     |                                                       ^^^^^^^^^ Expected `Never`, found `Literal["buttons"]`
6078 |         markup = None
6079 |         if isinstance(buttons, list):
     |
info: Matching overload defined here
    --> stdlib/builtins.pyi:3015:9
     |
3013 |     # Positional-only in dict, but not in MutableMapping
3014 |     @overload  # type: ignore[override]
3015 |     def get(self, key: _KT, default: None = None, /) -> _VT | None:
     |         ^^^       -------- Parameter declared here
3016 |         """Return the value for key if key is in the dictionary, else default."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@dict, default: _VT@dict, /) -> _VT@dict
info:   [_T](self, key: _KT@dict, default: _T, /) -> _VT@dict | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> gateway/platforms/telegram.py:6091:25
     |
6089 |                 markup = InlineKeyboardMarkup(rows)
6090 |         if (
6091 |             payload.get("status") == "card"
     |                         ^^^^^^^^ Expected `Never`, found `Literal["status"]`
6092 |             and (
6093 |                 grounding_input is None
     |
info: Matching overload defined here
    --> stdlib/builtins.pyi:3015:9
     |
3013 |     # Positional-only in dict, but not in MutableMapping
3014 |     @overload  # type: ignore[override]
3015 |     def get(self, key: _KT, default: None = None, /) -> _VT | None:
     |         ^^^       -------- Parameter declared here
3016 |         """Return the value for key if key is in the dictionary, else default."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@dict, default: _VT@dict, /) -> _VT@dict
info:   [_T](self, key: _KT@dict, default: _T, /) -> _VT@dict | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> gateway/platforms/telegram.py:6107:24
     |
6105 |             )
6106 |             return
6107 |         if payload.get("status") == "card":
     |                        ^^^^^^^^ Expected `Never`, found `Literal["status"]`
6108 |             replied = getattr(message, "reply_to_message", None)
6109 |             editor = getattr(replied, "edit_text", None)
     |
info: Matching overload defined here
    --> stdlib/builtins.pyi:3015:9
     |
3013 |     # Positional-only in dict, but not in MutableMapping
3014 |     @overload  # type: ignore[override]
3015 |     def get(self, key: _KT, default: None = None, /) -> _VT | None:
     |         ^^^       -------- Parameter declared here
3016 |         """Return the value for key if key is in the dictionary, else default."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@dict, default: _VT@dict, /) -> _VT@dict
info:   [_T](self, key: _KT@dict, default: _T, /) -> _VT@dict | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> gateway/platforms/telegram.py:6122:24
     |
6120 |             reply_markup=markup,
6121 |         )
6122 |         if payload.get("status") == "menu" and markup is not None:
     |                        ^^^^^^^^ Expected `Never`, found `Literal["status"]`
6123 |             published_message_id = getattr(sent, "message_id", None)
6124 |             if isinstance(published_message_id, bool) or not isinstance(
     |
info: Matching overload defined here
    --> stdlib/builtins.pyi:3015:9
     |
3013 |     # Positional-only in dict, but not in MutableMapping
3014 |     @overload  # type: ignore[override]
3015 |     def get(self, key: _KT, default: None = None, /) -> _VT | None:
     |         ^^^       -------- Parameter declared here
3016 |         """Return the value for key if key is in the dictionary, else default."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@dict, default: _VT@dict, /) -> _VT@dict
info:   [_T](self, key: _KT@dict, default: _T, /) -> _VT@dict | _T
info: rule `invalid-argument-type` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `reply_text`
    --> gateway/platforms/telegram.py:6234:23
     |
6232 |             shown = getattr(self, "_adaptive_operator_keyboard_chats", set())
6233 |             if keyboard_chat not in shown:
6234 |                 await message.reply_text(
     |                       ^^^^^^^^^^^^^^^^^^
6235 |                     "적응형 영양 검토 메뉴를 열려면 아래 버튼을 사용하세요.",
6236 |                     reply_markup=self._adaptive_operator_reply_markup(),
     |
info: rule `unresolved-attribute` is enabled by default

error[call-non-callable]: Object of type `<special-form 'typing.Any'>` is not callable
    --> gateway/platforms/telegram.py:6262:20
     |
6260 |         rows = [["적응형 영양 검토"]]
6261 |         try:
6262 |             return ReplyKeyboardMarkup(rows, resize_keyboard=True, is_persistent=True)
     |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6263 |         except TypeError:
6264 |             try:
     |
info: Union variant `<special-form 'typing.Any'>` is incompatible with this call site
info: Attempted to call union type `Any | <special-form 'typing.Any'>`
info: rule `call-non-callable` is enabled by default

error[call-non-callable]: Object of type `<special-form 'typing.Any'>` is not callable
    --> gateway/platforms/telegram.py:6265:24
     |
6263 |         except TypeError:
6264 |             try:
6265 |                 return ReplyKeyboardMarkup(rows, resize_keyboard=True)
     |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6266 |             except TypeError:
6267 |                 return rows
     |
info: Union variant `<special-form 'typing.Any'>` is incompatible with this call site
info: Attempted to call union type `Any | <special-form 'typing.Any'>`
info: rule `call-non-callable` is enabled by default

error[invalid-method-override]: Invalid override of method `_send_nutrition_topic`
    --> gateway/platforms/telegram.py:6268:15
     |
6266 |               except TypeError:
6267 |                   return rows
6268 |       async def _send_nutrition_topic(
     |  _______________^
6269 | |         self,
6270 | |         *,
6271 | |         chat_id: object,
6272 | |         topic_id: object,
6273 | |         **kwargs: object,
6274 | |     ) -> object:
     | |_______________^ Definition is incompatible with `TelegramWeeklyTransportMixin._send_nutrition_topic`
6275 |           if str(topic_id) == "0":
6276 |               if self._bot is None:
     |
    ::: gateway/platforms/telegram_weekly_host_transport.py:71:15
     |
  69 |       _bot: TelegramTextEditor | None = None
  70 |
  71 |       async def _send_nutrition_topic(
     |  _______________-
  72 | |         self, *, chat_id: str, topic_id: str | None, text: str,
  73 | |     ) -> Message | TelegramSendReceipt:
     | |______________________________________- `TelegramWeeklyTransportMixin._send_nutrition_topic` defined here
  74 |           _ = chat_id, topic_id, text
  75 |           raise NotImplementedError
     |
info: This violates the Liskov Substitution Principle
info: rule `invalid-method-override` is enabled by default

error[unresolved-attribute]: Object of type `TelegramTextEditor` has no attribute `send_message`
    --> gateway/platforms/telegram.py:6278:26
     |
6276 |             if self._bot is None:
6277 |                 raise RuntimeError("Not connected")
6278 |             return await self._bot.send_message(chat_id=chat_id, **kwargs)
     |                          ^^^^^^^^^^^^^^^^^^^^^^
6279 |         thread_kwargs = self._thread_kwargs_for_send(
6280 |             str(chat_id),
     |
info: rule `unresolved-attribute` is enabled by default

error[call-non-callable]: Object of type `<special-form 'typing.Any'>` is not callable
    --> gateway/platforms/telegram.py:6296:20
     |
6294 |         rows = [["오늘 체크인", "오늘 체크인 수정"]]
6295 |         try:
6296 |             return ReplyKeyboardMarkup(rows, resize_keyboard=True, is_persistent=True)
     |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6297 |         except TypeError:
6298 |             return ReplyKeyboardMarkup(rows, resize_keyboard=True)
     |
info: Union variant `<special-form 'typing.Any'>` is incompatible with this call site
info: Attempted to call union type `Any | <special-form 'typing.Any'>`
info: rule `call-non-callable` is enabled by default

error[call-non-callable]: Object of type `<special-form 'typing.Any'>` is not callable
    --> gateway/platforms/telegram.py:6298:20
     |
6296 |             return ReplyKeyboardMarkup(rows, resize_keyboard=True, is_persistent=True)
6297 |         except TypeError:
6298 |             return ReplyKeyboardMarkup(rows, resize_keyboard=True)
     |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6299 |
6300 |     async def _ensure_customer_checkin_keyboard(self, address: object) -> None:
     |
info: Union variant `<special-form 'typing.Any'>` is incompatible with this call site
info: Attempted to call union type `Any | <special-form 'typing.Any'>`
info: rule `call-non-callable` is enabled by default

error[unsupported-operator]: Unsupported `-` operation
    --> gateway/platforms/telegram.py:6328:31
     |
6326 |         starts_on = getattr(getattr(getattr(customer, "spec", None), "plan", None), "starts_on", None)
6327 |         try:
6328 |             day_number = int((kst_day - starts_on).days) + 1
     |                               -------^^^---------
     |                               |         |
     |                               |         Has type `Any | None`
     |                               Has type `object`
6329 |         except (TypeError, ValueError, AttributeError):
6330 |             return ""
     |
info: rule `unsupported-operator` is enabled by default

error[unresolved-attribute]: Attribute `chat_id` is not defined on `~AlwaysFalsy` in union `~AlwaysFalsy | Unknown`
    --> gateway/platforms/telegram.py:6415:25
     |
6413 |         try:
6414 |             await self._send_nutrition_topic(
6415 |                 chat_id=address.chat_id,
     |                         ^^^^^^^^^^^^^^^
6416 |                 topic_id=address.topic_id,
6417 |                 text=prompt.text,
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `topic_id` is not defined on `~AlwaysFalsy` in union `~AlwaysFalsy | Unknown`
    --> gateway/platforms/telegram.py:6416:26
     |
6414 |             await self._send_nutrition_topic(
6415 |                 chat_id=address.chat_id,
6416 |                 topic_id=address.topic_id,
     |                          ^^^^^^^^^^^^^^^^
6417 |                 text=prompt.text,
6418 |                 reply_markup=self._physique_markup(prompt),
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `text` is not defined on `None` in union `WizardPrompt | None`
    --> gateway/platforms/telegram.py:6613:22
     |
6611 |         if getattr(reply, "accepted", False) and getattr(reply, "prompt", None) is not None:
6612 |             await query.edit_message_text(
6613 |                 text=reply.prompt.text,
     |                      ^^^^^^^^^^^^^^^^^
6614 |                 reply_markup=self._physique_markup(reply.prompt),
6615 |             )
     |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to function `_physique_markup` is incorrect
    --> gateway/platforms/telegram.py:6614:52
     |
6612 |             await query.edit_message_text(
6613 |                 text=reply.prompt.text,
6614 |                 reply_markup=self._physique_markup(reply.prompt),
     |                                                    ^^^^^^^^^^^^ Expected `WizardPrompt`, found `WizardPrompt | None`
6615 |             )
6616 |         completion = getattr(transition, "completion", None)
     |
info: Element `None` of this union is not assignable to `WizardPrompt`
info: Function defined here
    --> gateway/platforms/telegram.py:8119:9
     |
8118 |     @staticmethod
8119 |     def _physique_markup(prompt: WizardPrompt):
     |         ^^^^^^^^^^^^^^^^ -------------------- Parameter declared here
8120 |         """Render only opaque button addresses; prompt text holds all labels."""
8121 |         if not prompt.buttons and not prompt.button_rows:
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `edit_message_text` is incorrect
    --> gateway/platforms/telegram.py:6714:51
     |
6712 |             }
6713 |             try:
6714 |                 await self._bot.edit_message_text(**edit_kwargs)
     |                                                   ^^^^^^^^^^^^^ Expected `int`, found `int | Any | str`
6715 |                 message_id = active_message_id
6716 |             except (OSError, NetworkError):
     |
info: Element `str` of this union is not assignable to `int`
info: Method defined here
  --> gateway/platforms/telegram_edit_transport.py:14:15
   |
13 | class TelegramTextEditor(Protocol):
14 |     async def edit_message_text(
   |               ^^^^^^^^^^^^^^^^^
15 |         self, *, chat_id: int, message_id: int, text: str,
   |                  ------------ Parameter declared here
16 |     ) -> Message | bool: ...
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `edit_message_text` is incorrect
    --> gateway/platforms/telegram.py:6714:51
     |
6712 |             }
6713 |             try:
6714 |                 await self._bot.edit_message_text(**edit_kwargs)
     |                                                   ^^^^^^^^^^^^^ Expected `int`, found `int | Any | str`
6715 |                 message_id = active_message_id
6716 |             except (OSError, NetworkError):
     |
info: Element `str` of this union is not assignable to `int`
info: Method defined here
  --> gateway/platforms/telegram_edit_transport.py:14:15
   |
13 | class TelegramTextEditor(Protocol):
14 |     async def edit_message_text(
   |               ^^^^^^^^^^^^^^^^^
15 |         self, *, chat_id: int, message_id: int, text: str,
   |                                --------------- Parameter declared here
16 |     ) -> Message | bool: ...
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `edit_message_text` is incorrect
    --> gateway/platforms/telegram.py:6714:51
     |
6712 |             }
6713 |             try:
6714 |                 await self._bot.edit_message_text(**edit_kwargs)
     |                                                   ^^^^^^^^^^^^^ Expected `str`, found `int | Any | str`
6715 |                 message_id = active_message_id
6716 |             except (OSError, NetworkError):
     |
info: Element `int` of this union is not assignable to `str`
info: Method defined here
  --> gateway/platforms/telegram_edit_transport.py:14:15
   |
13 | class TelegramTextEditor(Protocol):
14 |     async def edit_message_text(
   |               ^^^^^^^^^^^^^^^^^
15 |         self, *, chat_id: int, message_id: int, text: str,
   |                                                 --------- Parameter declared here
16 |     ) -> Message | bool: ...
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `edit_message_text` is incorrect
    --> gateway/platforms/telegram.py:6718:55
     |
6716 |             except (OSError, NetworkError):
6717 |                 try:
6718 |                     await self._bot.edit_message_text(**edit_kwargs)
     |                                                       ^^^^^^^^^^^^^ Expected `int`, found `int | Any | str`
6719 |                 except BadRequest as exc:
6720 |                     if "message is not modified" not in str(exc).lower():
     |
info: Element `str` of this union is not assignable to `int`
info: Method defined here
  --> gateway/platforms/telegram_edit_transport.py:14:15
   |
13 | class TelegramTextEditor(Protocol):
14 |     async def edit_message_text(
   |               ^^^^^^^^^^^^^^^^^
15 |         self, *, chat_id: int, message_id: int, text: str,
   |                  ------------ Parameter declared here
16 |     ) -> Message | bool: ...
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `edit_message_text` is incorrect
    --> gateway/platforms/telegram.py:6718:55
     |
6716 |             except (OSError, NetworkError):
6717 |                 try:
6718 |                     await self._bot.edit_message_text(**edit_kwargs)
     |                                                       ^^^^^^^^^^^^^ Expected `int`, found `int | Any | str`
6719 |                 except BadRequest as exc:
6720 |                     if "message is not modified" not in str(exc).lower():
     |
info: Element `str` of this union is not assignable to `int`
info: Method defined here
  --> gateway/platforms/telegram_edit_transport.py:14:15
   |
13 | class TelegramTextEditor(Protocol):
14 |     async def edit_message_text(
   |               ^^^^^^^^^^^^^^^^^
15 |         self, *, chat_id: int, message_id: int, text: str,
   |                                --------------- Parameter declared here
16 |     ) -> Message | bool: ...
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `edit_message_text` is incorrect
    --> gateway/platforms/telegram.py:6718:55
     |
6716 |             except (OSError, NetworkError):
6717 |                 try:
6718 |                     await self._bot.edit_message_text(**edit_kwargs)
     |                                                       ^^^^^^^^^^^^^ Expected `str`, found `int | Any | str`
6719 |                 except BadRequest as exc:
6720 |                     if "message is not modified" not in str(exc).lower():
     |
info: Element `int` of this union is not assignable to `str`
info: Method defined here
  --> gateway/platforms/telegram_edit_transport.py:14:15
   |
13 | class TelegramTextEditor(Protocol):
14 |     async def edit_message_text(
   |               ^^^^^^^^^^^^^^^^^
15 |         self, *, chat_id: int, message_id: int, text: str,
   |                                                 --------- Parameter declared here
16 |     ) -> Message | bool: ...
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `_nutrition_draft_markup` is incorrect
    --> gateway/platforms/telegram.py:6835:21
     |
6833 |                 text=self._nutrition_draft_text(current_card),
6834 |                 reply_markup=self._nutrition_draft_markup(
6835 |                     current_card,
     |                     ^^^^^^^^^^^^ Expected `DraftAction`, found `~None`
6836 |                     render_identity=self._nutrition_card_render_identity(message),
6837 |                 ),
     |
info: Method defined here
   --> gateway/platforms/telegram_weekly_host_owner.py:195:9
    |
194 |     @classmethod
195 |     def _nutrition_draft_markup(
    |         ^^^^^^^^^^^^^^^^^^^^^^^
196 |         cls, action: DraftAction, *, render_identity: str | None = None,
    |              ------------------- Parameter declared here
197 |     ) -> InlineKeyboardMarkup | None:
198 |         return weekly_owner_markup(
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `__new__` is incorrect
    --> gateway/platforms/telegram.py:7123:30
     |
7121 |             return None
7122 |         try:
7123 |             message_id = int(raw_message_id)
     |                              ^^^^^^^^^^^^^^ Expected `str | Buffer | SupportsInt | SupportsIndex | SupportsTrunc`, found `(Any & ~bool) | None`
7124 |         except (TypeError, ValueError):
7125 |             return None
     |
info: Element `None` of this union is not assignable to `str | Buffer | SupportsInt | SupportsIndex | SupportsTrunc`
info: Matching overload defined here
   --> stdlib/builtins.pyi:366:9
    |
365 |     @overload
366 |     def __new__(cls, x: ConvertibleToInt = 0, /) -> Self: ...
    |         ^^^^^^^      ----------------------- Parameter declared here
367 |     @overload
368 |     def __new__(cls, x: str | bytes | bytearray, /, base: SupportsIndex) -> Self: ...
    |
info: Non-matching overloads for function `__new__`:
info:   [Self](cls, x: str | bytes | bytearray, /, base: SupportsIndex) -> Self
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `_nutrition_draft_markup` is incorrect
    --> gateway/platforms/telegram.py:7246:13
     |
7244 |             return False
7245 |         markup = self._nutrition_draft_markup(
7246 |             action,
     |             ^^^^^^ Expected `DraftAction`, found `object`
7247 |             render_identity=render_identity,
7248 |         )
     |
info: Method defined here
   --> gateway/platforms/telegram_weekly_host_owner.py:195:9
    |
194 |     @classmethod
195 |     def _nutrition_draft_markup(
    |         ^^^^^^^^^^^^^^^^^^^^^^^
196 |         cls, action: DraftAction, *, render_identity: str | None = None,
    |              ------------------- Parameter declared here
197 |     ) -> InlineKeyboardMarkup | None:
198 |         return weekly_owner_markup(
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `__new__` is incorrect
    --> gateway/platforms/telegram.py:7256:32
     |
7254 |             await editor(
7255 |                 chat_id=int(getattr(owner, "chat_id")),
7256 |                 message_id=int(message_id),
     |                                ^^^^^^^^^^ Expected `str | Buffer | SupportsInt | SupportsIndex | SupportsTrunc`, found `object`
7257 |                 text=self._nutrition_operator_card_text(action),
7258 |                 reply_markup=markup,
     |
info: Matching overload defined here
   --> stdlib/builtins.pyi:366:9
    |
365 |     @overload
366 |     def __new__(cls, x: ConvertibleToInt = 0, /) -> Self: ...
    |         ^^^^^^^      ----------------------- Parameter declared here
367 |     @overload
368 |     def __new__(cls, x: str | bytes | bytearray, /, base: SupportsIndex) -> Self: ...
    |
info: Non-matching overloads for function `__new__`:
info:   [Self](cls, x: str | bytes | bytearray, /, base: SupportsIndex) -> Self
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
    --> gateway/platforms/telegram.py:7419:13
     |
7418 |         worker = DraftGenerationWorker(
7419 |             coordinator,
     |             ^^^^^^^^^^^ Expected `NutritionCoachingCoordinator`, found `object`
7420 |             owner,
7421 |             worker_id=f"telegram-{hashlib.sha256(token.encode()).hexdigest()[:16]}",
     |
info: Method defined here
    --> gateway/platforms/nutrition_coaching.py:9298:9
     |
9296 |     """Run one leased generation job through the existing durable boundaries."""
9297 |
9298 |     def __init__(
     |         ^^^^^^^^
9299 |         self,
9300 |         coordinator: NutritionCoachingCoordinator,
     |         ----------------------------------------- Parameter declared here
9301 |         owner: IncomingAddress,
9302 |         *,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
    --> gateway/platforms/telegram.py:7420:13
     |
7418 |         worker = DraftGenerationWorker(
7419 |             coordinator,
7420 |             owner,
     |             ^^^^^ Expected `IncomingAddress`, found `object`
7421 |             worker_id=f"telegram-{hashlib.sha256(token.encode()).hexdigest()[:16]}",
7422 |             provider_ready=self._preflight_nutrition_generation_provider,
     |
info: Method defined here
    --> gateway/platforms/nutrition_coaching.py:9298:9
     |
9296 |     """Run one leased generation job through the existing durable boundaries."""
9297 |
9298 |     def __init__(
     |         ^^^^^^^^
9299 |         self,
9300 |         coordinator: NutritionCoachingCoordinator,
9301 |         owner: IncomingAddress,
     |         ---------------------- Parameter declared here
9302 |         *,
9303 |         worker_id: str,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `edit_draft` is incorrect
    --> gateway/platforms/telegram.py:8020:17
     |
8018 |                 actor,
8019 |                 text,
8020 |                 proposed_targets=proposed_targets,
     |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `NutritionTargets | None`, found `~None`
8021 |                 **generation_pins,
8022 |             )
     |
info: Method defined here
    --> gateway/platforms/nutrition_coaching.py:5772:9
     |
5770 |         )
5771 |
5772 |     def edit_draft(
     |         ^^^^^^^^^^
5773 |         self,
5774 |         draft_id: str,
     |
    ::: gateway/platforms/nutrition_coaching.py:5778:9
     |
5776 |         text: str,
5777 |         *,
5778 |         proposed_targets: NutritionTargets | None = None,
     |         ------------------------------------------------ Parameter declared here
5779 |         expected_generation: int | None = None,
5780 |         expected_record_digest: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[no-matching-overload]: No overload of bound method `get` matches arguments
    --> gateway/platforms/telegram.py:8216:27
     |
8214 |     def _nutrition_snapshot_answers(snapshot: object) -> Mapping[str, object]:
8215 |         if isinstance(snapshot, Mapping):
8216 |             raw_answers = snapshot.get("answers", {})
     |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
8217 |         else:
8218 |             raw_answers = getattr(snapshot, "answers", {})
     |
info: First overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Possible overloads for bound method `get`:
info:   (self, key: _KT@Mapping, /) -> _VT_co@Mapping | None
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `no-matching-overload` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> gateway/platforms/telegram.py:8229:36
     |
8227 |             value = answers.get(name)
8228 |             if isinstance(value, Mapping):
8229 |                 nested = value.get("value")
     |                                    ^^^^^^^ Expected `Never`, found `Literal["value"]`
8230 |                 if nested is not None:
8231 |                     value = nested
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> gateway/platforms/telegram.py:8298:39
     |
8296 |             parsed: list[str] = []
8297 |             for label, keys in names:
8298 |                 raw = next((value.get(key) for key in keys if value.get(key) is not None), None)
     |                                       ^^^ Expected `Never`, found `Literal["carbohydrate", "carbohydrates", "탄수화물", "탄수", "protein", ... omitted 3 literals]`
8299 |                 if raw is None or not str(raw).strip():
8300 |                     return "기록 없음"
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> gateway/platforms/telegram.py:8298:73
     |
8296 |             parsed: list[str] = []
8297 |             for label, keys in names:
8298 |                 raw = next((value.get(key) for key in keys if value.get(key) is not None), None)
     |                                                                         ^^^ Expected `Never`, found `Literal["carbohydrate", "carbohydrates", "탄수화물", "탄수", "protein", ... omitted 3 literals]`
8299 |                 if raw is None or not str(raw).strip():
8300 |                     return "기록 없음"
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

warning[unknown-argument]: Argument `reply_markup` does not match any known parameter of bound method `edit_message_text`
    --> gateway/platforms/telegram.py:8548:17
     |
8546 |                 message_id=int(message_id),
8547 |                 text=reply.prompt.text,
8548 |                 reply_markup=self._physique_markup(reply.prompt),
     |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8549 |             )
8550 |         except Exception:
     |
info: Method signature here
  --> gateway/platforms/telegram_edit_transport.py:14:15
   |
13 |   class TelegramTextEditor(Protocol):
14 |       async def edit_message_text(
   |  _______________^
15 | |         self, *, chat_id: int, message_id: int, text: str,
16 | |     ) -> Message | bool: ...
   | |_______________________^
   |
info: rule `unknown-argument` was selected in the configuration file

error[unresolved-attribute]: Object of type `object` has no attribute `canonical_sha256`
    --> gateway/platforms/telegram.py:8756:17
     |
8754 |         if (
8755 |             surface == "daily"
8756 |             and grounding_input.canonical_sha256
     |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8757 |             != hashlib.sha256(canonical.encode("utf-8")).hexdigest()
8758 |         ):
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `revision_binding_digest`
    --> gateway/platforms/telegram.py:8813:21
     |
8811 |                 "processing_allowed": processing_allowed,
8812 |                 "revision_binding_digest": (
8813 |                     grounding_input.revision_binding_digest
     |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8814 |                 ),
8815 |             }
     |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to function `to_thread` is incorrect
    --> gateway/platforms/telegram.py:8822:17
     |
8820 |                 pipeline_kwargs["artifact_sink"] = artifact_sink
8821 |             result, receipt = await asyncio.to_thread(
8822 |                 pipeline,
     |                 ^^^^^^^^ Expected `(surface: str, canonical: str, grounding: CoachingGrounding, request: (str, str, /) -> object, *, processing_allowed: (() -> bool) | None = None, revision_binding_digest: str | None = None, locked_recommendation: Mapping[str, int] | None = None, artifact_sink: ((Mapping[str, object], /) -> None) | None = None) -> tuple[str, CoachingPipelineReceipt]`, found `(def polish_validated(surface: str, canonical: str, grounding: CoachingGrounding, request: (str, str, /) -> object, *, processing_allowed: (() -> bool) | None = None, revision_binding_digest: str | None = None, locked_recommendation: Mapping[str, int] | None = None, artifact_sink: ((Mapping[str, object], /) -> None) | None = None) -> tuple[str, CoachingPipelineReceipt]) | (def coach_and_polish(surface: str, canonical: str, grounding: CoachingGrounding, request: (str, str, /) -> object, *, processing_allowed: (() -> bool) | None = None, revision_binding_digest: str | None = None) -> tuple[str, CoachingPipelineReceipt])`
8823 |                 surface,
8824 |                 canonical,
     |
info: Element `def coach_and_polish(surface: str, canonical: str, grounding: CoachingGrounding, request: (str, str, /) -> object, *, processing_allowed: (() -> bool) | None = None, revision_binding_digest: str | None = None) -> tuple[str, CoachingPipelineReceipt]` of this union is not assignable to `(surface: str, canonical: str, grounding: CoachingGrounding, request: (str, str, /) -> object, *, processing_allowed: (() -> bool) | None = None, revision_binding_digest: str | None = None, locked_recommendation: Mapping[str, int] | None = None, artifact_sink: ((Mapping[str, object], /) -> None) | None = None) -> tuple[str, CoachingPipelineReceipt]`
info: Function defined here
  --> stdlib/asyncio/threads.pyi:12:11
   |
10 | _R = TypeVar("_R")
11 |
12 | async def to_thread(func: Callable[_P, _R], /, *args: _P.args, **kwargs: _P.kwargs) -> _R:
   |           ^^^^^^^^^ ---------------------- Parameter declared here
13 |     """Asynchronously run function *func* in a separate thread.
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `to_thread` is incorrect
    --> gateway/platforms/telegram.py:8827:17
     |
8825 |                 grounding,
8826 |                 request,
8827 |                 **pipeline_kwargs,
     |                 ^^^^^^^^^^^^^^^^^ Expected `Mapping[str, int] | None`, found `(() -> bool) | Unknown`
8828 |             )
8829 |         except Exception:
     |
info: Element `() -> bool` of this union is not assignable to `Mapping[str, int] | None`
info: Function defined here
  --> stdlib/asyncio/threads.pyi:12:11
   |
10 | _R = TypeVar("_R")
11 |
12 | async def to_thread(func: Callable[_P, _R], /, *args: _P.args, **kwargs: _P.kwargs) -> _R:
   |           ^^^^^^^^^---------------------------------------------------------------- Parameter declared here
13 |     """Asynchronously run function *func* in a separate thread.
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `to_thread` is incorrect
    --> gateway/platforms/telegram.py:8827:17
     |
8825 |                 grounding,
8826 |                 request,
8827 |                 **pipeline_kwargs,
     |                 ^^^^^^^^^^^^^^^^^ Expected `((Mapping[str, object], /) -> None) | None`, found `(() -> bool) | Unknown`
8828 |             )
8829 |         except Exception:
     |
info: Element `() -> bool` of this union is not assignable to `((Mapping[str, object], /) -> None) | None`
info: Function defined here
  --> stdlib/asyncio/threads.pyi:12:11
   |
10 | _R = TypeVar("_R")
11 |
12 | async def to_thread(func: Callable[_P, _R], /, *args: _P.args, **kwargs: _P.kwargs) -> _R:
   |           ^^^^^^^^^---------------------------------------------------------------- Parameter declared here
13 |     """Asynchronously run function *func* in a separate thread.
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `to_thread` is incorrect
    --> gateway/platforms/telegram.py:8827:17
     |
8825 |                 grounding,
8826 |                 request,
8827 |                 **pipeline_kwargs,
     |                 ^^^^^^^^^^^^^^^^^ Expected `str | None`, found `(() -> bool) | Unknown`
8828 |             )
8829 |         except Exception:
     |
info: Element `() -> bool` of this union is not assignable to `str | None`
info: Function defined here
  --> stdlib/asyncio/threads.pyi:12:11
   |
10 | _R = TypeVar("_R")
11 |
12 | async def to_thread(func: Callable[_P, _R], /, *args: _P.args, **kwargs: _P.kwargs) -> _R:
   |           ^^^^^^^^^---------------------------------------------------------------- Parameter declared here
13 |     """Asynchronously run function *func* in a separate thread.
   |
info: rule `invalid-argument-type` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `facts`
    --> gateway/platforms/telegram.py:8944:17
     |
8942 |             },
8943 |         }[surface]
8944 |         facts = value.facts
     |                 ^^^^^^^^^^^
8945 |         if type(facts) is not tuple or len(facts) > 32:
8946 |             return False
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `verified_memory`
    --> gateway/platforms/telegram.py:9125:18
     |
9123 |                     return False
9124 |
9125 |         memory = value.verified_memory
     |                  ^^^^^^^^^^^^^^^^^^^^^
9126 |         if type(memory) is not tuple or len(memory) > 8:
9127 |             return False
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `revision_binding_digest`
    --> gateway/platforms/telegram.py:9210:17
     |
9208 |             seen_memory.add(key)
9209 |
9210 |         if type(value.revision_binding_digest) is not str or digest_re.fullmatch(
     |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9211 |             value.revision_binding_digest
9212 |         ) is None:
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `revision_binding_digest`
    --> gateway/platforms/telegram.py:9211:13
     |
9210 |         if type(value.revision_binding_digest) is not str or digest_re.fullmatch(
9211 |             value.revision_binding_digest
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9212 |         ) is None:
9213 |             return False
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `canonical_sha256`
    --> gateway/platforms/telegram.py:9215:18
     |
9213 |             return False
9214 |         if surface == "daily" and (
9215 |             type(value.canonical_sha256) is not str
     |                  ^^^^^^^^^^^^^^^^^^^^^^
9216 |             or digest_re.fullmatch(value.canonical_sha256) is None
9217 |         ):
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `canonical_sha256`
    --> gateway/platforms/telegram.py:9216:36
     |
9214 |         if surface == "daily" and (
9215 |             type(value.canonical_sha256) is not str
9216 |             or digest_re.fullmatch(value.canonical_sha256) is None
     |                                    ^^^^^^^^^^^^^^^^^^^^^^
9217 |         ):
9218 |             return False
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `source_cluster_ids`
    --> gateway/platforms/telegram.py:9224:17
     |
9222 |             "adaptive_operator": ("adaptive-proposal",),
9223 |         }[surface]
9224 |         if type(value.source_cluster_ids) is not tuple or value.source_cluster_ids != expected_clusters:
     |                 ^^^^^^^^^^^^^^^^^^^^^^^^
9225 |             return False
9226 |         if type(value.excluded_risk_ids) is not tuple or value.excluded_risk_ids != (
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `source_cluster_ids`
    --> gateway/platforms/telegram.py:9224:59
     |
9222 |             "adaptive_operator": ("adaptive-proposal",),
9223 |         }[surface]
9224 |         if type(value.source_cluster_ids) is not tuple or value.source_cluster_ids != expected_clusters:
     |                                                           ^^^^^^^^^^^^^^^^^^^^^^^^
9225 |             return False
9226 |         if type(value.excluded_risk_ids) is not tuple or value.excluded_risk_ids != (
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `excluded_risk_ids`
    --> gateway/platforms/telegram.py:9226:17
     |
9224 |         if type(value.source_cluster_ids) is not tuple or value.source_cluster_ids != expected_clusters:
9225 |             return False
9226 |         if type(value.excluded_risk_ids) is not tuple or value.excluded_risk_ids != (
     |                 ^^^^^^^^^^^^^^^^^^^^^^^
9227 |             "medical",
9228 |             "unsafe_nutrition",
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `excluded_risk_ids`
    --> gateway/platforms/telegram.py:9226:58
     |
9224 |         if type(value.source_cluster_ids) is not tuple or value.source_cluster_ids != expected_clusters:
9225 |             return False
9226 |         if type(value.excluded_risk_ids) is not tuple or value.excluded_risk_ids != (
     |                                                          ^^^^^^^^^^^^^^^^^^^^^^^
9227 |             "medical",
9228 |             "unsafe_nutrition",
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `customer_key`
    --> gateway/platforms/telegram.py:9231:17
     |
9229 |         ):
9230 |             return False
9231 |         if type(value.customer_key) not in {type(None), str}:
     |                 ^^^^^^^^^^^^^^^^^^
9232 |             return False
9233 |         if value.customer_key is not None and (
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `customer_key`
    --> gateway/platforms/telegram.py:9233:12
     |
9231 |         if type(value.customer_key) not in {type(None), str}:
9232 |             return False
9233 |         if value.customer_key is not None and (
     |            ^^^^^^^^^^^^^^^^^^
9234 |             not value.customer_key
9235 |             or len(value.customer_key) > 64
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `customer_key`
    --> gateway/platforms/telegram.py:9234:17
     |
9232 |             return False
9233 |         if value.customer_key is not None and (
9234 |             not value.customer_key
     |                 ^^^^^^^^^^^^^^^^^^
9235 |             or len(value.customer_key) > 64
9236 |             or opaque_re.fullmatch(value.customer_key) is None
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `customer_key`
    --> gateway/platforms/telegram.py:9235:20
     |
9233 |         if value.customer_key is not None and (
9234 |             not value.customer_key
9235 |             or len(value.customer_key) > 64
     |                    ^^^^^^^^^^^^^^^^^^
9236 |             or opaque_re.fullmatch(value.customer_key) is None
9237 |         ):
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `customer_key`
    --> gateway/platforms/telegram.py:9236:36
     |
9234 |             not value.customer_key
9235 |             or len(value.customer_key) > 64
9236 |             or opaque_re.fullmatch(value.customer_key) is None
     |                                    ^^^^^^^^^^^^^^^^^^
9237 |         ):
9238 |             return False
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `decision_id`
    --> gateway/platforms/telegram.py:9240:21
     |
9238 |             return False
9239 |         if surface == "adaptive_operator":
9240 |             if type(value.decision_id) is not str:
     |                     ^^^^^^^^^^^^^^^^^
9241 |                 return False
9242 |             if value.decision_id and (
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `decision_id`
    --> gateway/platforms/telegram.py:9242:16
     |
9240 |             if type(value.decision_id) is not str:
9241 |                 return False
9242 |             if value.decision_id and (
     |                ^^^^^^^^^^^^^^^^^
9243 |                 opaque_re.fullmatch(value.decision_id) is None
9244 |                 or (
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `decision_id`
    --> gateway/platforms/telegram.py:9243:37
     |
9241 |                 return False
9242 |             if value.decision_id and (
9243 |                 opaque_re.fullmatch(value.decision_id) is None
     |                                     ^^^^^^^^^^^^^^^^^
9244 |                 or (
9245 |                     not re.fullmatch(
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `decision_id`
    --> gateway/platforms/telegram.py:9247:25
     |
9245 |                     not re.fullmatch(
9246 |                         r"(?:decision|review|hold|adjust)[_.-][a-z][a-z0-9_.-]{1,63}",
9247 |                         value.decision_id,
     |                         ^^^^^^^^^^^^^^^^^
9248 |                     )
9249 |                     and value.decision_id
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `decision_id`
    --> gateway/platforms/telegram.py:9249:25
     |
9247 |                         value.decision_id,
9248 |                     )
9249 |                     and value.decision_id
     |                         ^^^^^^^^^^^^^^^^^
9250 |                     not in {
9251 |                         "observe",
     |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> gateway/platforms/telegram.py:9299:36
     |
9297 |         if not isinstance(payload, Mapping):
9298 |             return None
9299 |         customer_key = payload.get("customer_key")
     |                                    ^^^^^^^^^^^^^^ Expected `Never`, found `Literal["customer_key"]`
9300 |         proposal_digest = payload.get("proposal_digest")
9301 |         revision = payload.get("revision")
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> gateway/platforms/telegram.py:9300:39
     |
9298 |             return None
9299 |         customer_key = payload.get("customer_key")
9300 |         proposal_digest = payload.get("proposal_digest")
     |                                       ^^^^^^^^^^^^^^^^^ Expected `Never`, found `Literal["proposal_digest"]`
9301 |         revision = payload.get("revision")
9302 |         if (
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> gateway/platforms/telegram.py:9301:32
     |
9299 |         customer_key = payload.get("customer_key")
9300 |         proposal_digest = payload.get("proposal_digest")
9301 |         revision = payload.get("revision")
     |                                ^^^^^^^^^^ Expected `Never`, found `Literal["revision"]`
9302 |         if (
9303 |             type(customer_key) is not str
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `facts`
    --> gateway/platforms/telegram.py:9376:31
     |
9374 |             source = {
9375 |                 "surface": surface,
9376 |                 "facts": dict(grounding_input.facts),
     |                               ^^^^^^^^^^^^^^^^^^^^^
9377 |                 "verified_memory": grounding_input.verified_memory,
9378 |                 "revision_binding_digest": grounding_input.revision_binding_digest,
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `verified_memory`
    --> gateway/platforms/telegram.py:9377:36
     |
9375 |                 "surface": surface,
9376 |                 "facts": dict(grounding_input.facts),
9377 |                 "verified_memory": grounding_input.verified_memory,
     |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9378 |                 "revision_binding_digest": grounding_input.revision_binding_digest,
9379 |                 "source_cluster_ids": grounding_input.source_cluster_ids,
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `revision_binding_digest`
    --> gateway/platforms/telegram.py:9378:44
     |
9376 |                 "facts": dict(grounding_input.facts),
9377 |                 "verified_memory": grounding_input.verified_memory,
9378 |                 "revision_binding_digest": grounding_input.revision_binding_digest,
     |                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9379 |                 "source_cluster_ids": grounding_input.source_cluster_ids,
9380 |                 "excluded_risk_ids": grounding_input.excluded_risk_ids,
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `source_cluster_ids`
    --> gateway/platforms/telegram.py:9379:39
     |
9377 |                 "verified_memory": grounding_input.verified_memory,
9378 |                 "revision_binding_digest": grounding_input.revision_binding_digest,
9379 |                 "source_cluster_ids": grounding_input.source_cluster_ids,
     |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9380 |                 "excluded_risk_ids": grounding_input.excluded_risk_ids,
9381 |                 "decision_id": getattr(grounding_input, "decision_id", ""),
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `excluded_risk_ids`
    --> gateway/platforms/telegram.py:9380:38
     |
9378 |                 "revision_binding_digest": grounding_input.revision_binding_digest,
9379 |                 "source_cluster_ids": grounding_input.source_cluster_ids,
9380 |                 "excluded_risk_ids": grounding_input.excluded_risk_ids,
     |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9381 |                 "decision_id": getattr(grounding_input, "decision_id", ""),
9382 |             }
     |
info: rule `unresolved-attribute` is enabled by default

error[call-top-callable]: Object of type `Top[(...) -> object]` is not safe to call; its signature is not known
    --> gateway/platforms/telegram.py:9425:23
     |
9423 |             return False
9424 |         try:
9425 |             current = supplier()
     |                       ^^^^^^^^^^
9426 |         except Exception:
9427 |             return False
     |
info: This type includes all possible callables, so it cannot safely be called because there is no valid set of arguments for it
info: rule `call-top-callable` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `revision_binding_digest`
    --> gateway/platforms/telegram.py:9430:22
     |
9428 |         return (
9429 |             self._valid_grounding_input(surface, current)
9430 |             and type(current.revision_binding_digest) is str
     |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9431 |             and current.revision_binding_digest == grounding_input.revision_binding_digest
9432 |         )
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `revision_binding_digest`
    --> gateway/platforms/telegram.py:9431:17
     |
9429 |             self._valid_grounding_input(surface, current)
9430 |             and type(current.revision_binding_digest) is str
9431 |             and current.revision_binding_digest == grounding_input.revision_binding_digest
     |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9432 |         )
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `revision_binding_digest`
    --> gateway/platforms/telegram.py:9431:52
     |
9429 |             self._valid_grounding_input(surface, current)
9430 |             and type(current.revision_binding_digest) is str
9431 |             and current.revision_binding_digest == grounding_input.revision_binding_digest
     |                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9432 |         )
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `revision_binding_digest`
    --> gateway/platforms/telegram.py:9454:13
     |
9452 |         digest = hashlib.sha256(canonical.encode("utf-8")).hexdigest()
9453 |         safe_binding = (
9454 |             grounding_input.revision_binding_digest
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9455 |             if TelegramAdapter._valid_grounding_input(surface, grounding_input)
9456 |             else ""
     |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to function `asdict` is incorrect
    --> gateway/platforms/telegram.py:9891:44
     |
9889 |                 value = value.model_dump(mode="json")  # type: ignore[union-attr]
9890 |             elif dataclasses.is_dataclass(value):
9891 |                 value = dataclasses.asdict(value)
     |                                            ^^^^^ Expected `DataclassInstance`, found `(DataclassInstance & ~<Protocol with members 'model_dump'>) | (type & ~<Protocol with members 'model_dump'>)`
9892 |             payload = json.dumps(
9893 |                 value,
     |
info: Element `type & ~<Protocol with members 'model_dump'>` of this union is not assignable to `DataclassInstance`
info: Matching overload defined here
  --> stdlib/dataclasses.pyi:67:5
   |
66 | @overload
67 | def asdict(obj: DataclassInstance) -> dict[str, Any]:
   |     ^^^^^^ ---------------------- Parameter declared here
68 |     """Return the fields of a dataclass instance as a new dictionary mapping
69 |     field names to field values.
   |
info: Non-matching overloads for function `asdict`:
info:   [_T](obj: DataclassInstance, *, dict_factory: (list[tuple[str, Any]], /) -> _T) -> _T
info: rule `invalid-argument-type` is enabled by default

error[no-matching-overload]: No overload of bound method `get` matches arguments
    --> gateway/platforms/telegram.py:9960:24
     |
9958 |     def _nutrition_schedule_state(receipt: object) -> str:
9959 |         if isinstance(receipt, Mapping):
9960 |             return str(receipt.get("state", "") or "")
     |                        ^^^^^^^^^^^^^^^^^^^^^^^^
9961 |         return str(getattr(receipt, "state", "") or "")
     |
info: First overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Possible overloads for bound method `get`:
info:   (self, key: _KT@Mapping, /) -> _VT_co@Mapping | None
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `no-matching-overload` is enabled by default

error[no-matching-overload]: No overload of bound method `get` matches arguments
    --> gateway/platforms/telegram.py:9976:16
     |
9974 |             raise ValueError("provider rejected delivery")
9975 |         if isinstance(result, Mapping):
9976 |             if result.get("ok", result.get("success", True)) is False:
     |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9977 |                 raise ValueError("provider rejected delivery")
9978 |             message_id = result.get("message_id")
     |
info: First overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Possible overloads for bound method `get`:
info:   (self, key: _KT@Mapping, /) -> _VT_co@Mapping | None
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `no-matching-overload` is enabled by default

error[no-matching-overload]: No overload of bound method `get` matches arguments
    --> gateway/platforms/telegram.py:9976:33
     |
9974 |             raise ValueError("provider rejected delivery")
9975 |         if isinstance(result, Mapping):
9976 |             if result.get("ok", result.get("success", True)) is False:
     |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
9977 |                 raise ValueError("provider rejected delivery")
9978 |             message_id = result.get("message_id")
     |
info: First overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Possible overloads for bound method `get`:
info:   (self, key: _KT@Mapping, /) -> _VT_co@Mapping | None
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `no-matching-overload` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> gateway/platforms/telegram.py:9978:37
     |
9976 |             if result.get("ok", result.get("success", True)) is False:
9977 |                 raise ValueError("provider rejected delivery")
9978 |             message_id = result.get("message_id")
     |                                     ^^^^^^^^^^^^ Expected `Never`, found `Literal["message_id"]`
9979 |             raw_response = result.get("raw_response")
9980 |         else:
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> gateway/platforms/telegram.py:9979:39
     |
9977 |                 raise ValueError("provider rejected delivery")
9978 |             message_id = result.get("message_id")
9979 |             raw_response = result.get("raw_response")
     |                                       ^^^^^^^^^^^^^^ Expected `Never`, found `Literal["raw_response"]`
9980 |         else:
9981 |             if (
     |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[unresolved-attribute]: Object of type `WeeklyReminderCoordinator` has no attribute `customer`
     --> gateway/platforms/telegram.py:10075:20
      |
10073 |         if callable(refresh) and not refresh():
10074 |             return self._nutrition_schedule_key(task)
10075 |         customer = coordinator.customer(getattr(task, "customer_key", ""))
      |                    ^^^^^^^^^^^^^^^^^^^^
10076 |         if customer is None:
10077 |             return self._nutrition_schedule_key(task)
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `WeeklyReminderCoordinator` has no attribute `customer_transport_allowed`
     --> gateway/platforms/telegram.py:10087:20
      |
10085 |             or config_digest is None
10086 |             or not callable(getattr(coordinator, "customer_transport_allowed", None))
10087 |             or not coordinator.customer_transport_allowed(
      |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10088 |                 getattr(task, "customer_key", ""),
10089 |                 destination,
      |
info: rule `unresolved-attribute` is enabled by default

error[call-non-callable]: Object of type `object` is not callable
     --> gateway/platforms/telegram.py:10115:34
      |
10113 |                 if self._nutrition_schedule_state(prepared) == "sent_audited":
10114 |                     return prepared, None
10115 |                 return prepared, mark_sending(profile_root, prepared)
      |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10116 |
10117 |             authorized = dual_coach.canonical_transaction.authorize_missing_morning_reminder(
      |
info: rule `call-non-callable` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `authorize_missing_morning_reminder`
     --> gateway/platforms/telegram.py:10117:26
      |
10115 |                 return prepared, mark_sending(profile_root, prepared)
10116 |
10117 |             authorized = dual_coach.canonical_transaction.authorize_missing_morning_reminder(
      |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10118 |                 getattr(task, "kst_day"), authorize_reminder
10119 |             )
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `WeeklyReminderCoordinator` has no attribute `customer`
     --> gateway/platforms/telegram.py:10142:23
      |
10140 |             if callable(refresh) and not refresh():
10141 |                 raise RuntimeError("customer registry unavailable")
10142 |             current = coordinator.customer(getattr(task, "customer_key", ""))
      |                       ^^^^^^^^^^^^^^^^^^^^
10143 |             current_destination = getattr(getattr(current, "spec", None), "telegram", None)
10144 |             if (
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `WeeklyReminderCoordinator` has no attribute `customer_transport_allowed`
     --> gateway/platforms/telegram.py:10149:24
      |
10147 |                 or self._nutrition_schedule_registry_digest(coordinator) != registry_digest
10148 |                 or self._nutrition_schedule_config_digest() != config_digest
10149 |                 or not coordinator.customer_transport_allowed(
      |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10150 |                     getattr(task, "customer_key", ""),
10151 |                     current_destination,
      |
info: rule `unresolved-attribute` is enabled by default

error[call-non-callable]: Object of type `object` is not callable
     --> gateway/platforms/telegram.py:10158:17
      |
10156 | …ept Exception:
10157 | … try:
10158 | …     mark_unknown(profile_root, locals().get("sending", locals().get("prepared")), reason="authority_changed_after_reservation")
      |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10159 | … except Exception:
10160 | …     pass
      |
info: rule `call-non-callable` is enabled by default

error[call-non-callable]: Object of type `object` is not callable
     --> gateway/platforms/telegram.py:10171:17
      |
10169 |           except Exception:
10170 |               try:
10171 | /                 mark_unknown(
10172 | |                     profile_root, sending, reason="canonical_response_check_unavailable"
10173 | |                 )
      | |_________________^
10174 |               except Exception:
10175 |                   pass
      |
info: rule `call-non-callable` is enabled by default

error[call-non-callable]: Object of type `object` is not callable
     --> gateway/platforms/telegram.py:10179:17
      |
10177 |         if response_received:
10178 |             try:
10179 |                 abandon_for_terminal_response(profile_root, sending)
      |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10180 |             except Exception:
10181 |                 return self._nutrition_schedule_key(task)
      |
info: rule `call-non-callable` is enabled by default

error[call-top-callable]: Object of type `Top[(...) -> object]` is not safe to call; its signature is not known
     --> gateway/platforms/telegram.py:10191:17
      |
10189 |             rejected_reason = self._reminder_no_send_rejection(provider_result)
10190 |             if rejected_reason is not None and callable(mark_known_failure):
10191 |                 mark_known_failure(profile_root, sending, reason=rejected_reason)
      |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10192 |                 return self._nutrition_schedule_key(task)
10193 |             provider_receipt = self._nutrition_delivery_receipt(provider_result)
      |
info: This type includes all possible callables, so it cannot safely be called because there is no valid set of arguments for it
info: rule `call-top-callable` is enabled by default

error[call-non-callable]: Object of type `object` is not callable
     --> gateway/platforms/telegram.py:10194:25
      |
10192 |                   return self._nutrition_schedule_key(task)
10193 |               provider_receipt = self._nutrition_delivery_receipt(provider_result)
10194 |               delivered = mark_delivered(
      |  _________________________^
10195 | |                 profile_root, sending, provider_receipt=provider_receipt, message_id=provider_receipt
10196 | |             )
      | |_____________^
10197 |               mark_audited(profile_root, delivered)
10198 |           except Exception as exc:
      |
info: rule `call-non-callable` is enabled by default

error[call-non-callable]: Object of type `object` is not callable
     --> gateway/platforms/telegram.py:10197:13
      |
10195 |                 profile_root, sending, provider_receipt=provider_receipt, message_id=provider_receipt
10196 |             )
10197 |             mark_audited(profile_root, delivered)
      |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10198 |         except Exception as exc:
10199 |             rejected_reason = self._reminder_no_send_rejection(exc)
      |
info: rule `call-non-callable` is enabled by default

error[call-top-callable]: Object of type `Top[(...) -> object]` is not safe to call; its signature is not known
     --> gateway/platforms/telegram.py:10202:21
      |
10200 |             try:
10201 |                 if rejected_reason is not None and callable(mark_known_failure):
10202 |                     mark_known_failure(profile_root, sending, reason=rejected_reason)
      |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10203 |                 else:
10204 |                     mark_unknown(profile_root, sending, reason="provider_unknown")
      |
info: This type includes all possible callables, so it cannot safely be called because there is no valid set of arguments for it
info: rule `call-top-callable` is enabled by default

error[call-non-callable]: Object of type `object` is not callable
     --> gateway/platforms/telegram.py:10204:21
      |
10202 |                     mark_known_failure(profile_root, sending, reason=rejected_reason)
10203 |                 else:
10204 |                     mark_unknown(profile_root, sending, reason="provider_unknown")
      |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10205 |             except Exception:
10206 |                 pass
      |
info: rule `call-non-callable` is enabled by default

error[unresolved-attribute]: Object of type `~None` has no attribute `customer`
     --> gateway/platforms/telegram.py:10309:32
      |
10307 |                     if not callable(refresh) or not refresh():
10308 |                         raise RuntimeError("activation notice registry unavailable")
10309 |                     customer = coordinator.customer(receipt.customer_key)
      |                                ^^^^^^^^^^^^^^^^^^^^
10310 |                     destination = getattr(getattr(customer, "spec", None), "telegram", None)
10311 |                     if (
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `~None` has no attribute `customer_transport_allowed`
     --> gateway/platforms/telegram.py:10315:32
      |
10313 |                         or self._nutrition_schedule_destination(destination)
10314 |                         != receipt.destination
10315 |                         or not coordinator.customer_transport_allowed(
      |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10316 |                             receipt.customer_key,
10317 |                             destination,
      |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to function `reserve_customer_task_delivery` is incorrect
     --> gateway/platforms/telegram.py:10685:21
      |
10683 |                 prepared = reserve_customer_task_delivery(
10684 |                     profile_root,
10685 |                     task,
      |                     ^^^^ Expected `CustomerScheduleTask`, found `WeeklyOperationsTask`
10686 |                     body,
10687 |                     destination_pin,
      |
info: Function defined here
    --> dualcoach/profile/checkin_cli/customer_schedule.py:1368:5
     |
1368 | def reserve_customer_task_delivery(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1369 |     profile_root: Path,
1370 |     task: CustomerScheduleTask,
     |     -------------------------- Parameter declared here
1371 |     body: str,
1372 |     destination: object,
     |
info: rule `invalid-argument-type` is enabled by default

error[unresolved-attribute]: Attribute `spec` is not defined on `None` in union `CustomerRuntime | None`
     --> gateway/platforms/telegram.py:10734:21
      |
10732 |                 current_customer = coordinator.customer(task.customer_key)
10733 |                 current_destination = (
10734 |                     current_customer.spec.telegram
      |                     ^^^^^^^^^^^^^^^^^^^^^
10735 |                     if task.kind == "daily"
10736 |                     else coordinator.owner
      |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/telegram.py:10967:37
      |
10965 |         for name in names:
10966 |             if isinstance(summary, Mapping):
10967 |                 value = summary.get(name)
      |                                     ^^^^ Expected `Never`, found `str`
10968 |             else:
10969 |                 value = getattr(summary, name, None)
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/telegram.py:11016:31
      |
11014 |             low = next(
11015 |                 (
11016 |                     value.get(name)
      |                               ^^^^ Expected `Never`, found `Literal["min", "low", "start", "minimum"]`
11017 |                     for name in ("min", "low", "start", "minimum")
11018 |                     if value.get(name) is not None
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/telegram.py:11018:34
      |
11016 |                     value.get(name)
11017 |                     for name in ("min", "low", "start", "minimum")
11018 |                     if value.get(name) is not None
      |                                  ^^^^ Expected `Never`, found `Literal["min", "low", "start", "minimum"]`
11019 |                 ),
11020 |                 None,
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/telegram.py:11024:31
      |
11022 |             high = next(
11023 |                 (
11024 |                     value.get(name)
      |                               ^^^^ Expected `Never`, found `Literal["max", "high", "end", "maximum"]`
11025 |                     for name in ("max", "high", "end", "maximum")
11026 |                     if value.get(name) is not None
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/telegram.py:11026:34
      |
11024 |                     value.get(name)
11025 |                     for name in ("max", "high", "end", "maximum")
11026 |                     if value.get(name) is not None
      |                                  ^^^^ Expected `Never`, found `Literal["max", "high", "end", "maximum"]`
11027 |                 ),
11028 |                 None,
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/telegram.py:11051:31
      |
11049 |             low = next(
11050 |                 (
11051 |                     value.get(name)
      |                               ^^^^ Expected `Never`, found `Literal["min", "low", "start", "minimum"]`
11052 |                     for name in ("min", "low", "start", "minimum")
11053 |                     if value.get(name) is not None
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/telegram.py:11053:34
      |
11051 |                     value.get(name)
11052 |                     for name in ("min", "low", "start", "minimum")
11053 |                     if value.get(name) is not None
      |                                  ^^^^ Expected `Never`, found `Literal["min", "low", "start", "minimum"]`
11054 |                 ),
11055 |                 None,
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/telegram.py:11059:31
      |
11057 |             high = next(
11058 |                 (
11059 |                     value.get(name)
      |                               ^^^^ Expected `Never`, found `Literal["max", "high", "end", "maximum"]`
11060 |                     for name in ("max", "high", "end", "maximum")
11061 |                     if value.get(name) is not None
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
     --> gateway/platforms/telegram.py:11061:34
      |
11059 |                     value.get(name)
11060 |                     for name in ("max", "high", "end", "maximum")
11061 |                     if value.get(name) is not None
      |                                  ^^^^ Expected `Never`, found `Literal["max", "high", "end", "maximum"]`
11062 |                 ),
11063 |                 None,
      |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[unresolved-import]: Cannot resolve imported module `source_collector.source_review`
     --> gateway/platforms/telegram.py:11260:18
      |
11258 |             if package_text not in sys.path:
11259 |                 sys.path.insert(0, package_text)
11260 |             from source_collector.source_review import SourceReviewQueue
      |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11261 |
11262 |             return SourceReviewQueue(profile_root / "data", profile_root / "knowledge")
      |
info: Searched in the following paths during module resolution:
info:   1. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/dualcoach/profile (extra search path specified on the CLI or in your config file)
info:   2. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl (extra search path specified on the CLI or in your config file)
info:   3. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   4. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib/python3.12/site-packages (site-packages)
info:   5. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `answer`
     --> gateway/platforms/telegram.py:11325:19
      |
11323 |         """Apply a signed-in owner's bounded review action without exposing queue details."""
11324 |         if not self._accepts_physique_source_review(query, message):
11325 |             await query.answer(text="이 검토 카드는 소유자 전용입니다.")
      |                   ^^^^^^^^^^^^
11326 |             return
11327 |         parsed = _SOURCE_REVIEW_CALLBACK_RE.fullmatch(data)
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `answer`
     --> gateway/platforms/telegram.py:11329:19
      |
11327 |         parsed = _SOURCE_REVIEW_CALLBACK_RE.fullmatch(data)
11328 |         if parsed is None:
11329 |             await query.answer(text="유효하지 않은 검토 버튼입니다.")
      |                   ^^^^^^^^^^^^
11330 |             return
11331 |         queue = self._get_physique_source_review_queue()
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `answer`
     --> gateway/platforms/telegram.py:11333:19
      |
11331 |         queue = self._get_physique_source_review_queue()
11332 |         if queue is None:
11333 |             await query.answer(text="검토 큐를 불러올 수 없습니다.")
      |                   ^^^^^^^^^^^^
11334 |             return
11335 |         now = datetime.now(timezone.utc).astimezone(ZoneInfo("Asia/Seoul")).isoformat()
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `answer`
     --> gateway/platforms/telegram.py:11343:23
      |
11341 |             candidate = queue.candidate_by_prefix(prefix)
11342 |             if candidate is None:
11343 |                 await query.answer(text="이미 처리됐거나 찾을 수 없는 자료입니다.")
      |                       ^^^^^^^^^^^^
11344 |                 return
11345 |             if action == "a":
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `answer`
     --> gateway/platforms/telegram.py:11352:19
      |
11350 |                 completed_text = "⏸ 이 자료는 보류했습니다. 코칭 근거에 사용하지 않습니다."
11351 |         if result.approved_count == 0 and result.deferred_count == 0:
11352 |             await query.answer(text="이미 처리된 자료입니다.")
      |                   ^^^^^^^^^^^^
11353 |             return
11354 |         await query.answer(text="처리했습니다.")
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `answer`
     --> gateway/platforms/telegram.py:11354:15
      |
11352 |             await query.answer(text="이미 처리된 자료입니다.")
11353 |             return
11354 |         await query.answer(text="처리했습니다.")
      |               ^^^^^^^^^^^^
11355 |         await query.edit_message_text(text=completed_text, reply_markup=None)
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `edit_message_text`
     --> gateway/platforms/telegram.py:11355:15
      |
11353 |             return
11354 |         await query.answer(text="처리했습니다.")
11355 |         await query.edit_message_text(text=completed_text, reply_markup=None)
      |               ^^^^^^^^^^^^^^^^^^^^^^^
11356 |
11357 |     async def send_physique_checkin_launcher(self) -> SendResult:
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `split` is not defined on `None` in union `str | None`
     --> gateway/platforms/telegram.py:11392:30
      |
11390 |             )
11391 |             for opening in (morning, workout):
11392 |                 session_id = opening.callback_data.split(":", 3)[1]
      |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
11393 |                 bridge.bind_launcher_message(session_id, str(sent.message_id))
11394 |             return SendResult(success=True, message_id=str(sent.message_id))
      |
info: rule `unresolved-attribute` is enabled by default

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
     --> gateway/platforms/telegram.py:12575:85
      |
12573 |                 resolved_text: Optional[str] = None
12574 |                 try:
12575 |                     from tools.clarify_gateway import _entries as _clarify_entries  # type: ignore
      |                                                                                     ^^^^^^^^^^^^^^
12576 |                     entry = _clarify_entries.get(clarify_id)
12577 |                     if entry and entry.choices and 0 <= idx < len(entry.choices):
      |
help: Remove the unused suppression comment
12572 |                 # has been cleaned up (race with timeout / session reset).
12573 |                 resolved_text: Optional[str] = None
12574 |                 try:
      -                     from tools.clarify_gateway import _entries as _clarify_entries  # type: ignore
12575 +                     from tools.clarify_gateway import _entries as _clarify_entries
12576 |                     entry = _clarify_entries.get(clarify_id)
12577 |                     if entry and entry.choices and 0 <= idx < len(entry.choices):
12578 |                         resolved_text = entry.choices[idx]

error[unresolved-attribute]: Object of type `TelegramTextEditor & ~AlwaysFalsy` has no attribute `send_voice`
     --> gateway/platforms/telegram.py:12844:25
      |
12842 |                     )
12843 |                     msg = await self._send_with_dm_topic_reply_anchor_retry(
12844 |                         self._bot.send_voice,
      |                         ^^^^^^^^^^^^^^^^^^^^
12845 |                         {
12846 |                             "chat_id": int(chat_id),
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `TelegramTextEditor & ~AlwaysFalsy` has no attribute `send_audio`
     --> gateway/platforms/telegram.py:12870:25
      |
12868 |                     )
12869 |                     msg = await self._send_with_dm_topic_reply_anchor_retry(
12870 |                         self._bot.send_audio,
      |                         ^^^^^^^^^^^^^^^^^^^^
12871 |                         {
12872 |                             "chat_id": int(chat_id),
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `TelegramTextEditor & ~AlwaysFalsy` has no attribute `send_media_group`
     --> gateway/platforms/telegram.py:13009:21
      |
13008 |                 await self._send_with_dm_topic_reply_anchor_retry(
13009 |                     self._bot.send_media_group,
      |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^
13010 |                     {
13011 |                         "chat_id": int(chat_id),
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `TelegramTextEditor & ~AlwaysFalsy` has no attribute `send_photo`
     --> gateway/platforms/telegram.py:13067:21
      |
13065 |             with open(image_path, "rb") as image_file:
13066 |                 msg = await self._send_with_dm_topic_reply_anchor_retry(
13067 |                     self._bot.send_photo,
      |                     ^^^^^^^^^^^^^^^^^^^^
13068 |                     {
13069 |                         "chat_id": int(chat_id),
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `TelegramTextEditor & ~AlwaysFalsy` has no attribute `send_document`
     --> gateway/platforms/telegram.py:13163:21
      |
13161 |             with open(file_path, "rb") as f:
13162 |                 msg = await self._send_with_dm_topic_reply_anchor_retry(
13163 |                     self._bot.send_document,
      |                     ^^^^^^^^^^^^^^^^^^^^^^^
13164 |                     {
13165 |                         "chat_id": int(chat_id),
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `TelegramTextEditor & ~AlwaysFalsy` has no attribute `send_video`
     --> gateway/platforms/telegram.py:13211:21
      |
13209 |             with open(video_path, "rb") as f:
13210 |                 msg = await self._send_with_dm_topic_reply_anchor_retry(
13211 |                     self._bot.send_video,
      |                     ^^^^^^^^^^^^^^^^^^^^
13212 |                     {
13213 |                         "chat_id": int(chat_id),
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `TelegramTextEditor & ~AlwaysFalsy` has no attribute `send_photo`
     --> gateway/platforms/telegram.py:13263:17
      |
13261 |             )
13262 |             msg = await self._send_with_dm_topic_reply_anchor_retry(
13263 |                 self._bot.send_photo,
      |                 ^^^^^^^^^^^^^^^^^^^^
13264 |                 {
13265 |                     "chat_id": int(chat_id),
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `TelegramTextEditor & ~AlwaysFalsy` has no attribute `send_photo`
     --> gateway/platforms/telegram.py:13300:21
      |
13298 |                 )
13299 |                 msg = await self._send_with_dm_topic_reply_anchor_retry(
13300 |                     self._bot.send_photo,
      |                     ^^^^^^^^^^^^^^^^^^^^
13301 |                     {
13302 |                         "chat_id": int(chat_id),
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `TelegramTextEditor & ~AlwaysFalsy` has no attribute `send_animation`
     --> gateway/platforms/telegram.py:13347:17
      |
13345 |             )
13346 |             msg = await self._send_with_dm_topic_reply_anchor_retry(
13347 |                 self._bot.send_animation,
      |                 ^^^^^^^^^^^^^^^^^^^^^^^^
13348 |                 {
13349 |                     "chat_id": int(chat_id),
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `TelegramTextEditor & ~AlwaysFalsy` has no attribute `send_chat_action`
     --> gateway/platforms/telegram.py:13380:23
      |
13378 |                 _is_dm_topic = bool(metadata and metadata.get("telegram_dm_topic_reply_fallback"))
13379 |                 message_thread_id = self._message_thread_id_for_typing(_typing_thread)
13380 |                 await self._bot.send_chat_action(
      |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^
13381 |                     chat_id=int(chat_id),
13382 |                     action="typing",
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `TelegramTextEditor & ~AlwaysFalsy` has no attribute `send_chat_action`
     --> gateway/platforms/telegram.py:13391:31
      |
13389 |                 if _is_dm_topic and message_thread_id is not None:
13390 |                     try:
13391 |                         await self._bot.send_chat_action(
      |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^
13392 |                             chat_id=int(chat_id),
13393 |                             action="typing",
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `TelegramTextEditor & ~AlwaysFalsy` has no attribute `get_chat`
     --> gateway/platforms/telegram.py:13412:26
      |
13411 |         try:
13412 |             chat = await self._bot.get_chat(int(chat_id))
      |                          ^^^^^^^^^^^^^^^^^^
13413 |             
13414 |             chat_type = "dm"
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `TelegramTextEditor & ~AlwaysFalsy` has no attribute `username`
     --> gateway/platforms/telegram.py:13948:30
      |
13946 |         if not text or not self._bot or not getattr(self._bot, "username", None):
13947 |             return text
13948 |         username = re.escape(self._bot.username)
      |                              ^^^^^^^^^^^^^^^^^^
13949 |         cleaned = re.sub(rf"(?i)@{username}\b[,:\-]*\s*", "", text).strip()
13950 |         return cleaned or text
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `TelegramTextEditor | None` has no attribute `set_my_commands`
     --> gateway/platforms/telegram.py:14340:23
      |
14338 |                 menu_commands, _ = telegram_menu_commands(max_commands=MAX_COMMANDS_PER_SCOPE)
14339 |                 bot_commands = [BotCommand(name, desc) for name, desc in menu_commands]
14340 |                 await self._bot.set_my_commands(bot_commands, scope=BotCommandScopeChat(chat_id=chat_id))
      |                       ^^^^^^^^^^^^^^^^^^^^^^^^^
14341 |                 self._forum_command_registered.add(chat_id)
14342 |                 logger.info("[%s] Lazy-registered %d commands for forum chat %s", self.name, len(bot_commands), chat_id)
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `WizardReply` has no attribute `text`
     --> gateway/platforms/telegram.py:14431:38
      |
14429 |             if nutrition is not None:
14430 |                 transition = nutrition.withdraw_customer(self._nutrition_address(msg))
14431 |                 await msg.reply_text(transition.reply.text)
      |                                      ^^^^^^^^^^^^^^^^^^^^^
14432 |                 return
14433 |         if await self._handle_nutrition_onboarding_text(update, msg):
      |
info: rule `unresolved-attribute` is enabled by default

error[invalid-assignment]: Object of type `str | None` is not assignable to attribute `text` of type `str`
     --> gateway/platforms/telegram.py:14590:9
      |
14589 |         event = self._build_message_event(msg, MessageType.TEXT, update_id=update.update_id)
14590 |         event.text = self._clean_bot_trigger_text(event.text)
      |         ^^^^^^^^^^
14591 |         await self._cache_replied_media(msg, event)
14592 |         event = self._apply_telegram_group_observe_attribution(event)
      |
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `str | None` is not assignable to attribute `text` of type `str`
     --> gateway/platforms/telegram.py:14676:9
      |
14675 |         event = self._build_message_event(msg, MessageType.COMMAND, update_id=update.update_id)
14676 |         event.text = self._clean_bot_trigger_text(event.text)
      |         ^^^^^^^^^^
14677 |         await self._cache_replied_media(msg, event)
14678 |         event = self._apply_telegram_group_observe_attribution(event)
      |
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `str | None` is not assignable to attribute `text` of type `str`
     --> gateway/platforms/telegram.py:14883:21
      |
14881 |                 _event = self._build_message_event(_m, _observe_type, update_id=update.update_id)
14882 |                 if _m.caption:
14883 |                     _event.text = self._clean_bot_trigger_text(_m.caption)
      |                     ^^^^^^^^^^^
14884 |                 await self._cache_observed_media(_m, _event)
14885 |                 self._observe_unmentioned_group_message(
      |
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `str | None` is not assignable to attribute `text` of type `str`
     --> gateway/platforms/telegram.py:14896:13
      |
14894 |         # Add caption as text
14895 |         if msg.caption:
14896 |             event.text = self._clean_bot_trigger_text(msg.caption)
      |             ^^^^^^^^^^
14897 |         
14898 |         # Handle stickers: describe via vision tool with caching
      |
info: rule `invalid-assignment` is enabled by default

error[unresolved-attribute]: Attribute `lower` is not defined on `None` in union `str | None`
     --> gateway/platforms/telegram.py:14982:28
      |
14980 |                 if getattr(file_obj, "file_path", None):
14981 |                     for candidate in SUPPORTED_VIDEO_TYPES:
14982 |                         if file_obj.file_path.lower().endswith(candidate):
      |                            ^^^^^^^^^^^^^^^^^^^^^^^^
14983 |                             ext = candidate
14984 |                             break
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `emoji` is not defined on `None` in union `Sticker | None`
     --> gateway/platforms/telegram.py:15188:17
      |
15187 |         sticker = msg.sticker
15188 |         emoji = sticker.emoji or ""
      |                 ^^^^^^^^^^^^^
15189 |         set_name = sticker.set_name or ""
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `set_name` is not defined on `None` in union `Sticker | None`
     --> gateway/platforms/telegram.py:15189:20
      |
15187 |         sticker = msg.sticker
15188 |         emoji = sticker.emoji or ""
15189 |         set_name = sticker.set_name or ""
      |                    ^^^^^^^^^^^^^^^^
15190 |
15191 |         # Animated and video stickers can't be analyzed as static images
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `is_animated` is not defined on `None` in union `Sticker | None`
     --> gateway/platforms/telegram.py:15192:12
      |
15191 |         # Animated and video stickers can't be analyzed as static images
15192 |         if sticker.is_animated or sticker.is_video:
      |            ^^^^^^^^^^^^^^^^^^^
15193 |             event.text = build_animated_sticker_injection(emoji)
15194 |             return
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `is_video` is not defined on `None` in union `Sticker | None`
     --> gateway/platforms/telegram.py:15192:35
      |
15191 |         # Animated and video stickers can't be analyzed as static images
15192 |         if sticker.is_animated or sticker.is_video:
      |                                   ^^^^^^^^^^^^^^^^
15193 |             event.text = build_animated_sticker_injection(emoji)
15194 |             return
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `file_unique_id` is not defined on `None` in union `Sticker | None`
     --> gateway/platforms/telegram.py:15197:41
      |
15196 |         # Check the cache first
15197 |         cached = get_cached_description(sticker.file_unique_id)
      |                                         ^^^^^^^^^^^^^^^^^^^^^^
15198 |         if cached:
15199 |             event.text = build_sticker_injection(
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `file_unique_id` is not defined on `None` in union `Sticker | None`
     --> gateway/platforms/telegram.py:15202:61
      |
15200 |                 cached["description"], cached.get("emoji", emoji), cached.get("set_name", set_name)
15201 |             )
15202 |             logger.info("[Telegram] Sticker cache hit: %s", sticker.file_unique_id)
      |                                                             ^^^^^^^^^^^^^^^^^^^^^^
15203 |             return
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `get_file` is not defined on `None` in union `Sticker | None`
     --> gateway/platforms/telegram.py:15207:30
      |
15205 |         # Cache miss -- download and analyze
15206 |         try:
15207 |             file_obj = await sticker.get_file()
      |                              ^^^^^^^^^^^^^^^^
15208 |             image_bytes = await file_obj.download_as_bytearray()
15209 |             cached_path = cache_image_from_bytes(bytes(image_bytes), ext=".webp")
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `file_unique_id` is not defined on `None` in union `Sticker | None`
     --> gateway/platforms/telegram.py:15221:43
      |
15219 |             if result.get("success"):
15220 |                 description = result.get("analysis", "a sticker")
15221 |                 cache_sticker_description(sticker.file_unique_id, description, emoji, set_name)
      |                                           ^^^^^^^^^^^^^^^^^^^^^^
15222 |                 event.text = build_sticker_injection(description, emoji, set_name)
15223 |             else:
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `TelegramTextEditor & ~AlwaysFalsy` has no attribute `set_message_reaction`
     --> gateway/platforms/telegram.py:15512:19
      |
15510 |             return False
15511 |         try:
15512 |             await self._bot.set_message_reaction(
      |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15513 |                 chat_id=int(chat_id),
15514 |                 message_id=int(message_id),
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `TelegramTextEditor & ~AlwaysFalsy` has no attribute `set_message_reaction`
     --> gateway/platforms/telegram.py:15533:19
      |
15531 |             return False
15532 |         try:
15533 |             await self._bot.set_message_reaction(
      |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15534 |                 chat_id=int(chat_id),
15535 |                 message_id=int(message_id),
      |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to function `_required_int` is incorrect
    --> gateway/platforms/telegram_customer_bootstrap.py:1197:41
     |
1195 |             if handoff_value is None
1196 |             else ConsentHandoff(
1197 |                 update_id=_required_int(handoff_value, "update_id"),
     |                                         ^^^^^^^^^^^^^ Expected `Mapping[str, object]`, found `Top[Mapping[Unknown, object]]`
1198 |                 actor_id=_required_int(handoff_value, "actor_id"),
1199 |                 chat_id=_required_int(handoff_value, "chat_id"),
     |
info: Function defined here
    --> gateway/platforms/telegram_customer_bootstrap.py:1046:5
     |
1046 | def _required_int(value: Mapping[str, object], field: str) -> int:
     |     ^^^^^^^^^^^^^ --------------------------- Parameter declared here
1047 |     candidate = value[field]
1048 |     if type(candidate) is not int:
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `_required_int` is incorrect
    --> gateway/platforms/telegram_customer_bootstrap.py:1198:40
     |
1196 |             else ConsentHandoff(
1197 |                 update_id=_required_int(handoff_value, "update_id"),
1198 |                 actor_id=_required_int(handoff_value, "actor_id"),
     |                                        ^^^^^^^^^^^^^ Expected `Mapping[str, object]`, found `Top[Mapping[Unknown, object]]`
1199 |                 chat_id=_required_int(handoff_value, "chat_id"),
1200 |                 topic_id=_required_int(handoff_value, "topic_id"),
     |
info: Function defined here
    --> gateway/platforms/telegram_customer_bootstrap.py:1046:5
     |
1046 | def _required_int(value: Mapping[str, object], field: str) -> int:
     |     ^^^^^^^^^^^^^ --------------------------- Parameter declared here
1047 |     candidate = value[field]
1048 |     if type(candidate) is not int:
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `_required_int` is incorrect
    --> gateway/platforms/telegram_customer_bootstrap.py:1199:39
     |
1197 |                 update_id=_required_int(handoff_value, "update_id"),
1198 |                 actor_id=_required_int(handoff_value, "actor_id"),
1199 |                 chat_id=_required_int(handoff_value, "chat_id"),
     |                                       ^^^^^^^^^^^^^ Expected `Mapping[str, object]`, found `Top[Mapping[Unknown, object]]`
1200 |                 topic_id=_required_int(handoff_value, "topic_id"),
1201 |                 message_id=_required_int(handoff_value, "message_id"),
     |
info: Function defined here
    --> gateway/platforms/telegram_customer_bootstrap.py:1046:5
     |
1046 | def _required_int(value: Mapping[str, object], field: str) -> int:
     |     ^^^^^^^^^^^^^ --------------------------- Parameter declared here
1047 |     candidate = value[field]
1048 |     if type(candidate) is not int:
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `_required_int` is incorrect
    --> gateway/platforms/telegram_customer_bootstrap.py:1200:40
     |
1198 |                 actor_id=_required_int(handoff_value, "actor_id"),
1199 |                 chat_id=_required_int(handoff_value, "chat_id"),
1200 |                 topic_id=_required_int(handoff_value, "topic_id"),
     |                                        ^^^^^^^^^^^^^ Expected `Mapping[str, object]`, found `Top[Mapping[Unknown, object]]`
1201 |                 message_id=_required_int(handoff_value, "message_id"),
1202 |                 callback_data=_required_string(handoff_value, "callback_data"),
     |
info: Function defined here
    --> gateway/platforms/telegram_customer_bootstrap.py:1046:5
     |
1046 | def _required_int(value: Mapping[str, object], field: str) -> int:
     |     ^^^^^^^^^^^^^ --------------------------- Parameter declared here
1047 |     candidate = value[field]
1048 |     if type(candidate) is not int:
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `_required_int` is incorrect
    --> gateway/platforms/telegram_customer_bootstrap.py:1201:42
     |
1199 |                 chat_id=_required_int(handoff_value, "chat_id"),
1200 |                 topic_id=_required_int(handoff_value, "topic_id"),
1201 |                 message_id=_required_int(handoff_value, "message_id"),
     |                                          ^^^^^^^^^^^^^ Expected `Mapping[str, object]`, found `Top[Mapping[Unknown, object]]`
1202 |                 callback_data=_required_string(handoff_value, "callback_data"),
1203 |                 bootstrap_generation=(
     |
info: Function defined here
    --> gateway/platforms/telegram_customer_bootstrap.py:1046:5
     |
1046 | def _required_int(value: Mapping[str, object], field: str) -> int:
     |     ^^^^^^^^^^^^^ --------------------------- Parameter declared here
1047 |     candidate = value[field]
1048 |     if type(candidate) is not int:
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `_required_string` is incorrect
    --> gateway/platforms/telegram_customer_bootstrap.py:1202:48
     |
1200 |                 topic_id=_required_int(handoff_value, "topic_id"),
1201 |                 message_id=_required_int(handoff_value, "message_id"),
1202 |                 callback_data=_required_string(handoff_value, "callback_data"),
     |                                                ^^^^^^^^^^^^^ Expected `Mapping[str, object]`, found `Top[Mapping[Unknown, object]]`
1203 |                 bootstrap_generation=(
1204 |                     _required_int(handoff_value, "bootstrap_generation")
     |
info: Function defined here
    --> gateway/platforms/telegram_customer_bootstrap.py:1042:5
     |
1042 | def _required_string(value: Mapping[str, object], field: str) -> str:
     |     ^^^^^^^^^^^^^^^^ --------------------------- Parameter declared here
1043 |     return _strict_string(value[field], field)
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `_required_int` is incorrect
    --> gateway/platforms/telegram_customer_bootstrap.py:1204:35
     |
1202 |                 callback_data=_required_string(handoff_value, "callback_data"),
1203 |                 bootstrap_generation=(
1204 |                     _required_int(handoff_value, "bootstrap_generation")
     |                                   ^^^^^^^^^^^^^ Expected `Mapping[str, object]`, found `Top[Mapping[Unknown, object]]`
1205 |                     if "bootstrap_generation" in handoff_value
1206 |                     else legacy_handoff_generation
     |
info: Function defined here
    --> gateway/platforms/telegram_customer_bootstrap.py:1046:5
     |
1046 | def _required_int(value: Mapping[str, object], field: str) -> int:
     |     ^^^^^^^^^^^^^ --------------------------- Parameter declared here
1047 |     candidate = value[field]
1048 |     if type(candidate) is not int:
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `_required_datetime` is incorrect
    --> gateway/platforms/telegram_customer_bootstrap.py:1208:48
     |
1206 |                     else legacy_handoff_generation
1207 |                 ),
1208 |                 recorded_at=_required_datetime(handoff_value, "recorded_at"),
     |                                                ^^^^^^^^^^^^^ Expected `Mapping[str, object]`, found `Top[Mapping[Unknown, object]]`
1209 |                 provenance_digest=_required_string(
1210 |                     handoff_value, "provenance_digest"
     |
info: Function defined here
    --> gateway/platforms/telegram_customer_bootstrap.py:1078:5
     |
1078 | def _required_datetime(value: Mapping[str, object], field: str) -> datetime:
     |     ^^^^^^^^^^^^^^^^^^ --------------------------- Parameter declared here
1079 |     return datetime.fromisoformat(_required_string(value, field))
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `_required_string` is incorrect
    --> gateway/platforms/telegram_customer_bootstrap.py:1210:21
     |
1208 |                 recorded_at=_required_datetime(handoff_value, "recorded_at"),
1209 |                 provenance_digest=_required_string(
1210 |                     handoff_value, "provenance_digest"
     |                     ^^^^^^^^^^^^^ Expected `Mapping[str, object]`, found `Top[Mapping[Unknown, object]]`
1211 |                 ),
1212 |             )
     |
info: Function defined here
    --> gateway/platforms/telegram_customer_bootstrap.py:1042:5
     |
1042 | def _required_string(value: Mapping[str, object], field: str) -> str:
     |     ^^^^^^^^^^^^^^^^ --------------------------- Parameter declared here
1043 |     return _strict_string(value[field], field)
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-return-type]: Return type does not match returned value
  --> gateway/platforms/telegram_production_preflight.py:71:6
   |
69 | def _production_preflight(
70 |     extra: Mapping[str, JsonValue],
71 | ) -> Mapping[str, JsonValue]:
   |      ----------------------- Expected `Mapping[str, str | int | float | ... omitted 3 union elements]` because of return type
72 |     value = extra.get("production_preflight", {})
73 |     if not isinstance(value, Mapping):
74 |         raise GatewayPreflightError("production_preflight configuration is invalid")
75 |     return value
   |            ^^^^^ expected `Mapping[str, str | int | float | ... omitted 3 union elements]`, found `(str & Top[Mapping[Unknown, object]]) | (int & Top[Mapping[Unknown, object]]) | (float & Top[Mapping[Unknown, object]]) | (list[Divergent] & Top[Mapping[Unknown, object]]) | Mapping[str, Divergent]`
   |
info: rule `invalid-return-type` is enabled by default

error[invalid-return-type]: Return type does not match returned value
  --> gateway/platforms/telegram_staff_membership_gate.py:90:44
   |
90 | def _mapping(value: object, label: str) -> Mapping[str, object]:
   |                                            -------------------- Expected `Mapping[str, object]` because of return type
91 |     if not isinstance(value, Mapping) or not all(
92 |         isinstance(key, str) for key in value
93 |     ):
94 |         raise MembershipGateError(f"{label} is invalid")
95 |     return value
   |            ^^^^^ expected `Mapping[str, object]`, found `Top[Mapping[Unknown, object]]`
   |
info: rule `invalid-return-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
   --> gateway/platforms/telegram_staff_membership_gate.py:113:34
    |
111 |     platforms = config.get("platforms")
112 |     if isinstance(platforms, Mapping):
113 |         telegram = platforms.get("telegram")
    |                                  ^^^^^^^^^^ Expected `Never`, found `Literal["telegram"]`
114 |         if isinstance(telegram, Mapping):
115 |             extra = telegram.get("extra", telegram)
    |
info: Matching overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^       -------- Parameter declared here
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `invalid-argument-type` is enabled by default

error[no-matching-overload]: No overload of bound method `get` matches arguments
   --> gateway/platforms/telegram_staff_membership_gate.py:119:25
    |
117 |     telegram = config.get("telegram")
118 |     if isinstance(telegram, Mapping):
119 |         return _mapping(telegram.get("extra", telegram), "Telegram configuration")
    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
120 |     return config
    |
info: First overload defined here
    --> stdlib/typing.pyi:1790:9
     |
1788 |     # Mixin methods
1789 |     @overload
1790 |     def get(self, key: _KT, /) -> _VT_co | None:
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1791 |         """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
     |
info: Possible overloads for bound method `get`:
info:   (self, key: _KT@Mapping, /) -> _VT_co@Mapping | None
info:   (self, key: _KT@Mapping, default: _VT_co@Mapping, /) -> _VT_co@Mapping
info:   [_T](self, key: _KT@Mapping, default: _T, /) -> _VT_co@Mapping | _T
info: rule `no-matching-overload` is enabled by default

error[unresolved-import]: Cannot resolve imported module `mutagen.oggopus`
    --> gateway/run.py:1889:22
     |
1887 |         try:
1888 |             def _ogg_duration() -> float:
1889 |                 from mutagen.oggopus import OggOpus
     |                      ^^^^^^^^^^^^^^^
1890 |                 return float(OggOpus(path).info.length)
1891 |             secs = await asyncio.to_thread(_ogg_duration)
     |
info: Searched in the following paths during module resolution:
info:   1. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/dualcoach/profile (extra search path specified on the CLI or in your config file)
info:   2. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl (extra search path specified on the CLI or in your config file)
info:   3. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   4. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib/python3.12/site-packages (site-packages)
info:   5. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[invalid-assignment]: Object of type `() -> Unknown` is not assignable to `ReferenceType[Unknown]`
    --> gateway/run.py:2277:22
     |
2275 | # adapter for plugin platforms.  Set in GatewayRunner.__init__().
2276 | import weakref as _weakref
2277 | _gateway_runner_ref: _weakref.ref = lambda: None
     |                      ------------   ^^^^^^^^^^^^ Incompatible value of type `() -> Unknown`
     |                      |
     |                      Declared type
     |
info: rule `invalid-assignment` is enabled by default

error[unresolved-attribute]: Attribute `steer` is not defined on `None` in union `Any | None`
    --> gateway/run.py:4294:36
     |
4292 |             if can_steer:
4293 |                 try:
4294 |                     steered = bool(running_agent.steer(steer_text))
     |                                    ^^^^^^^^^^^^^^^^^^^
4295 |                 except Exception as exc:
4296 |                     logger.warning("Gateway steer failed for session %s: %s", session_key, exc)
     |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to function `atomic_json_write` is incorrect
    --> gateway/run.py:4742:49
     |
4741 |         try:
4742 |             atomic_json_write(path, new_counts, indent=None)
     |                                                 ^^^^^^^^^^^ Expected `int`, found `None`
4743 |         except Exception:
4744 |             pass
     |
info: Function defined here
   --> utils.py:111:5
    |
111 | def atomic_json_write(
    |     ^^^^^^^^^^^^^^^^^
112 |     path: Union[str, Path],
113 |     data: Any,
114 |     *,
115 |     indent: int = 2,
    |     --------------- Parameter declared here
116 |     mode: int | None = None,
117 |     **dump_kwargs: Any,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `atomic_json_write` is incorrect
    --> gateway/run.py:4810:53
     |
4808 |                 del counts[session_key]
4809 |                 if counts:
4810 |                     atomic_json_write(path, counts, indent=None)
     |                                                     ^^^^^^^^^^^ Expected `int`, found `None`
4811 |                 else:
4812 |                     path.unlink(missing_ok=True)
     |
info: Function defined here
   --> utils.py:111:5
    |
111 | def atomic_json_write(
    |     ^^^^^^^^^^^^^^^^^
112 |     path: Union[str, Path],
113 |     data: Any,
114 |     *,
115 |     indent: int = 2,
    |     --------------- Parameter declared here
116 |     mode: int | None = None,
117 |     **dump_kwargs: Any,
    |
info: rule `invalid-argument-type` is enabled by default

error[unresolved-attribute]: Attribute `platform` is not defined on `None` in union `Unknown | SessionSource | None`
    --> gateway/run.py:5180:41
     |
5179 |             source = entry.origin
5180 |             adapter = self.adapters.get(source.platform)
     |                                         ^^^^^^^^^^^^^^^
5181 |             if adapter is None:
5182 |                 logger.debug(
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `platform` is not defined on `None` in union `Unknown | SessionSource | None`
    --> gateway/run.py:5185:29
     |
5183 |                     "Skipping auto-resume for %s: adapter not ready for %s",
5184 |                     entry.session_key,
5185 |                     getattr(source.platform, "value", source.platform),
     |                             ^^^^^^^^^^^^^^^
5186 |                 )
5187 |                 continue
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `platform` is not defined on `None` in union `Unknown | SessionSource | None`
    --> gateway/run.py:5185:55
     |
5183 |                     "Skipping auto-resume for %s: adapter not ready for %s",
5184 |                     entry.session_key,
5185 |                     getattr(source.platform, "value", source.platform),
     |                                                       ^^^^^^^^^^^^^^^
5186 |                 )
5187 |                 continue
     |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument is incorrect
    --> gateway/run.py:5203:17
     |
5201 |                 text="",
5202 |                 message_type=MessageType.TEXT,
5203 |                 source=source,
     |                 ^^^^^^^^^^^^^ Expected `SessionSource`, found `Unknown | SessionSource | None`
5204 |                 internal=True,
5205 |             )
     |
info: Element `None` of this union is not assignable to `SessionSource`
info: rule `invalid-argument-type` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `pop`
    --> gateway/run.py:6149:29
     |
6147 |                         self._set_session_reasoning_override(key, None)
6148 |                         if hasattr(self, "_pending_model_notes"):
6149 |                             self._pending_model_notes.pop(key, None)
     |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6150 |                         _pending_approvals = getattr(self, "_pending_approvals", None)
6151 |                         if isinstance(_pending_approvals, dict):
     |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to function `atomic_json_write` is incorrect
    --> gateway/run.py:6821:25
     |
6819 |                             "detached": bool(self._restart_detached),
6820 |                         },
6821 |                         indent=None,
     |                         ^^^^^^^^^^^ Expected `int`, found `None`
6822 |                     )
6823 |                 except Exception as e:
     |
info: Function defined here
   --> utils.py:111:5
    |
111 | def atomic_json_write(
    |     ^^^^^^^^^^^^^^^^^
112 |     path: Union[str, Path],
113 |     data: Any,
114 |     *,
115 |     indent: int = 2,
    |     --------------- Parameter declared here
116 |     mode: int | None = None,
117 |     **dump_kwargs: Any,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `def resolve_command(name: str) -> CommandDef | None`
    --> gateway/run.py:7413:25
     |
7411 |                         from hermes_cli.commands import resolve_command as _resolve_update_cmd
7412 |                     except Exception:
7413 |                         _resolve_update_cmd = None
     |                         -------------------   ^^^^ Incompatible value of type `None`
     |                         |
     |                         Declared type `def resolve_command(name: str) -> CommandDef | None`
7414 |                     if _resolve_update_cmd is not None:
7415 |                         try:
     |
info: Implicit shadowing of function `resolve_command`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-argument-type]: Argument to function `resolve` is incorrect
    --> gateway/run.py:7538:33
     |
7536 |             if _confirm_choice is not None:
7537 |                 _resolved = await _slash_confirm_mod.resolve(
7538 |                     _quick_key, _pending_confirm.get("confirm_id"), _confirm_choice,
     |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `Any | None`
7539 |                 )
7540 |                 return _resolved or ""
     |
info: Element `None` of this union is not assignable to `str`
info: Function defined here
   --> tools/slash_confirm.py:99:11
    |
 99 | async def resolve(
    |           ^^^^^^^
100 |     session_key: str,
101 |     confirm_id: str,
    |     --------------- Parameter declared here
102 |     choice: str,
103 |     timeout: float = DEFAULT_TIMEOUT_SECONDS,
    |
info: rule `invalid-argument-type` is enabled by default

error[unresolved-attribute]: Attribute `interrupt` is not defined on `None` in union `Any | None`
    --> gateway/run.py:7951:13
     |
7949 |                 return None
7950 |             logger.debug("PRIORITY interrupt for session %s", _quick_key)
7951 |             running_agent.interrupt(event.text)
     |             ^^^^^^^^^^^^^^^^^^^^^^^
7952 |             # NOTE: self._pending_messages was write-only (never consumed).
7953 |             # The actual interrupt message is delivered via adapter._pending_messages
     |
info: rule `unresolved-attribute` is enabled by default

error[no-matching-overload]: No overload of bound method `get` matches arguments
    --> gateway/run.py:7977:34
     |
7975 |         if command and _cmd_def is None:
7976 |             if isinstance(self.config, dict):
7977 |                 quick_commands = self.config.get("quick_commands", {}) or {}
     |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7978 |             else:
7979 |                 quick_commands = getattr(self.config, "quick_commands", {}) or {}
     |
info: First overload defined here
    --> stdlib/builtins.pyi:3015:9
     |
3013 |     # Positional-only in dict, but not in MutableMapping
3014 |     @overload  # type: ignore[override]
3015 |     def get(self, key: _KT, default: None = None, /) -> _VT | None:
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3016 |         """Return the value for key if key is in the dictionary, else default."""
     |
info: Possible overloads for bound method `get`:
info:   (self, key: _KT@dict, default: None = None, /) -> _VT@dict | None
info:   (self, key: _KT@dict, default: _VT@dict, /) -> _VT@dict
info:   [_T](self, key: _KT@dict, default: _T, /) -> _VT@dict | _T
info: rule `no-matching-overload` is enabled by default

error[no-matching-overload]: No overload of bound method `get` matches arguments
    --> gateway/run.py:8286:34
     |
8284 |         if command:
8285 |             if isinstance(self.config, dict):
8286 |                 quick_commands = self.config.get("quick_commands", {}) or {}
     |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8287 |             else:
8288 |                 quick_commands = getattr(self.config, "quick_commands", {}) or {}
     |
info: First overload defined here
    --> stdlib/builtins.pyi:3015:9
     |
3013 |     # Positional-only in dict, but not in MutableMapping
3014 |     @overload  # type: ignore[override]
3015 |     def get(self, key: _KT, default: None = None, /) -> _VT | None:
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3016 |         """Return the value for key if key is in the dictionary, else default."""
     |
info: Possible overloads for bound method `get`:
info:   (self, key: _KT@dict, default: None = None, /) -> _VT@dict | None
info:   (self, key: _KT@dict, default: _VT@dict, /) -> _VT@dict
info:   [_T](self, key: _KT@dict, default: _T, /) -> _VT@dict | _T
info: rule `no-matching-overload` is enabled by default

error[not-subscriptable]: Cannot subscript object of type `None` with no `__getitem__` method
    --> gateway/run.py:8745:29
     |
8743 |             # multiple times, and without an explicit pointer the agent has to
8744 |             # guess (or answer for both subjects). Token overhead is minimal.
8745 |             reply_snippet = event.reply_to_text[:500]
     |                             ^^^^^^^^^^^^^^^^^^^^^^^^^
8746 |             if getattr(event, "reply_to_is_own_message", False):
8747 |                 message_text = (
     |
info: rule `not-subscriptable` is enabled by default

error[unresolved-attribute]: Object of type `Self@_prepare_inbound_message_text` has no attribute `_model`
    --> gateway/run.py:8772:21
     |
8770 |                     pass
8771 |                 _msg_ctx_len = get_model_context_length(
8772 |                     self._model,
     |                     ^^^^^^^^^^^
8773 |                     base_url=self._base_url or _msg_runtime.get("base_url") or "",
8774 |                     api_key=_msg_runtime.get("api_key") or "",
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `Self@_prepare_inbound_message_text` has no attribute `_base_url`
    --> gateway/run.py:8773:30
     |
8771 |                 _msg_ctx_len = get_model_context_length(
8772 |                     self._model,
8773 |                     base_url=self._base_url or _msg_runtime.get("base_url") or "",
     |                              ^^^^^^^^^^^^^^
8774 |                     api_key=_msg_runtime.get("api_key") or "",
8775 |                     config_context_length=_msg_config_ctx,
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `pop`
    --> gateway/run.py:8935:17
     |
8933 |             self._set_session_reasoning_override(session_key, None)
8934 |             if hasattr(self, "_pending_model_notes"):
8935 |                 self._pending_model_notes.pop(session_key, None)
     |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8936 |         
8937 |         # Emit session:start for new or auto-reset sessions
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Unresolved attribute `_print_fn` on type `AIAgent`
    --> gateway/run.py:9281:37
     |
9279 |                                 )
9280 |                                 try:
9281 |                                     _hyg_agent._print_fn = lambda *a, **kw: None
     |                                     ^^^^^^^^^^^^^^^^^^^^
9282 |
9283 |                                     loop = asyncio.get_running_loop()
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `AIAgent` has no attribute `session_id`
    --> gateway/run.py:9296:52
     |
9294 | …                     # the NEW session so the old transcript stays intact
9295 | …                     # and searchable via session_search.
9296 | …                     _hyg_new_sid = _hyg_agent.session_id
     |                                      ^^^^^^^^^^^^^^^^^^^^^
9297 | …                     if _hyg_new_sid != session_entry.session_id:
9298 | …                         session_entry.session_id = _hyg_new_sid
     |
info: rule `unresolved-attribute` is enabled by default

error[call-non-callable]: Object of type `object` is not callable
    --> gateway/run.py:9465:30
     |
9463 |             guild_id = self._get_guild_id(event)
9464 |             if guild_id and adapter and hasattr(adapter, "get_voice_channel_context"):
9465 |                 vc_context = adapter.get_voice_channel_context(guild_id)
     |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9466 |                 if vc_context:
9467 |                     context_prompt += f"\n\n{vc_context}"
     |
info: rule `call-non-callable` is enabled by default

error[unresolved-attribute]: Attribute `pop_post_delivery_callback` is not defined on `None` in union `BasePlatformAdapter | None`
    --> gateway/run.py:9578:21
     |
9576 |                 _stale_adapter = self.adapters.get(source.platform)
9577 |                 if getattr(type(_stale_adapter), "pop_post_delivery_callback", None) is not None:
9578 |                     _stale_adapter.pop_post_delivery_callback(
     |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9579 |                         _quick_key,
9580 |                         generation=run_generation,
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `pop`
    --> gateway/run.py:9827:21
     |
9825 |                 self._set_session_reasoning_override(session_key, None)
9826 |                 if hasattr(self, "_pending_model_notes"):
9827 |                     self._pending_model_notes.pop(session_key, None)
     |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9828 |                 if new_entry is not None:
9829 |                     # Drop the stale reference to the bloated compressed child and
     |
info: rule `unresolved-attribute` is enabled by default

error[no-matching-overload]: No overload of bound method `get` matches arguments
     --> gateway/run.py:10479:17
      |
10477 |         try:
10478 |             goals_cfg = (
10479 |                 (self.config or {}).get("goals", {})
      |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10480 |                 if isinstance(self.config, dict)
10481 |                 else getattr(self.config, "goals", {}) or {}
      |
info: First overload defined here
    --> stdlib/builtins.pyi:3015:9
     |
3013 |     # Positional-only in dict, but not in MutableMapping
3014 |     @overload  # type: ignore[override]
3015 |     def get(self, key: _KT, default: None = None, /) -> _VT | None:
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3016 |         """Return the value for key if key is in the dictionary, else default."""
     |
info: Possible overloads for bound method `get`:
info:   (self, key: _KT@dict, default: None = None, /) -> _VT@dict | None
info:   (self, key: _KT@dict, default: _VT@dict, /) -> _VT@dict
info:   [_T](self, key: _KT@dict, default: _T, /) -> _VT@dict | _T
info: Union variant `Overload[(key: Never, default: None = None, /) -> object, (key: Never, default: Never, /) -> object, [_T](key: Never, default: _T, /) -> object]` is incompatible with this call site
info: Attempted to call union type `(Overload[(key: Never, default: None = None, /) -> object, (key: Never, default: Never, /) -> object, [_T](key: Never, default: _T, /) -> object]) | (Overload[(key: Unknown, default: None = None, /) -> Unknown | None, (key: Unknown, default: Unknown, /) -> Unknown, [_T](key: Unknown, default: _T, /) -> Unknown | _T])`
info: rule `no-matching-overload` is enabled by default

error[unresolved-attribute]: Object of type `BasePlatformAdapter & <Protocol with members 'join_voice_channel'>` has no attribute `get_user_voice_channel`
     --> gateway/run.py:10673:31
      |
10671 |             return "This command only works in a Discord server."
10672 |
10673 |         voice_channel = await adapter.get_user_voice_channel(
      |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10674 |             guild_id, event.source.user_id
10675 |         )
      |
info: rule `unresolved-attribute` is enabled by default

error[invalid-assignment]: Object of type `bound method Self@_handle_voice_channel_join._handle_voice_channel_input(guild_id: int, user_id: int, transcript: str) -> CoroutineType[Any, Any, Unknown]` is not assignable to attribute `_voice_input_callback` on type `BasePlatformAdapter & <Protocol with members 'join_voice_channel'> & <Protocol with members '_voice_input_callback'>`
     --> gateway/run.py:10682:13
      |
10680 |         # after connection is not lost.
10681 |         if hasattr(adapter, "_voice_input_callback"):
10682 |             adapter._voice_input_callback = self._handle_voice_channel_input
      |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10683 |         if hasattr(adapter, "_on_voice_disconnect"):
10684 |             adapter._on_voice_disconnect = self._handle_voice_timeout_cleanup
      |
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `bound method Self@_handle_voice_channel_join._handle_voice_timeout_cleanup(chat_id: str) -> None` is not assignable to attribute `_on_voice_disconnect` on type `BasePlatformAdapter & <Protocol with members 'join_voice_channel'> & <Protocol with members '_on_voice_disconnect'>`
     --> gateway/run.py:10684:13
      |
10682 |             adapter._voice_input_callback = self._handle_voice_channel_input
10683 |         if hasattr(adapter, "_on_voice_disconnect"):
10684 |             adapter._on_voice_disconnect = self._handle_voice_timeout_cleanup
      |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10685 |         # Let the adapter's inactivity timer see the live voice-reply mode so it
10686 |         # doesn't disconnect a deliberately text-only (/voice off) session.
      |
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `(chat_id) -> Unknown` is not assignable to attribute `_voice_mode_getter` on type `BasePlatformAdapter & <Protocol with members 'join_voice_channel'> & <Protocol with members '_voice_mode_getter'>`
     --> gateway/run.py:10688:13
      |
10686 |         # doesn't disconnect a deliberately text-only (/voice off) session.
10687 |         if hasattr(adapter, "_voice_mode_getter"):
10688 |             adapter._voice_mode_getter = lambda chat_id: self._voice_mode.get(
      |             ^^^^^^^^^^^^^^^^^^^^^^^^^^
10689 |                 self._voice_key(Platform.DISCORD, str(chat_id)), "off"
10690 |             )
      |
info: rule `invalid-assignment` is enabled by default

error[call-non-callable]: Object of type `object` is not callable
     --> gateway/run.py:10693:29
      |
10692 |         try:
10693 |             success = await adapter.join_voice_channel(voice_channel)
      |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10694 |         except Exception as e:
10695 |             logger.warning("Failed to join voice channel: %s", e)
      |
info: rule `call-non-callable` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to attribute `_voice_input_callback` on type `BasePlatformAdapter & <Protocol with members 'join_voice_channel'>`
     --> gateway/run.py:10696:13
      |
10694 |         except Exception as e:
10695 |             logger.warning("Failed to join voice channel: %s", e)
10696 |             adapter._voice_input_callback = None
      |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10697 |             err_lower = str(e).lower()
10698 |             if "pynacl" in err_lower or "nacl" in err_lower or "davey" in err_lower:
      |
info: rule `invalid-assignment` is enabled by default

error[unresolved-attribute]: Object of type `BasePlatformAdapter & <Protocol with members 'join_voice_channel'>` has no attribute `_voice_text_channels`
     --> gateway/run.py:10706:13
      |
10705 |         if success:
10706 |             adapter._voice_text_channels[guild_id] = int(event.source.chat_id)
      |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10707 |             if hasattr(adapter, "_voice_sources"):
10708 |                 adapter._voice_sources[guild_id] = event.source.to_dict()
      |
info: rule `unresolved-attribute` is enabled by default

error[invalid-assignment]: Cannot assign to a subscript on an object of type `object`
     --> gateway/run.py:10708:17
      |
10706 |             adapter._voice_text_channels[guild_id] = int(event.source.chat_id)
10707 |             if hasattr(adapter, "_voice_sources"):
10708 |                 adapter._voice_sources[guild_id] = event.source.to_dict()
      |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10709 |             self._voice_mode[self._voice_key(event.source.platform, event.source.chat_id)] = "all"
10710 |             self._save_voice_modes()
      |
info: `object` does not have a `__setitem__` method.
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to attribute `_voice_input_callback` on type `BasePlatformAdapter & <Protocol with members 'join_voice_channel'>`
     --> gateway/run.py:10717:9
      |
10715 |             )
10716 |         # Join failed — clear callback
10717 |         adapter._voice_input_callback = None
      |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10718 |         return "Failed to join voice channel. Check bot permissions (Connect + Speak)."
      |
info: rule `invalid-assignment` is enabled by default

error[call-non-callable]: Object of type `object` is not callable
     --> gateway/run.py:10728:63
      |
10726 |             return "Not in a voice channel."
10727 |
10728 |         if not hasattr(adapter, "is_in_voice_channel") or not adapter.is_in_voice_channel(guild_id):
      |                                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10729 |             return "Not in a voice channel."
      |
info: rule `call-non-callable` is enabled by default

error[call-non-callable]: Object of type `object` is not callable
     --> gateway/run.py:10732:19
      |
10731 |         try:
10732 |             await adapter.leave_voice_channel(guild_id)
      |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10733 |         except Exception as e:
10734 |             logger.warning("Error leaving voice channel: %s", e)
      |
info: rule `call-non-callable` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to attribute `_voice_input_callback` on type `BasePlatformAdapter & <Protocol with members 'leave_voice_channel'> & <Protocol with members 'is_in_voice_channel'> & <Protocol with members '_voice_input_callback'>`
     --> gateway/run.py:10740:13
      |
10738 |         self._set_adapter_auto_tts_disabled(adapter, event.source.chat_id, disabled=True)
10739 |         if hasattr(adapter, "_voice_input_callback"):
10740 |             adapter._voice_input_callback = None
      |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10741 |         return "Left voice channel."
      |
info: rule `invalid-assignment` is enabled by default

error[unresolved-attribute]: Object of type `BasePlatformAdapter & ~AlwaysFalsy` has no attribute `_voice_text_channels`
     --> gateway/run.py:10806:22
      |
10804 |             return
10805 |
10806 |         text_ch_id = adapter._voice_text_channels.get(guild_id)
      |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10807 |         if not text_ch_id:
10808 |             return
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `BasePlatformAdapter & ~AlwaysFalsy` has no attribute `_client`
     --> gateway/run.py:10842:23
      |
10840 |         # Show transcript in text channel (after auth, with mention sanitization)
10841 |         try:
10842 |             channel = adapter._client.get_channel(text_ch_id)
      |                       ^^^^^^^^^^^^^^^
10843 |             if channel:
10844 |                 safe_text = transcript[:2000].replace("@everyone", "@\u200beveryone").replace("@here", "@\u200bhere")
      |
info: rule `unresolved-attribute` is enabled by default

error[call-non-callable]: Object of type `object` is not callable
     --> gateway/run.py:10959:25
      |
10957 |                     and hasattr(adapter, "play_in_voice_channel")
10958 |                     and hasattr(adapter, "is_in_voice_channel")
10959 |                     and adapter.is_in_voice_channel(guild_id)):
      |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10960 |                 await adapter.play_in_voice_channel(guild_id, actual_path)
10961 |             elif adapter and hasattr(adapter, "send_voice"):
      |
info: rule `call-non-callable` is enabled by default

error[call-non-callable]: Object of type `object` is not callable
     --> gateway/run.py:10960:23
      |
10958 |                     and hasattr(adapter, "is_in_voice_channel")
10959 |                     and adapter.is_in_voice_channel(guild_id)):
10960 |                 await adapter.play_in_voice_channel(guild_id, actual_path)
      |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10961 |             elif adapter and hasattr(adapter, "send_voice"):
10962 |                 reply_anchor = self._reply_anchor_for_event(event)
      |
info: rule `call-non-callable` is enabled by default

error[invalid-argument-type]: Argument to function `unlink` is incorrect
     --> gateway/run.py:10988:31
      |
10986 |             for p in {audio_path, actual_path} - {None}:
10987 |                 try:
10988 |                     os.unlink(p)
      |                               ^ Expected `str | bytes | PathLike[str] | PathLike[bytes]`, found `None | str | Any`
10989 |                 except OSError:
10990 |                     pass
      |
info: Element `None` of this union is not assignable to `str | bytes | PathLike[str] | PathLike[bytes]`
info: Function defined here
    --> stdlib/os/__init__.pyi:2107:5
     |
2105 |     """
2106 |
2107 | def unlink(path: StrOrBytesPath, *, dir_fd: int | None = None) -> None:
     |     ^^^^^^ -------------------- Parameter declared here
2108 |     """Remove a file (same as remove()).
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
     --> gateway/run.py:11190:21
      |
11188 |                     verbose_logging=False,
11189 |                     enabled_toolsets=enabled_toolsets,
11190 |                     disabled_toolsets=disabled_toolsets,
      |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `list[str]`, found `(Unknown & ~AlwaysFalsy) | None`
11191 |                     reasoning_config=reasoning_config,
11192 |                     service_tier=self._service_tier,
      |
info: Element `None` of this union is not assignable to `list[str]`
info: Method defined here
   --> run_agent.py:356:9
    |
354 |         self._base_url_hostname = base_url_hostname(value)
355 |
356 |     def __init__(
    |         ^^^^^^^^
357 |         self,
358 |         base_url: str = None,
    |
   ::: run_agent.py:370:9
    |
368 |         tool_delay: float = 1.0,
369 |         enabled_toolsets: List[str] = None,
370 |         disabled_toolsets: List[str] = None,
    |         ----------------------------------- Parameter declared here
371 |         save_trajectories: bool = False,
372 |         verbose_logging: bool = False,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
     --> gateway/run.py:11191:21
      |
11189 |                     enabled_toolsets=enabled_toolsets,
11190 |                     disabled_toolsets=disabled_toolsets,
11191 |                     reasoning_config=reasoning_config,
      |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `dict[str, Any]`, found `dict[Unknown, Unknown] | None`
11192 |                     service_tier=self._service_tier,
11193 |                     request_overrides=turn_route.get("request_overrides"),
      |
info: Element `None` of this union is not assignable to `dict[str, Any]`
info: Method defined here
   --> run_agent.py:356:9
    |
354 |         self._base_url_hostname = base_url_hostname(value)
355 |
356 |     def __init__(
    |         ^^^^^^^^
357 |         self,
358 |         base_url: str = None,
    |
   ::: run_agent.py:402:9
    |
400 |         event_callback: Optional[Callable[[str, dict], None]] = None,
401 |         max_tokens: int = None,
402 |         reasoning_config: Dict[str, Any] = None,
    |         --------------------------------------- Parameter declared here
403 |         service_tier: str = None,
404 |         request_overrides: Dict[str, Any] = None,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
     --> gateway/run.py:11192:21
      |
11190 |                     disabled_toolsets=disabled_toolsets,
11191 |                     reasoning_config=reasoning_config,
11192 |                     service_tier=self._service_tier,
      |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `Unknown | str | None`
11193 |                     request_overrides=turn_route.get("request_overrides"),
11194 |                     providers_allowed=pr.get("only"),
      |
info: Element `None` of this union is not assignable to `str`
info: Method defined here
   --> run_agent.py:356:9
    |
354 |         self._base_url_hostname = base_url_hostname(value)
355 |
356 |     def __init__(
    |         ^^^^^^^^
357 |         self,
358 |         base_url: str = None,
    |
   ::: run_agent.py:403:9
    |
401 |         max_tokens: int = None,
402 |         reasoning_config: Dict[str, Any] = None,
403 |         service_tier: str = None,
    |         ------------------------ Parameter declared here
404 |         request_overrides: Dict[str, Any] = None,
405 |         prefill_messages: List[Dict[str, Any]] = None,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
     --> gateway/run.py:11193:21
      |
11191 |                     reasoning_config=reasoning_config,
11192 |                     service_tier=self._service_tier,
11193 |                     request_overrides=turn_route.get("request_overrides"),
      |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `dict[str, Any]`, found `Unknown | None`
11194 |                     providers_allowed=pr.get("only"),
11195 |                     providers_ignored=pr.get("ignore"),
      |
info: Element `None` of this union is not assignable to `dict[str, Any]`
info: Method defined here
   --> run_agent.py:356:9
    |
354 |         self._base_url_hostname = base_url_hostname(value)
355 |
356 |     def __init__(
    |         ^^^^^^^^
357 |         self,
358 |         base_url: str = None,
    |
   ::: run_agent.py:404:9
    |
402 |         reasoning_config: Dict[str, Any] = None,
403 |         service_tier: str = None,
404 |         request_overrides: Dict[str, Any] = None,
    |         ---------------------------------------- Parameter declared here
405 |         prefill_messages: List[Dict[str, Any]] = None,
406 |         platform: str = None,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
     --> gateway/run.py:11194:21
      |
11192 |                     service_tier=self._service_tier,
11193 |                     request_overrides=turn_route.get("request_overrides"),
11194 |                     providers_allowed=pr.get("only"),
      |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `list[str]`, found `Unknown | None`
11195 |                     providers_ignored=pr.get("ignore"),
11196 |                     providers_order=pr.get("order"),
      |
info: Element `None` of this union is not assignable to `list[str]`
info: Method defined here
   --> run_agent.py:356:9
    |
354 |         self._base_url_hostname = base_url_hostname(value)
355 |
356 |     def __init__(
    |         ^^^^^^^^
357 |         self,
358 |         base_url: str = None,
    |
   ::: run_agent.py:378:9
    |
376 |         log_prefix_chars: int = 100,
377 |         log_prefix: str = "",
378 |         providers_allowed: List[str] = None,
    |         ----------------------------------- Parameter declared here
379 |         providers_ignored: List[str] = None,
380 |         providers_order: List[str] = None,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
     --> gateway/run.py:11195:21
      |
11193 |                     request_overrides=turn_route.get("request_overrides"),
11194 |                     providers_allowed=pr.get("only"),
11195 |                     providers_ignored=pr.get("ignore"),
      |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `list[str]`, found `Unknown | None`
11196 |                     providers_order=pr.get("order"),
11197 |                     provider_sort=pr.get("sort"),
      |
info: Element `None` of this union is not assignable to `list[str]`
info: Method defined here
   --> run_agent.py:356:9
    |
354 |         self._base_url_hostname = base_url_hostname(value)
355 |
356 |     def __init__(
    |         ^^^^^^^^
357 |         self,
358 |         base_url: str = None,
    |
   ::: run_agent.py:379:9
    |
377 |         log_prefix: str = "",
378 |         providers_allowed: List[str] = None,
379 |         providers_ignored: List[str] = None,
    |         ----------------------------------- Parameter declared here
380 |         providers_order: List[str] = None,
381 |         provider_sort: str = None,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
     --> gateway/run.py:11196:21
      |
11194 |                     providers_allowed=pr.get("only"),
11195 |                     providers_ignored=pr.get("ignore"),
11196 |                     providers_order=pr.get("order"),
      |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `list[str]`, found `Unknown | None`
11197 |                     provider_sort=pr.get("sort"),
11198 |                     provider_require_parameters=pr.get("require_parameters", False),
      |
info: Element `None` of this union is not assignable to `list[str]`
info: Method defined here
   --> run_agent.py:356:9
    |
354 |         self._base_url_hostname = base_url_hostname(value)
355 |
356 |     def __init__(
    |         ^^^^^^^^
357 |         self,
358 |         base_url: str = None,
    |
   ::: run_agent.py:380:9
    |
378 |         providers_allowed: List[str] = None,
379 |         providers_ignored: List[str] = None,
380 |         providers_order: List[str] = None,
    |         --------------------------------- Parameter declared here
381 |         provider_sort: str = None,
382 |         provider_require_parameters: bool = False,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
     --> gateway/run.py:11197:21
      |
11195 |                     providers_ignored=pr.get("ignore"),
11196 |                     providers_order=pr.get("order"),
11197 |                     provider_sort=pr.get("sort"),
      |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `Unknown | None`
11198 |                     provider_require_parameters=pr.get("require_parameters", False),
11199 |                     provider_data_collection=pr.get("data_collection"),
      |
info: Element `None` of this union is not assignable to `str`
info: Method defined here
   --> run_agent.py:356:9
    |
354 |         self._base_url_hostname = base_url_hostname(value)
355 |
356 |     def __init__(
    |         ^^^^^^^^
357 |         self,
358 |         base_url: str = None,
    |
   ::: run_agent.py:381:9
    |
379 |         providers_ignored: List[str] = None,
380 |         providers_order: List[str] = None,
381 |         provider_sort: str = None,
    |         ------------------------- Parameter declared here
382 |         provider_require_parameters: bool = False,
383 |         provider_data_collection: str = None,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
     --> gateway/run.py:11199:21
      |
11197 |                     provider_sort=pr.get("sort"),
11198 |                     provider_require_parameters=pr.get("require_parameters", False),
11199 |                     provider_data_collection=pr.get("data_collection"),
      |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `Unknown | None`
11200 |                     session_id=task_id,
11201 |                     platform=platform_key,
      |
info: Element `None` of this union is not assignable to `str`
info: Method defined here
   --> run_agent.py:356:9
    |
354 |         self._base_url_hostname = base_url_hostname(value)
355 |
356 |     def __init__(
    |         ^^^^^^^^
357 |         self,
358 |         base_url: str = None,
    |
   ::: run_agent.py:383:9
    |
381 |         provider_sort: str = None,
382 |         provider_require_parameters: bool = False,
383 |         provider_data_collection: str = None,
    |         ------------------------------------ Parameter declared here
384 |         openrouter_min_coding_score: Optional[float] = None,
385 |         session_id: str = None,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
     --> gateway/run.py:11202:21
      |
11200 |                     session_id=task_id,
11201 |                     platform=platform_key,
11202 |                     user_id=source.user_id,
      |                     ^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `str | None`
11203 |                     user_id_alt=source.user_id_alt,
11204 |                     user_name=source.user_name,
      |
info: Element `None` of this union is not assignable to `str`
info: Method defined here
   --> run_agent.py:356:9
    |
354 |         self._base_url_hostname = base_url_hostname(value)
355 |
356 |     def __init__(
    |         ^^^^^^^^
357 |         self,
358 |         base_url: str = None,
    |
   ::: run_agent.py:407:9
    |
405 |         prefill_messages: List[Dict[str, Any]] = None,
406 |         platform: str = None,
407 |         user_id: str = None,
    |         ------------------- Parameter declared here
408 |         user_id_alt: str = None,
409 |         user_name: str = None,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
     --> gateway/run.py:11203:21
      |
11201 |                     platform=platform_key,
11202 |                     user_id=source.user_id,
11203 |                     user_id_alt=source.user_id_alt,
      |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `str | None`
11204 |                     user_name=source.user_name,
11205 |                     chat_id=source.chat_id,
      |
info: Element `None` of this union is not assignable to `str`
info: Method defined here
   --> run_agent.py:356:9
    |
354 |         self._base_url_hostname = base_url_hostname(value)
355 |
356 |     def __init__(
    |         ^^^^^^^^
357 |         self,
358 |         base_url: str = None,
    |
   ::: run_agent.py:408:9
    |
406 |         platform: str = None,
407 |         user_id: str = None,
408 |         user_id_alt: str = None,
    |         ----------------------- Parameter declared here
409 |         user_name: str = None,
410 |         chat_id: str = None,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
     --> gateway/run.py:11204:21
      |
11202 |                     user_id=source.user_id,
11203 |                     user_id_alt=source.user_id_alt,
11204 |                     user_name=source.user_name,
      |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `str | None`
11205 |                     chat_id=source.chat_id,
11206 |                     chat_name=source.chat_name,
      |
info: Element `None` of this union is not assignable to `str`
info: Method defined here
   --> run_agent.py:356:9
    |
354 |         self._base_url_hostname = base_url_hostname(value)
355 |
356 |     def __init__(
    |         ^^^^^^^^
357 |         self,
358 |         base_url: str = None,
    |
   ::: run_agent.py:409:9
    |
407 |         user_id: str = None,
408 |         user_id_alt: str = None,
409 |         user_name: str = None,
    |         --------------------- Parameter declared here
410 |         chat_id: str = None,
411 |         chat_name: str = None,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
     --> gateway/run.py:11206:21
      |
11204 |                     user_name=source.user_name,
11205 |                     chat_id=source.chat_id,
11206 |                     chat_name=source.chat_name,
      |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `str | None`
11207 |                     chat_type=source.chat_type,
11208 |                     thread_id=source.thread_id,
      |
info: Element `None` of this union is not assignable to `str`
info: Method defined here
   --> run_agent.py:356:9
    |
354 |         self._base_url_hostname = base_url_hostname(value)
355 |
356 |     def __init__(
    |         ^^^^^^^^
357 |         self,
358 |         base_url: str = None,
    |
   ::: run_agent.py:411:9
    |
409 |         user_name: str = None,
410 |         chat_id: str = None,
411 |         chat_name: str = None,
    |         --------------------- Parameter declared here
412 |         chat_type: str = None,
413 |         thread_id: str = None,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
     --> gateway/run.py:11208:21
      |
11206 |                     chat_name=source.chat_name,
11207 |                     chat_type=source.chat_type,
11208 |                     thread_id=source.thread_id,
      |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `str | None`
11209 |                     session_db=self._session_db,
11210 |                     fallback_model=self._fallback_model,
      |
info: Element `None` of this union is not assignable to `str`
info: Method defined here
   --> run_agent.py:356:9
    |
354 |         self._base_url_hostname = base_url_hostname(value)
355 |
356 |     def __init__(
    |         ^^^^^^^^
357 |         self,
358 |         base_url: str = None,
    |
   ::: run_agent.py:413:9
    |
411 |         chat_name: str = None,
412 |         chat_type: str = None,
413 |         thread_id: str = None,
    |         --------------------- Parameter declared here
414 |         gateway_session_key: str = None,
415 |         skip_context_files: bool = False,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
     --> gateway/run.py:11210:21
      |
11208 |                     thread_id=source.thread_id,
11209 |                     session_db=self._session_db,
11210 |                     fallback_model=self._fallback_model,
      |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `dict[str, Any]`, found `Unknown | list[Unknown] | None`
11211 |                 )
11212 |                 try:
      |
info: Union elements `list[Unknown]` and `None` are not assignable to `dict[str, Any]`
info: Method defined here
   --> run_agent.py:356:9
    |
354 |         self._base_url_hostname = base_url_hostname(value)
355 |
356 |     def __init__(
    |         ^^^^^^^^
357 |         self,
358 |         base_url: str = None,
    |
   ::: run_agent.py:421:9
    |
419 |         parent_session_id: str = None,
420 |         iteration_budget: "IterationBudget" = None,
421 |         fallback_model: Dict[str, Any] = None,
    |         ------------------------------------- Parameter declared here
422 |         credential_pool=None,
423 |         checkpoints_enabled: bool = False,
    |
info: rule `invalid-argument-type` is enabled by default

error[unresolved-attribute]: Attribute `list_unlinked_telegram_sessions_for_user` is not defined on `None` in union `Unknown | None | SessionDB`
     --> gateway/run.py:11656:24
      |
11654 |         ]
11655 |         try:
11656 |             sessions = self._session_db.list_unlinked_telegram_sessions_for_user(
      |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11657 |                 chat_id=str(source.chat_id),
11658 |                 user_id=str(source.user_id),
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `resolve_session_id` is not defined on `None` in union `Unknown | None | SessionDB`
     --> gateway/run.py:11695:22
      |
11693 |         """Restore an existing Telegram-owned Hermes session into this topic."""
11694 |         source = event.source
11695 |         session_id = self._session_db.resolve_session_id(raw_session_id.strip())
      |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11696 |         if not session_id:
11697 |             return f"Session not found: {raw_session_id.strip()}"
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `get_session` is not defined on `None` in union `Unknown | None | SessionDB`
     --> gateway/run.py:11699:19
      |
11697 |             return f"Session not found: {raw_session_id.strip()}"
11698 |
11699 |         session = self._session_db.get_session(session_id)
      |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11700 |         if not session:
11701 |             return f"Session not found: {raw_session_id.strip()}"
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `is_telegram_session_linked_to_topic` is not defined on `None` in union `Unknown | None | SessionDB`
     --> gateway/run.py:11707:18
      |
11705 |             return "That session does not belong to this Telegram user."
11706 |
11707 |         linked = self._session_db.is_telegram_session_linked_to_topic(session_id=session_id)
      |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11708 |         current_binding = self._session_db.get_telegram_topic_binding(
11709 |             chat_id=str(source.chat_id),
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `get_telegram_topic_binding` is not defined on `None` in union `Unknown | None | SessionDB`
     --> gateway/run.py:11708:27
      |
11707 |         linked = self._session_db.is_telegram_session_linked_to_topic(session_id=session_id)
11708 |         current_binding = self._session_db.get_telegram_topic_binding(
      |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11709 |             chat_id=str(source.chat_id),
11710 |             thread_id=str(source.thread_id),
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `bind_telegram_topic` is not defined on `None` in union `Unknown | None | SessionDB`
     --> gateway/run.py:11718:13
      |
11716 |         session_key = self._session_key_for_source(source)
11717 |         try:
11718 |             self._session_db.bind_telegram_topic(
      |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11719 |                 chat_id=str(source.chat_id),
11720 |                 thread_id=str(source.thread_id),
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `get_session_title` is not defined on `None` in union `Unknown | None | SessionDB`
     --> gateway/run.py:11731:17
      |
11729 |             raise
11730 |
11731 |         title = self._session_db.get_session_title(session_id) or session_id
      |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11732 |         last_assistant = None
11733 |         try:
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `get_messages` is not defined on `None` in union `Unknown | None | SessionDB`
     --> gateway/run.py:11734:37
      |
11732 |         last_assistant = None
11733 |         try:
11734 |             for message in reversed(self._session_db.get_messages(session_id)):
      |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11735 |                 if message.get("role") == "assistant" and message.get("content"):
11736 |                     last_assistant = str(message.get("content"))
      |
info: rule `unresolved-attribute` is enabled by default

error[no-matching-overload]: No overload of bound method `pop` matches arguments
     --> gateway/run.py:12311:17
      |
12309 |                     p.unlink(missing_ok=True)
12310 |                 (_hermes_home / ".update_response").unlink(missing_ok=True)
12311 |                 self._update_prompt_pending.pop(session_key, None)
      |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12312 |                 return
      |
info: First overload defined here
    --> stdlib/builtins.pyi:3023:9
     |
3021 |     def get(self, key: _KT, default: _T, /) -> _VT | _T: ...
3022 |     @overload
3023 |     def pop(self, key: _KT, /) -> _VT:
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3024 |         """D.pop(k[,d]) -> v, remove specified key and return the corresponding value.
     |
info: Possible overloads for bound method `pop`:
info:   (self, key: _KT@dict, /) -> _VT@dict
info:   (self, key: _KT@dict, default: _VT@dict, /) -> _VT@dict
info:   [_T](self, key: _KT@dict, default: _T, /) -> _VT@dict | _T
info: rule `no-matching-overload` is enabled by default

error[unresolved-attribute]: Object of type `BasePlatformAdapter & ~AlwaysFalsy` has no attribute `send_update_prompt`
     --> gateway/run.py:12346:39
      |
12344 |                         if getattr(type(adapter), "send_update_prompt", None) is not None:
12345 |                             try:
12346 |                                 await adapter.send_update_prompt(
      |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^
12347 |                                     chat_id=chat_id,
12348 |                                     prompt=prompt_text,
      |
info: rule `unresolved-attribute` is enabled by default

error[no-matching-overload]: No overload of bound method `pop` matches arguments
     --> gateway/run.py:12397:13
      |
12395 |                 p.unlink(missing_ok=True)
12396 |             (_hermes_home / ".update_response").unlink(missing_ok=True)
12397 |             self._update_prompt_pending.pop(session_key, None)
      |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12398 |
12399 |     async def _send_update_notification(self) -> bool:
      |
info: First overload defined here
    --> stdlib/builtins.pyi:3023:9
     |
3021 |     def get(self, key: _KT, default: _T, /) -> _VT | _T: ...
3022 |     @overload
3023 |     def pop(self, key: _KT, /) -> _VT:
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3024 |         """D.pop(k[,d]) -> v, remove specified key and return the corresponding value.
     |
info: Possible overloads for bound method `pop`:
info:   (self, key: _KT@dict, /) -> _VT@dict
info:   (self, key: _KT@dict, default: _VT@dict, /) -> _VT@dict
info:   [_T](self, key: _KT@dict, default: _T, /) -> _VT@dict | _T
info: rule `no-matching-overload` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to `<module 'tools.slash_confirm'>`
     --> gateway/run.py:13585:13
      |
13583 |             from tools import slash_confirm as _slash_confirm_mod
13584 |         except Exception:
13585 |             _slash_confirm_mod = None
      |             ------------------   ^^^^ Incompatible value of type `None`
      |             |
      |             Declared type `<module 'tools.slash_confirm'>`
13586 |         if _slash_confirm_mod is not None:
13587 |             try:
      |
info: rule `invalid-assignment` is enabled by default

error[invalid-parameter-default]: Default value of type `None` is not assignable to annotated parameter type `str`
     --> gateway/run.py:14006:9
      |
14004 |         source: "SessionSource",
14005 |         session_id: str,
14006 |         session_key: str = None,
      |         ^^^^^^^^^^^^^^^^^^^^^^^
14007 |         run_generation: Optional[int] = None,
14008 |         event_message_id: Optional[str] = None,
      |
info: rule `invalid-parameter-default` is enabled by default

error[invalid-parameter-default]: Default value of type `None` is not assignable to annotated parameter type `str`
     --> gateway/run.py:14292:9
      |
14290 |         source: SessionSource,
14291 |         session_id: str,
14292 |         session_key: str = None,
      |         ^^^^^^^^^^^^^^^^^^^^^^^
14293 |         run_generation: Optional[int] = None,
14294 |         _interrupt_depth: int = 0,
      |
info: rule `invalid-parameter-default` is enabled by default

error[invalid-parameter-default]: Default value of type `None` is not assignable to annotated parameter type `str`
     --> gateway/run.py:14350:9
      |
14348 |         source: SessionSource,
14349 |         session_id: str,
14350 |         session_key: str = None,
      |         ^^^^^^^^^^^^^^^^^^^^^^^
14351 |         run_generation: Optional[int] = None,
14352 |         _interrupt_depth: int = 0,
      |
info: rule `invalid-parameter-default` is enabled by default

error[call-non-callable]: Object of type `object` is not callable
     --> gateway/run.py:14500:60
      |
14498 |             if isinstance(_vtc, dict) and hasattr(_va, "voice_mixer_active"):
14499 |                 for _gid, _tc in _vtc.items():
14500 |                     if str(_tc) == str(source.chat_id) and _va.voice_mixer_active(_gid):
      |                                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14501 |                         _voice_ack_guild[0] = _gid
14502 |                         break
      |
info: rule `call-non-callable` is enabled by default

error[call-non-callable]: Object of type `object` is not callable
     --> gateway/run.py:14517:21
      |
14515 |             try:
14516 |                 safe_schedule_threadsafe(
14517 |                     _adapter.play_ack_in_voice(_voice_ack_guild[0]),
      |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14518 |                     _voice_ack_loop,
14519 |                     logger=logger,
      |
info: rule `call-non-callable` is enabled by default

error[invalid-parameter-default]: Default value of type `None` is not assignable to annotated parameter type `str`
     --> gateway/run.py:14547:48
      |
14545 |         _LONG_TOOL_THRESHOLD_S = 30.0
14546 |
14547 |         def progress_callback(event_type: str, tool_name: str = None, preview: str = None, args: dict = None, **kwargs):
      |                                                ^^^^^^^^^^^^^^^^^^^^^
14548 |             """Callback invoked by agent on tool lifecycle events."""
14549 |             if not progress_queue or not _run_still_current():
      |
info: rule `invalid-parameter-default` is enabled by default

error[invalid-parameter-default]: Default value of type `None` is not assignable to annotated parameter type `str`
     --> gateway/run.py:14547:71
      |
14545 |         _LONG_TOOL_THRESHOLD_S = 30.0
14546 |
14547 |         def progress_callback(event_type: str, tool_name: str = None, preview: str = None, args: dict = None, **kwargs):
      |                                                                       ^^^^^^^^^^^^^^^^^^^
14548 |             """Callback invoked by agent on tool lifecycle events."""
14549 |             if not progress_queue or not _run_still_current():
      |
info: rule `invalid-parameter-default` is enabled by default

error[invalid-parameter-default]: Default value of type `None` is not assignable to annotated parameter type `dict[Unknown, Unknown]`
     --> gateway/run.py:14547:92
      |
14545 |         _LONG_TOOL_THRESHOLD_S = 30.0
14546 |
14547 |         def progress_callback(event_type: str, tool_name: str = None, preview: str = None, args: dict = None, **kwargs):
      |                                                                                            ^^^^^^^^^^^^^^^^^
14548 |             """Callback invoked by agent on tool lifecycle events."""
14549 |             if not progress_queue or not _run_still_current():
      |
info: rule `invalid-parameter-default` is enabled by default

error[invalid-assignment]: Invalid subscript assignment with key of type `Literal[0]` and value of type `str & ~Literal["_thinking"]` on object of type `list[None]`
     --> gateway/run.py:14623:13
      |
14621 |             if progress_mode == "new" and tool_name == last_tool[0]:
14622 |                 return
14623 |             last_tool[0] = tool_name
      |             ^^^^^^^^^^^^^^^^^^^^^^^^
14624 |             
14625 |             # Build progress message with primary argument preview
      |
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Invalid subscript assignment with key of type `Literal[0]` and value of type `str` on object of type `list[None]`
     --> gateway/run.py:14729:13
      |
14727 |                 progress_queue.put(("__dedup__", msg, repeat_count[0]))
14728 |                 return
14729 |             last_progress_msg[0] = msg
      |             ^^^^^^^^^^^^^^^^^^^^^^^^^^
14730 |             repeat_count[0] = 0
      |
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Invalid subscript assignment with key of type `Literal["finalize"]` and value of type `Literal[True]` on object of type `dict[str, str]`
     --> gateway/run.py:14823:21
      |
14821 |                 }
14822 |                 if getattr(adapter, "REQUIRES_EDIT_FINALIZE", False):
14823 |                     kwargs["finalize"] = True
      |                     ^^^^^^^^^^^^^^^^^^^^^----
      |                                          |
      |                                          Expected value of type `str`, got `Literal[True]`
14824 |                 if _edit_accepts_metadata:
14825 |                     kwargs["metadata"] = _progress_metadata
      |
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Invalid subscript assignment with key of type `Literal["metadata"]` and value of type `dict[str, Any] | None` on object of type `dict[str, str]`
     --> gateway/run.py:14825:21
      |
14823 |                     kwargs["finalize"] = True
14824 |                 if _edit_accepts_metadata:
14825 |                     kwargs["metadata"] = _progress_metadata
      |                     ^^^^^^^^^^^^^^^^^^^^^------------------
      |                                          |
      |                                          Expected value of type `str`, got `dict[str, Any] | None`
14826 |                 return await adapter.edit_message(**kwargs)
      |
info: rule `invalid-assignment` is enabled by default

error[invalid-argument-type]: Argument to bound method `edit_message` is incorrect
     --> gateway/run.py:14826:51
      |
14824 |                 if _edit_accepts_metadata:
14825 |                     kwargs["metadata"] = _progress_metadata
14826 |                 return await adapter.edit_message(**kwargs)
      |                                                   ^^^^^^^^ Expected `bool`, found `str`
14827 |
14828 |             def _progress_text(lines: list) -> str:
      |
info: Method defined here
    --> gateway/platforms/base.py:2372:15
     |
2372 |     async def edit_message(
     |               ^^^^^^^^^^^^
2373 |         self,
2374 |         chat_id: str,
     |
    ::: gateway/platforms/base.py:2378:9
     |
2376 |         content: str,
2377 |         *,
2378 |         finalize: bool = False,
     |         ---------------------- Parameter declared here
2379 |     ) -> SendResult:
2380 |         """
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-assignment]: Invalid subscript assignment with key of type `Literal[0]` and value of type `GatewayStreamConsumer` on object of type `list[None]`
     --> gateway/run.py:15318:25
      |
15316 |                                 if _run_still_current():
15317 |                                     _stream_consumer.on_delta(text)
15318 |                         stream_consumer_holder[0] = _stream_consumer
      |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15319 |                 except Exception as _sc_err:
15320 |                     logger.debug("Could not set up stream consumer: %s", _sc_err)
      |
info: rule `invalid-assignment` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
     --> gateway/run.py:15425:21
      |
15423 |                     verbose_logging=False,
15424 |                     enabled_toolsets=enabled_toolsets,
15425 |                     disabled_toolsets=disabled_toolsets,
      |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `list[str]`, found `(Unknown & ~AlwaysFalsy) | None`
15426 |                     ephemeral_system_prompt=combined_ephemeral or None,
15427 |                     prefill_messages=self._prefill_messages or None,
      |
info: Element `None` of this union is not assignable to `list[str]`
info: Method defined here
   --> run_agent.py:356:9
    |
354 |         self._base_url_hostname = base_url_hostname(value)
355 |
356 |     def __init__(
    |         ^^^^^^^^
357 |         self,
358 |         base_url: str = None,
    |
   ::: run_agent.py:370:9
    |
368 |         tool_delay: float = 1.0,
369 |         enabled_toolsets: List[str] = None,
370 |         disabled_toolsets: List[str] = None,
    |         ----------------------------------- Parameter declared here
371 |         save_trajectories: bool = False,
372 |         verbose_logging: bool = False,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
     --> gateway/run.py:15426:21
      |
15424 |                     enabled_toolsets=enabled_toolsets,
15425 |                     disabled_toolsets=disabled_toolsets,
15426 |                     ephemeral_system_prompt=combined_ephemeral or None,
      |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `(str & ~AlwaysFalsy) | None`
15427 |                     prefill_messages=self._prefill_messages or None,
15428 |                     reasoning_config=reasoning_config,
      |
info: Element `None` of this union is not assignable to `str`
info: Method defined here
   --> run_agent.py:356:9
    |
354 |         self._base_url_hostname = base_url_hostname(value)
355 |
356 |     def __init__(
    |         ^^^^^^^^
357 |         self,
358 |         base_url: str = None,
    |
   ::: run_agent.py:375:9
    |
373 |         quiet_mode: bool = False,
374 |         tool_progress_mode: str = "all",
375 |         ephemeral_system_prompt: str = None,
    |         ----------------------------------- Parameter declared here
376 |         log_prefix_chars: int = 100,
377 |         log_prefix: str = "",
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
     --> gateway/run.py:15427:21
      |
15425 |                     disabled_toolsets=disabled_toolsets,
15426 |                     ephemeral_system_prompt=combined_ephemeral or None,
15427 |                     prefill_messages=self._prefill_messages or None,
      |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `list[dict[str, Any]]`, found `(Unknown & ~AlwaysFalsy) | (list[dict[str, Any]] & ~AlwaysFalsy) | None`
15428 |                     reasoning_config=reasoning_config,
15429 |                     service_tier=self._service_tier,
      |
info: Element `None` of this union is not assignable to `list[dict[str, Any]]`
info: Method defined here
   --> run_agent.py:356:9
    |
354 |         self._base_url_hostname = base_url_hostname(value)
355 |
356 |     def __init__(
    |         ^^^^^^^^
357 |         self,
358 |         base_url: str = None,
    |
   ::: run_agent.py:405:9
    |
403 |         service_tier: str = None,
404 |         request_overrides: Dict[str, Any] = None,
405 |         prefill_messages: List[Dict[str, Any]] = None,
    |         --------------------------------------------- Parameter declared here
406 |         platform: str = None,
407 |         user_id: str = None,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
     --> gateway/run.py:15428:21
      |
15426 |                     ephemeral_system_prompt=combined_ephemeral or None,
15427 |                     prefill_messages=self._prefill_messages or None,
15428 |                     reasoning_config=reasoning_config,
      |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `dict[str, Any]`, found `dict[Unknown, Unknown] | None`
15429 |                     service_tier=self._service_tier,
15430 |                     request_overrides=turn_route.get("request_overrides"),
      |
info: Element `None` of this union is not assignable to `dict[str, Any]`
info: Method defined here
   --> run_agent.py:356:9
    |
354 |         self._base_url_hostname = base_url_hostname(value)
355 |
356 |     def __init__(
    |         ^^^^^^^^
357 |         self,
358 |         base_url: str = None,
    |
   ::: run_agent.py:402:9
    |
400 |         event_callback: Optional[Callable[[str, dict], None]] = None,
401 |         max_tokens: int = None,
402 |         reasoning_config: Dict[str, Any] = None,
    |         --------------------------------------- Parameter declared here
403 |         service_tier: str = None,
404 |         request_overrides: Dict[str, Any] = None,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
     --> gateway/run.py:15429:21
      |
15427 |                     prefill_messages=self._prefill_messages or None,
15428 |                     reasoning_config=reasoning_config,
15429 |                     service_tier=self._service_tier,
      |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `str | None`
15430 |                     request_overrides=turn_route.get("request_overrides"),
15431 |                     providers_allowed=pr.get("only"),
      |
info: Element `None` of this union is not assignable to `str`
info: Method defined here
   --> run_agent.py:356:9
    |
354 |         self._base_url_hostname = base_url_hostname(value)
355 |
356 |     def __init__(
    |         ^^^^^^^^
357 |         self,
358 |         base_url: str = None,
    |
   ::: run_agent.py:403:9
    |
401 |         max_tokens: int = None,
402 |         reasoning_config: Dict[str, Any] = None,
403 |         service_tier: str = None,
    |         ------------------------ Parameter declared here
404 |         request_overrides: Dict[str, Any] = None,
405 |         prefill_messages: List[Dict[str, Any]] = None,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
     --> gateway/run.py:15430:21
      |
15428 |                     reasoning_config=reasoning_config,
15429 |                     service_tier=self._service_tier,
15430 |                     request_overrides=turn_route.get("request_overrides"),
      |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `dict[str, Any]`, found `Unknown | None`
15431 |                     providers_allowed=pr.get("only"),
15432 |                     providers_ignored=pr.get("ignore"),
      |
info: Element `None` of this union is not assignable to `dict[str, Any]`
info: Method defined here
   --> run_agent.py:356:9
    |
354 |         self._base_url_hostname = base_url_hostname(value)
355 |
356 |     def __init__(
    |         ^^^^^^^^
357 |         self,
358 |         base_url: str = None,
    |
   ::: run_agent.py:404:9
    |
402 |         reasoning_config: Dict[str, Any] = None,
403 |         service_tier: str = None,
404 |         request_overrides: Dict[str, Any] = None,
    |         ---------------------------------------- Parameter declared here
405 |         prefill_messages: List[Dict[str, Any]] = None,
406 |         platform: str = None,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
     --> gateway/run.py:15431:21
      |
15429 |                     service_tier=self._service_tier,
15430 |                     request_overrides=turn_route.get("request_overrides"),
15431 |                     providers_allowed=pr.get("only"),
      |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `list[str]`, found `Unknown | None`
15432 |                     providers_ignored=pr.get("ignore"),
15433 |                     providers_order=pr.get("order"),
      |
info: Element `None` of this union is not assignable to `list[str]`
info: Method defined here
   --> run_agent.py:356:9
    |
354 |         self._base_url_hostname = base_url_hostname(value)
355 |
356 |     def __init__(
    |         ^^^^^^^^
357 |         self,
358 |         base_url: str = None,
    |
   ::: run_agent.py:378:9
    |
376 |         log_prefix_chars: int = 100,
377 |         log_prefix: str = "",
378 |         providers_allowed: List[str] = None,
    |         ----------------------------------- Parameter declared here
379 |         providers_ignored: List[str] = None,
380 |         providers_order: List[str] = None,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
     --> gateway/run.py:15432:21
      |
15430 |                     request_overrides=turn_route.get("request_overrides"),
15431 |                     providers_allowed=pr.get("only"),
15432 |                     providers_ignored=pr.get("ignore"),
      |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `list[str]`, found `Unknown | None`
15433 |                     providers_order=pr.get("order"),
15434 |                     provider_sort=pr.get("sort"),
      |
info: Element `None` of this union is not assignable to `list[str]`
info: Method defined here
   --> run_agent.py:356:9
    |
354 |         self._base_url_hostname = base_url_hostname(value)
355 |
356 |     def __init__(
    |         ^^^^^^^^
357 |         self,
358 |         base_url: str = None,
    |
   ::: run_agent.py:379:9
    |
377 |         log_prefix: str = "",
378 |         providers_allowed: List[str] = None,
379 |         providers_ignored: List[str] = None,
    |         ----------------------------------- Parameter declared here
380 |         providers_order: List[str] = None,
381 |         provider_sort: str = None,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
     --> gateway/run.py:15433:21
      |
15431 |                     providers_allowed=pr.get("only"),
15432 |                     providers_ignored=pr.get("ignore"),
15433 |                     providers_order=pr.get("order"),
      |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `list[str]`, found `Unknown | None`
15434 |                     provider_sort=pr.get("sort"),
15435 |                     provider_require_parameters=pr.get("require_parameters", False),
      |
info: Element `None` of this union is not assignable to `list[str]`
info: Method defined here
   --> run_agent.py:356:9
    |
354 |         self._base_url_hostname = base_url_hostname(value)
355 |
356 |     def __init__(
    |         ^^^^^^^^
357 |         self,
358 |         base_url: str = None,
    |
   ::: run_agent.py:380:9
    |
378 |         providers_allowed: List[str] = None,
379 |         providers_ignored: List[str] = None,
380 |         providers_order: List[str] = None,
    |         --------------------------------- Parameter declared here
381 |         provider_sort: str = None,
382 |         provider_require_parameters: bool = False,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
     --> gateway/run.py:15434:21
      |
15432 |                     providers_ignored=pr.get("ignore"),
15433 |                     providers_order=pr.get("order"),
15434 |                     provider_sort=pr.get("sort"),
      |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `Unknown | None`
15435 |                     provider_require_parameters=pr.get("require_parameters", False),
15436 |                     provider_data_collection=pr.get("data_collection"),
      |
info: Element `None` of this union is not assignable to `str`
info: Method defined here
   --> run_agent.py:356:9
    |
354 |         self._base_url_hostname = base_url_hostname(value)
355 |
356 |     def __init__(
    |         ^^^^^^^^
357 |         self,
358 |         base_url: str = None,
    |
   ::: run_agent.py:381:9
    |
379 |         providers_ignored: List[str] = None,
380 |         providers_order: List[str] = None,
381 |         provider_sort: str = None,
    |         ------------------------- Parameter declared here
382 |         provider_require_parameters: bool = False,
383 |         provider_data_collection: str = None,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
     --> gateway/run.py:15436:21
      |
15434 |                     provider_sort=pr.get("sort"),
15435 |                     provider_require_parameters=pr.get("require_parameters", False),
15436 |                     provider_data_collection=pr.get("data_collection"),
      |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `Unknown | None`
15437 |                     session_id=session_id,
15438 |                     platform=platform_key,
      |
info: Element `None` of this union is not assignable to `str`
info: Method defined here
   --> run_agent.py:356:9
    |
354 |         self._base_url_hostname = base_url_hostname(value)
355 |
356 |     def __init__(
    |         ^^^^^^^^
357 |         self,
358 |         base_url: str = None,
    |
   ::: run_agent.py:383:9
    |
381 |         provider_sort: str = None,
382 |         provider_require_parameters: bool = False,
383 |         provider_data_collection: str = None,
    |         ------------------------------------ Parameter declared here
384 |         openrouter_min_coding_score: Optional[float] = None,
385 |         session_id: str = None,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
     --> gateway/run.py:15439:21
      |
15437 |                     session_id=session_id,
15438 |                     platform=platform_key,
15439 |                     user_id=source.user_id,
      |                     ^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `str | None`
15440 |                     user_id_alt=source.user_id_alt,
15441 |                     user_name=source.user_name,
      |
info: Element `None` of this union is not assignable to `str`
info: Method defined here
   --> run_agent.py:356:9
    |
354 |         self._base_url_hostname = base_url_hostname(value)
355 |
356 |     def __init__(
    |         ^^^^^^^^
357 |         self,
358 |         base_url: str = None,
    |
   ::: run_agent.py:407:9
    |
405 |         prefill_messages: List[Dict[str, Any]] = None,
406 |         platform: str = None,
407 |         user_id: str = None,
    |         ------------------- Parameter declared here
408 |         user_id_alt: str = None,
409 |         user_name: str = None,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
     --> gateway/run.py:15440:21
      |
15438 |                     platform=platform_key,
15439 |                     user_id=source.user_id,
15440 |                     user_id_alt=source.user_id_alt,
      |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `str | None`
15441 |                     user_name=source.user_name,
15442 |                     chat_id=source.chat_id,
      |
info: Element `None` of this union is not assignable to `str`
info: Method defined here
   --> run_agent.py:356:9
    |
354 |         self._base_url_hostname = base_url_hostname(value)
355 |
356 |     def __init__(
    |         ^^^^^^^^
357 |         self,
358 |         base_url: str = None,
    |
   ::: run_agent.py:408:9
    |
406 |         platform: str = None,
407 |         user_id: str = None,
408 |         user_id_alt: str = None,
    |         ----------------------- Parameter declared here
409 |         user_name: str = None,
410 |         chat_id: str = None,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
     --> gateway/run.py:15441:21
      |
15439 |                     user_id=source.user_id,
15440 |                     user_id_alt=source.user_id_alt,
15441 |                     user_name=source.user_name,
      |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `str | None`
15442 |                     chat_id=source.chat_id,
15443 |                     chat_name=source.chat_name,
      |
info: Element `None` of this union is not assignable to `str`
info: Method defined here
   --> run_agent.py:356:9
    |
354 |         self._base_url_hostname = base_url_hostname(value)
355 |
356 |     def __init__(
    |         ^^^^^^^^
357 |         self,
358 |         base_url: str = None,
    |
   ::: run_agent.py:409:9
    |
407 |         user_id: str = None,
408 |         user_id_alt: str = None,
409 |         user_name: str = None,
    |         --------------------- Parameter declared here
410 |         chat_id: str = None,
411 |         chat_name: str = None,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
     --> gateway/run.py:15443:21
      |
15441 |                     user_name=source.user_name,
15442 |                     chat_id=source.chat_id,
15443 |                     chat_name=source.chat_name,
      |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `str | None`
15444 |                     chat_type=source.chat_type,
15445 |                     thread_id=source.thread_id,
      |
info: Element `None` of this union is not assignable to `str`
info: Method defined here
   --> run_agent.py:356:9
    |
354 |         self._base_url_hostname = base_url_hostname(value)
355 |
356 |     def __init__(
    |         ^^^^^^^^
357 |         self,
358 |         base_url: str = None,
    |
   ::: run_agent.py:411:9
    |
409 |         user_name: str = None,
410 |         chat_id: str = None,
411 |         chat_name: str = None,
    |         --------------------- Parameter declared here
412 |         chat_type: str = None,
413 |         thread_id: str = None,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
     --> gateway/run.py:15445:21
      |
15443 |                     chat_name=source.chat_name,
15444 |                     chat_type=source.chat_type,
15445 |                     thread_id=source.thread_id,
      |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `str | None`
15446 |                     gateway_session_key=session_key,
15447 |                     session_db=self._session_db,
      |
info: Element `None` of this union is not assignable to `str`
info: Method defined here
   --> run_agent.py:356:9
    |
354 |         self._base_url_hostname = base_url_hostname(value)
355 |
356 |     def __init__(
    |         ^^^^^^^^
357 |         self,
358 |         base_url: str = None,
    |
   ::: run_agent.py:413:9
    |
411 |         chat_name: str = None,
412 |         chat_type: str = None,
413 |         thread_id: str = None,
    |         --------------------- Parameter declared here
414 |         gateway_session_key: str = None,
415 |         skip_context_files: bool = False,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `__init__` is incorrect
     --> gateway/run.py:15448:21
      |
15446 |                     gateway_session_key=session_key,
15447 |                     session_db=self._session_db,
15448 |                     fallback_model=self._fallback_model,
      |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `dict[str, Any]`, found `Unknown | list[Unknown] | None`
15449 |                 )
15450 |                 if _cache_lock and _cache is not None:
      |
info: Union elements `list[Unknown]` and `None` are not assignable to `dict[str, Any]`
info: Method defined here
   --> run_agent.py:356:9
    |
354 |         self._base_url_hostname = base_url_hostname(value)
355 |
356 |     def __init__(
    |         ^^^^^^^^
357 |         self,
358 |         base_url: str = None,
    |
   ::: run_agent.py:421:9
    |
419 |         parent_session_id: str = None,
420 |         iteration_budget: "IterationBudget" = None,
421 |         fallback_model: Dict[str, Any] = None,
    |         ------------------------------------- Parameter declared here
422 |         credential_pool=None,
423 |         checkpoints_enabled: bool = False,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-assignment]: Object of type `(def progress_callback(event_type: str, tool_name: str = None, preview: str = None, args: dict[Unknown, Unknown] = None, **kwargs) -> Unknown) | None` is not assignable to attribute `tool_progress_callback` on type `(Any & ~None) | AIAgent`
     --> gateway/run.py:15458:13
      |
15456 |             # Per-message state — callbacks and reasoning config change every
15457 |             # turn and must not be baked into the cached agent constructor.
15458 |             agent.tool_progress_callback = progress_callback if tool_progress_enabled else None
      |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15459 |             # Discord voice verbal-ack hook (fires once per turn on first tool
15460 |             # call; armed only when in a voice channel with the mixer running).
      |
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `(def voice_ack_callback(call_id, tool_name, args) -> Unknown) | None` is not assignable to attribute `tool_start_callback` on type `(Any & ~None) | AIAgent`
     --> gateway/run.py:15461:13
      |
15459 |             # Discord voice verbal-ack hook (fires once per turn on first tool
15460 |             # call; armed only when in a voice channel with the mixer running).
15461 |             agent.tool_start_callback = (
      |             ^^^^^^^^^^^^^^^^^^^^^^^^^
15462 |                 voice_ack_callback if _voice_ack_guild[0] is not None else None
15463 |             )
      |
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `(def _step_callback_sync(iteration: int, prev_tools: list[Unknown]) -> None) | None` is not assignable to attribute `step_callback` on type `(Any & ~None) | AIAgent`
     --> gateway/run.py:15464:13
      |
15462 |                 voice_ack_callback if _voice_ack_guild[0] is not None else None
15463 |             )
15464 |             agent.step_callback = _step_callback_sync if _hooks_ref.loaded_hooks else None
      |             ^^^^^^^^^^^^^^^^^^^
15465 |             agent.stream_delta_callback = _stream_delta_cb
15466 |             agent.interim_assistant_callback = _interim_assistant_cb if _want_interim_messages else None
      |
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `None | (def _stream_delta_cb(text: str) -> None)` is not assignable to attribute `stream_delta_callback` on type `(Any & ~None) | AIAgent`
     --> gateway/run.py:15465:13
      |
15463 |             )
15464 |             agent.step_callback = _step_callback_sync if _hooks_ref.loaded_hooks else None
15465 |             agent.stream_delta_callback = _stream_delta_cb
      |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
15466 |             agent.interim_assistant_callback = _interim_assistant_cb if _want_interim_messages else None
15467 |             agent.status_callback = _status_callback_sync
      |
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `(def _interim_assistant_cb(text: str, *, already_streamed: bool = False) -> None) | None` is not assignable to attribute `interim_assistant_callback` on type `(Any & ~None) | AIAgent`
     --> gateway/run.py:15466:13
      |
15464 |             agent.step_callback = _step_callback_sync if _hooks_ref.loaded_hooks else None
15465 |             agent.stream_delta_callback = _stream_delta_cb
15466 |             agent.interim_assistant_callback = _interim_assistant_cb if _want_interim_messages else None
      |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15467 |             agent.status_callback = _status_callback_sync
15468 |             # Credits / out-of-band notices (usage bands, depletion, restored).
      |
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `def _status_callback_sync(event_type: str, message: str) -> None` is not assignable to attribute `status_callback` on type `(Any & ~None) | AIAgent`
     --> gateway/run.py:15467:13
      |
15465 |             agent.stream_delta_callback = _stream_delta_cb
15466 |             agent.interim_assistant_callback = _interim_assistant_cb if _want_interim_messages else None
15467 |             agent.status_callback = _status_callback_sync
      |             ^^^^^^^^^^^^^^^^^^^^^
15468 |             # Credits / out-of-band notices (usage bands, depletion, restored).
15469 |             # Messaging has no persistent status bar, so each notice is a
      |
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `def _notice_callback_sync(notice) -> None` is not assignable to attribute `notice_callback` on type `(Any & ~None) | AIAgent`
     --> gateway/run.py:15497:13
      |
15495 |                 )
15496 |
15497 |             agent.notice_callback = _notice_callback_sync
      |             ^^^^^^^^^^^^^^^^^^^^^
15498 |             agent.notice_clear_callback = None
15499 |             agent.event_callback = _event_callback_sync
      |
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `None` is not assignable to attribute `notice_clear_callback` on type `(Any & ~None) | AIAgent`
     --> gateway/run.py:15498:13
      |
15497 |             agent.notice_callback = _notice_callback_sync
15498 |             agent.notice_clear_callback = None
      |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
15499 |             agent.event_callback = _event_callback_sync
15500 |             agent.reasoning_config = reasoning_config
      |
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `def _event_callback_sync(event_type: str, context: dict[Unknown, Unknown]) -> None` is not assignable to attribute `event_callback` on type `(Any & ~None) | AIAgent`
     --> gateway/run.py:15499:13
      |
15497 |             agent.notice_callback = _notice_callback_sync
15498 |             agent.notice_clear_callback = None
15499 |             agent.event_callback = _event_callback_sync
      |             ^^^^^^^^^^^^^^^^^^^^
15500 |             agent.reasoning_config = reasoning_config
15501 |             agent.service_tier = self._service_tier
      |
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `dict[Unknown, Unknown] | None` is not assignable to attribute `reasoning_config` on type `(Any & ~None) | AIAgent`
     --> gateway/run.py:15500:13
      |
15498 |             agent.notice_clear_callback = None
15499 |             agent.event_callback = _event_callback_sync
15500 |             agent.reasoning_config = reasoning_config
      |             ^^^^^^^^^^^^^^^^^^^^^^
15501 |             agent.service_tier = self._service_tier
15502 |             agent.request_overrides = turn_route.get("request_overrides") or {}
      |
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `str | None` is not assignable to attribute `service_tier` on type `(Any & ~None) | AIAgent`
     --> gateway/run.py:15501:13
      |
15499 |             agent.event_callback = _event_callback_sync
15500 |             agent.reasoning_config = reasoning_config
15501 |             agent.service_tier = self._service_tier
      |             ^^^^^^^^^^^^^^^^^^
15502 |             agent.request_overrides = turn_route.get("request_overrides") or {}
      |
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `(Unknown & ~AlwaysFalsy) | dict[Unknown, Unknown]` is not assignable to attribute `request_overrides` on type `(Any & ~None) | AIAgent`
     --> gateway/run.py:15502:13
      |
15500 |             agent.reasoning_config = reasoning_config
15501 |             agent.service_tier = self._service_tier
15502 |             agent.request_overrides = turn_route.get("request_overrides") or {}
      |             ^^^^^^^^^^^^^^^^^^^^^^^
15503 |
15504 |             _bg_review_release = threading.Event()
      |
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `def _bg_review_send(message: str) -> None` is not assignable to attribute `background_review_callback` on type `(Any & ~None) | AIAgent`
     --> gateway/run.py:15541:13
      |
15539 |                 _deliver_bg_review_message(message)
15540 |
15541 |             agent.background_review_callback = _bg_review_send
      |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15542 |             # Register the release hook on the adapter so base.py's finally
15543 |             # block can fire it after delivering the main response.
      |
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `str` is not assignable to attribute `memory_notifications` on type `(Any & ~None) | AIAgent`
     --> gateway/run.py:15562:13
      |
15560 |             if isinstance(_mem_notif, bool):
15561 |                 _mem_notif = "on" if _mem_notif else "off"
15562 |             agent.memory_notifications = str(_mem_notif).lower() if _mem_notif else "on"
      |             ^^^^^^^^^^^^^^^^^^^^^^^^^^
15563 |
15564 |             # ------------------------------------------------------------------
      |
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `def _clarify_callback_sync(question: str, choices) -> str` is not assignable to attribute `clarify_callback` on type `(Any & ~None) | AIAgent`
     --> gateway/run.py:15637:13
      |
15635 |                 return response
15636 |
15637 |             agent.clarify_callback = _clarify_callback_sync
      |             ^^^^^^^^^^^^^^^^^^^^^^
15638 |
15639 |             # Show assistant thinking between tool calls — independent of
      |
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `bool` is not assignable to attribute `thinking_progress` on type `(Any & ~None) | AIAgent`
     --> gateway/run.py:15642:13
      |
15640 |             # tool_progress mode. Mattermost needs an explicit per-platform
15641 |             # opt-in so global scratch-text display does not leak into threads.
15642 |             agent.thinking_progress = _thinking_enabled
      |             ^^^^^^^^^^^^^^^^^^^^^^^
15643 |             # Store agent reference for interrupt support
15644 |             agent_holder[0] = agent
      |
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Invalid subscript assignment with key of type `Literal[0]` and value of type `(Any & ~None) | AIAgent` on object of type `list[None]`
     --> gateway/run.py:15644:13
      |
15642 |             agent.thinking_progress = _thinking_enabled
15643 |             # Store agent reference for interrupt support
15644 |             agent_holder[0] = agent
      |             ^^^^^^^^^^^^^^^^^^^^^^^
15645 |             # Capture the full tool definitions for transcript logging
15646 |             tools_holder[0] = agent.tools if hasattr(agent, 'tools') else None
      |
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Invalid subscript assignment with key of type `Literal[0]` and value of type `object` on object of type `list[None]`
     --> gateway/run.py:15646:13
      |
15644 |             agent_holder[0] = agent
15645 |             # Capture the full tool definitions for transcript logging
15646 |             tools_holder[0] = agent.tools if hasattr(agent, 'tools') else None
      |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15647 |             
15648 |             # Convert history to agent format.
      |
info: rule `invalid-assignment` is enabled by default

error[unresolved-attribute]: Attribute `pause_typing_for_chat` is not defined on `None` in union `BasePlatformAdapter | None`
     --> gateway/run.py:15714:17
      |
15712 |                 # status; pausing prevents _keep_typing from re-setting it.
15713 |                 # Typing resumes in _handle_approve_command/_handle_deny_command.
15714 |                 _status_adapter.pause_typing_for_chat(_status_chat_id)
      |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15715 |
15716 |                 cmd = approval_data.get("command", "")
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `BasePlatformAdapter | None` has no attribute `send_exec_approval`
     --> gateway/run.py:15725:29
      |
15723 |                     try:
15724 |                         _approval_fut = safe_schedule_threadsafe(
15725 |                             _status_adapter.send_exec_approval(
      |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15726 |                                 chat_id=_status_chat_id,
15727 |                                 command=cmd,
      |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `send` is not defined on `None` in union `BasePlatformAdapter | None`
     --> gateway/run.py:15771:25
      |
15769 |                 try:
15770 |                     _approval_send_fut = safe_schedule_threadsafe(
15771 |                         _status_adapter.send(
      |                         ^^^^^^^^^^^^^^^^^^^^
15772 |                             _status_chat_id,
15773 |                             msg,
      |
info: rule `unresolved-attribute` is enabled by default

error[invalid-assignment]: Invalid subscript assignment with key of type `Literal["persist_user_timestamp"]` and value of type `int | float` on object of type `dict[str, list[dict[str, Any]] | str]`
     --> gateway/run.py:15944:21
      |
15942 |                     _conversation_kwargs["persist_user_message"] = message
15943 |                 if _persist_user_timestamp_override is not None:
15944 |                     _conversation_kwargs["persist_user_timestamp"] = _persist_user_timestamp_override
      |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^--------------------------------
      |                                                                      |
      |                                                                      Expected value of type `list[dict[str, Any]] | str`, got `int | float`
15945 |                 result = agent.run_conversation(_api_run_message, **_conversation_kwargs)
15946 |             finally:
      |
info: rule `invalid-assignment` is enabled by default

error[invalid-argument-type]: Argument to bound method `run_conversation` is incorrect
     --> gateway/run.py:15945:67
      |
15943 |                 if _persist_user_timestamp_override is not None:
15944 |                     _conversation_kwargs["persist_user_timestamp"] = _persist_user_timestamp_override
15945 |                 result = agent.run_conversation(_api_run_message, **_conversation_kwargs)
      |                                                                   ^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `list[dict[str, Any]] | str`
15946 |             finally:
15947 |                 unregister_gateway_notify(_approval_session_key)
      |
info: Element `list[dict[str, Any]]` of this union is not assignable to `str`
info: Method defined here
    --> run_agent.py:5272:9
     |
5270 |         return handle_max_iterations(self, messages, api_call_count)
5271 |
5272 |     def run_conversation(
     |         ^^^^^^^^^^^^^^^^
5273 |         self,
5274 |         user_message: str,
5275 |         system_message: str = None,
     |         -------------------------- Parameter declared here
5276 |         conversation_history: List[Dict[str, Any]] = None,
5277 |         task_id: str = None,
     |
info: Union variant `bound method AIAgent.run_conversation(user_message: str, system_message: str = None, conversation_history: list[dict[str, Any]] = None, task_id: str = None, stream_callback: Unknown | None = None, persist_user_message: str | None = None, persist_user_timestamp: int | float | None = None) -> dict[str, Any]` is incompatible with this call site
info: Attempted to call union type `Any | (bound method AIAgent.run_conversation(user_message: str, system_message: str = None, conversation_history: list[dict[str, Any]] = None, task_id: str = None, stream_callback: Unknown | None = None, persist_user_message: str | None = None, persist_user_timestamp: int | float | None = None) -> dict[str, Any])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `run_conversation` is incorrect
     --> gateway/run.py:15945:67
      |
15943 |                 if _persist_user_timestamp_override is not None:
15944 |                     _conversation_kwargs["persist_user_timestamp"] = _persist_user_timestamp_override
15945 |                 result = agent.run_conversation(_api_run_message, **_conversation_kwargs)
      |                                                                   ^^^^^^^^^^^^^^^^^^^^^^ Expected `list[dict[str, Any]]`, found `list[dict[str, Any]] | str`
15946 |             finally:
15947 |                 unregister_gateway_notify(_approval_session_key)
      |
info: Element `str` of this union is not assignable to `list[dict[str, Any]]`
info: Method defined here
    --> run_agent.py:5272:9
     |
5270 |         return handle_max_iterations(self, messages, api_call_count)
5271 |
5272 |     def run_conversation(
     |         ^^^^^^^^^^^^^^^^
5273 |         self,
5274 |         user_message: str,
5275 |         system_message: str = None,
5276 |         conversation_history: List[Dict[str, Any]] = None,
     |         ------------------------------------------------- Parameter declared here
5277 |         task_id: str = None,
5278 |         stream_callback: Optional[callable] = None,
     |
info: Union variant `bound method AIAgent.run_conversation(user_message: str, system_message: str = None, conversation_history: list[dict[str, Any]] = None, task_id: str = None, stream_callback: Unknown | None = None, persist_user_message: str | None = None, persist_user_timestamp: int | float | None = None) -> dict[str, Any]` is incompatible with this call site
info: Attempted to call union type `Any | (bound method AIAgent.run_conversation(user_message: str, system_message: str = None, conversation_history: list[dict[str, Any]] = None, task_id: str = None, stream_callback: Unknown | None = None, persist_user_message: str | None = None, persist_user_timestamp: int | float | None = None) -> dict[str, Any])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `run_conversation` is incorrect
     --> gateway/run.py:15945:67
      |
15943 |                 if _persist_user_timestamp_override is not None:
15944 |                     _conversation_kwargs["persist_user_timestamp"] = _persist_user_timestamp_override
15945 |                 result = agent.run_conversation(_api_run_message, **_conversation_kwargs)
      |                                                                   ^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `list[dict[str, Any]] | str`
15946 |             finally:
15947 |                 unregister_gateway_notify(_approval_session_key)
      |
info: Element `list[dict[str, Any]]` of this union is not assignable to `str`
info: Method defined here
    --> run_agent.py:5272:9
     |
5270 |         return handle_max_iterations(self, messages, api_call_count)
5271 |
5272 |     def run_conversation(
     |         ^^^^^^^^^^^^^^^^
5273 |         self,
5274 |         user_message: str,
5275 |         system_message: str = None,
5276 |         conversation_history: List[Dict[str, Any]] = None,
5277 |         task_id: str = None,
     |         ------------------- Parameter declared here
5278 |         stream_callback: Optional[callable] = None,
5279 |         persist_user_message: Optional[str] = None,
     |
info: Union variant `bound method AIAgent.run_conversation(user_message: str, system_message: str = None, conversation_history: list[dict[str, Any]] = None, task_id: str = None, stream_callback: Unknown | None = None, persist_user_message: str | None = None, persist_user_timestamp: int | float | None = None) -> dict[str, Any]` is incompatible with this call site
info: Attempted to call union type `Any | (bound method AIAgent.run_conversation(user_message: str, system_message: str = None, conversation_history: list[dict[str, Any]] = None, task_id: str = None, stream_callback: Unknown | None = None, persist_user_message: str | None = None, persist_user_timestamp: int | float | None = None) -> dict[str, Any])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `run_conversation` is incorrect
     --> gateway/run.py:15945:67
      |
15943 |                 if _persist_user_timestamp_override is not None:
15944 |                     _conversation_kwargs["persist_user_timestamp"] = _persist_user_timestamp_override
15945 |                 result = agent.run_conversation(_api_run_message, **_conversation_kwargs)
      |                                                                   ^^^^^^^^^^^^^^^^^^^^^^ Expected `str | None`, found `list[dict[str, Any]] | str`
15946 |             finally:
15947 |                 unregister_gateway_notify(_approval_session_key)
      |
info: Element `list[dict[str, Any]]` of this union is not assignable to `str | None`
info: Method defined here
    --> run_agent.py:5272:9
     |
5270 |         return handle_max_iterations(self, messages, api_call_count)
5271 |
5272 |     def run_conversation(
     |         ^^^^^^^^^^^^^^^^
5273 |         self,
5274 |         user_message: str,
     |
    ::: run_agent.py:5279:9
     |
5277 |         task_id: str = None,
5278 |         stream_callback: Optional[callable] = None,
5279 |         persist_user_message: Optional[str] = None,
     |         ------------------------------------------ Parameter declared here
5280 |         persist_user_timestamp: Optional[float] = None,
5281 |     ) -> Dict[str, Any]:
     |
info: Union variant `bound method AIAgent.run_conversation(user_message: str, system_message: str = None, conversation_history: list[dict[str, Any]] = None, task_id: str = None, stream_callback: Unknown | None = None, persist_user_message: str | None = None, persist_user_timestamp: int | float | None = None) -> dict[str, Any]` is incompatible with this call site
info: Attempted to call union type `Any | (bound method AIAgent.run_conversation(user_message: str, system_message: str = None, conversation_history: list[dict[str, Any]] = None, task_id: str = None, stream_callback: Unknown | None = None, persist_user_message: str | None = None, persist_user_timestamp: int | float | None = None) -> dict[str, Any])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `run_conversation` is incorrect
     --> gateway/run.py:15945:67
      |
15943 |                 if _persist_user_timestamp_override is not None:
15944 |                     _conversation_kwargs["persist_user_timestamp"] = _persist_user_timestamp_override
15945 |                 result = agent.run_conversation(_api_run_message, **_conversation_kwargs)
      |                                                                   ^^^^^^^^^^^^^^^^^^^^^^ Expected `int | float | None`, found `list[dict[str, Any]] | str`
15946 |             finally:
15947 |                 unregister_gateway_notify(_approval_session_key)
      |
info: Method defined here
    --> run_agent.py:5272:9
     |
5270 |         return handle_max_iterations(self, messages, api_call_count)
5271 |
5272 |     def run_conversation(
     |         ^^^^^^^^^^^^^^^^
5273 |         self,
5274 |         user_message: str,
     |
    ::: run_agent.py:5280:9
     |
5278 |         stream_callback: Optional[callable] = None,
5279 |         persist_user_message: Optional[str] = None,
5280 |         persist_user_timestamp: Optional[float] = None,
     |         ---------------------------------------------- Parameter declared here
5281 |     ) -> Dict[str, Any]:
5282 |         """Forwarder — see ``agent.conversation_loop.run_conversation``."""
     |
info: Union variant `bound method AIAgent.run_conversation(user_message: str, system_message: str = None, conversation_history: list[dict[str, Any]] = None, task_id: str = None, stream_callback: Unknown | None = None, persist_user_message: str | None = None, persist_user_timestamp: int | float | None = None) -> dict[str, Any]` is incompatible with this call site
info: Attempted to call union type `Any | (bound method AIAgent.run_conversation(user_message: str, system_message: str = None, conversation_history: list[dict[str, Any]] = None, task_id: str = None, stream_callback: Unknown | None = None, persist_user_message: str | None = None, persist_user_timestamp: int | float | None = None) -> dict[str, Any])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-assignment]: Invalid subscript assignment with key of type `Literal[0]` and value of type `Any | dict[str, Any]` on object of type `list[None]`
     --> gateway/run.py:15957:13
      |
15955 |                     pass
15956 |                 reset_current_session_key(_approval_session_token)
15957 |             result_holder[0] = result
      |             ^^^^^^^^^^^^^^^^^^^^^^^^^
15958 |
15959 |             # Signal the stream consumer that the agent is done
      |
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Invalid subscript assignment with key of type `Literal["title_callback"]` and value of type `(title) -> Unknown` on object of type `dict[str, ((task: str, exc: BaseException) -> None) | None]`
     --> gateway/run.py:16121:25
      |
16119 |                        }
16120 |                        if self._is_telegram_topic_lane(source):
16121 |                            maybe_auto_title_kwargs["title_callback"] = lambda title: self._schedule_telegram_topic_title_rename(
      |  __________________________^                                           -
      | | _____________________________________________________________________|
16122 | ||                             source,
16123 | ||                             effective_session_id,
16124 | ||                             title,
16125 | ||                         )
      | ||_________________________-
      |  |_________________________|
      |                            Expected value of type `((task: str, exc: BaseException) -> None) | None`, got `(title) -> Unknown`
16126 |                        maybe_auto_title(
16127 |                            self._session_db,
      |
info: rule `invalid-assignment` is enabled by default

error[invalid-argument-type]: Argument to function `maybe_auto_title` is incorrect
     --> gateway/run.py:16132:25
      |
16130 |                         final_response,
16131 |                         all_msgs,
16132 |                         **maybe_auto_title_kwargs,
      |                         ^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `dict[Unknown, Unknown]`, found `((task: str, exc: BaseException) -> None) | None`
16133 |                     )
16134 |                 except Exception:
      |
info: Function defined here
   --> agent/title_generator.py:158:5
    |
158 | def maybe_auto_title(
    |     ^^^^^^^^^^^^^^^^
159 |     session_db,
160 |     session_id: str,
    |
   ::: agent/title_generator.py:165:5
    |
163 |     conversation_history: list,
164 |     failure_callback: Optional[FailureCallback] = None,
165 |     main_runtime: dict = None,
    |     ------------------------- Parameter declared here
166 |     title_callback: Optional[TitleCallback] = None,
167 | ) -> None:
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `maybe_auto_title` is incorrect
     --> gateway/run.py:16132:25
      |
16130 |                         final_response,
16131 |                         all_msgs,
16132 |                         **maybe_auto_title_kwargs,
      |                         ^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `((str, /) -> None) | None`, found `((task: str, exc: BaseException) -> None) | None`
16133 |                     )
16134 |                 except Exception:
      |
info: Element `(task: str, exc: BaseException) -> None` of this union is not assignable to `((str, /) -> None) | None`
info: Function defined here
   --> agent/title_generator.py:158:5
    |
158 | def maybe_auto_title(
    |     ^^^^^^^^^^^^^^^^
159 |     session_db,
160 |     session_id: str,
    |
   ::: agent/title_generator.py:166:5
    |
164 |     failure_callback: Optional[FailureCallback] = None,
165 |     main_runtime: dict = None,
166 |     title_callback: Optional[TitleCallback] = None,
    |     ---------------------------------------------- Parameter declared here
167 | ) -> None:
168 |     """Fire-and-forget title generation after the first exchange.
    |
info: rule `invalid-argument-type` is enabled by default

error[unsupported-operator]: Unsupported `//` operation
     --> gateway/run.py:16531:37
      |
16529 |                     _timed_out_agent.interrupt(_INTERRUPT_REASON_TIMEOUT)
16530 |
16531 |                 _timeout_mins = int(_agent_timeout // 60) or 1
      |                                     --------------^^^^--
      |                                     |                 |
      |                                     |                 Has type `Literal[60]`
      |                                     Has type `int | float | None`
16532 |
16533 |                 # Construct a user-facing message with diagnostic context.
      |
info: rule `unsupported-operator` is enabled by default

error[invalid-return-type]: Return type does not match returned value
     --> gateway/run.py:17008:16
      |
17006 |                 logger.debug("Post-delivery cleanup registration failed: %s", _rpe)
17007 |
17008 |         return response
      |                ^^^^^^^^ expected `dict[str, Any]`, found `Unknown | None | dict[str, str | list[Unknown] | Unknown | int]`
      |
     ::: gateway/run.py:14357:10
      |
14355 |         persist_user_message: Optional[str] = None,
14356 |         persist_user_timestamp: Optional[float] = None,
14357 |     ) -> Dict[str, Any]:
      |          -------------- Expected `dict[str, Any]` because of return type
14358 |         """
14359 |         Run the agent with the given message and context.
      |
info: rule `invalid-return-type` is enabled by default

error[no-matching-overload]: No overload of function `open` matches arguments
   --> hermes_cli/env_loader.py:185:14
    |
183 |     read_kw = {"encoding": "utf-8-sig", "errors": "replace"}
184 |     try:
185 |         with open(path, **read_kw) as f:
    |              ^^^^^^^^^^^^^^^^^^^^^
186 |             original = f.readlines()
187 |         # Strip null bytes before _sanitize_env_lines so they never
    |
info: First overload defined here
    --> stdlib/builtins.pyi:3981:5
     |
3979 |   # Text mode: always returns a TextIOWrapper
3980 |   @overload
3981 |   def open(
     |  _____^
3982 | |     file: FileDescriptorOrPath,
3983 | |     mode: OpenTextMode = "r",
3984 | |     buffering: int = -1,
3985 | |     encoding: str | None = None,
3986 | |     errors: str | None = None,
3987 | |     newline: str | None = None,
3988 | |     closefd: bool = True,
3989 | |     opener: _Opener | None = None,
3990 | | ) -> TextIOWrapper:
     | |__________________^
3991 |       """Open file and return a stream.  Raise OSError upon failure.
     |
info: Possible overloads for function `open`:
info:   (file: int | str | bytes | PathLike[str] | PathLike[bytes], mode: Literal["r+", "+r", "rt+", "r+t", "+rt", ... omitted 48 literals] = "r", buffering: int = -1, encoding: str | None = None, errors: str | None = None, newline: str | None = None, closefd: bool = True, opener: ((str, int, /) -> int) | None = None) -> TextIOWrapper[_WrappedBuffer]
info:   (file: int | str | bytes | PathLike[str] | PathLike[bytes], mode: Literal["rb+", "r+b", "+rb", "br+", "b+r", ... omitted 33 literals], buffering: Literal[0], encoding: None = None, errors: None = None, newline: None = None, closefd: bool = True, opener: ((str, int, /) -> int) | None = None) -> FileIO
info:   (file: int | str | bytes | PathLike[str] | PathLike[bytes], mode: Literal["rb+", "r+b", "+rb", "br+", "b+r", ... omitted 19 literals], buffering: Literal[-1, 1] = -1, encoding: None = None, errors: None = None, newline: None = None, closefd: bool = True, opener: ((str, int, /) -> int) | None = None) -> BufferedRandom
info:   (file: int | str | bytes | PathLike[str] | PathLike[bytes], mode: Literal["wb", "bw", "ab", "ba", "xb", "bx"], buffering: Literal[-1, 1] = -1, encoding: None = None, errors: None = None, newline: None = None, closefd: bool = True, opener: ((str, int, /) -> int) | None = None) -> BufferedWriter
info:   (file: int | str | bytes | PathLike[str] | PathLike[bytes], mode: Literal["rb", "br", "rbU", "rUb", "Urb", ... omitted 3 literals], buffering: Literal[-1, 1] = -1, encoding: None = None, errors: None = None, newline: None = None, closefd: bool = True, opener: ((str, int, /) -> int) | None = None) -> BufferedReader[_BufferedReaderStream]
info:   (file: int | str | bytes | PathLike[str] | PathLike[bytes], mode: Literal["rb+", "r+b", "+rb", "br+", "b+r", ... omitted 33 literals], buffering: int = -1, encoding: None = None, errors: None = None, newline: None = None, closefd: bool = True, opener: ((str, int, /) -> int) | None = None) -> BinaryIO
info:   (file: int | str | bytes | PathLike[str] | PathLike[bytes], mode: str, buffering: int = -1, encoding: str | None = None, errors: str | None = None, newline: str | None = None, closefd: bool = True, opener: ((str, int, /) -> int) | None = None) -> IO[Any]
info: rule `no-matching-overload` is enabled by default

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
   --> hermes_cli/env_loader.py:377:22
    |
375 |         return {}
376 |     try:
377 |         import yaml  # type: ignore
    |                      ^^^^^^^^^^^^^^
378 |     except ImportError:
379 |         return {}
    |
help: Remove the unused suppression comment
374 |     if not config_path.exists():
375 |         return {}
376 |     try:
    -         import yaml  # type: ignore
377 +         import yaml
378 |     except ImportError:
379 |         return {}
380 |     try:

error[invalid-argument-type]: Argument to bound method `_handle_nutrition_draft_callback` is incorrect
   --> scripts/nutricoach_v140_telegram_facade.py:206:13
    |
204 |     ) -> NutritionDraftCallbackDenied | None:
205 |         return await super()._handle_nutrition_draft_callback(
206 |             query, query.data, query.message,
    |             ^^^^^ Expected `CallbackQuery`, found `FakeCallbackQuery`
207 |         )
    |
info: Method defined here
    --> gateway/platforms/telegram.py:7444:15
     |
7442 |             logger.exception("nutrition stale operator card refresh failed")
7443 |
7444 |     async def _handle_nutrition_draft_callback(
     |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7445 |         self,
7446 |         query: CallbackQuery,
     |         -------------------- Parameter declared here
7447 |         data: str,
7448 |         message: object,
     |
info: rule `invalid-argument-type` is enabled by default

error[unresolved-import]: Cannot resolve imported module `tests.gateway._nutrition_weekly_reminder_support`
  --> tests/gateway/_nutrition_weekly_dispatcher_cases.py:41:6
   |
39 | )
40 | from gateway.platforms.telegram import ReminderNoSendRejected, TelegramAdapter
41 | from tests.gateway._nutrition_weekly_reminder_support import (
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
42 |     CANDIDATE,
43 |     ReminderContextSource,
   |
info: Searched in the following paths during module resolution:
info:   1. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/dualcoach/profile (extra search path specified on the CLI or in your config file)
info:   2. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl (extra search path specified on the CLI or in your config file)
info:   3. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   4. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib/python3.12/site-packages (site-packages)
info:   5. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `tests.gateway._nutrition_weekly_dispatcher_config_support`
   --> tests/gateway/_nutrition_weekly_dispatcher_cases.py:102:6
    |
102 | from tests.gateway._nutrition_weekly_dispatcher_config_support import (
    |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
103 |     weekly_platform_config,
104 | )
    |
info: Searched in the following paths during module resolution:
info:   1. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/dualcoach/profile (extra search path specified on the CLI or in your config file)
info:   2. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl (extra search path specified on the CLI or in your config file)
info:   3. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   4. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib/python3.12/site-packages (site-packages)
info:   5. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[invalid-method-override]: Invalid override of method `_get_nutrition_coaching`
    --> tests/gateway/_nutrition_weekly_dispatcher_cases.py:194:9
     |
 193 |       @override
 194 |       def _get_nutrition_coaching(self) -> WeeklyDispatcherCoordinator:
     |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Definition is incompatible with `TelegramAdapter._get_nutrition_coaching`
 195 |           coordinator = self._test_coordinator
 196 |           if coordinator is None:
     |
    ::: gateway/platforms/telegram.py:5153:9
     |
5151 |           return controller
5152 |       @override
5153 |       def _get_nutrition_coaching(
     |  _________-
5154 | |         self,
5155 | |     ) -> NutritionCoachingCoordinator | None:
     | |____________________________________________- `TelegramAdapter._get_nutrition_coaching` defined here
5156 |           """Load the customer coordinator only for an explicit private registry."""
5157 |           if getattr(self, "_diagnostic_isolation_fenced", False):
     |
info: This violates the Liskov Substitution Principle
info: rule `invalid-method-override` is enabled by default

error[unresolved-import]: Cannot resolve imported module `tests.gateway._nutrition_weekly_reminder_support`
  --> tests/gateway/_nutrition_weekly_dispatcher_config_support.py:13:6
   |
11 | )
12 | from gateway.platforms.nutrition_weekly_operations_config import JsonValue
13 | from tests.gateway._nutrition_weekly_reminder_support import ReminderOwnerFixture
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
info: Searched in the following paths during module resolution:
info:   1. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/dualcoach/profile (extra search path specified on the CLI or in your config file)
info:   2. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl (extra search path specified on the CLI or in your config file)
info:   3. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   4. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib/python3.12/site-packages (site-packages)
info:   5. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `tests.gateway._weekly_operations_authority_support`
  --> tests/gateway/_nutrition_weekly_reminder_support.py:33:6
   |
31 | )
32 | from checkin_cli.weekly_operations_store import WeeklyOperationsStore
33 | from tests.gateway._weekly_operations_authority_support import (
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
34 |     registry_identity_from_file,
35 |     registry_identity_to_document,
   |
info: Searched in the following paths during module resolution:
info:   1. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/dualcoach/profile (extra search path specified on the CLI or in your config file)
info:   2. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl (extra search path specified on the CLI or in your config file)
info:   3. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   4. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib/python3.12/site-packages (site-packages)
info:   5. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-attribute]: Attribute `bridge` is not defined on `None` in union `ResolvedCustomer | None`
   --> tests/gateway/test_nutrition_coaching.py:958:14
    |
956 |         CallbackInput(opening.callback_data, address, "44")
957 |     ).reply.accepted
958 |     bridge = coordinator.resolve(address).bridge
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
959 |     for action, value in zip(
960 |         (
    |
info: rule `unresolved-attribute` is enabled by default

error[invalid-assignment]: Object of type `def append_event(event: Event) -> Unknown` is not assignable to attribute `append_event` of type `def append_event(self, event: object) -> object`
   --> tests/gateway/test_nutrition_coaching.py:990:5
    |
988 |         return result
989 |
990 |     bridge.append_event = append_event
    |     ^^^^^^^^^^^^^^^^^^^
991 |     snapshot = selection.snapshot.model_dump()
992 |     bridge.snapshot = snapshot
    |
info: Implicit shadowing of function `append_event`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[unresolved-attribute]: Unresolved attribute `snapshot` on type `PhysiqueCheckinBridge`
   --> tests/gateway/test_nutrition_coaching.py:992:5
    |
990 |     bridge.append_event = append_event
991 |     snapshot = selection.snapshot.model_dump()
992 |     bridge.snapshot = snapshot
    |     ^^^^^^^^^^^^^^^
993 |     bridge.finalized_coaching_snapshot = lambda _session_id: dict(snapshot)
994 |     bridge.finalized_safety_snapshot = lambda _session_id: (
    |
info: rule `unresolved-attribute` is enabled by default

error[invalid-assignment]: Object of type `(_session_id) -> Unknown` is not assignable to attribute `finalized_coaching_snapshot` of type `def finalized_coaching_snapshot(self, session_id: str) -> dict[str, object] | None`
   --> tests/gateway/test_nutrition_coaching.py:993:5
    |
991 |     snapshot = selection.snapshot.model_dump()
992 |     bridge.snapshot = snapshot
993 |     bridge.finalized_coaching_snapshot = lambda _session_id: dict(snapshot)
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
994 |     bridge.finalized_safety_snapshot = lambda _session_id: (
995 |         {"safety_held": True}
    |
info: Implicit shadowing of function `finalized_coaching_snapshot`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `(_session_id) -> Unknown` is not assignable to attribute `finalized_safety_snapshot` of type `def finalized_safety_snapshot(self, session_id: str) -> dict[str, object] | None`
   --> tests/gateway/test_nutrition_coaching.py:994:5
    |
992 |     bridge.snapshot = snapshot
993 |     bridge.finalized_coaching_snapshot = lambda _session_id: dict(snapshot)
994 |     bridge.finalized_safety_snapshot = lambda _session_id: (
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
995 |         {"safety_held": True}
996 |         if snapshot.get("safety_signals") or snapshot.get("safety_reasons")
    |
info: Implicit shadowing of function `finalized_safety_snapshot`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-argument-type]: Argument to bound method `persist_approved_delivery_card` is incorrect
    --> tests/gateway/test_nutrition_coaching.py:1119:9
     |
1117 |         nonce="a1b2c3d4",
1118 |         payload_digest="b" * 64,
1119 |         expected_generation=current.generation,
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `int`, found `int | None`
1120 |         expected_record_digest=current.generation_record_digest,
1121 |         expected_checkin_revision=current.generation_checkin_revision,
     |
info: Element `None` of this union is not assignable to `int`
info: Method defined here
    --> gateway/platforms/nutrition_coaching.py:6724:9
     |
6722 |         return projected if all(projected.values()) else None
6723 |
6724 |     def persist_approved_delivery_card(
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6725 |         self,
6726 |         draft_id: str,
     |
    ::: gateway/platforms/nutrition_coaching.py:6733:9
     |
6731 |         nonce: str,
6732 |         payload_digest: str,
6733 |         expected_generation: int,
     |         ------------------------ Parameter declared here
6734 |         expected_record_digest: str,
6735 |         expected_checkin_revision: str,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `persist_approved_delivery_card` is incorrect
    --> tests/gateway/test_nutrition_coaching.py:1120:9
     |
1118 |         payload_digest="b" * 64,
1119 |         expected_generation=current.generation,
1120 |         expected_record_digest=current.generation_record_digest,
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `str | None`
1121 |         expected_checkin_revision=current.generation_checkin_revision,
1122 |         expected_draft_revision=current.generation_draft_revision,
     |
info: Element `None` of this union is not assignable to `str`
info: Method defined here
    --> gateway/platforms/nutrition_coaching.py:6724:9
     |
6722 |         return projected if all(projected.values()) else None
6723 |
6724 |     def persist_approved_delivery_card(
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6725 |         self,
6726 |         draft_id: str,
     |
    ::: gateway/platforms/nutrition_coaching.py:6734:9
     |
6732 |         payload_digest: str,
6733 |         expected_generation: int,
6734 |         expected_record_digest: str,
     |         --------------------------- Parameter declared here
6735 |         expected_checkin_revision: str,
6736 |         expected_draft_revision: str | None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `persist_approved_delivery_card` is incorrect
    --> tests/gateway/test_nutrition_coaching.py:1121:9
     |
1119 |         expected_generation=current.generation,
1120 |         expected_record_digest=current.generation_record_digest,
1121 |         expected_checkin_revision=current.generation_checkin_revision,
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `str`, found `str | None`
1122 |         expected_draft_revision=current.generation_draft_revision,
1123 |     )
     |
info: Element `None` of this union is not assignable to `str`
info: Method defined here
    --> gateway/platforms/nutrition_coaching.py:6724:9
     |
6722 |         return projected if all(projected.values()) else None
6723 |
6724 |     def persist_approved_delivery_card(
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6725 |         self,
6726 |         draft_id: str,
     |
    ::: gateway/platforms/nutrition_coaching.py:6735:9
     |
6733 |         expected_generation: int,
6734 |         expected_record_digest: str,
6735 |         expected_checkin_revision: str,
     |         ------------------------------ Parameter declared here
6736 |         expected_draft_revision: str | None,
6737 |     ) -> None:
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `prepare_delivery` is incorrect
    --> tests/gateway/test_nutrition_coaching.py:1130:70
     |
1128 |         "expected_draft_revision": current.generation_draft_revision,
1129 |     }
1130 |     blocked = coordinator.prepare_delivery(approved.draft_id, owner, **pins)
     |                                                                      ^^^^^^ Expected `int | None`, found `int | None | str`
1131 |     assert blocked.error == "delivery_capability_required"
     |
info: Element `str` of this union is not assignable to `int | None`
info: Method defined here
    --> gateway/platforms/nutrition_coaching.py:7211:9
     |
7209 |         return customer_key, session_id
7210 |
7211 |     def prepare_delivery(
     |         ^^^^^^^^^^^^^^^^
7212 |         self,
7213 |         draft_id: str,
7214 |         owner: IncomingAddress,
7215 |         *,
7216 |         expected_generation: int | None = None,
     |         -------------------------------------- Parameter declared here
7217 |         expected_record_digest: str | None = None,
7218 |         expected_checkin_revision: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `prepare_delivery` is incorrect
    --> tests/gateway/test_nutrition_coaching.py:1130:70
     |
1128 |         "expected_draft_revision": current.generation_draft_revision,
1129 |     }
1130 |     blocked = coordinator.prepare_delivery(approved.draft_id, owner, **pins)
     |                                                                      ^^^^^^ Expected `str | None`, found `int | None | str`
1131 |     assert blocked.error == "delivery_capability_required"
     |
info: Element `int` of this union is not assignable to `str | None`
info: Method defined here
    --> gateway/platforms/nutrition_coaching.py:7211:9
     |
7209 |         return customer_key, session_id
7210 |
7211 |     def prepare_delivery(
     |         ^^^^^^^^^^^^^^^^
7212 |         self,
7213 |         draft_id: str,
     |
    ::: gateway/platforms/nutrition_coaching.py:7217:9
     |
7215 |         *,
7216 |         expected_generation: int | None = None,
7217 |         expected_record_digest: str | None = None,
     |         ----------------------------------------- Parameter declared here
7218 |         expected_checkin_revision: str | None = None,
7219 |         expected_draft_revision: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `prepare_delivery` is incorrect
    --> tests/gateway/test_nutrition_coaching.py:1130:70
     |
1128 |         "expected_draft_revision": current.generation_draft_revision,
1129 |     }
1130 |     blocked = coordinator.prepare_delivery(approved.draft_id, owner, **pins)
     |                                                                      ^^^^^^ Expected `str | None`, found `int | None | str`
1131 |     assert blocked.error == "delivery_capability_required"
     |
info: Element `int` of this union is not assignable to `str | None`
info: Method defined here
    --> gateway/platforms/nutrition_coaching.py:7211:9
     |
7209 |         return customer_key, session_id
7210 |
7211 |     def prepare_delivery(
     |         ^^^^^^^^^^^^^^^^
7212 |         self,
7213 |         draft_id: str,
     |
    ::: gateway/platforms/nutrition_coaching.py:7218:9
     |
7216 |         expected_generation: int | None = None,
7217 |         expected_record_digest: str | None = None,
7218 |         expected_checkin_revision: str | None = None,
     |         -------------------------------------------- Parameter declared here
7219 |         expected_draft_revision: str | None = None,
7220 |     ) -> DraftAction:
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `prepare_delivery` is incorrect
    --> tests/gateway/test_nutrition_coaching.py:1130:70
     |
1128 |         "expected_draft_revision": current.generation_draft_revision,
1129 |     }
1130 |     blocked = coordinator.prepare_delivery(approved.draft_id, owner, **pins)
     |                                                                      ^^^^^^ Expected `str | None`, found `int | None | str`
1131 |     assert blocked.error == "delivery_capability_required"
     |
info: Element `int` of this union is not assignable to `str | None`
info: Method defined here
    --> gateway/platforms/nutrition_coaching.py:7211:9
     |
7209 |         return customer_key, session_id
7210 |
7211 |     def prepare_delivery(
     |         ^^^^^^^^^^^^^^^^
7212 |         self,
7213 |         draft_id: str,
     |
    ::: gateway/platforms/nutrition_coaching.py:7219:9
     |
7217 |         expected_record_digest: str | None = None,
7218 |         expected_checkin_revision: str | None = None,
7219 |         expected_draft_revision: str | None = None,
     |         ------------------------------------------ Parameter declared here
7220 |     ) -> DraftAction:
7221 |         """Durably reserve an approved revision before any customer transport."""
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `prepare_delivery` is incorrect
    --> tests/gateway/test_nutrition_coaching.py:1188:68
     |
1186 |         now_provider=lambda: datetime(2026, 8, 22, tzinfo=ZoneInfo("UTC")),
1187 |     )
1188 |     ready = coordinator.prepare_delivery(approved.draft_id, owner, **pins)
     |                                                                    ^^^^^^ Expected `int | None`, found `int | None | str`
1189 |
1190 |     # Then: authority is issued without Telegram/model I/O and transport is ready.
     |
info: Element `str` of this union is not assignable to `int | None`
info: Method defined here
    --> gateway/platforms/nutrition_coaching.py:7211:9
     |
7209 |         return customer_key, session_id
7210 |
7211 |     def prepare_delivery(
     |         ^^^^^^^^^^^^^^^^
7212 |         self,
7213 |         draft_id: str,
7214 |         owner: IncomingAddress,
7215 |         *,
7216 |         expected_generation: int | None = None,
     |         -------------------------------------- Parameter declared here
7217 |         expected_record_digest: str | None = None,
7218 |         expected_checkin_revision: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `prepare_delivery` is incorrect
    --> tests/gateway/test_nutrition_coaching.py:1188:68
     |
1186 |         now_provider=lambda: datetime(2026, 8, 22, tzinfo=ZoneInfo("UTC")),
1187 |     )
1188 |     ready = coordinator.prepare_delivery(approved.draft_id, owner, **pins)
     |                                                                    ^^^^^^ Expected `str | None`, found `int | None | str`
1189 |
1190 |     # Then: authority is issued without Telegram/model I/O and transport is ready.
     |
info: Element `int` of this union is not assignable to `str | None`
info: Method defined here
    --> gateway/platforms/nutrition_coaching.py:7211:9
     |
7209 |         return customer_key, session_id
7210 |
7211 |     def prepare_delivery(
     |         ^^^^^^^^^^^^^^^^
7212 |         self,
7213 |         draft_id: str,
     |
    ::: gateway/platforms/nutrition_coaching.py:7217:9
     |
7215 |         *,
7216 |         expected_generation: int | None = None,
7217 |         expected_record_digest: str | None = None,
     |         ----------------------------------------- Parameter declared here
7218 |         expected_checkin_revision: str | None = None,
7219 |         expected_draft_revision: str | None = None,
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `prepare_delivery` is incorrect
    --> tests/gateway/test_nutrition_coaching.py:1188:68
     |
1186 |         now_provider=lambda: datetime(2026, 8, 22, tzinfo=ZoneInfo("UTC")),
1187 |     )
1188 |     ready = coordinator.prepare_delivery(approved.draft_id, owner, **pins)
     |                                                                    ^^^^^^ Expected `str | None`, found `int | None | str`
1189 |
1190 |     # Then: authority is issued without Telegram/model I/O and transport is ready.
     |
info: Element `int` of this union is not assignable to `str | None`
info: Method defined here
    --> gateway/platforms/nutrition_coaching.py:7211:9
     |
7209 |         return customer_key, session_id
7210 |
7211 |     def prepare_delivery(
     |         ^^^^^^^^^^^^^^^^
7212 |         self,
7213 |         draft_id: str,
     |
    ::: gateway/platforms/nutrition_coaching.py:7218:9
     |
7216 |         expected_generation: int | None = None,
7217 |         expected_record_digest: str | None = None,
7218 |         expected_checkin_revision: str | None = None,
     |         -------------------------------------------- Parameter declared here
7219 |         expected_draft_revision: str | None = None,
7220 |     ) -> DraftAction:
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to bound method `prepare_delivery` is incorrect
    --> tests/gateway/test_nutrition_coaching.py:1188:68
     |
1186 |         now_provider=lambda: datetime(2026, 8, 22, tzinfo=ZoneInfo("UTC")),
1187 |     )
1188 |     ready = coordinator.prepare_delivery(approved.draft_id, owner, **pins)
     |                                                                    ^^^^^^ Expected `str | None`, found `int | None | str`
1189 |
1190 |     # Then: authority is issued without Telegram/model I/O and transport is ready.
     |
info: Element `int` of this union is not assignable to `str | None`
info: Method defined here
    --> gateway/platforms/nutrition_coaching.py:7211:9
     |
7209 |         return customer_key, session_id
7210 |
7211 |     def prepare_delivery(
     |         ^^^^^^^^^^^^^^^^
7212 |         self,
7213 |         draft_id: str,
     |
    ::: gateway/platforms/nutrition_coaching.py:7219:9
     |
7217 |         expected_record_digest: str | None = None,
7218 |         expected_checkin_revision: str | None = None,
7219 |         expected_draft_revision: str | None = None,
     |         ------------------------------------------ Parameter declared here
7220 |     ) -> DraftAction:
7221 |         """Durably reserve an approved revision before any customer transport."""
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-assignment]: Object of type `def prepare_current(draft_id: str, draft_owner, *, expected_generation=None, expected_record_digest=None, expected_checkin_revision=None, expected_draft_revision=None) -> Unknown` is not assignable to attribute `prepare_delivery` of type `def prepare_delivery(self, draft_id: str, owner: IncomingAddress, *, expected_generation: int | None = None, expected_record_digest: str | None = None, expected_checkin_revision: str | None = None, expected_draft_revision: str | None = None) -> DraftAction`
    --> tests/gateway/test_nutrition_coaching.py:1232:5
     |
1230 |         )
1231 |
1232 |     coordinator.prepare_delivery = prepare_current
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1233 |     return coordinator, owner, events
     |
info: Implicit shadowing of function `prepare_delivery`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[unresolved-attribute]: Attribute `actor` is not defined on `None` in union `DraftPayload | None`
    --> tests/gateway/test_nutrition_coaching.py:1327:13
     |
1325 |         "draft_created", "draft_approved", "draft_created", "draft_edited", "draft_approved",
1326 |     ]
1327 |     assert [event.draft.actor.value for event in events] == [
     |             ^^^^^^^^^^^^^^^^^
1328 |         "ai", "richard", "richard", "richard", "richard",
1329 |     ]
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-import]: Cannot resolve imported module `tests.gateway._nutrition_weekly_dispatcher_cases`
  --> tests/gateway/test_nutrition_weekly_dispatcher.py:11:6
   |
 9 | import pytest
10 |
11 | from tests.gateway._nutrition_weekly_dispatcher_cases import dispatcher_fixture
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
info: Searched in the following paths during module resolution:
info:   1. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/dualcoach/profile (extra search path specified on the CLI or in your config file)
info:   2. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl (extra search path specified on the CLI or in your config file)
info:   3. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   4. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib/python3.12/site-packages (site-packages)
info:   5. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `tests.gateway._nutrition_weekly_dispatcher_cases`
  --> tests/gateway/test_nutrition_weekly_dispatcher_epoch2.py:16:6
   |
15 | from checkin_cli.customer_coaching import AiProcessingConsent
16 | from tests.gateway._nutrition_weekly_dispatcher_cases import (
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
17 |     ProviderMode,
18 |     dispatcher_fixture,
   |
info: Searched in the following paths during module resolution:
info:   1. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/dualcoach/profile (extra search path specified on the CLI or in your config file)
info:   2. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl (extra search path specified on the CLI or in your config file)
info:   3. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   4. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib/python3.12/site-packages (site-packages)
info:   5. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `tests.gateway._nutrition_weekly_dispatcher_config_support`
  --> tests/gateway/test_nutrition_weekly_dispatcher_epoch2.py:20:6
   |
18 |     dispatcher_fixture,
19 | )
20 | from tests.gateway._nutrition_weekly_dispatcher_config_support import (
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
21 |     WeeklyConfigState,
22 |     weekly_platform_config,
   |
info: Searched in the following paths during module resolution:
info:   1. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/dualcoach/profile (extra search path specified on the CLI or in your config file)
info:   2. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl (extra search path specified on the CLI or in your config file)
info:   3. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   4. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib/python3.12/site-packages (site-packages)
info:   5. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `tests.gateway._nutrition_weekly_reminder_support`
  --> tests/gateway/test_nutrition_weekly_dispatcher_epoch2.py:24:6
   |
22 |     weekly_platform_config,
23 | )
24 | from tests.gateway._nutrition_weekly_reminder_support import ReminderContextSource
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
25 |
26 | KST = ZoneInfo("Asia/Seoul")
   |
info: Searched in the following paths during module resolution:
info:   1. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/dualcoach/profile (extra search path specified on the CLI or in your config file)
info:   2. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl (extra search path specified on the CLI or in your config file)
info:   3. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   4. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib/python3.12/site-packages (site-packages)
info:   5. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `tests.gateway._nutrition_weekly_dispatcher_cases`
   --> tests/gateway/test_nutrition_weekly_dispatcher_epoch2.py:163:10
    |
161 |     tmp_path: Path, monkeypatch: pytest.MonkeyPatch, mode: ProviderMode,
162 | ) -> None:
163 |     from tests.gateway._nutrition_weekly_dispatcher_cases import FakeTelegramProvider
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
164 |
165 |     provider = FakeTelegramProvider(mode)
    |
info: Searched in the following paths during module resolution:
info:   1. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/dualcoach/profile (extra search path specified on the CLI or in your config file)
info:   2. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl (extra search path specified on the CLI or in your config file)
info:   3. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   4. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib/python3.12/site-packages (site-packages)
info:   5. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `tests.gateway._nutrition_weekly_dispatcher_cases`
  --> tests/gateway/test_nutrition_weekly_dispatcher_host_matrix.py:26:6
   |
24 |     WeeklyOperationInput,
25 | )
26 | from tests.gateway._nutrition_weekly_dispatcher_cases import dispatcher_fixture
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
27 |
28 | KST = ZoneInfo("Asia/Seoul")
   |
info: Searched in the following paths during module resolution:
info:   1. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/dualcoach/profile (extra search path specified on the CLI or in your config file)
info:   2. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl (extra search path specified on the CLI or in your config file)
info:   3. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   4. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib/python3.12/site-packages (site-packages)
info:   5. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `tests.gateway._nutrition_weekly_dispatcher_cases`
  --> tests/gateway/test_nutrition_weekly_dispatcher_lifecycle.py:13:6
   |
12 | from gateway.platforms.base import SendResult
13 | from tests.gateway._nutrition_weekly_dispatcher_cases import (
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14 |     AuthorizedTelegramHost,
15 |     FakeTelegramProvider,
   |
info: Searched in the following paths during module resolution:
info:   1. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/dualcoach/profile (extra search path specified on the CLI or in your config file)
info:   2. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl (extra search path specified on the CLI or in your config file)
info:   3. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   4. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib/python3.12/site-packages (site-packages)
info:   5. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `tests.gateway._nutrition_weekly_dispatcher_config_support`
  --> tests/gateway/test_nutrition_weekly_dispatcher_lifecycle.py:18:6
   |
16 |     dispatcher_fixture,
17 | )
18 | from tests.gateway._nutrition_weekly_dispatcher_config_support import (
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
19 |     WeeklyConfigState,
20 |     weekly_platform_config,
   |
info: Searched in the following paths during module resolution:
info:   1. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/dualcoach/profile (extra search path specified on the CLI or in your config file)
info:   2. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl (extra search path specified on the CLI or in your config file)
info:   3. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   4. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib/python3.12/site-packages (site-packages)
info:   5. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `tests.gateway._nutrition_weekly_reminder_support`
  --> tests/gateway/test_nutrition_weekly_dispatcher_lifecycle.py:22:6
   |
20 |     weekly_platform_config,
21 | )
22 | from tests.gateway._nutrition_weekly_reminder_support import ReminderContextSource
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
23 |
24 | KST = ZoneInfo("Asia/Seoul")
   |
info: Searched in the following paths during module resolution:
info:   1. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/dualcoach/profile (extra search path specified on the CLI or in your config file)
info:   2. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl (extra search path specified on the CLI or in your config file)
info:   3. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   4. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib/python3.12/site-packages (site-packages)
info:   5. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `tests.gateway._weekly_operations_authority_support`
  --> tests/gateway/test_nutrition_weekly_operations.py:14:6
   |
12 | import pytest
13 |
14 | from tests.gateway._weekly_operations_authority_support import (
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15 |     test_registry_identity_binding_digest as registry_identity_binding_digest,
16 |     test_registry_identity_document as registry_identity_document,
   |
info: Searched in the following paths during module resolution:
info:   1. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/dualcoach/profile (extra search path specified on the CLI or in your config file)
info:   2. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl (extra search path specified on the CLI or in your config file)
info:   3. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   4. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib/python3.12/site-packages (site-packages)
info:   5. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `tests.gateway._weekly_operations_authority_support`
  --> tests/gateway/test_nutrition_weekly_operations_registry_identity_r7.py:14:6
   |
12 | )
13 | import gateway.platforms.nutrition_weekly_operations_registry_identity as registry_boundary
14 | from tests.gateway._weekly_operations_authority_support import (
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15 |     registry_identity_from_file,
16 | )
   |
info: Searched in the following paths during module resolution:
info:   1. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/dualcoach/profile (extra search path specified on the CLI or in your config file)
info:   2. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl (extra search path specified on the CLI or in your config file)
info:   3. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   4. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib/python3.12/site-packages (site-packages)
info:   5. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `tests.gateway._weekly_operations_authority_support`
  --> tests/gateway/test_nutrition_weekly_operations_topic59.py:19:6
   |
17 |     Topic59PublicationRequest,
18 | )
19 | from tests.gateway._weekly_operations_authority_support import (
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20 |     authority_receipt_fixture,
21 |     test_registry_identity as registry_identity,
   |
info: Searched in the following paths during module resolution:
info:   1. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/dualcoach/profile (extra search path specified on the CLI or in your config file)
info:   2. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl (extra search path specified on the CLI or in your config file)
info:   3. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   4. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib/python3.12/site-packages (site-packages)
info:   5. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `tests.gateway._weekly_operations_authority_support`
  --> tests/gateway/test_nutrition_weekly_operations_topic59_failures.py:18:6
   |
16 |     Topic59PublicationRequest,
17 | )
18 | from tests.gateway._weekly_operations_authority_support import (
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
19 |     authority_receipt_fixture,
20 |     test_registry_identity as registry_identity,
   |
info: Searched in the following paths during module resolution:
info:   1. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/dualcoach/profile (extra search path specified on the CLI or in your config file)
info:   2. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl (extra search path specified on the CLI or in your config file)
info:   3. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   4. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib/python3.12/site-packages (site-packages)
info:   5. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `tests.gateway._weekly_operations_authority_support`
  --> tests/gateway/test_nutrition_weekly_operations_topic59_r2.py:26:6
   |
24 |     Topic59PublicationRequest,
25 | )
26 | from tests.gateway._weekly_operations_authority_support import (
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
27 |     authority_receipt_fixture,
28 |     test_registry_identity as registry_identity,
   |
info: Searched in the following paths during module resolution:
info:   1. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/dualcoach/profile (extra search path specified on the CLI or in your config file)
info:   2. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl (extra search path specified on the CLI or in your config file)
info:   3. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   4. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib/python3.12/site-packages (site-packages)
info:   5. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `tests.gateway._weekly_operations_authority_support`
  --> tests/gateway/test_nutrition_weekly_operations_topic59_r2_slots.py:23:6
   |
21 |     Topic59PublicationResult,
22 | )
23 | from tests.gateway._weekly_operations_authority_support import (
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
24 |     authority_receipt_fixture,
25 |     test_registry_identity as registry_identity,
   |
info: Searched in the following paths during module resolution:
info:   1. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/dualcoach/profile (extra search path specified on the CLI or in your config file)
info:   2. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl (extra search path specified on the CLI or in your config file)
info:   3. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   4. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib/python3.12/site-packages (site-packages)
info:   5. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `tests.gateway._weekly_operations_authority_support`
  --> tests/gateway/test_nutrition_weekly_operations_topic59_telegram.py:19:6
   |
17 |     Topic59PublicationRequest,
18 | )
19 | from tests.gateway._weekly_operations_authority_support import (
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20 |     authority_receipt_fixture,
21 |     test_registry_identity as registry_identity,
   |
info: Searched in the following paths during module resolution:
info:   1. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/dualcoach/profile (extra search path specified on the CLI or in your config file)
info:   2. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl (extra search path specified on the CLI or in your config file)
info:   3. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   4. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib/python3.12/site-packages (site-packages)
info:   5. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `tests.gateway._weekly_operations_authority_support`
  --> tests/gateway/test_nutrition_weekly_owner_draft.py:23:6
   |
22 | from gateway.platforms.nutrition_coaching import CallbackInput, IncomingAddress, NutritionCoachingCoordinator
23 | from tests.gateway._weekly_operations_authority_support import (
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
24 |     test_registry_identity_binding_digest as registry_identity_binding_digest,
25 |     test_registry_identity_document as registry_identity_document,
   |
info: Searched in the following paths during module resolution:
info:   1. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/dualcoach/profile (extra search path specified on the CLI or in your config file)
info:   2. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl (extra search path specified on the CLI or in your config file)
info:   3. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   4. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib/python3.12/site-packages (site-packages)
info:   5. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `tests.gateway._weekly_owner_summary_support`
  --> tests/gateway/test_nutrition_weekly_owner_draft.py:32:6
   |
30 | from gateway.platforms.nutrition_weekly_owner_model import JsonValue
31 | from gateway.platforms.nutrition_weekly_owner_contract import WeeklyDraftLifecycle
32 | from tests.gateway._weekly_owner_summary_support import bound_summary_at
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
info: Searched in the following paths during module resolution:
info:   1. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/dualcoach/profile (extra search path specified on the CLI or in your config file)
info:   2. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl (extra search path specified on the CLI or in your config file)
info:   3. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   4. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib/python3.12/site-packages (site-packages)
info:   5. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `tests.gateway.test_nutrition_weekly_owner_draft_model`
  --> tests/gateway/test_nutrition_weekly_owner_draft_authority.py:13:6
   |
12 | from gateway.platforms.nutrition_weekly_owner_draft import WeeklyOwnerDraftService
13 | from tests.gateway.test_nutrition_weekly_owner_draft_model import (
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14 |     FakeLifecycle,
15 |     SequenceModel,
   |
info: Searched in the following paths during module resolution:
info:   1. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/dualcoach/profile (extra search path specified on the CLI or in your config file)
info:   2. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl (extra search path specified on the CLI or in your config file)
info:   3. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   4. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib/python3.12/site-packages (site-packages)
info:   5. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `tests.gateway._weekly_operations_authority_support`
  --> tests/gateway/test_nutrition_weekly_owner_draft_model.py:23:6
   |
21 | from checkin_cli.weekly_operations_owner_binding import BoundWeeklySummaryForOwnerDraft
22 |
23 | from tests.gateway._weekly_operations_authority_support import (
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
24 |     test_registry_identity_binding_digest as registry_identity_binding_digest,
25 |     test_registry_identity_document as registry_identity_document,
   |
info: Searched in the following paths during module resolution:
info:   1. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/dualcoach/profile (extra search path specified on the CLI or in your config file)
info:   2. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl (extra search path specified on the CLI or in your config file)
info:   3. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   4. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib/python3.12/site-packages (site-packages)
info:   5. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `tests.gateway._weekly_owner_summary_support`
  --> tests/gateway/test_nutrition_weekly_owner_draft_model.py:35:6
   |
33 | from gateway.platforms.nutrition_weekly_owner_storage import WeeklyOwnerStorageAuthority, bind_weekly_owner_storage
34 | from checkin_cli.weekly_operations_knowledge import load_shipped_weekly_public_knowledge
35 | from tests.gateway._weekly_owner_summary_support import bound_summary_at
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
36 |
37 | ModelOutput: TypeAlias = Mapping[str, JsonValue]
   |
info: Searched in the following paths during module resolution:
info:   1. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/dualcoach/profile (extra search path specified on the CLI or in your config file)
info:   2. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl (extra search path specified on the CLI or in your config file)
info:   3. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   4. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib/python3.12/site-packages (site-packages)
info:   5. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `tests.gateway.test_nutrition_weekly_owner_draft_model`
  --> tests/gateway/test_nutrition_weekly_owner_draft_r3.py:41:6
   |
39 |     WeeklyOwnerStorageError,
40 | )
41 | from tests.gateway.test_nutrition_weekly_owner_draft_model import (
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
42 |     FakeLifecycle,
43 |     ModelGeneratedResponse,
   |
info: Searched in the following paths during module resolution:
info:   1. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/dualcoach/profile (extra search path specified on the CLI or in your config file)
info:   2. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl (extra search path specified on the CLI or in your config file)
info:   3. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   4. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib/python3.12/site-packages (site-packages)
info:   5. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `tests.gateway._nutrition_weekly_reminder_support`
  --> tests/gateway/test_nutrition_weekly_reminder_allocation_r10.py:12:6
   |
11 | from gateway.platforms.telegram import TelegramAdapter
12 | from tests.gateway._nutrition_weekly_reminder_support import reminder_owner_fixture
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
13 | from tests.gateway.test_nutrition_weekly_reminder_bootstrap_boundary_r7 import (
14 |     platform_config,
   |
info: Searched in the following paths during module resolution:
info:   1. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/dualcoach/profile (extra search path specified on the CLI or in your config file)
info:   2. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl (extra search path specified on the CLI or in your config file)
info:   3. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   4. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib/python3.12/site-packages (site-packages)
info:   5. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `tests.gateway.test_nutrition_weekly_reminder_bootstrap_boundary_r7`
  --> tests/gateway/test_nutrition_weekly_reminder_allocation_r10.py:13:6
   |
11 | from gateway.platforms.telegram import TelegramAdapter
12 | from tests.gateway._nutrition_weekly_reminder_support import reminder_owner_fixture
13 | from tests.gateway.test_nutrition_weekly_reminder_bootstrap_boundary_r7 import (
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14 |     platform_config,
15 | )
   |
info: Searched in the following paths during module resolution:
info:   1. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/dualcoach/profile (extra search path specified on the CLI or in your config file)
info:   2. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl (extra search path specified on the CLI or in your config file)
info:   3. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   4. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib/python3.12/site-packages (site-packages)
info:   5. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `tests.gateway._nutrition_weekly_reminder_support`
  --> tests/gateway/test_nutrition_weekly_reminder_bootstrap_boundary_r7.py:16:6
   |
14 | )
15 | from gateway.platforms.telegram import TelegramAdapter
16 | from tests.gateway._nutrition_weekly_reminder_support import (
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
17 |     FakeTelegramHost,
18 |     reminder_owner_fixture,
   |
info: Searched in the following paths during module resolution:
info:   1. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/dualcoach/profile (extra search path specified on the CLI or in your config file)
info:   2. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl (extra search path specified on the CLI or in your config file)
info:   3. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   4. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib/python3.12/site-packages (site-packages)
info:   5. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `tests.gateway._nutrition_weekly_reminder_support`
  --> tests/gateway/test_nutrition_weekly_reminder_bootstrap_r6.py:22:6
   |
20 | from gateway.platforms.telegram import TelegramAdapter
21 | from gateway.platforms.telegram_weekly_reminder import send_weekly_operations_task
22 | from tests.gateway._nutrition_weekly_reminder_support import (
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
23 |     CANDIDATE,
24 |     KST,
   |
info: Searched in the following paths during module resolution:
info:   1. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/dualcoach/profile (extra search path specified on the CLI or in your config file)
info:   2. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl (extra search path specified on the CLI or in your config file)
info:   3. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   4. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib/python3.12/site-packages (site-packages)
info:   5. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `tests.gateway._nutrition_weekly_reminder_support`
  --> tests/gateway/test_nutrition_weekly_reminder_bootstrap_race_r7.py:15:6
   |
13 | )
14 | from gateway.platforms.telegram import TelegramAdapter
15 | from tests.gateway._nutrition_weekly_reminder_support import (
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
16 |     FakeTelegramHost,
17 |     reminder_owner_fixture,
   |
info: Searched in the following paths during module resolution:
info:   1. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/dualcoach/profile (extra search path specified on the CLI or in your config file)
info:   2. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl (extra search path specified on the CLI or in your config file)
info:   3. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   4. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib/python3.12/site-packages (site-packages)
info:   5. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `tests.gateway.test_nutrition_weekly_reminder_bootstrap_boundary_r7`
  --> tests/gateway/test_nutrition_weekly_reminder_bootstrap_race_r7.py:19:6
   |
17 |     reminder_owner_fixture,
18 | )
19 | from tests.gateway.test_nutrition_weekly_reminder_bootstrap_boundary_r7 import (
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20 |     alternate_registry,
21 |     platform_config,
   |
info: Searched in the following paths during module resolution:
info:   1. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/dualcoach/profile (extra search path specified on the CLI or in your config file)
info:   2. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl (extra search path specified on the CLI or in your config file)
info:   3. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   4. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib/python3.12/site-packages (site-packages)
info:   5. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[invalid-argument-type]: Argument to function `send_weekly_operations_task` is incorrect
  --> tests/gateway/test_nutrition_weekly_reminder_boundaries.py:62:13
   |
60 |     with pytest.raises(WeeklyReminderOwnerError, match="owner is invalid"):
61 |         _ = await send_weekly_operations_task(
62 |             host,
   |             ^^^^ Expected `WeeklyReminderTelegramHost`, found `NoCallHost`
63 |             InvalidOwnerCoordinator(),
64 |             task,
   |
info: Function defined here
   --> gateway/platforms/telegram_weekly_reminder.py:218:11
    |
218 | async def send_weekly_operations_task(
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
219 |     host: WeeklyReminderTelegramHost,
    |     -------------------------------- Parameter declared here
220 |     coordinator: WeeklyReminderCoordinator,
221 |     task: WeeklyReminderTask,
    |
info: rule `invalid-argument-type` is enabled by default

error[unresolved-import]: Cannot resolve imported module `tests.gateway._nutrition_weekly_reminder_support`
  --> tests/gateway/test_nutrition_weekly_reminder_ownership_r8.py:13:6
   |
11 | )
12 | from gateway.platforms.telegram import TelegramAdapter
13 | from tests.gateway._nutrition_weekly_reminder_support import (
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14 |     reminder_owner_fixture,
15 | )
   |
info: Searched in the following paths during module resolution:
info:   1. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/dualcoach/profile (extra search path specified on the CLI or in your config file)
info:   2. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl (extra search path specified on the CLI or in your config file)
info:   3. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   4. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib/python3.12/site-packages (site-packages)
info:   5. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `tests.gateway.test_nutrition_weekly_reminder_bootstrap_boundary_r7`
  --> tests/gateway/test_nutrition_weekly_reminder_ownership_r8.py:16:6
   |
14 |     reminder_owner_fixture,
15 | )
16 | from tests.gateway.test_nutrition_weekly_reminder_bootstrap_boundary_r7 import (
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
17 |     platform_config,
18 | )
   |
info: Searched in the following paths during module resolution:
info:   1. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/dualcoach/profile (extra search path specified on the CLI or in your config file)
info:   2. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl (extra search path specified on the CLI or in your config file)
info:   3. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   4. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib/python3.12/site-packages (site-packages)
info:   5. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `tests.gateway._nutrition_weekly_reminder_support`
  --> tests/gateway/test_nutrition_weekly_reminder_runtime.py:26:6
   |
24 | from gateway.platforms.telegram import TelegramAdapter
25 | from gateway.platforms.telegram_weekly_reminder import send_weekly_operations_task
26 | from tests.gateway._nutrition_weekly_reminder_support import (
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
27 |     CANDIDATE,
28 |     KST,
   |
info: Searched in the following paths during module resolution:
info:   1. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/dualcoach/profile (extra search path specified on the CLI or in your config file)
info:   2. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl (extra search path specified on the CLI or in your config file)
info:   3. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   4. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib/python3.12/site-packages (site-packages)
info:   5. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `tests.gateway._nutrition_weekly_reminder_support`
  --> tests/gateway/test_nutrition_weekly_reminder_threat_boundary_r8.py:24:6
   |
22 | )
23 | from gateway.platforms.telegram import TelegramAdapter
24 | from tests.gateway._nutrition_weekly_reminder_support import (
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
25 |     reminder_owner_fixture,
26 | )
   |
info: Searched in the following paths during module resolution:
info:   1. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/dualcoach/profile (extra search path specified on the CLI or in your config file)
info:   2. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl (extra search path specified on the CLI or in your config file)
info:   3. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   4. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib/python3.12/site-packages (site-packages)
info:   5. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `tests.gateway.test_nutrition_weekly_reminder_bootstrap_boundary_r7`
  --> tests/gateway/test_nutrition_weekly_reminder_threat_boundary_r8.py:27:6
   |
25 |     reminder_owner_fixture,
26 | )
27 | from tests.gateway.test_nutrition_weekly_reminder_bootstrap_boundary_r7 import (
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
28 |     platform_config,
29 | )
   |
info: Searched in the following paths during module resolution:
info:   1. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/dualcoach/profile (extra search path specified on the CLI or in your config file)
info:   2. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl (extra search path specified on the CLI or in your config file)
info:   3. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   4. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib/python3.12/site-packages (site-packages)
info:   5. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `tests.gateway._nutrition_weekly_reminder_support`
  --> tests/gateway/test_nutrition_weekly_reminder_transfer_r9.py:11:6
   |
10 | from gateway.platforms.telegram import TelegramAdapter
11 | from tests.gateway._nutrition_weekly_reminder_support import reminder_owner_fixture
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12 | from tests.gateway.test_nutrition_weekly_reminder_bootstrap_boundary_r7 import (
13 |     platform_config,
   |
info: Searched in the following paths during module resolution:
info:   1. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/dualcoach/profile (extra search path specified on the CLI or in your config file)
info:   2. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl (extra search path specified on the CLI or in your config file)
info:   3. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   4. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib/python3.12/site-packages (site-packages)
info:   5. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-import]: Cannot resolve imported module `tests.gateway.test_nutrition_weekly_reminder_bootstrap_boundary_r7`
  --> tests/gateway/test_nutrition_weekly_reminder_transfer_r9.py:12:6
   |
10 | from gateway.platforms.telegram import TelegramAdapter
11 | from tests.gateway._nutrition_weekly_reminder_support import reminder_owner_fixture
12 | from tests.gateway.test_nutrition_weekly_reminder_bootstrap_boundary_r7 import (
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
13 |     platform_config,
14 | )
   |
info: Searched in the following paths during module resolution:
info:   1. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/dualcoach/profile (extra search path specified on the CLI or in your config file)
info:   2. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl (extra search path specified on the CLI or in your config file)
info:   3. vendored://stdlib (stdlib typeshed stubs vendored by ty)
info:   4. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib/python3.12/site-packages (site-packages)
info:   5. /home/cube/projects/richard/.worktrees/nutricoach-v140-impl/.venv/lib64/python3.12/site-packages (site-packages)
info: make sure your Python environment is properly configured: https://docs.astral.sh/ty/modules/#python-environment
info: rule `unresolved-import` is enabled by default

error[unresolved-attribute]: Class `InlineKeyboardButton` has no attribute `reset_mock`
   --> tests/gateway/test_telegram_group_gating.py:251:5
    |
249 |     from gateway.platforms.nutrition_coaching_config import AdaptiveNutritionConfig, AdaptiveReviewOperator
250 |     from gateway.platforms import telegram as telegram_module
251 |     telegram_module.InlineKeyboardButton.reset_mock()
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
252 |
253 |     adapter = _make_adapter(require_mention=False)
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Class `InlineKeyboardButton` has no attribute `assert_any_call`
   --> tests/gateway/test_telegram_group_gating.py:297:5
    |
295 |     assert "초안을 생성" in kwargs["text"]
296 |     assert kwargs["reply_markup"] is not None
297 |     telegram_module.InlineKeyboardButton.assert_any_call(
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
298 |         "적응형 영양 초안 생성",
299 |         callback_data="an1:create-token:create",
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Class `InlineKeyboardButton` has no attribute `reset_mock`
   --> tests/gateway/test_telegram_group_gating.py:460:5
    |
458 |     from gateway.platforms import telegram as telegram_module
459 |
460 |     telegram_module.InlineKeyboardButton.reset_mock()
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
461 |     adapter = _make_adapter(require_mention=False)
462 |     service = Mock()
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `kwargs` is not defined on `None` in union `_Call | None`
    --> tests/gateway/test_telegram_group_gating.py:1844:18
     |
1843 |         adapter._send_nutrition_topic.assert_awaited_once()
1844 |         kwargs = adapter._send_nutrition_topic.await_args.kwargs
     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1845 |         assert kwargs["chat_id"] == -1001
1846 |         assert kwargs["topic_id"] == "4"
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `kwargs` is not defined on `None` in union `_Call | None`
    --> tests/gateway/test_telegram_group_gating.py:1911:14
     |
1909 |     )
1910 |     adapter._send_message_strict_topic.assert_awaited_once()
1911 |     kwargs = adapter._send_message_strict_topic.await_args.kwargs
     |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1912 |     assert kwargs["message_thread_id"] == "59"
1913 |     assert kwargs["reply_markup"] is not None
     |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to function `_acknowledge_operator_attention` is incorrect
   --> tests/gateway/test_telegram_operator_notification_recovery.py:185:9
    |
184 |     created = TelegramNutritionOnboardingRuntime._acknowledge_operator_attention(
185 |         runtime,
    |         ^^^^^^^ Expected `TelegramNutritionOnboardingRuntime`, found `SimpleNamespace`
186 |         session=session,
187 |         publication=current,
    |
info: Function defined here
   --> gateway/platforms/telegram_nutrition_onboarding_runtime.py:157:9
    |
155 |         )
156 |
157 |     def _acknowledge_operator_attention(
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
158 |         self,
    |         ---- Parameter declared here
159 |         *,
160 |         session: Any,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-assignment]: Object of type `(_session) -> Unknown` is not assignable to attribute `_current_authority` of type `def _current_authority(self, session: Any) -> Any`
   --> tests/gateway/test_telegram_operator_notification_recovery.py:224:5
    |
222 |     )
223 |     runtime._operator_attention_store = attention_store
224 |     runtime._current_authority = lambda _session: SimpleNamespace()
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
225 |     runtime._operator_attention_payload = lambda **_kwargs: {
226 |         **publication.payload,
    |
info: Implicit shadowing of function `_current_authority`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `(**_kwargs) -> Unknown` is not assignable to attribute `_operator_attention_payload` of type `def _operator_attention_payload(self, *, session: Any, service: Any, status: Any, payload: dict[str, Any], recovery_request_id: str | None = None) -> dict[str, Any]`
   --> tests/gateway/test_telegram_operator_notification_recovery.py:225:5
    |
223 |     runtime._operator_attention_store = attention_store
224 |     runtime._current_authority = lambda _session: SimpleNamespace()
225 |     runtime._operator_attention_payload = lambda **_kwargs: {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
226 |         **publication.payload,
227 |         "operator_delivery_epoch": "f" * 64,
    |
info: Implicit shadowing of function `_operator_attention_payload`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `AsyncMock` is not assignable to attribute `_send_publication` of type `def _send_publication(self, *, session: Any, service: Any, status: Any, text: str, role: str, payload: dict[str, Any], actions: list[tuple[str, str]], force_reply: bool, reply_anchor_message_id: int | None = None) -> CoroutineType[Any, Any, None]`
   --> tests/gateway/test_telegram_operator_notification_recovery.py:229:5
    |
227 |         "operator_delivery_epoch": "f" * 64,
228 |     }
229 |     runtime._send_publication = send
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
230 |     service = SimpleNamespace(
231 |         reconciliation_record=lambda **_kwargs: {"digest": "e" * 64},
    |
info: Implicit shadowing of function `_send_publication`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `(_session) -> Unknown` is not assignable to attribute `_current_authority` of type `def _current_authority(self, session: Any) -> Any`
   --> tests/gateway/test_telegram_operator_notification_recovery.py:259:5
    |
257 |         tmp_path,
258 |     )
259 |     runtime._current_authority = lambda _session: SimpleNamespace()
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
260 |     runtime._send_publication = AsyncMock()
261 |     service = SimpleNamespace(
    |
info: Implicit shadowing of function `_current_authority`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `AsyncMock` is not assignable to attribute `_send_publication` of type `def _send_publication(self, *, session: Any, service: Any, status: Any, text: str, role: str, payload: dict[str, Any], actions: list[tuple[str, str]], force_reply: bool, reply_anchor_message_id: int | None = None) -> CoroutineType[Any, Any, None]`
   --> tests/gateway/test_telegram_operator_notification_recovery.py:260:5
    |
258 |     )
259 |     runtime._current_authority = lambda _session: SimpleNamespace()
260 |     runtime._send_publication = AsyncMock()
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
261 |     service = SimpleNamespace(
262 |         reconciliation_record=lambda **_kwargs: {"digest": "e" * 64},
    |
info: Implicit shadowing of function `_send_publication`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[unresolved-attribute]: Object of type `bound method TelegramNutritionOnboardingRuntimePublicationMixin._send_publication(*, session: Any, service: Any, status: Any, text: str, role: str, payload: dict[str, Any], actions: list[tuple[str, str]], force_reply: bool, reply_anchor_message_id: int | None = None) -> CoroutineType[Any, Any, None]` has no attribute `await_args`
   --> tests/gateway/test_telegram_operator_notification_recovery.py:277:15
    |
275 |     anyio.run(runtime._publish, session, service, status)
276 |
277 |     actions = runtime._send_publication.await_args.kwargs["actions"]
    |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
278 |     assert [action for action, _label in actions] == [
279 |         "hold_ack",
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `bound method TelegramNutritionOnboardingRuntimePublicationMixin._send_publication(*, session: Any, service: Any, status: Any, text: str, role: str, payload: dict[str, Any], actions: list[tuple[str, str]], force_reply: bool, reply_anchor_message_id: int | None = None) -> CoroutineType[Any, Any, None]` has no attribute `await_args`
   --> tests/gateway/test_telegram_operator_notification_recovery.py:285:24
    |
283 |     runtime._owner_risk_acceptance = None
284 |     anyio.run(runtime._publish, session, service, status)
285 |     disabled_actions = runtime._send_publication.await_args.kwargs["actions"]
    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
286 |     assert [action for action, _label in disabled_actions] == ["hold_ack"]
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `bound method TelegramNutritionOnboardingRuntimePublicationMixin._send_publication(*, session: Any, service: Any, status: Any, text: str, role: str, payload: dict[str, Any], actions: list[tuple[str, str]], force_reply: bool, reply_anchor_message_id: int | None = None) -> CoroutineType[Any, Any, None]` has no attribute `await_args`
   --> tests/gateway/test_telegram_operator_notification_recovery.py:294:9
    |
292 |     anyio.run(runtime._publish, session, service, status)
293 |     owner_risk_only_actions = (
294 |         runtime._send_publication.await_args.kwargs["actions"]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
295 |     )
296 |     assert [
    |
info: rule `unresolved-attribute` is enabled by default

error[invalid-assignment]: Object of type `(_session) -> Unknown` is not assignable to attribute `_current_authority` of type `def _current_authority(self, session: Any) -> Any`
   --> tests/gateway/test_telegram_operator_notification_recovery.py:328:5
    |
326 |     runtime._operator_attention_store = attention_store
327 |     runtime.domain = domain
328 |     runtime._current_authority = lambda _session: SimpleNamespace()
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
329 |     runtime._send_publication = AsyncMock()
330 |     service = SimpleNamespace(
    |
info: Implicit shadowing of function `_current_authority`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `AsyncMock` is not assignable to attribute `_send_publication` of type `def _send_publication(self, *, session: Any, service: Any, status: Any, text: str, role: str, payload: dict[str, Any], actions: list[tuple[str, str]], force_reply: bool, reply_anchor_message_id: int | None = None) -> CoroutineType[Any, Any, None]`
   --> tests/gateway/test_telegram_operator_notification_recovery.py:329:5
    |
327 |     runtime.domain = domain
328 |     runtime._current_authority = lambda _session: SimpleNamespace()
329 |     runtime._send_publication = AsyncMock()
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
330 |     service = SimpleNamespace(
331 |         reconciliation_record=lambda **_kwargs: {"digest": "e" * 64},
    |
info: Implicit shadowing of function `_send_publication`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[unresolved-attribute]: Object of type `bound method TelegramNutritionOnboardingRuntimePublicationMixin._send_publication(*, session: Any, service: Any, status: Any, text: str, role: str, payload: dict[str, Any], actions: list[tuple[str, str]], force_reply: bool, reply_anchor_message_id: int | None = None) -> CoroutineType[Any, Any, None]` has no attribute `assert_awaited_once`
   --> tests/gateway/test_telegram_operator_notification_recovery.py:346:5
    |
344 |     anyio.run(runtime._publish, session, service, status)
345 |
346 |     runtime._send_publication.assert_awaited_once()
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
347 |     actions = runtime._send_publication.await_args.kwargs["actions"]
348 |     assert [action for action, _label in actions] == [
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `bound method TelegramNutritionOnboardingRuntimePublicationMixin._send_publication(*, session: Any, service: Any, status: Any, text: str, role: str, payload: dict[str, Any], actions: list[tuple[str, str]], force_reply: bool, reply_anchor_message_id: int | None = None) -> CoroutineType[Any, Any, None]` has no attribute `await_args`
   --> tests/gateway/test_telegram_operator_notification_recovery.py:347:15
    |
346 |     runtime._send_publication.assert_awaited_once()
347 |     actions = runtime._send_publication.await_args.kwargs["actions"]
    |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
348 |     assert [action for action, _label in actions] == [
349 |         "hold_ack",
    |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to function `handle_callback` is incorrect
   --> tests/gateway/test_telegram_operator_notification_recovery.py:508:13
    |
506 |         await TelegramNutritionOnboardingRuntimeCallbackMixin.handle_callback(
507 |             runtime,
508 |             query,
    |             ^^^^^ Expected `_OnboardingCallbackQuery`, found `SimpleNamespace`
509 |             callback,
510 |             message,
    |
info: Function defined here
   --> gateway/platforms/telegram_nutrition_onboarding_runtime_callback.py:114:15
    |
112 |     TelegramNutritionOnboardingRuntimeNoticeMixin
113 | ):
114 |     async def handle_callback(
    |               ^^^^^^^^^^^^^^^
115 |         self: Any,
116 |         query: _OnboardingCallbackQuery,
    |         ------------------------------- Parameter declared here
117 |         data: str,
118 |         message: _OnboardingCallbackMessage,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/gateway/test_telegram_operator_notification_recovery.py:522:13
    |
520 |                 binding,
521 |             ),
522 |             authority=authority,
    |             ^^^^^^^^^^^^^^^^^^^ Expected `OnboardingAuthority`, found `SimpleNamespace`
523 |             evidence=evidence,
524 |         ),
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> tests/gateway/test_telegram_operator_notification_recovery.py:523:13
    |
521 |             ),
522 |             authority=authority,
523 |             evidence=evidence,
    |             ^^^^^^^^^^^^^^^^^ Expected `MessageEvidence`, found `SimpleNamespace`
524 |         ),
525 |     )
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `handle_callback` is incorrect
   --> tests/gateway/test_telegram_operator_notification_recovery.py:619:13
    |
617 |         await TelegramNutritionOnboardingRuntimeCallbackMixin.handle_callback(
618 |             runtime,
619 |             query,
    |             ^^^^^ Expected `_OnboardingCallbackQuery`, found `SimpleNamespace`
620 |             callback,
621 |             SimpleNamespace(message_id=77),
    |
info: Function defined here
   --> gateway/platforms/telegram_nutrition_onboarding_runtime_callback.py:114:15
    |
112 |     TelegramNutritionOnboardingRuntimeNoticeMixin
113 | ):
114 |     async def handle_callback(
    |               ^^^^^^^^^^^^^^^
115 |         self: Any,
116 |         query: _OnboardingCallbackQuery,
    |         ------------------------------- Parameter declared here
117 |         data: str,
118 |         message: _OnboardingCallbackMessage,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-assignment]: Object of type `(_session) -> Unknown` is not assignable to attribute `_current_authority` of type `def _current_authority(self, session: Any) -> Any`
   --> tests/gateway/test_telegram_operator_notification_recovery.py:731:5
    |
729 |         candidate_epoch="c" * 64,
730 |     )
731 |     first._current_authority = lambda _session: SimpleNamespace()
    |     ^^^^^^^^^^^^^^^^^^^^^^^^
732 |     first_payload = first._operator_attention_payload(
733 |         session=session,
    |
info: Implicit shadowing of function `_current_authority`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `(_session) -> Unknown` is not assignable to attribute `_current_authority` of type `def _current_authority(self, session: Any) -> Any`
   --> tests/gateway/test_telegram_operator_notification_recovery.py:749:5
    |
747 |         candidate_epoch="f" * 64,
748 |     )
749 |     successor._current_authority = lambda _session: SimpleNamespace()
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
750 |     successor_payload = successor._operator_attention_payload(
751 |         session=session,
    |
info: Implicit shadowing of function `_current_authority`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `(_service, _session_id) -> Unknown` is not assignable to attribute `_current_publication` of type `def _current_publication(service: Any, session_id: str) -> Any | None`
   --> tests/gateway/test_telegram_operator_notification_recovery.py:841:5
    |
840 |     transport = TelegramNutritionOnboardingRuntimePublicationTransportMixin()
841 |     transport._current_publication = lambda _service, _session_id: SimpleNamespace(
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
842 |         payload=status_payload,
843 |     )
    |
info: Implicit shadowing of function `_current_publication`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `(_session, _role) -> Unknown` is not assignable to attribute `_route` of type `def _route(self, session: Any, role: str) -> tuple[str, str]`
   --> tests/gateway/test_telegram_operator_notification_recovery.py:844:5
    |
842 |         payload=status_payload,
843 |     )
844 |     transport._route = lambda _session, _role: ("12", "0")
    |     ^^^^^^^^^^^^^^^^
845 |     store = SimpleNamespace(mark_prepared=Mock())
846 |     service = SimpleNamespace(store=store)
    |
info: Implicit shadowing of function `_route`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `(_service, _session_id) -> Unknown` is not assignable to attribute `_current_publication` of type `def _current_publication(service: Any, session_id: str) -> Any | None`
   --> tests/gateway/test_telegram_operator_notification_recovery.py:872:5
    |
870 |         TelegramNutritionOnboardingRuntimePublicationTransportMixin()
871 |     )
872 |     recovery_transport._current_publication = (
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
873 |         lambda _service, _session_id: SimpleNamespace(
874 |             generation=26,
    |
info: Implicit shadowing of function `_current_publication`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `(_session, _role) -> Unknown` is not assignable to attribute `_route` of type `def _route(self, session: Any, role: str) -> tuple[str, str]`
   --> tests/gateway/test_telegram_operator_notification_recovery.py:878:5
    |
876 |         )
877 |     )
878 |     recovery_transport._route = lambda _session, _role: ("12", "0")
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
879 |     prepared = SimpleNamespace(
880 |         generation=27,
    |
info: Implicit shadowing of function `_route`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[invalid-argument-type]: Argument to function `recover_operator_status` is incorrect
   --> tests/gateway/test_telegram_operator_notification_recovery.py:932:13
    |
930 |     async def exercise() -> tuple[int | None, int | None]:
931 |         handled = await TelegramNutritionOnboardingRuntimePublicationMixin.recover_operator_status(
932 |             runtime,
    |             ^^^^^^^ Expected `TelegramNutritionOnboardingRuntimePublicationMixin`, found `SimpleNamespace`
933 |             actor_user_id=12,
934 |             chat_id=12,
    |
info: Function defined here
   --> gateway/platforms/telegram_nutrition_onboarding_runtime_publication.py:158:15
    |
156 |         return decorated
157 |
158 |     async def recover_operator_status(
    |               ^^^^^^^^^^^^^^^^^^^^^^^
159 |         self,
    |         ---- Parameter declared here
160 |         *,
161 |         actor_user_id: int,
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `recover_operator_status` is incorrect
   --> tests/gateway/test_telegram_operator_notification_recovery.py:939:13
    |
937 |         )
938 |         rejected = await TelegramNutritionOnboardingRuntimePublicationMixin.recover_operator_status(
939 |             runtime,
    |             ^^^^^^^ Expected `TelegramNutritionOnboardingRuntimePublicationMixin`, found `SimpleNamespace`
940 |             actor_user_id=99,
941 |             chat_id=12,
    |
info: Function defined here
   --> gateway/platforms/telegram_nutrition_onboarding_runtime_publication.py:158:15
    |
156 |         return decorated
157 |
158 |     async def recover_operator_status(
    |               ^^^^^^^^^^^^^^^^^^^^^^^
159 |         self,
    |         ---- Parameter declared here
160 |         *,
161 |         actor_user_id: int,
    |
info: rule `invalid-argument-type` is enabled by default

error[unresolved-attribute]: Unresolved attribute `_storage` on type `_FakeService`
   --> tests/gateway/test_telegram_physique_checkin.py:150:9
    |
148 |     def test_finalized_snapshot_exports_branch_state_for_grounding(self, tmp_path):
149 |         service = _FakeService()
150 |         service._storage = MagicMock()
    |         ^^^^^^^^^^^^^^^^
151 |         service._storage.load.return_value = SimpleNamespace(
152 |             owner_id="owner-1",
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `_FakeService` has no attribute `_storage`
   --> tests/gateway/test_telegram_physique_checkin.py:151:9
    |
149 |         service = _FakeService()
150 |         service._storage = MagicMock()
151 |         service._storage.load.return_value = SimpleNamespace(
    |         ^^^^^^^^^^^^^^^^
152 |             owner_id="owner-1",
153 |             topic_id="101",
    |
info: rule `unresolved-attribute` is enabled by default

error[invalid-assignment]: Object of type `MagicMock` is not assignable to attribute `answer` of type `def answer(self, context, session_id, version, action, value=None) -> Unknown`
   --> tests/gateway/test_telegram_physique_checkin.py:182:9
    |
180 |         binding.step = "sleep_quality"
181 |         binding.awaiting_text = False
182 |         service.answer = MagicMock(
    |         ^^^^^^^^^^^^^^
183 |             return_value=_FakeResult(version=2, step="safety_ack", status="safety_stop", message="stop_and_escalate")
184 |         )
    |
info: Implicit shadowing of function `answer`, add an annotation to make it explicit if this is intentional
info: rule `invalid-assignment` is enabled by default

error[unresolved-attribute]: Object of type `bound method _FakeService.answer(context, session_id, version, action, value=None) -> Unknown` has no attribute `assert_called_once`
   --> tests/gateway/test_telegram_physique_checkin.py:195:9
    |
193 |         assert reply is not None and reply.accepted is True
194 |         assert reply.prompt is not None and "진료" in reply.prompt.text
195 |         service.answer.assert_called_once()
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
196 |         assert service.answer.call_args.args[3:] == ("value", "흉통과 호흡 곤란이 있습니다")
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `bound method _FakeService.answer(context, session_id, version, action, value=None) -> Unknown` has no attribute `call_args`
   --> tests/gateway/test_telegram_physique_checkin.py:196:16
    |
194 |         assert reply.prompt is not None and "진료" in reply.prompt.text
195 |         service.answer.assert_called_once()
196 |         assert service.answer.call_args.args[3:] == ("value", "흉통과 호흡 곤란이 있습니다")
    |                ^^^^^^^^^^^^^^^^^^^^^^^^
197 |
198 |     @pytest.mark.parametrize("flow", ["morning", "workout", "nutrition_daily"])
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `handled` is not defined on `None` in union `WizardReply | None`
   --> tests/gateway/test_telegram_physique_checkin.py:346:16
    |
345 |         accepted = bridge.handle_text("70.2", "owner-1", "chat-1", "101")
346 |         assert accepted.handled is True and accepted.accepted is True
    |                ^^^^^^^^^^^^^^^^
347 |         assert service.answers == [("0123456789abcdef0123456789abcdef", 0, "value", "70.2")]
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `accepted` is not defined on `None` in union `WizardReply | None`
   --> tests/gateway/test_telegram_physique_checkin.py:346:45
    |
345 |         accepted = bridge.handle_text("70.2", "owner-1", "chat-1", "101")
346 |         assert accepted.handled is True and accepted.accepted is True
    |                                             ^^^^^^^^^^^^^^^^^
347 |         assert service.answers == [("0123456789abcdef0123456789abcdef", 0, "value", "70.2")]
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `handled` is not defined on `None` in union `WizardReply | None`
   --> tests/gateway/test_telegram_physique_checkin.py:351:16
    |
349 |         denied = bridge.handle_text("71.0", "foreign", "chat-1", "101")
350 |         wrong_topic = bridge.handle_text("71.0", "owner-1", "chat-1", "other-topic")
351 |         assert denied.handled is True and denied.accepted is False
    |                ^^^^^^^^^^^^^^
352 |         assert wrong_topic is not None and wrong_topic.accepted is False
353 |         assert len(service.answers) == 1
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `accepted` is not defined on `None` in union `WizardReply | None`
   --> tests/gateway/test_telegram_physique_checkin.py:351:43
    |
349 |         denied = bridge.handle_text("71.0", "foreign", "chat-1", "101")
350 |         wrong_topic = bridge.handle_text("71.0", "owner-1", "chat-1", "other-topic")
351 |         assert denied.handled is True and denied.accepted is False
    |                                           ^^^^^^^^^^^^^^^
352 |         assert wrong_topic is not None and wrong_topic.accepted is False
353 |         assert len(service.answers) == 1
    |
info: rule `unresolved-attribute` is enabled by default

error[not-subscriptable]: Cannot subscript object of type `object` with no `__getitem__` method
   --> tests/gateway/test_telegram_physique_checkin.py:376:16
    |
374 |         snapshot = bridge.active_checkin_snapshot()
375 |         assert snapshot is not None
376 |         assert snapshot["answers"]["bodyweight"] is None
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
377 |
378 |     def test_model_can_rewrite_the_current_sleep_quality_prompt_without_advancing_the_draft(self, tmp_path):
    |
info: rule `not-subscriptable` is enabled by default

error[unresolved-attribute]: Object of type `~None` has no attribute `dedupe_key`
   --> tests/gateway/test_telegram_physique_checkin.py:520:16
    |
518 |         event = bridge.finalized_event(session_id)
519 |         assert event is not None
520 |         assert event.dedupe_key == "trainer-session:customer-1:" + event.occurred_at_kst[:10]
    |                ^^^^^^^^^^^^^^^^
521 |         assert event.provenance.source_ref == "pilot:customer-1:trainer_session_record"
522 | class TestPhysiqueTelegramAdapterIngress:
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `~None` has no attribute `occurred_at_kst`
   --> tests/gateway/test_telegram_physique_checkin.py:520:68
    |
518 |         event = bridge.finalized_event(session_id)
519 |         assert event is not None
520 |         assert event.dedupe_key == "trainer-session:customer-1:" + event.occurred_at_kst[:10]
    |                                                                    ^^^^^^^^^^^^^^^^^^^^^
521 |         assert event.provenance.source_ref == "pilot:customer-1:trainer_session_record"
522 | class TestPhysiqueTelegramAdapterIngress:
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `~None` has no attribute `provenance`
   --> tests/gateway/test_telegram_physique_checkin.py:521:16
    |
519 |         assert event is not None
520 |         assert event.dedupe_key == "trainer-session:customer-1:" + event.occurred_at_kst[:10]
521 |         assert event.provenance.source_ref == "pilot:customer-1:trainer_session_record"
    |                ^^^^^^^^^^^^^^^^
522 | class TestPhysiqueTelegramAdapterIngress:
523 |     @staticmethod
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `kwargs` is not defined on `None` in union `_Call | None`
   --> tests/gateway/test_telegram_physique_checkin.py:782:16
    |
780 |         # Then: the saved snapshot remains renderable even when typed grounding is unavailable.
781 |         adapter._humanize_korean_copy.assert_not_awaited()
782 |         sent = adapter._send_message_with_thread_fallback.await_args.kwargs
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
783 |         assert "오늘 체크인 완료" in sent["text"]
784 |         bridge.handle_text.assert_not_called()
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `kwargs` is not defined on `None` in union `_Call | None`
    --> tests/gateway/test_telegram_physique_checkin.py:2043:16
     |
2041 |         assert first.success is True and second.success is True
2042 |         assert provider.await_count == 1
2043 |         assert provider.await_args.kwargs == {
     |                ^^^^^^^^^^^^^^^^^^^^^^^^^^
2044 |             "chat_id": "customer-chat",
2045 |             "message_thread_id": "customer-topic",
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Attribute `kwargs` is not defined on `None` in union `_Call | None`
    --> tests/gateway/test_telegram_physique_checkin.py:2478:12
     |
2477 |     assert adapter._send_message_strict_topic.await_count == 1
2478 |     assert adapter._send_message_strict_topic.await_args.kwargs == {
     |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2479 |         "chat_id": "review-chat",
2480 |         "message_thread_id": "59",
     |
info: rule `unresolved-attribute` is enabled by default

Found 1473 diagnostics
