gateway/platforms/telegram_room_bootstrap.py:562:        session = RoomBootstrapSession(
gateway/platforms/telegram_room_bootstrap.py-563-            session_id="rb_" + secrets.token_urlsafe(16),
gateway/platforms/telegram_room_bootstrap.py-564-            sid_hash=sid_hash,
gateway/platforms/telegram_room_bootstrap.py-565-            customer_draft=draft,
--
gateway/platforms/telegram_room_bootstrap.py-580-            self._write_unlocked(sessions)
gateway/platforms/telegram_room_bootstrap.py-581-        return PreparedRoomBootstrap(sid, session, build_startgroup_link(username, sid))
gateway/platforms/telegram_room_bootstrap.py-582-
gateway/platforms/telegram_room_bootstrap.py:583:    def prepare_rehearsal_customer_invite(
gateway/platforms/telegram_room_bootstrap.py-584-        self,
gateway/platforms/telegram_room_bootstrap.py-585-        draft: CustomerDraft,
gateway/platforms/telegram_room_bootstrap.py-586-        *,
--
gateway/platforms/telegram_room_bootstrap.py-607-        if _SID_RE.fullmatch(sid) is None:  # pragma: no cover - secrets contract guard
gateway/platforms/telegram_room_bootstrap.py-608-            raise RuntimeError("generated bootstrap SID has an invalid shape")
gateway/platforms/telegram_room_bootstrap.py-609-        private_draft = draft
gateway/platforms/telegram_room_bootstrap.py:610:        session = RoomBootstrapSession(
gateway/platforms/telegram_room_bootstrap.py-611-            session_id="rb_" + secrets.token_urlsafe(16),
gateway/platforms/telegram_room_bootstrap.py-612-            sid_hash=_sha256(sid.encode("ascii")),
gateway/platforms/telegram_room_bootstrap.py-613-            customer_draft=private_draft,
--
gateway/platforms/telegram_room_bootstrap.py-995-
gateway/platforms/telegram_room_bootstrap.py-996-        return self._mutate(session_id, expected_generation, mutate)
gateway/platforms/telegram_room_bootstrap.py-997-
gateway/platforms/telegram_room_bootstrap.py:998:    def _complete_committed_activation(
gateway/platforms/telegram_room_bootstrap.py-999-        self,
gateway/platforms/telegram_room_bootstrap.py-1000-        session_id: str,
gateway/platforms/telegram_room_bootstrap.py-1001-        *,
--
gateway/platforms/telegram_room_bootstrap.py-1007-            session: RoomBootstrapSession,
gateway/platforms/telegram_room_bootstrap.py-1008-            now: datetime,
gateway/platforms/telegram_room_bootstrap.py-1009-        ) -> RoomBootstrapSession:
gateway/platforms/telegram_room_bootstrap.py:1010:            if session.state is not BootstrapState.AWAITING_ACTIVATION:
gateway/platforms/telegram_room_bootstrap.py-1011-                raise BootstrapError(
gateway/platforms/telegram_room_bootstrap.py-1012-                    "session is not awaiting committed activation completion"
gateway/platforms/telegram_room_bootstrap.py-1013-                )
--
gateway/platforms/telegram_room_bootstrap.py-1448-                raise GenerationConflict("committed consent authority is stale or inexact")
gateway/platforms/telegram_room_bootstrap.py-1449-            return replace(
gateway/platforms/telegram_room_bootstrap.py-1450-                session,
gateway/platforms/telegram_room_bootstrap.py:1451:                state=BootstrapState.AWAITING_ACTIVATION,
gateway/platforms/telegram_room_bootstrap.py-1452-                consent_card_message_id=None,
gateway/platforms/telegram_room_bootstrap.py-1453-                failure_code=None,
gateway/platforms/telegram_room_bootstrap.py-1454-                generation=session.generation + 1,
--
gateway/platforms/telegram_room_bootstrap.py-2255-        bot = _telegram_id(bot, "bot")
gateway/platforms/telegram_room_bootstrap.py-2256-    if failure is not None:
gateway/platforms/telegram_room_bootstrap.py-2257-        failure = _optional_code(failure)
gateway/platforms/telegram_room_bootstrap.py:2258:    return RoomBootstrapSession(
gateway/platforms/telegram_room_bootstrap.py-2259-        session_id=session_id, sid_hash=sid_hash, customer_draft=draft,
gateway/platforms/telegram_room_bootstrap.py-2260-        customer_draft_digest=digest, bot_username=username, state=state_value,
gateway/platforms/telegram_room_bootstrap.py-2261-        generation=generation, created_at=created, updated_at=updated,
--
tests/gateway/test_task22_supplemental_owner_review.py-295-    *,
tests/gateway/test_task22_supplemental_owner_review.py-296-    update_id: int = 500,
tests/gateway/test_task22_supplemental_owner_review.py-297-) -> None:
tests/gateway/test_task22_supplemental_owner_review.py:298:    store.prepare(authority=authority, route=route)
tests/gateway/test_task22_supplemental_owner_review.py-299-    _commit_publication(store.outbox, generation=27, state="owner_review", message_id=122)
tests/gateway/test_task22_supplemental_owner_review.py-300-    event = store.outbox.record_owner_callback(
tests/gateway/test_task22_supplemental_owner_review.py-301-        session_id="sid",
--
tests/gateway/test_task22_supplemental_owner_review.py-428-    tmp_path: Path,
tests/gateway/test_task22_supplemental_owner_review.py-429-) -> None:
tests/gateway/test_task22_supplemental_owner_review.py-430-    store, authority, route = _fixture(tmp_path)
tests/gateway/test_task22_supplemental_owner_review.py:431:    store.prepare(authority=authority, route=route)
tests/gateway/test_task22_supplemental_owner_review.py-432-    _commit_publication(store.outbox, generation=28, state="ready", message_id=123)
tests/gateway/test_task22_supplemental_owner_review.py-433-
tests/gateway/test_task22_supplemental_owner_review.py-434-    _prepare_and_review(store, authority, route)
--
tests/gateway/test_task22_supplemental_owner_review.py-447-    tmp_path: Path,
tests/gateway/test_task22_supplemental_owner_review.py-448-) -> None:
tests/gateway/test_task22_supplemental_owner_review.py-449-    store, authority_values, route = _fixture(tmp_path)
tests/gateway/test_task22_supplemental_owner_review.py:450:    store.prepare(authority=authority_values, route=route)
tests/gateway/test_task22_supplemental_owner_review.py-451-    runtime = object.__new__(TelegramNutritionOnboardingRuntime)
tests/gateway/test_task22_supplemental_owner_review.py-452-    runtime.profile_root = store.paths.profile_root
tests/gateway/test_task22_supplemental_owner_review.py-453-    runtime._publication_outbox = store.outbox
--
tests/gateway/test_task22_supplemental_owner_review.py-546-    tmp_path: Path,
tests/gateway/test_task22_supplemental_owner_review.py-547-) -> None:
tests/gateway/test_task22_supplemental_owner_review.py-548-    store, authority, route = _fixture(tmp_path)
tests/gateway/test_task22_supplemental_owner_review.py:549:    store.prepare(authority=authority, route=route)
tests/gateway/test_task22_supplemental_owner_review.py-550-    payload = {"state": "ready", "body_digest": hashlib.sha256(b"ready").hexdigest()}
tests/gateway/test_task22_supplemental_owner_review.py-551-    receipt, created = store.outbox.claim(
tests/gateway/test_task22_supplemental_owner_review.py-552-        session_id="sid",
--
tests/gateway/test_task22_supplemental_owner_review.py-856-            store.paths.original_journal,
tests/gateway/test_task22_supplemental_owner_review.py-857-        )
tests/gateway/test_task22_supplemental_owner_review.py-858-    }
tests/gateway/test_task22_supplemental_owner_review.py:859:    prepared = store.prepare(authority=authority, route=route)
tests/gateway/test_task22_supplemental_owner_review.py-860-    assert prepared.phase is SupplementalReviewPhase.PREPARED
tests/gateway/test_task22_supplemental_owner_review.py-861-    journal = json.loads(store.paths.journal.read_text())
tests/gateway/test_task22_supplemental_owner_review.py-862-    assert journal["classifications"]["25"] == "historical_provenance_incomplete"
--
tests/gateway/test_task22_supplemental_owner_review.py-889-    tmp_path: Path,
tests/gateway/test_task22_supplemental_owner_review.py-890-) -> None:
tests/gateway/test_task22_supplemental_owner_review.py-891-    store, authority_values, route = _fixture(tmp_path)
tests/gateway/test_task22_supplemental_owner_review.py:892:    store.prepare(authority=authority_values, route=route)
tests/gateway/test_task22_supplemental_owner_review.py-893-    _commit_publication(store.outbox, generation=27, state="owner_review", message_id=122)
tests/gateway/test_task22_supplemental_owner_review.py-894-    runtime = object.__new__(TelegramNutritionOnboardingRuntime)
tests/gateway/test_task22_supplemental_owner_review.py-895-    runtime.profile_root = store.paths.profile_root
--
tests/gateway/test_task22_supplemental_owner_review.py-1028-        removal, "verify_committed_removal_receipt", verify_live_removal
tests/gateway/test_task22_supplemental_owner_review.py-1029-    )
tests/gateway/test_task22_supplemental_owner_review.py-1030-
tests/gateway/test_task22_supplemental_owner_review.py:1031:    prepared = store.prepare(authority=authority, route=route)
tests/gateway/test_task22_supplemental_owner_review.py-1032-    assert store.load(authority=authority, route=route) == prepared
tests/gateway/test_task22_supplemental_owner_review.py-1033-    assert replay_removal_calls == [{}]
tests/gateway/test_task22_supplemental_owner_review.py-1034-
--
tests/gateway/test_task22_supplemental_owner_review.py-1198-        ),
tests/gateway/test_task22_supplemental_owner_review.py-1199-        outbox=store.outbox,
tests/gateway/test_task22_supplemental_owner_review.py-1200-    )
tests/gateway/test_task22_supplemental_owner_review.py:1201:    historical_store.prepare(authority=authority, route=route)
tests/gateway/test_task22_supplemental_owner_review.py-1202-    for generation in range(22):
tests/gateway/test_task22_supplemental_owner_review.py-1203-        _commit_publication(
tests/gateway/test_task22_supplemental_owner_review.py-1204-            historical_store.outbox,
--
tests/gateway/test_task22_supplemental_owner_review.py-1343-    phase: str,
tests/gateway/test_task22_supplemental_owner_review.py-1344-) -> None:
tests/gateway/test_task22_supplemental_owner_review.py-1345-    store, authority, route = _fixture(tmp_path)
tests/gateway/test_task22_supplemental_owner_review.py:1346:    store.prepare(authority=authority, route=route)
tests/gateway/test_task22_supplemental_owner_review.py-1347-    if phase == "review":
tests/gateway/test_task22_supplemental_owner_review.py-1348-        _prepare_and_review(store, authority, route)
tests/gateway/test_task22_supplemental_owner_review.py-1349-    with pytest.raises(SupplementalReviewError, match="approval"):
--
tests/gateway/test_task22_supplemental_owner_review.py-1356-
tests/gateway/test_task22_supplemental_owner_review.py-1357-def test_restart_pending_does_not_create_or_duplicate_publication(tmp_path: Path) -> None:
tests/gateway/test_task22_supplemental_owner_review.py-1358-    store, authority, route = _fixture(tmp_path)
tests/gateway/test_task22_supplemental_owner_review.py:1359:    first = store.prepare(authority=authority, route=route)
tests/gateway/test_task22_supplemental_owner_review.py-1360-    restarted = discover_supplemental_review_store(
tests/gateway/test_task22_supplemental_owner_review.py-1361-        store.paths.profile_root,
tests/gateway/test_task22_supplemental_owner_review.py-1362-        outbox=GatewayOnboardingPublicationOutbox(store.paths.profile_root),
--
tests/gateway/test_task22_supplemental_owner_review.py-1373-    tmp_path: Path,
tests/gateway/test_task22_supplemental_owner_review.py-1374-) -> None:
tests/gateway/test_task22_supplemental_owner_review.py-1375-    store, authority, route = _fixture(tmp_path)
tests/gateway/test_task22_supplemental_owner_review.py:1376:    store.prepare(authority=authority, route=route)
tests/gateway/test_task22_supplemental_owner_review.py-1377-    current = SimpleNamespace(
tests/gateway/test_task22_supplemental_owner_review.py-1378-        generation=26,
tests/gateway/test_task22_supplemental_owner_review.py-1379-        payload={"state": "ready"},
--
tests/gateway/test_task22_supplemental_owner_review.py-1417-        customer_key="customer",
tests/gateway/test_task22_supplemental_owner_review.py-1418-        session_id="sid",
tests/gateway/test_task22_supplemental_owner_review.py-1419-        sid_hash=hashlib.sha256(b"sid").hexdigest(),
tests/gateway/test_task22_supplemental_owner_review.py:1420:        state=BootstrapState.AWAITING_ACTIVATION,
tests/gateway/test_task22_supplemental_owner_review.py-1421-    )
tests/gateway/test_task22_supplemental_owner_review.py-1422-    runtime = object.__new__(TelegramNutritionOnboardingRuntime)
tests/gateway/test_task22_supplemental_owner_review.py-1423-    runtime.profile_root = store.paths.profile_root
--
tests/gateway/test_task22_supplemental_owner_review.py-1457-    operation: str,
tests/gateway/test_task22_supplemental_owner_review.py-1458-) -> None:
tests/gateway/test_task22_supplemental_owner_review.py-1459-    store, authority, route = _fixture(tmp_path)
tests/gateway/test_task22_supplemental_owner_review.py:1460:    store.prepare(authority=authority, route=route)
tests/gateway/test_task22_supplemental_owner_review.py-1461-    before = _tree_snapshot(store.paths.profile_root)
tests/gateway/test_task22_supplemental_owner_review.py-1462-
tests/gateway/test_task22_supplemental_owner_review.py-1463-    assert _run_preflight(store, monkeypatch, [operation]) == 1
--
tests/gateway/test_task22_supplemental_owner_review.py-1471-
tests/gateway/test_task22_supplemental_owner_review.py-1472-def test_reseal_resumes_after_persisted_receipt_without_publication(tmp_path: Path) -> None:
tests/gateway/test_task22_supplemental_owner_review.py-1473-    store, authority, route = _fixture(tmp_path)
tests/gateway/test_task22_supplemental_owner_review.py:1474:    store.prepare(authority=authority, route=route)
tests/gateway/test_task22_supplemental_owner_review.py-1475-    successor_manifest = store.paths.candidate_manifest.with_name("successor.json")
tests/gateway/test_task22_supplemental_owner_review.py-1476-    _write(successor_manifest, {"candidate_digest": "d" * 64})
tests/gateway/test_task22_supplemental_owner_review.py-1477-    successor_store = SupplementalReviewStore(
--
tests/gateway/test_task22_supplemental_owner_review.py-1498-
tests/gateway/test_task22_supplemental_owner_review.py-1499-def test_reseal_rejects_existing_generation27_authority(tmp_path: Path) -> None:
tests/gateway/test_task22_supplemental_owner_review.py-1500-    store, authority, route = _fixture(tmp_path)
tests/gateway/test_task22_supplemental_owner_review.py:1501:    store.prepare(authority=authority, route=route)
tests/gateway/test_task22_supplemental_owner_review.py-1502-    _commit_publication(store.outbox, generation=27, state="owner_review", message_id=122)
tests/gateway/test_task22_supplemental_owner_review.py-1503-    journal = store.paths.journal.read_bytes()
tests/gateway/test_task22_supplemental_owner_review.py-1504-    successor_manifest = store.paths.candidate_manifest.with_name("successor.json")
--
tests/gateway/test_task22_supplemental_owner_review.py-1523-@pytest.mark.parametrize("boundary", ("prepared", "envelope", "review", "terminal"))
tests/gateway/test_task22_supplemental_owner_review.py-1524-def test_every_crash_phase_recovers_forward_once(tmp_path: Path, boundary: str) -> None:
tests/gateway/test_task22_supplemental_owner_review.py-1525-    store, authority, route = _fixture(tmp_path)
tests/gateway/test_task22_supplemental_owner_review.py:1526:    store.prepare(authority=authority, route=route)
tests/gateway/test_task22_supplemental_owner_review.py-1527-    if boundary == "prepared":
tests/gateway/test_task22_supplemental_owner_review.py-1528-        loaded = store.load(authority=authority, route=route)
tests/gateway/test_task22_supplemental_owner_review.py-1529-        assert loaded is not None
--
tests/gateway/test_task22_supplemental_owner_review.py-1565-
tests/gateway/test_task22_supplemental_owner_review.py-1566-def test_unknown_provider_outcome_blocks_without_resend_authority(tmp_path: Path) -> None:
tests/gateway/test_task22_supplemental_owner_review.py-1567-    store, authority, route = _fixture(tmp_path)
tests/gateway/test_task22_supplemental_owner_review.py:1568:    store.prepare(authority=authority, route=route)
tests/gateway/test_task22_supplemental_owner_review.py-1569-    payload = {"state": "owner_review", "body_digest": "d" * 64}
tests/gateway/test_task22_supplemental_owner_review.py-1570-    store.outbox.claim(
tests/gateway/test_task22_supplemental_owner_review.py-1571-        session_id="sid", generation=27, payload=payload, route=route,
--
tests/gateway/test_task22_supplemental_owner_review.py-1596-    tmp_path: Path, field: str, value: object, message: str
tests/gateway/test_task22_supplemental_owner_review.py-1597-) -> None:
tests/gateway/test_task22_supplemental_owner_review.py-1598-    store, authority, route = _fixture(tmp_path)
tests/gateway/test_task22_supplemental_owner_review.py:1599:    store.prepare(authority=authority, route=route)
tests/gateway/test_task22_supplemental_owner_review.py-1600-    _commit_publication(store.outbox, generation=27, state="owner_review", message_id=122)
tests/gateway/test_task22_supplemental_owner_review.py-1601-    kwargs: dict[str, Any] = dict(
tests/gateway/test_task22_supplemental_owner_review.py-1602-        session_id="sid", customer_key="customer", action="Approve", actor_user_id=12,
--
tests/gateway/test_task22_supplemental_owner_review.py-1634-    bootstrap = json.loads(store.paths.bootstrap.read_text(encoding="utf-8"))
tests/gateway/test_task22_supplemental_owner_review.py-1635-    bootstrap["sessions"][0]["sid_hash"] = embedded_hash
tests/gateway/test_task22_supplemental_owner_review.py-1636-    _write(store.paths.bootstrap, bootstrap)
tests/gateway/test_task22_supplemental_owner_review.py:1637:    store.prepare(authority=authority, route=route)
tests/gateway/test_task22_supplemental_owner_review.py-1638-    for generation in range(22):
tests/gateway/test_task22_supplemental_owner_review.py-1639-        _commit_publication(store.outbox, generation=generation, state="collecting", role="customer")
tests/gateway/test_task22_supplemental_owner_review.py-1640-    _commit_publication(store.outbox, generation=24, state="trainer_review", role="trainer")
--
tests/gateway/test_task22_supplemental_owner_review.py-1752-    crash_boundary: str | None,
tests/gateway/test_task22_supplemental_owner_review.py-1753-) -> None:
tests/gateway/test_task22_supplemental_owner_review.py-1754-    store, authority, route = _fixture(tmp_path)
tests/gateway/test_task22_supplemental_owner_review.py:1755:    store.prepare(authority=authority, route=route)
tests/gateway/test_task22_supplemental_owner_review.py-1756-    _commit_publication(store.outbox, generation=27, state="owner_review", message_id=122)
tests/gateway/test_task22_supplemental_owner_review.py-1757-    event = store.outbox.record_owner_callback(
tests/gateway/test_task22_supplemental_owner_review.py-1758-        session_id="sid", customer_key="customer", action="Approve", actor_user_id=12,
--
tests/gateway/test_task22_supplemental_owner_review.py-1830-    capsys: pytest.CaptureFixture[str],
tests/gateway/test_task22_supplemental_owner_review.py-1831-) -> None:
tests/gateway/test_task22_supplemental_owner_review.py-1832-    store, _authority, _route = _fixture(tmp_path)
tests/gateway/test_task22_supplemental_owner_review.py:1833:    store.prepare(authority=(12, -100, 22), route=("-100", "22"))
tests/gateway/test_task22_supplemental_owner_review.py-1834-    before = _tree_snapshot(store.paths.profile_root)
tests/gateway/test_task22_supplemental_owner_review.py-1835-
tests/gateway/test_task22_supplemental_owner_review.py-1836-    assert _run_preflight(store, monkeypatch, ["--recover-exact", "wrong"]) == 1
--
tests/gateway/test_task22_supplemental_owner_review.py-2046-@pytest.mark.parametrize("target", ("manifest", "baseline", "ready", "original", "pointer"))
tests/gateway/test_task22_supplemental_owner_review.py-2047-def test_freeze_drift_and_rebinding_fail_closed(tmp_path: Path, target: str) -> None:
tests/gateway/test_task22_supplemental_owner_review.py-2048-    store, authority, route = _fixture(tmp_path)
tests/gateway/test_task22_supplemental_owner_review.py:2049:    store.prepare(authority=authority, route=route)
tests/gateway/test_task22_supplemental_owner_review.py-2050-    path = {
tests/gateway/test_task22_supplemental_owner_review.py-2051-        "manifest": store.paths.candidate_manifest,
tests/gateway/test_task22_supplemental_owner_review.py-2052-        "baseline": store.paths.baseline_candidate,
--
tests/gateway/test_task22_supplemental_owner_review.py-2064-) -> None:
tests/gateway/test_task22_supplemental_owner_review.py-2065-    store, authority, route = _fixture(tmp_path)
tests/gateway/test_task22_supplemental_owner_review.py-2066-
tests/gateway/test_task22_supplemental_owner_review.py:2067:    store.prepare(authority=authority, route=route)
tests/gateway/test_task22_supplemental_owner_review.py-2068-
tests/gateway/test_task22_supplemental_owner_review.py-2069-    journal = json.loads(store.paths.journal.read_text(encoding="utf-8"))
tests/gateway/test_task22_supplemental_owner_review.py-2070-    expected_paths = (
--
tests/gateway/test_task22_supplemental_owner_review.py-2102-    tmp_path: Path,
tests/gateway/test_task22_supplemental_owner_review.py-2103-) -> None:
tests/gateway/test_task22_supplemental_owner_review.py-2104-    store, authority, route = _fixture(tmp_path)
tests/gateway/test_task22_supplemental_owner_review.py:2105:    store.prepare(authority=authority, route=route)
tests/gateway/test_task22_supplemental_owner_review.py-2106-    path = store.paths.baseline
tests/gateway/test_task22_supplemental_owner_review.py-2107-    before = path.stat()
tests/gateway/test_task22_supplemental_owner_review.py-2108-    changed = path.read_bytes().replace(b'"owner_review_receipt":"' + b"o" * 64, b'"owner_review_receipt":"' + b"x" * 64)
--
tests/gateway/test_task22_supplemental_owner_review.py-2122-    capsys: pytest.CaptureFixture[str],
tests/gateway/test_task22_supplemental_owner_review.py-2123-) -> None:
tests/gateway/test_task22_supplemental_owner_review.py-2124-    store, authority, route = _fixture(tmp_path)
tests/gateway/test_task22_supplemental_owner_review.py:2125:    store.prepare(authority=authority, route=route)
tests/gateway/test_task22_supplemental_owner_review.py-2126-    path = store.paths.baseline_candidate
tests/gateway/test_task22_supplemental_owner_review.py-2127-    data = path.read_bytes()
tests/gateway/test_task22_supplemental_owner_review.py-2128-    before_inode = path.stat().st_ino
--
tests/gateway/test_task22_supplemental_owner_review.py-2196-
tests/gateway/test_task22_supplemental_owner_review.py-2197-def test_same_byte_file_rebind_and_symlink_fail_closed(tmp_path: Path) -> None:
tests/gateway/test_task22_supplemental_owner_review.py-2198-    store, authority, route = _fixture(tmp_path)
tests/gateway/test_task22_supplemental_owner_review.py:2199:    store.prepare(authority=authority, route=route)
tests/gateway/test_task22_supplemental_owner_review.py-2200-    original = store.paths.baseline_candidate.read_bytes()
tests/gateway/test_task22_supplemental_owner_review.py-2201-    store.paths.baseline_candidate.unlink()
tests/gateway/test_task22_supplemental_owner_review.py-2202-    store.paths.baseline_candidate.write_bytes(original)
--
tests/gateway/test_task22_supplemental_owner_review.py-2210-    store.paths.baseline.rename(target)
tests/gateway/test_task22_supplemental_owner_review.py-2211-    store.paths.baseline.symlink_to(target)
tests/gateway/test_task22_supplemental_owner_review.py-2212-    with pytest.raises(SupplementalReviewError, match="private|identity|unsafe|unavailable"):
tests/gateway/test_task22_supplemental_owner_review.py:2213:        store.prepare(authority=authority, route=route)
tests/gateway/test_task22_supplemental_owner_review.py-2214-
tests/gateway/test_task22_supplemental_owner_review.py-2215-
tests/gateway/test_task22_supplemental_owner_review.py-2216-@pytest.mark.parametrize("authority", ("enabled", "trainer", "activation", "delivery", "draft"))
--
tests/gateway/test_task22_supplemental_owner_review.py-2235-        }[authority]
tests/gateway/test_task22_supplemental_owner_review.py-2236-        _write(path, {"records": [{"customer_key": "customer"}]})
tests/gateway/test_task22_supplemental_owner_review.py-2237-    with pytest.raises(SupplementalReviewError, match="downstream|trainer|activation"):
tests/gateway/test_task22_supplemental_owner_review.py:2238:        store.prepare(authority=owner, route=route)
tests/gateway/test_task22_supplemental_owner_review.py-2239-    assert store.paths.journal.exists() is False
tests/gateway/test_task22_supplemental_owner_review.py-2240-
tests/gateway/test_task22_supplemental_owner_review.py-2241-
--
tests/gateway/test_task22_supplemental_owner_review.py-2245-    try:
tests/gateway/test_task22_supplemental_owner_review.py-2246-        fcntl.flock(descriptor, fcntl.LOCK_EX | fcntl.LOCK_NB)
tests/gateway/test_task22_supplemental_owner_review.py-2247-        with pytest.raises(SupplementalReviewError, match="lock"):
tests/gateway/test_task22_supplemental_owner_review.py:2248:            store.prepare(authority=authority, route=route)
tests/gateway/test_task22_supplemental_owner_review.py-2249-    finally:
tests/gateway/test_task22_supplemental_owner_review.py-2250-        os.close(descriptor)
tests/gateway/test_task22_supplemental_owner_review.py-2251-
--
tests/gateway/test_task22_supplemental_owner_review.py-2260-        lambda self: iter([fake]) if self == Path("/proc") else original_iterdir(self),
tests/gateway/test_task22_supplemental_owner_review.py-2261-    )
tests/gateway/test_task22_supplemental_owner_review.py-2262-    with pytest.raises(SupplementalReviewError, match="process"):
tests/gateway/test_task22_supplemental_owner_review.py:2263:        store.prepare(authority=authority, route=route)
tests/gateway/test_task22_supplemental_owner_review.py-2264-
tests/gateway/test_task22_supplemental_owner_review.py-2265-
tests/gateway/test_task22_supplemental_owner_review.py-2266-def test_archive_scope_contains_journal_envelope_and_locks(tmp_path: Path) -> None:
--
tests/gateway/test_telegram_room_bootstrap_transport.py-465-        tmp_path / "state",
tests/gateway/test_telegram_room_bootstrap_transport.py-466-        now=lambda: datetime(2026, 7, 31, tzinfo=timezone.utc),
tests/gateway/test_telegram_room_bootstrap_transport.py-467-    )
tests/gateway/test_telegram_room_bootstrap_transport.py:468:    prepared = store.prepare(
tests/gateway/test_telegram_room_bootstrap_transport.py-469-        CustomerDraft(
tests/gateway/test_telegram_room_bootstrap_transport.py-470-            customer_key="first_customer",
tests/gateway/test_telegram_room_bootstrap_transport.py-471-            display_name="첫 고객",
--
tests/gateway/test_telegram_room_bootstrap_transport.py-624-        tmp_path / "state",
tests/gateway/test_telegram_room_bootstrap_transport.py-625-        now=lambda: datetime(2026, 7, 31, tzinfo=timezone.utc),
tests/gateway/test_telegram_room_bootstrap_transport.py-626-    )
tests/gateway/test_telegram_room_bootstrap_transport.py:627:    prepared = store.prepare(
tests/gateway/test_telegram_room_bootstrap_transport.py-628-        CustomerDraft(
tests/gateway/test_telegram_room_bootstrap_transport.py-629-            customer_key="first_customer",
tests/gateway/test_telegram_room_bootstrap_transport.py-630-            display_name="첫 고객",
--
tests/gateway/test_telegram_room_bootstrap_transport.py-782-        for index, state in enumerate(states)
tests/gateway/test_telegram_room_bootstrap_transport.py-783-    ) + (
tests/gateway/test_telegram_room_bootstrap_transport.py-784-        SimpleNamespace(
tests/gateway/test_telegram_room_bootstrap_transport.py:785:            state=SimpleNamespace(value="AWAITING_ACTIVATION"),
tests/gateway/test_telegram_room_bootstrap_transport.py-786-            chat_id=str(ROOM_ID - 10),
tests/gateway/test_telegram_room_bootstrap_transport.py-787-            recovery_attempts=(),
tests/gateway/test_telegram_room_bootstrap_transport.py-788-        ),
--
tests/gateway/test_telegram_room_bootstrap_transport.py-1332-    )
tests/gateway/test_telegram_room_bootstrap_transport.py-1333-
tests/gateway/test_telegram_room_bootstrap_transport.py-1334-    current = store.get(awaiting.session_id)
tests/gateway/test_telegram_room_bootstrap_transport.py:1335:    assert current.state is BootstrapState.AWAITING_ACTIVATION
tests/gateway/test_telegram_room_bootstrap_transport.py-1336-    assert current.state is not BootstrapState.ACTIVE
tests/gateway/test_telegram_room_bootstrap_transport.py-1337-    assert current.consent_card_message_id is None
tests/gateway/test_telegram_room_bootstrap_transport.py-1338-
--
tests/gateway/test_telegram_room_bootstrap_transport.py-1398-    )
tests/gateway/test_telegram_room_bootstrap_transport.py-1399-    query.edit_message_text.assert_awaited_once_with(text=reply.notice)
tests/gateway/test_telegram_room_bootstrap_transport.py-1400-    runtime.start_after_consent.assert_awaited_once()
tests/gateway/test_telegram_room_bootstrap_transport.py:1401:    assert store.get(awaiting.session_id).state is BootstrapState.AWAITING_ACTIVATION
tests/gateway/test_telegram_room_bootstrap_transport.py-1402-    assert (
tests/gateway/test_telegram_room_bootstrap_transport.py-1403-        "telegram_callback_ack_failed gate=nutrition_customer_consent "
tests/gateway/test_telegram_room_bootstrap_transport.py-1404-        "update_id=unknown error=BadRequest"
--
tests/gateway/test_telegram_room_bootstrap_transport.py-1450-
tests/gateway/test_telegram_room_bootstrap_transport.py-1451-    async def start_after_consent(**kwargs: object) -> None:
tests/gateway/test_telegram_room_bootstrap_transport.py-1452-        assert kwargs["session"] == store.get(awaiting.session_id)
tests/gateway/test_telegram_room_bootstrap_transport.py:1453:        assert store.get(awaiting.session_id).state is BootstrapState.AWAITING_ACTIVATION
tests/gateway/test_telegram_room_bootstrap_transport.py-1454-        events.append("start")
tests/gateway/test_telegram_room_bootstrap_transport.py-1455-
tests/gateway/test_telegram_room_bootstrap_transport.py-1456-    monkeypatch.setattr(
--
tests/gateway/test_telegram_room_bootstrap_transport.py-1492-        "cc1:0123456789abcdef01234567:g",
tests/gateway/test_telegram_room_bootstrap_transport.py-1493-    )
tests/gateway/test_telegram_room_bootstrap_transport.py-1494-    runtime.start_after_consent.assert_awaited_once()
tests/gateway/test_telegram_room_bootstrap_transport.py:1495:    assert store.get(awaiting.session_id).state is BootstrapState.AWAITING_ACTIVATION
tests/gateway/test_telegram_room_bootstrap_transport.py-1496-    restarted_store = RoomBootstrapStore(store.state_dir)
tests/gateway/test_telegram_room_bootstrap_transport.py-1497-    restarted = restarted_store.get(awaiting.session_id)
tests/gateway/test_telegram_room_bootstrap_transport.py:1498:    assert restarted.state is BootstrapState.AWAITING_ACTIVATION
tests/gateway/test_telegram_room_bootstrap_transport.py-1499-    assert restarted.consent_card_message_id is None
tests/gateway/test_telegram_room_bootstrap_transport.py-1500-    assert (
tests/gateway/test_telegram_room_bootstrap_transport.py-1501-        "telegram_callback_card_publication_failed "
--
tests/gateway/test_telegram_room_bootstrap_transport.py-1656-    assert events == ["ack", "consent", "start"]
tests/gateway/test_telegram_room_bootstrap_transport.py-1657-    query.edit_message_text.assert_awaited_once_with(text=reply.notice)
tests/gateway/test_telegram_room_bootstrap_transport.py-1658-    runtime.start_after_consent.assert_awaited_once()
tests/gateway/test_telegram_room_bootstrap_transport.py:1659:    assert store.get(awaiting.session_id).state is BootstrapState.AWAITING_ACTIVATION
tests/gateway/test_telegram_room_bootstrap_transport.py-1660-    assert (
tests/gateway/test_telegram_room_bootstrap_transport.py-1661-        "telegram_callback_ack_failed gate=nutrition_customer_consent "
tests/gateway/test_telegram_room_bootstrap_transport.py-1662-        "update_id=unknown error=TimeoutError"
--
tests/gateway/test_telegram_room_bootstrap_transport.py-1949-    )
tests/gateway/test_telegram_room_bootstrap_transport.py-1950-
tests/gateway/test_telegram_room_bootstrap_transport.py-1951-    reconciled = store.get(awaiting.session_id)
tests/gateway/test_telegram_room_bootstrap_transport.py:1952:    assert reconciled.state is BootstrapState.AWAITING_ACTIVATION
tests/gateway/test_telegram_room_bootstrap_transport.py-1953-    assert reconciled.consent_card_message_id is None
tests/gateway/test_telegram_room_bootstrap_transport.py-1954-    adapter._send_nutrition_topic.assert_not_awaited()
tests/gateway/test_telegram_room_bootstrap_transport.py-1955-
--
tests/gateway/test_nutrition_onboarding_reconciliation.py-472-        topic_id="0",
tests/gateway/test_nutrition_onboarding_reconciliation.py-473-    )
tests/gateway/test_nutrition_onboarding_reconciliation.py-474-    session = _OnboardingSession(
tests/gateway/test_nutrition_onboarding_reconciliation.py:475:        state=BootstrapState.AWAITING_ACTIVATION,
tests/gateway/test_nutrition_onboarding_reconciliation.py-476-        customer_key="client_001",
tests/gateway/test_nutrition_onboarding_reconciliation.py-477-        session_id="session-1",
tests/gateway/test_nutrition_onboarding_reconciliation.py-478-        chat_id="10",
--
tests/gateway/test_nutrition_onboarding_reconciliation.py-633-        topic_id="0",
tests/gateway/test_nutrition_onboarding_reconciliation.py-634-    )
tests/gateway/test_nutrition_onboarding_reconciliation.py-635-    session = _OnboardingSession(
tests/gateway/test_nutrition_onboarding_reconciliation.py:636:        state=BootstrapState.AWAITING_ACTIVATION,
tests/gateway/test_nutrition_onboarding_reconciliation.py-637-        customer_key="client_001",
tests/gateway/test_nutrition_onboarding_reconciliation.py-638-        session_id="session-1",
tests/gateway/test_nutrition_onboarding_reconciliation.py-639-        sid_hash=sid_hash,
--
tests/gateway/test_telegram_room_bootstrap_registration.py-93-        encoding="utf-8",
tests/gateway/test_telegram_room_bootstrap_registration.py-94-    )
tests/gateway/test_telegram_room_bootstrap_registration.py-95-    store = RoomBootstrapStore(tmp_path / "bootstrap")
tests/gateway/test_telegram_room_bootstrap_registration.py:96:    prepared = store.prepare(
tests/gateway/test_telegram_room_bootstrap_registration.py-97-        load_customer_draft(draft_path),
tests/gateway/test_telegram_room_bootstrap_registration.py-98-        bot_username="coach_bot",
tests/gateway/test_telegram_room_bootstrap_registration.py-99-    )
--
tests/gateway/test_telegram_room_bootstrap_registration.py-158-    }
tests/gateway/test_telegram_room_bootstrap_registration.py-159-    draft_path.write_text(json.dumps(rehearsal_draft), encoding="utf-8")
tests/gateway/test_telegram_room_bootstrap_registration.py-160-    store = RoomBootstrapStore(tmp_path / "bootstrap")
tests/gateway/test_telegram_room_bootstrap_registration.py:161:    prepared = store.prepare_rehearsal_customer_invite(
tests/gateway/test_telegram_room_bootstrap_registration.py-162-        load_customer_draft(draft_path),
tests/gateway/test_telegram_room_bootstrap_registration.py-163-        bot_username="coach_bot",
tests/gateway/test_telegram_room_bootstrap_registration.py-164-        owner_id="100",
--
tests/gateway/test_telegram_room_bootstrap_registration.py-217-    }
tests/gateway/test_telegram_room_bootstrap_registration.py-218-    draft_path.write_text(json.dumps(rehearsal_draft), encoding="utf-8")
tests/gateway/test_telegram_room_bootstrap_registration.py-219-    store = RoomBootstrapStore(tmp_path / "bootstrap")
tests/gateway/test_telegram_room_bootstrap_registration.py:220:    prepared = store.prepare_rehearsal_customer_invite(
tests/gateway/test_telegram_room_bootstrap_registration.py-221-        load_customer_draft(draft_path),
tests/gateway/test_telegram_room_bootstrap_registration.py-222-        bot_username="coach_bot",
tests/gateway/test_telegram_room_bootstrap_registration.py-223-        owner_id="100",
--
tests/gateway/test_telegram_room_bootstrap_registration.py-316-    }
tests/gateway/test_telegram_room_bootstrap_registration.py-317-    draft_path.write_text(json.dumps(rehearsal_draft), encoding="utf-8")
tests/gateway/test_telegram_room_bootstrap_registration.py-318-    store = RoomBootstrapStore(tmp_path / "bootstrap", now=lambda: now[0])
tests/gateway/test_telegram_room_bootstrap_registration.py:319:    prepared = store.prepare_rehearsal_customer_invite(
tests/gateway/test_telegram_room_bootstrap_registration.py-320-        load_customer_draft(draft_path),
tests/gateway/test_telegram_room_bootstrap_registration.py-321-        bot_username="coach_bot",
tests/gateway/test_telegram_room_bootstrap_registration.py-322-        owner_id="100",
--
tests/gateway/test_telegram_room_bootstrap_registration.py-347-    }
tests/gateway/test_telegram_room_bootstrap_registration.py-348-    draft_path.write_text(json.dumps(rehearsal_draft), encoding="utf-8")
tests/gateway/test_telegram_room_bootstrap_registration.py-349-    store = RoomBootstrapStore(tmp_path / "bootstrap")
tests/gateway/test_telegram_room_bootstrap_registration.py:350:    prepared = store.prepare_rehearsal_customer_invite(
tests/gateway/test_telegram_room_bootstrap_registration.py-351-        load_customer_draft(draft_path),
tests/gateway/test_telegram_room_bootstrap_registration.py-352-        bot_username="coach_bot",
tests/gateway/test_telegram_room_bootstrap_registration.py-353-        owner_id="100",
--
tests/gateway/test_telegram_room_bootstrap_registration.py-393-        encoding="utf-8",
tests/gateway/test_telegram_room_bootstrap_registration.py-394-    )
tests/gateway/test_telegram_room_bootstrap_registration.py-395-    store = RoomBootstrapStore(tmp_path / "bootstrap")
tests/gateway/test_telegram_room_bootstrap_registration.py:396:    prepared = store.prepare(
tests/gateway/test_telegram_room_bootstrap_registration.py-397-        load_customer_draft(draft_path),
tests/gateway/test_telegram_room_bootstrap_registration.py-398-        bot_username="coach_bot",
tests/gateway/test_telegram_room_bootstrap_registration.py-399-    )
--
tests/gateway/test_telegram_room_bootstrap_registration.py-523-    )
tests/gateway/test_telegram_room_bootstrap_registration.py-524-
tests/gateway/test_telegram_room_bootstrap_registration.py-525-    activated = store.get(awaiting.session_id)
tests/gateway/test_telegram_room_bootstrap_registration.py:526:    assert activated.state is BootstrapState.AWAITING_ACTIVATION
tests/gateway/test_telegram_room_bootstrap_registration.py-527-    assert activated.chat_id is None
tests/gateway/test_telegram_room_bootstrap_registration.py-528-    assert activated.role_claim(Role.CUSTOMER) == bound.role_claim(Role.CUSTOMER)
tests/gateway/test_telegram_room_bootstrap_registration.py-529-    assert activated.role_claim(Role.TRAINER) == bound.role_claim(Role.TRAINER)
--
tests/gateway/test_telegram_room_bootstrap_registration.py-632-        encoding="utf-8",
tests/gateway/test_telegram_room_bootstrap_registration.py-633-    )
tests/gateway/test_telegram_room_bootstrap_registration.py-634-    store = RoomBootstrapStore(tmp_path / "bootstrap")
tests/gateway/test_telegram_room_bootstrap_registration.py:635:    prepared = store.prepare(
tests/gateway/test_telegram_room_bootstrap_registration.py-636-        load_customer_draft(draft_path),
tests/gateway/test_telegram_room_bootstrap_registration.py-637-        bot_username="coach_bot",
tests/gateway/test_telegram_room_bootstrap_registration.py-638-    )
--
tests/gateway/test_telegram_room_bootstrap_registration.py-661-    draft_path = tmp_path / "draft.json"
tests/gateway/test_telegram_room_bootstrap_registration.py-662-    draft_path.write_text(json.dumps(DRAFT), encoding="utf-8")
tests/gateway/test_telegram_room_bootstrap_registration.py-663-    store = RoomBootstrapStore(tmp_path / "bootstrap")
tests/gateway/test_telegram_room_bootstrap_registration.py:664:    prepared = store.prepare(load_customer_draft(draft_path), bot_username="coach_bot")
tests/gateway/test_telegram_room_bootstrap_registration.py-665-    session = store.transition(
tests/gateway/test_telegram_room_bootstrap_registration.py-666-        prepared.session.session_id,
tests/gateway/test_telegram_room_bootstrap_registration.py-667-        expected_generation=prepared.session.generation,
--
gateway/platforms/api_server.py-1719-        if gateway_session_key:
gateway/platforms/api_server.py-1720-            headers["X-Hermes-Session-Key"] = gateway_session_key
gateway/platforms/api_server.py-1721-        response = web.StreamResponse(status=200, headers=headers)
gateway/platforms/api_server.py:1722:        await response.prepare(request)
gateway/platforms/api_server.py-1723-        last_write = time.monotonic()
gateway/platforms/api_server.py-1724-        try:
gateway/platforms/api_server.py-1725-            while True:
--
gateway/platforms/api_server.py-2092-        if gateway_session_key:
gateway/platforms/api_server.py-2093-            sse_headers["X-Hermes-Session-Key"] = gateway_session_key
gateway/platforms/api_server.py-2094-        response = web.StreamResponse(status=200, headers=sse_headers)
gateway/platforms/api_server.py:2095:        await response.prepare(request)
gateway/platforms/api_server.py-2096-
gateway/platforms/api_server.py-2097-        try:
gateway/platforms/api_server.py-2098-            last_activity = time.monotonic()
--
gateway/platforms/api_server.py-2276-        if gateway_session_key:
gateway/platforms/api_server.py-2277-            sse_headers["X-Hermes-Session-Key"] = gateway_session_key
gateway/platforms/api_server.py-2278-        response = web.StreamResponse(status=200, headers=sse_headers)
gateway/platforms/api_server.py:2279:        await response.prepare(request)
gateway/platforms/api_server.py-2280-
gateway/platforms/api_server.py-2281-        # State accumulated during the stream
gateway/platforms/api_server.py-2282-        final_text_parts: List[str] = []
--
gateway/platforms/api_server.py-4044-                "X-Accel-Buffering": "no",
gateway/platforms/api_server.py-4045-            },
gateway/platforms/api_server.py-4046-        )
gateway/platforms/api_server.py:4047:        await response.prepare(request)
gateway/platforms/api_server.py-4048-
gateway/platforms/api_server.py-4049-        try:
gateway/platforms/api_server.py-4050-            while True:
--
tests/gateway/test_telegram_room_bootstrap_invite.py-64-    tmp_path: Path,
tests/gateway/test_telegram_room_bootstrap_invite.py-65-) -> None:
tests/gateway/test_telegram_room_bootstrap_invite.py-66-    store = RoomBootstrapStore(tmp_path / "state", now=lambda: NOW)
tests/gateway/test_telegram_room_bootstrap_invite.py:67:    prepared = store.prepare(
tests/gateway/test_telegram_room_bootstrap_invite.py-68-        load_customer_draft(_draft(tmp_path / "draft.json")),
tests/gateway/test_telegram_room_bootstrap_invite.py-69-        bot_username="coach_bot",
tests/gateway/test_telegram_room_bootstrap_invite.py-70-    )
--
tests/gateway/test_telegram_room_bootstrap_invite.py-115-    expires_in: timedelta = timedelta(hours=24),
tests/gateway/test_telegram_room_bootstrap_invite.py-116-) -> tuple[RoomBootstrapStore, object]:
tests/gateway/test_telegram_room_bootstrap_invite.py-117-    store = RoomBootstrapStore(tmp_path / "state", now=lambda: clock[0])
tests/gateway/test_telegram_room_bootstrap_invite.py:118:    prepared = store.prepare(
tests/gateway/test_telegram_room_bootstrap_invite.py-119-        load_customer_draft(_draft(tmp_path / "draft.json")),
tests/gateway/test_telegram_room_bootstrap_invite.py-120-        bot_username="coach_bot",
tests/gateway/test_telegram_room_bootstrap_invite.py-121-    )
--
tests/gateway/test_telegram_room_bootstrap_invite.py-146-    tmp_path: Path,
tests/gateway/test_telegram_room_bootstrap_invite.py-147-) -> None:
tests/gateway/test_telegram_room_bootstrap_invite.py-148-    store = RoomBootstrapStore(tmp_path / "state", now=lambda: NOW)
tests/gateway/test_telegram_room_bootstrap_invite.py:149:    prepared = store.prepare(
tests/gateway/test_telegram_room_bootstrap_invite.py-150-        load_customer_draft(_draft(tmp_path / "draft.json")),
tests/gateway/test_telegram_room_bootstrap_invite.py-151-        bot_username="coach_bot",
tests/gateway/test_telegram_room_bootstrap_invite.py-152-    )
--
tests/gateway/test_telegram_room_bootstrap_invite.py-435-        encoding="utf-8",
tests/gateway/test_telegram_room_bootstrap_invite.py-436-    )
tests/gateway/test_telegram_room_bootstrap_invite.py-437-    store = RoomBootstrapStore(room_bootstrap_state_dir(profile_root))
tests/gateway/test_telegram_room_bootstrap_invite.py:438:    prepared = store.prepare(
tests/gateway/test_telegram_room_bootstrap_invite.py-439-        load_customer_draft(_draft(tmp_path / "draft.json")),
tests/gateway/test_telegram_room_bootstrap_invite.py-440-        bot_username="coach_bot",
tests/gateway/test_telegram_room_bootstrap_invite.py-441-    )
--
gateway/platforms/telegram_room_bootstrap_cutover.py-404-        admin.disable_customer(registry_path, customer_key)
gateway/platforms/telegram_room_bootstrap_cutover.py-405-        live = self.store.get(session_id)
gateway/platforms/telegram_room_bootstrap_cutover.py-406-        if live.state in {
gateway/platforms/telegram_room_bootstrap_cutover.py:407:            BootstrapState.AWAITING_ACTIVATION,
gateway/platforms/telegram_room_bootstrap_cutover.py-408-            BootstrapState.ACTIVE,
gateway/platforms/telegram_room_bootstrap_cutover.py-409-        }:
gateway/platforms/telegram_room_bootstrap_cutover.py-410-            self.completion.fail_activation_recovery(
--
gateway/platforms/telegram_room_bootstrap_cutover.py-465-            raise ActivationCutoverError(
gateway/platforms/telegram_room_bootstrap_cutover.py-466-                "terminal activation recovery requires a new supported bootstrap"
gateway/platforms/telegram_room_bootstrap_cutover.py-467-            )
gateway/platforms/telegram_room_bootstrap_cutover.py:468:        if live.state not in {BootstrapState.AWAITING_ACTIVATION, BootstrapState.ACTIVE}:
gateway/platforms/telegram_room_bootstrap_cutover.py:469:            raise ActivationCutoverError("session is not AWAITING_ACTIVATION or completed")
gateway/platforms/telegram_room_bootstrap_cutover.py-470-
gateway/platforms/telegram_room_bootstrap_cutover.py-471-        registry_path = admin._resolve_registry_path(self.profile_root)
gateway/platforms/telegram_room_bootstrap_cutover.py-472-        # This canonical validator also reconciles or rejects malformed activation
--
tests/gateway/test_telegram_nutrition_onboarding_callback_observability.py-116-]:
tests/gateway/test_telegram_nutrition_onboarding_callback_observability.py-117-    runtime = object.__new__(TelegramNutritionOnboardingRuntime)
tests/gateway/test_telegram_nutrition_onboarding_callback_observability.py-118-    session = SimpleNamespace(
tests/gateway/test_telegram_nutrition_onboarding_callback_observability.py:119:        state=BootstrapState.AWAITING_ACTIVATION,
tests/gateway/test_telegram_nutrition_onboarding_callback_observability.py-120-        customer_key="mother_pilot",
tests/gateway/test_telegram_nutrition_onboarding_callback_observability.py-121-        session_id="session-1",
tests/gateway/test_telegram_nutrition_onboarding_callback_observability.py-122-        sid_hash="a" * 64,
--
tests/gateway/test_telegram_nutrition_onboarding_callback_observability.py-186-) -> None:
tests/gateway/test_telegram_nutrition_onboarding_callback_observability.py-187-    runtime = object.__new__(TelegramNutritionOnboardingRuntime)
tests/gateway/test_telegram_nutrition_onboarding_callback_observability.py-188-    session = SimpleNamespace(
tests/gateway/test_telegram_nutrition_onboarding_callback_observability.py:189:        state=BootstrapState.AWAITING_ACTIVATION,
tests/gateway/test_telegram_nutrition_onboarding_callback_observability.py-190-        customer_key="client_001",
tests/gateway/test_telegram_nutrition_onboarding_callback_observability.py-191-        session_id="session-1",
tests/gateway/test_telegram_nutrition_onboarding_callback_observability.py-192-        customer_draft=SimpleNamespace(starts_on="2026-08-10"),
--
tests/gateway/test_telegram_nutrition_onboarding_callback_observability.py-652-class _TextIngressRuntime(TelegramNutritionOnboardingRuntimeCollectionMixin):
tests/gateway/test_telegram_nutrition_onboarding_callback_observability.py-653-    def __init__(self) -> None:
tests/gateway/test_telegram_nutrition_onboarding_callback_observability.py-654-        self.session = SimpleNamespace(
tests/gateway/test_telegram_nutrition_onboarding_callback_observability.py:655:            state=BootstrapState.AWAITING_ACTIVATION,
tests/gateway/test_telegram_nutrition_onboarding_callback_observability.py-656-            customer_key="test_customer",
tests/gateway/test_telegram_nutrition_onboarding_callback_observability.py-657-            session_id="session-1",
tests/gateway/test_telegram_nutrition_onboarding_callback_observability.py-658-        )
--
gateway/platforms/telegram_nutrition_onboarding_runtime_collection.py-58-            return False
gateway/platforms/telegram_nutrition_onboarding_runtime_collection.py-59-        update_id = getattr(update, "update_id", None)
gateway/platforms/telegram_nutrition_onboarding_runtime_collection.py-60-        log_ingress_stage("ingress", update_id, logger=logger)
gateway/platforms/telegram_nutrition_onboarding_runtime_collection.py:61:        if session.state is not BootstrapState.AWAITING_ACTIVATION:
gateway/platforms/telegram_nutrition_onboarding_runtime_collection.py-62-            log_ingress_stage(
gateway/platforms/telegram_nutrition_onboarding_runtime_collection.py-63-                "authority",
gateway/platforms/telegram_nutrition_onboarding_runtime_collection.py-64-                update_id,
--
gateway/platforms/telegram_nutrition_onboarding_runtime_authority.py-104-        if type(actor_id) is not int or type(chat_id) is not int:
gateway/platforms/telegram_nutrition_onboarding_runtime_authority.py-105-            return None
gateway/platforms/telegram_nutrition_onboarding_runtime_authority.py-106-        for session in self._context().bootstrap.store.list_sessions():
gateway/platforms/telegram_nutrition_onboarding_runtime_authority.py:107:            if session.state is not BootstrapState.AWAITING_ACTIVATION:
gateway/platforms/telegram_nutrition_onboarding_runtime_authority.py-108-                continue
gateway/platforms/telegram_nutrition_onboarding_runtime_authority.py-109-            try:
gateway/platforms/telegram_nutrition_onboarding_runtime_authority.py-110-                customer = self._registry_customer(session)

[Showing lines 1461-2036 of 2036 (50.0KB limit). Full output: /tmp/pi-bash-07123ffc45ff32cc.log]


Existing isolated virtual environments for Task22 canonical verifier:

Canonical verifier requirements:.omo/evidence/verify-task22-supplemental-candidate.py-152-            (gateway_root / "scripts" / "reproducible-wheel-build").read_bytes()
.omo/evidence/verify-task22-supplemental-candidate.py-153-        ).hexdigest()
.omo/evidence/verify-task22-supplemental-candidate.py-154-        or receipt.get("build_contract")
.omo/evidence/verify-task22-supplemental-candidate.py:155:        != "two isolated offline source copies with distinct mtimes produced byte-identical wheels"
.omo/evidence/verify-task22-supplemental-candidate.py-156-        or receipt.get("reproduced_exactly") is not True
.omo/evidence/verify-task22-supplemental-candidate.py-157-        or receipt.get("live_profile_accessed") is not False
.omo/evidence/verify-task22-supplemental-candidate.py-158-    ):
--
.omo/evidence/verify-task22-supplemental-candidate.py-184-            "zip_timestamp": "2000-01-01T00:00:00Z",
.omo/evidence/verify-task22-supplemental-candidate.py-185-            "source_epochs": [1700000000, 1800000000],
.omo/evidence/verify-task22-supplemental-candidate.py-186-            "builder_sha256": receipt["builder_sha256"],
.omo/evidence/verify-task22-supplemental-candidate.py:187:            "build_contract": "two isolated offline source copies with distinct mtimes produced byte-identical wheels",
.omo/evidence/verify-task22-supplemental-candidate.py-188-            "reproduced_exactly": True,
.omo/evidence/verify-task22-supplemental-candidate.py-189-            "live_profile_accessed": False,
.omo/evidence/verify-task22-supplemental-candidate.py-190-        }
--
.omo/evidence/verify-task22-supplemental-candidate.py-255-
.omo/evidence/verify-task22-supplemental-candidate.py-256-
.omo/evidence/verify-task22-supplemental-candidate.py-257-def main() -> int:
.omo/evidence/verify-task22-supplemental-candidate.py:258:    if len(sys.argv) != 1:
.omo/evidence/verify-task22-supplemental-candidate.py-259-        raise SystemExit("usage: verify-task22-supplemental-candidate.py")
.omo/evidence/verify-task22-supplemental-candidate.py-260-    predecessor_bytes = PREDECESSOR.read_bytes()
.omo/evidence/verify-task22-supplemental-candidate.py-261-    successor_bytes = SUCCESSOR.read_bytes()
--
.omo/evidence/task22-supplemental-compatibility-canonical.py-11-from typing import Final, cast
.omo/evidence/task22-supplemental-compatibility-canonical.py-12-
.omo/evidence/task22-supplemental-compatibility-canonical.py-13-EVIDENCE: Final = Path(__file__).resolve().parent
.omo/evidence/task22-supplemental-compatibility-canonical.py:14:VENV: Final = Path("/home/cube/projects/richard/hermes-agent/.venv")
.omo/evidence/task22-supplemental-compatibility-canonical.py-15-VERIFIER: Final = EVIDENCE / "verify-task22-supplemental-candidate.py"
.omo/evidence/task22-supplemental-compatibility-canonical.py-16-EXPECTED_VERIFIER_SHA256: Final = "fd57070f322f4de6a8a416d2c306652deb4313d8ba2aa44dba0aaf9e43f08bd2"
.omo/evidence/task22-supplemental-compatibility-canonical.py-17-EXPECTED: Final = {
--
.omo/evidence/task22-supplemental-compatibility-canonical.py-36-
.omo/evidence/task22-supplemental-compatibility-canonical.py-37-
.omo/evidence/task22-supplemental-compatibility-canonical.py-38-def main() -> int:
.omo/evidence/task22-supplemental-compatibility-canonical.py:39:    if sys.flags.isolated != 1 or Path(sys.prefix) != VENV:
.omo/evidence/task22-supplemental-compatibility-canonical.py:40:        raise RuntimeError("canonical verifier requires the isolated Task22 virtual environment")
.omo/evidence/task22-supplemental-compatibility-canonical.py-41-    _snapshot(VERIFIER, EXPECTED_VERIFIER_SHA256)
.omo/evidence/task22-supplemental-compatibility-canonical.py-42-    result = subprocess.run(
.omo/evidence/task22-supplemental-compatibility-canonical.py:43:        [sys.executable, "-I", "-B", str(VERIFIER)],
.omo/evidence/task22-supplemental-compatibility-canonical.py-44-        cwd=EVIDENCE,
.omo/evidence/task22-supplemental-compatibility-canonical.py-45-        env={
.omo/evidence/task22-supplemental-compatibility-canonical.py-46-            "HOME": "/home/cube",
--
.omo/evidence/task22-supplemental-compatibility-canonical.py-70-    try:
.omo/evidence/task22-supplemental-compatibility-canonical.py-71-        raise SystemExit(main())
.omo/evidence/task22-supplemental-compatibility-canonical.py-72-    except (OSError, RuntimeError, ValueError, json.JSONDecodeError) as exc:
.omo/evidence/task22-supplemental-compatibility-canonical.py:73:        print(json.dumps({"mode": "canonical-code-only-verification", "ready": False, "error": str(exc)}, sort_keys=True), file=sys.stderr)
.omo/evidence/task22-supplemental-compatibility-canonical.py-74-        raise SystemExit(1)


Membership receipt generation/consumption:
gateway/platforms/telegram_pending_marker_intake.py-236-                members.append(
gateway/platforms/telegram_pending_marker_intake.py-237-                    await result(
gateway/platforms/telegram_pending_marker_intake.py-238-                        client,
gateway/platforms/telegram_pending_marker_intake.py:239:                        "getChatMember",
gateway/platforms/telegram_pending_marker_intake.py-240-                        {
gateway/platforms/telegram_pending_marker_intake.py-241-                            "chat_id": expected_staff_chat_id,
gateway/platforms/telegram_pending_marker_intake.py-242-                            "user_id": user_id,
--
gateway/platforms/telegram_activation_readiness.py-23-
gateway/platforms/telegram_activation_readiness.py-24-_MAX_AUTHORITY_AGE: Final = timedelta(minutes=5)
gateway/platforms/telegram_activation_readiness.py-25-_MAX_CONSENT_AGE: Final = timedelta(days=30)
gateway/platforms/telegram_activation_readiness.py:26:_OBSERVATION_SCHEMA: Final = "telegram-membership-observation-v2"
gateway/platforms/telegram_activation_readiness.py-27-_RECEIPT_SCHEMA: Final = "telegram-activation-readiness-v2"
gateway/platforms/telegram_activation_readiness.py-28-_CHECKS: Final = (
gateway/platforms/telegram_activation_readiness.py-29-    "customer_dm_binding",
--
gateway/platforms/telegram_activation_readiness.py-43-
gateway/platforms/telegram_activation_readiness.py-44-
gateway/platforms/telegram_activation_readiness.py-45-@dataclass(frozen=True, slots=True)
gateway/platforms/telegram_activation_readiness.py:46:class TelegramMembershipObservation:
gateway/platforms/telegram_activation_readiness.py-47-    """Complete provider observation for one customer and exact staff scope."""
gateway/platforms/telegram_activation_readiness.py-48-
gateway/platforms/telegram_activation_readiness.py-49-    schema: str
--
gateway/platforms/telegram_activation_readiness.py-85-    consent_notice_version: str
gateway/platforms/telegram_activation_readiness.py-86-    consent_recorded_on: date
gateway/platforms/telegram_activation_readiness.py-87-    consent_bootstrap_generation: int
gateway/platforms/telegram_activation_readiness.py:88:    provider_observation: TelegramMembershipObservation
gateway/platforms/telegram_activation_readiness.py-89-
gateway/platforms/telegram_activation_readiness.py-90-
gateway/platforms/telegram_activation_readiness.py-91-@dataclass(frozen=True, slots=True)
--
gateway/platforms/telegram_activation_readiness.py-146-    ).encode("utf-8")
gateway/platforms/telegram_activation_readiness.py-147-
gateway/platforms/telegram_activation_readiness.py-148-
gateway/platforms/telegram_activation_readiness.py:149:def canonical_observation_digest(value: Mapping[str, object]) -> str:
gateway/platforms/telegram_activation_readiness.py-150-    """Digest one unsigned provider observation."""
gateway/platforms/telegram_activation_readiness.py-151-    return hashlib.sha256(_canonical_json(dict(value))).hexdigest()
gateway/platforms/telegram_activation_readiness.py-152-
gateway/platforms/telegram_activation_readiness.py-153-
gateway/platforms/telegram_activation_readiness.py-154-def _observation_unsigned(
gateway/platforms/telegram_activation_readiness.py:155:    observation: TelegramMembershipObservation,
gateway/platforms/telegram_activation_readiness.py-156-) -> dict[str, object]:
gateway/platforms/telegram_activation_readiness.py-157-    return {
gateway/platforms/telegram_activation_readiness.py-158-        "schema": observation.schema,
--
gateway/platforms/telegram_activation_readiness.py-202-    return candidate
gateway/platforms/telegram_activation_readiness.py-203-
gateway/platforms/telegram_activation_readiness.py-204-
gateway/platforms/telegram_activation_readiness.py:205:def _parse_provider_membership_observation(
gateway/platforms/telegram_activation_readiness.py-206-    raw: object,
gateway/platforms/telegram_activation_readiness.py:207:) -> TelegramMembershipObservation:
gateway/platforms/telegram_activation_readiness.py-208-    value = _string_object_dict(raw)
gateway/platforms/telegram_activation_readiness.py-209-    required = {
gateway/platforms/telegram_activation_readiness.py-210-        "schema", "provider", "customer_user_id", "customer_private_chat_id",
--
gateway/platforms/telegram_activation_readiness.py-221-    memberships_raw = value["customer_memberships"]
gateway/platforms/telegram_activation_readiness.py-222-    complete = value["complete"]
gateway/platforms/telegram_activation_readiness.py-223-    if (
gateway/platforms/telegram_activation_readiness.py:224:        receipt_digest != canonical_observation_digest(unsigned)
gateway/platforms/telegram_activation_readiness.py-225-        or not _is_object_list(scoped_raw)
gateway/platforms/telegram_activation_readiness.py-226-        or not _is_object_list(memberships_raw)
gateway/platforms/telegram_activation_readiness.py-227-        or type(complete) is not bool
--
gateway/platforms/telegram_activation_readiness.py-235-    customer_memberships = [
gateway/platforms/telegram_activation_readiness.py-236-        _membership_record(row) for row in memberships_raw
gateway/platforms/telegram_activation_readiness.py-237-    ]
gateway/platforms/telegram_activation_readiness.py:238:    return TelegramMembershipObservation(
gateway/platforms/telegram_activation_readiness.py-239-        schema=_required_string(value, "schema"),
gateway/platforms/telegram_activation_readiness.py-240-        provider=_required_string(value, "provider"),
gateway/platforms/telegram_activation_readiness.py-241-        customer_user_id=_required_string(value, "customer_user_id"),
--
gateway/platforms/telegram_activation_readiness.py-251-    )
gateway/platforms/telegram_activation_readiness.py-252-
gateway/platforms/telegram_activation_readiness.py-253-
gateway/platforms/telegram_activation_readiness.py:254:def load_provider_membership_observation(
gateway/platforms/telegram_activation_readiness.py-255-    path: Path | str,
gateway/platforms/telegram_activation_readiness.py:256:) -> TelegramMembershipObservation:
gateway/platforms/telegram_activation_readiness.py-257-    """Load one digest-verified provider receipt; omission is never absence."""
gateway/platforms/telegram_activation_readiness.py-258-    source = Path(path)
gateway/platforms/telegram_activation_readiness.py-259-    if source.is_symlink() or not source.is_file():
--
gateway/platforms/telegram_activation_readiness.py-262-            "provide a complete Telegram provider membership receipt",
gateway/platforms/telegram_activation_readiness.py-263-        )
gateway/platforms/telegram_activation_readiness.py-264-    try:
gateway/platforms/telegram_activation_readiness.py:265:        return _parse_provider_membership_observation(
gateway/platforms/telegram_activation_readiness.py-266-            json.loads(source.read_text(encoding="utf-8"))
gateway/platforms/telegram_activation_readiness.py-267-        )
gateway/platforms/telegram_activation_readiness.py-268-    except (OSError, TypeError, ValueError, json.JSONDecodeError) as exc:
--
gateway/platforms/telegram_activation_readiness.py-376-    valid_statuses = {"member", "administrator", "creator", "restricted", "left", "kicked"}
gateway/platforms/telegram_activation_readiness.py-377-    if (
gateway/platforms/telegram_activation_readiness.py-378-        observation.schema != _OBSERVATION_SCHEMA
gateway/platforms/telegram_activation_readiness.py:379:        or observation.provider != "telegram.getChatMember"
gateway/platforms/telegram_activation_readiness.py-380-        or observation.complete is not True
gateway/platforms/telegram_activation_readiness.py-381-        or observation.receipt_digest
gateway/platforms/telegram_activation_readiness.py:382:        != canonical_observation_digest(_observation_unsigned(observation))
gateway/platforms/telegram_activation_readiness.py-383-        or observation.customer_user_id != authority.customer_user_id
gateway/platforms/telegram_activation_readiness.py-384-        or observation.customer_private_chat_id != authority.customer_user_id
gateway/platforms/telegram_activation_readiness.py-385-        or observation.owner_user_id != authority.owner_user_id
--
gateway/platforms/telegram_activation_readiness.py-584-            or now.date() - consent_recorded_on > _MAX_CONSENT_AGE
gateway/platforms/telegram_activation_readiness.py-585-        ):
gateway/platforms/telegram_activation_readiness.py-586-            raise ValueError
gateway/platforms/telegram_activation_readiness.py:587:        observation = _parse_provider_membership_observation(
gateway/platforms/telegram_activation_readiness.py-588-            payload.provider_observation
gateway/platforms/telegram_activation_readiness.py-589-        )
gateway/platforms/telegram_activation_readiness.py-590-        require_activation_readiness(
--
gateway/platforms/telegram_activation_readiness.py-625-    "ActivationReadinessError",
gateway/platforms/telegram_activation_readiness.py-626-    "ActivationReadinessReceipt",
gateway/platforms/telegram_activation_readiness.py-627-    "DurableActivationReadinessProof",
gateway/platforms/telegram_activation_readiness.py:628:    "TelegramMembershipObservation",
gateway/platforms/telegram_activation_readiness.py-629-    "TelegramMembershipRecord",
gateway/platforms/telegram_activation_readiness.py-630-    "activation_readiness_receipt_path",
gateway/platforms/telegram_activation_readiness.py:631:    "canonical_observation_digest",
gateway/platforms/telegram_activation_readiness.py:632:    "load_provider_membership_observation",
gateway/platforms/telegram_activation_readiness.py-633-    "persist_activation_readiness_receipt",
gateway/platforms/telegram_activation_readiness.py-634-    "require_activation_readiness",
gateway/platforms/telegram_activation_readiness.py-635-    "validate_activation_readiness_receipt",
--
scripts/nutrition-room-bootstrap-19-
scripts/nutrition-room-bootstrap-20-from gateway.platforms.telegram_activation_readiness import (  # noqa: E402
scripts/nutrition-room-bootstrap-21-    ActivationReadinessAuthority,
scripts/nutrition-room-bootstrap:22:    load_provider_membership_observation,
scripts/nutrition-room-bootstrap-23-)
scripts/nutrition-room-bootstrap-24-from gateway.platforms.telegram_room_bootstrap_cutover import (  # noqa: E402
scripts/nutrition-room-bootstrap-25-    TelegramRoomBootstrapCutover,
--
scripts/nutrition-room-bootstrap-161-    args: argparse.Namespace,
scripts/nutrition-room-bootstrap-162-) -> ActivationReadinessAuthority:
scripts/nutrition-room-bootstrap-163-    """Bind a provider receipt to canonical identity and consent authority."""
scripts/nutrition-room-bootstrap:164:    receipt_path = getattr(args, "provider_membership_receipt", None)
scripts/nutrition-room-bootstrap-165-    if not receipt_path:
scripts/nutrition-room-bootstrap-166-        raise ValueError("provider membership receipt is required")
scripts/nutrition-room-bootstrap:167:    observation = load_provider_membership_observation(receipt_path)
scripts/nutrition-room-bootstrap-168-    registry_path = Path(args.profile_root) / "customers" / "registry.json"
scripts/nutrition-room-bootstrap-169-    try:
scripts/nutrition-room-bootstrap-170-        raw: object = json.loads(registry_path.read_text(encoding="utf-8"))
--
tests/gateway/test_telegram_activation_readiness.py-13-from gateway.platforms.telegram_activation_readiness import (
tests/gateway/test_telegram_activation_readiness.py-14-    ActivationReadinessAuthority,
tests/gateway/test_telegram_activation_readiness.py-15-    ActivationReadinessError,
tests/gateway/test_telegram_activation_readiness.py:16:    TelegramMembershipObservation,
tests/gateway/test_telegram_activation_readiness.py-17-    TelegramMembershipRecord,
tests/gateway/test_telegram_activation_readiness.py:18:    canonical_observation_digest,
tests/gateway/test_telegram_activation_readiness.py-19-    require_activation_readiness,
tests/gateway/test_telegram_activation_readiness.py-20-)
tests/gateway/test_telegram_activation_readiness.py-21-from gateway.platforms.telegram_room_bootstrap import Role
--
tests/gateway/test_telegram_activation_readiness.py-86-    scope: tuple[int, ...] = (-100123,),
tests/gateway/test_telegram_activation_readiness.py-87-    complete: bool = True,
tests/gateway/test_telegram_activation_readiness.py-88-    observed_at: datetime = NOW,
tests/gateway/test_telegram_activation_readiness.py:89:) -> TelegramMembershipObservation:
tests/gateway/test_telegram_activation_readiness.py-90-    memberships: tuple[TelegramMembershipRecord, ...] = tuple(
tests/gateway/test_telegram_activation_readiness.py-91-        {"chat_id": chat_id, "status": customer_status} for chat_id in scope
tests/gateway/test_telegram_activation_readiness.py-92-    )
tests/gateway/test_telegram_activation_readiness.py-93-    unsigned = {
tests/gateway/test_telegram_activation_readiness.py:94:        "schema": "telegram-membership-observation-v2",
tests/gateway/test_telegram_activation_readiness.py:95:        "provider": "telegram.getChatMember",
tests/gateway/test_telegram_activation_readiness.py-96-        "customer_user_id": "200",
tests/gateway/test_telegram_activation_readiness.py-97-        "customer_private_chat_id": "200",
tests/gateway/test_telegram_activation_readiness.py-98-        "owner_user_id": "201",
--
tests/gateway/test_telegram_activation_readiness.py-101-        "observed_at": observed_at.isoformat(),
tests/gateway/test_telegram_activation_readiness.py-102-        "complete": complete,
tests/gateway/test_telegram_activation_readiness.py-103-    }
tests/gateway/test_telegram_activation_readiness.py:104:    return TelegramMembershipObservation(
tests/gateway/test_telegram_activation_readiness.py:105:        schema="telegram-membership-observation-v2",
tests/gateway/test_telegram_activation_readiness.py:106:        provider="telegram.getChatMember",
tests/gateway/test_telegram_activation_readiness.py-107-        customer_user_id="200",
tests/gateway/test_telegram_activation_readiness.py-108-        customer_private_chat_id="200",
tests/gateway/test_telegram_activation_readiness.py-109-        owner_user_id="201",
--
tests/gateway/test_telegram_activation_readiness.py-111-        customer_memberships=memberships,
tests/gateway/test_telegram_activation_readiness.py-112-        observed_at=observed_at.isoformat(),
tests/gateway/test_telegram_activation_readiness.py-113-        complete=complete,
tests/gateway/test_telegram_activation_readiness.py:114:        receipt_digest=canonical_observation_digest(unsigned),
tests/gateway/test_telegram_activation_readiness.py-115-    )
tests/gateway/test_telegram_activation_readiness.py-116-
tests/gateway/test_telegram_activation_readiness.py-117-
--
tests/gateway/test_telegram_activation_readiness.py-358-def test_exact_provider_scope_cannot_omit_customer_membership_row() -> None:
tests/gateway/test_telegram_activation_readiness.py-359-    authority = _authority()
tests/gateway/test_telegram_activation_readiness.py-360-    unsigned = {
tests/gateway/test_telegram_activation_readiness.py:361:        "schema": "telegram-membership-observation-v2",
tests/gateway/test_telegram_activation_readiness.py:362:        "provider": "telegram.getChatMember",
tests/gateway/test_telegram_activation_readiness.py-363-        "customer_user_id": "200",
tests/gateway/test_telegram_activation_readiness.py-364-        "customer_private_chat_id": "200",
tests/gateway/test_telegram_activation_readiness.py-365-        "owner_user_id": "201",
--
tests/gateway/test_telegram_activation_readiness.py-371-    object.__setattr__(
tests/gateway/test_telegram_activation_readiness.py-372-        authority,
tests/gateway/test_telegram_activation_readiness.py-373-        "provider_observation",
tests/gateway/test_telegram_activation_readiness.py:374:        TelegramMembershipObservation(
tests/gateway/test_telegram_activation_readiness.py:375:            schema="telegram-membership-observation-v2",
tests/gateway/test_telegram_activation_readiness.py:376:            provider="telegram.getChatMember",
tests/gateway/test_telegram_activation_readiness.py-377-            customer_user_id="200",
tests/gateway/test_telegram_activation_readiness.py-378-            customer_private_chat_id="200",
tests/gateway/test_telegram_activation_readiness.py-379-            owner_user_id="201",
--
tests/gateway/test_telegram_activation_readiness.py-381-            customer_memberships=(),
tests/gateway/test_telegram_activation_readiness.py-382-            observed_at=NOW.isoformat(),
tests/gateway/test_telegram_activation_readiness.py-383-            complete=True,
tests/gateway/test_telegram_activation_readiness.py:384:            receipt_digest=canonical_observation_digest(unsigned),
tests/gateway/test_telegram_activation_readiness.py-385-        ),
tests/gateway/test_telegram_activation_readiness.py-386-    )
tests/gateway/test_telegram_activation_readiness.py-387-
--
tests/gateway/test_telegram_activation_readiness.py-447-        generation=12,
tests/gateway/test_telegram_activation_readiness.py-448-        customer_user_id="200",
tests/gateway/test_telegram_activation_readiness.py-449-        owner_user_id="201",
tests/gateway/test_telegram_activation_readiness.py:450:        provider_membership_receipt=str(observation_path),
tests/gateway/test_telegram_activation_readiness.py-451-    )
tests/gateway/test_telegram_activation_readiness.py-452-
tests/gateway/test_telegram_activation_readiness.py-453-    authority = constructor(args)
--
tests/gateway/test_telegram_activation_readiness.py-457-        {"chat_id": -100123, "status": "left"},
tests/gateway/test_telegram_activation_readiness.py-458-    )
tests/gateway/test_telegram_activation_readiness.py-459-
tests/gateway/test_telegram_activation_readiness.py:460:    args.provider_membership_receipt = None
tests/gateway/test_telegram_activation_readiness.py-461-    with pytest.raises(ValueError, match="provider membership receipt"):
tests/gateway/test_telegram_activation_readiness.py-462-        constructor(args)
--
tests/gateway/test_telegram_room_bootstrap_cutover.py-22-
tests/gateway/test_telegram_room_bootstrap_cutover.py-23-from gateway.platforms.telegram_activation_readiness import (  # noqa: E402
tests/gateway/test_telegram_room_bootstrap_cutover.py-24-    ActivationReadinessAuthority,
tests/gateway/test_telegram_room_bootstrap_cutover.py:25:    TelegramMembershipObservation,
tests/gateway/test_telegram_room_bootstrap_cutover.py-26-    activation_readiness_receipt_path,
tests/gateway/test_telegram_room_bootstrap_cutover.py:27:    canonical_observation_digest,
tests/gateway/test_telegram_room_bootstrap_cutover.py-28-)
tests/gateway/test_telegram_room_bootstrap_cutover.py-29-from gateway.platforms.telegram_room_bootstrap import (  # noqa: E402
tests/gateway/test_telegram_room_bootstrap_cutover.py-30-    BootstrapState,
--
tests/gateway/test_telegram_room_bootstrap_cutover.py-414-    observed_at: datetime = KST_NOW,
tests/gateway/test_telegram_room_bootstrap_cutover.py-415-) -> ActivationReadinessAuthority:
tests/gateway/test_telegram_room_bootstrap_cutover.py-416-    unsigned = {
tests/gateway/test_telegram_room_bootstrap_cutover.py:417:        "schema": "telegram-membership-observation-v2",
tests/gateway/test_telegram_room_bootstrap_cutover.py:418:        "provider": "telegram.getChatMember",
tests/gateway/test_telegram_room_bootstrap_cutover.py-419-        "customer_user_id": "300",
tests/gateway/test_telegram_room_bootstrap_cutover.py-420-        "customer_private_chat_id": "300",
tests/gateway/test_telegram_room_bootstrap_cutover.py-421-        "owner_user_id": "100",
--
tests/gateway/test_telegram_room_bootstrap_cutover.py-434-        consent_notice_version=coaching.CONSENT_VERSION,
tests/gateway/test_telegram_room_bootstrap_cutover.py-435-        consent_recorded_on=date(2026, 8, 1),
tests/gateway/test_telegram_room_bootstrap_cutover.py-436-        consent_bootstrap_generation=session.generation,
tests/gateway/test_telegram_room_bootstrap_cutover.py:437:        provider_observation=TelegramMembershipObservation(
tests/gateway/test_telegram_room_bootstrap_cutover.py:438:            schema="telegram-membership-observation-v2",
tests/gateway/test_telegram_room_bootstrap_cutover.py:439:            provider="telegram.getChatMember",
tests/gateway/test_telegram_room_bootstrap_cutover.py-440-            customer_user_id="300",
tests/gateway/test_telegram_room_bootstrap_cutover.py-441-            customer_private_chat_id="300",
tests/gateway/test_telegram_room_bootstrap_cutover.py-442-            owner_user_id="100",
--
tests/gateway/test_telegram_room_bootstrap_cutover.py-446-            ),
tests/gateway/test_telegram_room_bootstrap_cutover.py-447-            observed_at=observed_at.isoformat(),
tests/gateway/test_telegram_room_bootstrap_cutover.py-448-            complete=True,
tests/gateway/test_telegram_room_bootstrap_cutover.py:449:            receipt_digest=canonical_observation_digest(unsigned),
tests/gateway/test_telegram_room_bootstrap_cutover.py-450-        ),
tests/gateway/test_telegram_room_bootstrap_cutover.py-451-    )
tests/gateway/test_telegram_room_bootstrap_cutover.py-452-
--
tests/gateway/test_telegram_room_bootstrap_cutover.py-674-    elif damage == "provider-provenance":
tests/gateway/test_telegram_room_bootstrap_cutover.py-675-        provider = _nested_object(payload, "provider_observation")
tests/gateway/test_telegram_room_bootstrap_cutover.py-676-        provider["provider"] = "operator.assertion"
tests/gateway/test_telegram_room_bootstrap_cutover.py:677:        provider["receipt_digest"] = canonical_observation_digest(
tests/gateway/test_telegram_room_bootstrap_cutover.py-678-            {key: value for key, value in provider.items() if key != "receipt_digest"}
tests/gateway/test_telegram_room_bootstrap_cutover.py-679-        )
tests/gateway/test_telegram_room_bootstrap_cutover.py-680-        _resign_outer_readiness_receipt(payload)
tests/gateway/test_telegram_room_bootstrap_cutover.py-681-    elif damage == "provider-payload":
tests/gateway/test_telegram_room_bootstrap_cutover.py-682-        provider = _nested_object(payload, "provider_observation")
tests/gateway/test_telegram_room_bootstrap_cutover.py-683-        provider["customer_memberships"] = []
tests/gateway/test_telegram_room_bootstrap_cutover.py:684:        provider["receipt_digest"] = canonical_observation_digest(
tests/gateway/test_telegram_room_bootstrap_cutover.py-685-            {key: value for key, value in provider.items() if key != "receipt_digest"}
tests/gateway/test_telegram_room_bootstrap_cutover.py-686-        )
tests/gateway/test_telegram_room_bootstrap_cutover.py-687-        _resign_outer_readiness_receipt(payload)
--
tests/gateway/test_telegram_room_bootstrap_cutover.py-788-    readiness_path = activation_readiness_receipt_path(root, session.session_id)
tests/gateway/test_telegram_room_bootstrap_cutover.py-789-    payload = _json_object(readiness_path)
tests/gateway/test_telegram_room_bootstrap_cutover.py-790-    provider = _nested_object(payload, "provider_observation")
tests/gateway/test_telegram_room_bootstrap_cutover.py:791:    assert provider["receipt_digest"] == canonical_observation_digest(
tests/gateway/test_telegram_room_bootstrap_cutover.py-792-        {key: value for key, value in provider.items() if key != "receipt_digest"}
tests/gateway/test_telegram_room_bootstrap_cutover.py-793-    )
tests/gateway/test_telegram_room_bootstrap_cutover.py-794-    assert payload["payload_digest"] == _canonical_digest(
--
tests/gateway/test_telegram_room_bootstrap_cutover.py-948-    if case == "customer-in-staff":
tests/gateway/test_telegram_room_bootstrap_cutover.py-949-        unsafe = _authority(session)
tests/gateway/test_telegram_room_bootstrap_cutover.py-950-        member_unsigned = {
tests/gateway/test_telegram_room_bootstrap_cutover.py:951:            "schema": "telegram-membership-observation-v2",
tests/gateway/test_telegram_room_bootstrap_cutover.py:952:            "provider": "telegram.getChatMember",
tests/gateway/test_telegram_room_bootstrap_cutover.py-953-            "customer_user_id": "300",
tests/gateway/test_telegram_room_bootstrap_cutover.py-954-            "customer_private_chat_id": "300",
tests/gateway/test_telegram_room_bootstrap_cutover.py-955-            "owner_user_id": "100",
--
tests/gateway/test_telegram_room_bootstrap_cutover.py-961-        object.__setattr__(
tests/gateway/test_telegram_room_bootstrap_cutover.py-962-            unsafe,
tests/gateway/test_telegram_room_bootstrap_cutover.py-963-            "provider_observation",
tests/gateway/test_telegram_room_bootstrap_cutover.py:964:            TelegramMembershipObservation(
tests/gateway/test_telegram_room_bootstrap_cutover.py:965:                schema="telegram-membership-observation-v2",
tests/gateway/test_telegram_room_bootstrap_cutover.py:966:                provider="telegram.getChatMember",
tests/gateway/test_telegram_room_bootstrap_cutover.py-967-                customer_user_id="300",
tests/gateway/test_telegram_room_bootstrap_cutover.py-968-                customer_private_chat_id="300",
tests/gateway/test_telegram_room_bootstrap_cutover.py-969-                owner_user_id="100",
--
tests/gateway/test_telegram_room_bootstrap_cutover.py-973-                ),
tests/gateway/test_telegram_room_bootstrap_cutover.py-974-                observed_at=KST_NOW.isoformat(),
tests/gateway/test_telegram_room_bootstrap_cutover.py-975-                complete=True,
tests/gateway/test_telegram_room_bootstrap_cutover.py:976:                receipt_digest=canonical_observation_digest(member_unsigned),
tests/gateway/test_telegram_room_bootstrap_cutover.py-977-            ),
tests/gateway/test_telegram_room_bootstrap_cutover.py-978-        )
tests/gateway/test_telegram_room_bootstrap_cutover.py-979-        kwargs["readiness_authority"] = unsafe
--
tests/gateway/test_telegram_room_bootstrap_activation.py-151-from gateway.platforms.telegram_activation_readiness import (
tests/gateway/test_telegram_room_bootstrap_activation.py-152-    ActivationReadinessAuthority,
tests/gateway/test_telegram_room_bootstrap_activation.py-153-    DurableActivationReadinessProof,
tests/gateway/test_telegram_room_bootstrap_activation.py:154:    TelegramMembershipObservation,
tests/gateway/test_telegram_room_bootstrap_activation.py-155-    activation_readiness_receipt_path,
tests/gateway/test_telegram_room_bootstrap_activation.py:156:    canonical_observation_digest,
tests/gateway/test_telegram_room_bootstrap_activation.py-157-    persist_activation_readiness_receipt,
tests/gateway/test_telegram_room_bootstrap_activation.py-158-)
tests/gateway/test_telegram_room_bootstrap_activation.py-159-from gateway.platforms.telegram_room_bootstrap import (
--
tests/gateway/test_telegram_room_bootstrap_activation.py-365-    session: RoomBootstrapSession,
tests/gateway/test_telegram_room_bootstrap_activation.py-366-) -> DurableActivationReadinessProof:
tests/gateway/test_telegram_room_bootstrap_activation.py-367-    unsigned: dict[str, object] = {
tests/gateway/test_telegram_room_bootstrap_activation.py:368:        "schema": "telegram-membership-observation-v2",
tests/gateway/test_telegram_room_bootstrap_activation.py:369:        "provider": "telegram.getChatMember",
tests/gateway/test_telegram_room_bootstrap_activation.py-370-        "customer_user_id": "200",
tests/gateway/test_telegram_room_bootstrap_activation.py-371-        "customer_private_chat_id": "200",
tests/gateway/test_telegram_room_bootstrap_activation.py-372-        "owner_user_id": "100",
--
tests/gateway/test_telegram_room_bootstrap_activation.py-385-        consent_notice_version="privacy-v1",
tests/gateway/test_telegram_room_bootstrap_activation.py-386-        consent_recorded_on=date(2026, 7, 1),
tests/gateway/test_telegram_room_bootstrap_activation.py-387-        consent_bootstrap_generation=session.generation,
tests/gateway/test_telegram_room_bootstrap_activation.py:388:        provider_observation=TelegramMembershipObservation(
tests/gateway/test_telegram_room_bootstrap_activation.py:389:            schema="telegram-membership-observation-v2",
tests/gateway/test_telegram_room_bootstrap_activation.py:390:            provider="telegram.getChatMember",
tests/gateway/test_telegram_room_bootstrap_activation.py-391-            customer_user_id="200",
tests/gateway/test_telegram_room_bootstrap_activation.py-392-            customer_private_chat_id="200",
tests/gateway/test_telegram_room_bootstrap_activation.py-393-            owner_user_id="100",
--
tests/gateway/test_telegram_room_bootstrap_activation.py-395-            customer_memberships=({"chat_id": -100123, "status": "left"},),
tests/gateway/test_telegram_room_bootstrap_activation.py-396-            observed_at=ACTIVATION_NOW.isoformat(),
tests/gateway/test_telegram_room_bootstrap_activation.py-397-            complete=True,
tests/gateway/test_telegram_room_bootstrap_activation.py:398:            receipt_digest=canonical_observation_digest(unsigned),
tests/gateway/test_telegram_room_bootstrap_activation.py-399-        ),
tests/gateway/test_telegram_room_bootstrap_activation.py-400-    )
tests/gateway/test_telegram_room_bootstrap_activation.py-401-    customer = _ReadinessCustomer(
--
tests/gateway/test_telegram_pending_marker_intake.py-276-
tests/gateway/test_telegram_pending_marker_intake.py-277-    assert validated == resolution
tests/gateway/test_telegram_pending_marker_intake.py-278-    assert [method for method, _params in calls] == [
tests/gateway/test_telegram_pending_marker_intake.py:279:        "getMe", "getChat", "getChatMember", "getChatMember"
tests/gateway/test_telegram_pending_marker_intake.py-280-    ]
tests/gateway/test_telegram_pending_marker_intake.py-281-
tests/gateway/test_telegram_pending_marker_intake.py-282-


Summary:
No prior history.

---

**Turn Context (split turn):**

## Original Request
Execute Plan Task23 end-to-end for only synthetic customer `task22_dm_rehearsal`: audit Task22 state/seal, use supported authenticated DM/test activation and 12-question check-in if possible, create exactly one generation job with zero delivery, test service-only restart persistence, run automated invalid/stale/duplicate matrix, preserve all constraints/evidence, or stop with one precise manual blocker.

## Early Progress
- Located plan/evidence repo (`/home/cube/projects/richard/traning coach`) and execution repo (`/home/cube/projects/richard/hermes-agent`); evidence repo is not a Git repo.
- Read plan, handoff, Task22 evidence index, and relevant ledger portions. Handoff says Task23 is first unchecked (22/32 complete).
- Confirmed Task22 PASS evidence:
  - customer `task22_dm_rehearsal` disabled; trainer absent; no activation/delivery authority/downstream authority.
  - terminal owner phase `PUBLICATION_COMMITTED`; callback count 1.
  - generation 28 sent owner review message 123 once (generation 27/message 122 also recorded).
  - active candidate pins: candidate `3ce5b956…`, manifest `e456cfc6…`, freeze `5c98ffeb…`, wheel `f592abef…`.
- Read-only profile inspection confirmed registry record has `enabled: false`; no draft-deliveries file; `gateway_state.json` PID 675692.
- Confirmed real active unit is `hermes-gateway-dualcoachtest.service`, active/running, PID 675692. Initial query to incorrect `dualcoachtest` unit returned not-found.
- No mutations, restart, plan/ledger edits, delivery, or Telegram Web automation performed.

## Context for Suffix
- Supported activation CLI is `scripts/nutrition-room-bootstrap activate-cutover`; it requires profile root, committed bootstrap session/generation, customer/data roots, G1–G5 checklist, KST date, expected-current-customer, explicit disable confirmation, customer user ID, provider-membership receipt, and `--execute` to mutate. It is canonical cutover machinery, so suitability for synthetic-only Task23 remains to be established.
- Relevant implementation modules inspected/identified:
  - `gateway/platforms/telegram_room_bootstrap_cutover.py`
  - `telegram_room_bootstrap_activation.py`
  - `telegram_activation_readiness.py`
  - `telegram_activation_notice.py`
  - check-in integration in `telegram.py`, `physique_checkin.py`, and `tests/gateway/test_telegram_physique_checkin.py`.
- `checkin_cli` exists only under `/home/cube/.hermes/profiles/dualcoachtest/workspace/checkin_cli`; it contains customer admin/coaching/schedule/onboarding modules and `cli.py`, but command surface and safe gateway-driven route still need inspection.
- Task22 canonical verifier invocation via system Python failed only because it requires the isolated Task22 virtual environment; locate/use that venv before claiming recomputation.
- The workspace has extensive unrelated dirty changes; preserve them. User forbids commits/push/release and direct JSON/raw-listener/recovery shortcuts.

<read-files>
.omo/evidence/dualcoach-task-22-evidence-index.json
.omo/evidence/dualcoach-task-22.md
.omo/plans/dualcoach-production-readiness.md
.omo/senpi-task/tasks/st_019ff57c.json
.omo/start-work/dualcoach-production-readiness-handoff.md
.omo/start-work/ledger.jsonl
/home/cube/.hermes/profiles/dualcoachtest/workspace/checkin_cli/pyproject.toml
/home/cube/projects/richard/hermes-agent/AGENTS.md
/home/cube/projects/richard/hermes-agent/gateway/platforms/telegram_activation_notice.py
/home/cube/projects/richard/hermes-agent/gateway/platforms/telegram_activation_readiness.py
/home/cube/projects/richard/hermes-agent/gateway/platforms/telegram_room_bootstrap_activation.py
/home/cube/projects/richard/hermes-agent/gateway/platforms/telegram_room_bootstrap_cutover.py
/home/cube/projects/richard/hermes-agent/scripts/nutrition-room-bootstrap
</read-files>


**Assessing executed status command impact**

**Investigating status command session expiration effects**

**Tracing ledger hash race condition**

**Tracing ledger hash race condition**

I read this as an implementation task - I will determine whether the supported path remains eligible after the observed state change, then complete only the permitted automated checks or stop at one precise manual blocker.

bash

set -eu
root=/home/cube/.hermes/profiles/dualcoachtest
ledger="$root/data/onboarding/telegram-room-bootstrap-v1/ledger.json"
printf 'ledger_sha256='; sha256sum "$ledger" | cut -d' ' -f1
printf 'ledger_stat='; stat -c 'inode=%i mode=%a size=%s mtime=%y ctime=%z' "$ledger"
printf 'lock_stat='; stat -c 'inode=%i mode=%a size=%s mtime=%y ctime=%z' "${ledger%/*}/ledger.lock"
printf 'service='; systemctl --user show hermes-gateway-dualcoachtest.service --property=ActiveState --property=SubState --property=MainPID --property=ExecMainStartTimestamp --no-pager
printf 'ledger_session='; python3 - <<'PY'
import json
from pathlib import Path
path=Path('/home/cube/.hermes/profiles/dualcoachtest/data/onboarding/telegram-room-bootstrap-v1/ledger.json')
value=json.loads(path.read_text())
for s in value['sessions']:
 print(json.dumps({k:s.get(k) for k in ('session_id','customer_key','state','generation','created_at','updated_at','expires_at','failure_code','chat_id','anchor_message_id','role_claims','recovery_attempt_generation','recovery_attempts')},sort_keys=True,separators=(',',':')))
PY

cd '/home/cube/projects/richard/traning coach'
printf '%s\n' 'Task23 occurrences:'
rg -n -C 12 'Task 23|Task23|Task-23|task 23|task23' .omo/plans .omo/start-work .omo/senpi-task .omo/evidence | head -1500
printf '%s\n' 'Plan headings around task list:'
rg -n '^#{1,4} .*Task|^#{1,4} .*23|\[ \].*23|\[x\].*23' .omo/plans/dualcoach-production-readiness.md | head -500

cd /home/cube/projects/richard/hermes-agent && printf '%s\n' 'CLI status implementation and expiry operations:'; rg -n -C 5 'def _command_status|status\)|expire|expire_stale|list_sessions\(' scripts/nutrition-room-bootstrap gateway/platforms/telegram_room_bootstrap*.py | head -1000; printf '%s\n' 'Check-in / generation entry paths:'; rg -n -C 4 'PhysiqueCheckin|physique_checkin|checkin|generation job|generation_job|generate.*nutrition|nutrition.*generate' gateway/platforms checkin_cli scripts tests/gateway | head -1800

set -eu
printf 'PI environment:\n'; env | sort | grep '^PI_' || true
printf '\nTask22 venv path state:\n'; ls -ld /home/cube/projects/richard/hermes-agent/.venv 2>&1 || true; ls -l /home/cube/projects/richard/hermes-agent/.venv/bin/python 2>&1 || true
printf '\nTask22 verifier digest:\n'; sha256sum '/home/cube/projects/richard/traning coach/.omo/evidence/verify-task22-supplemental-candidate.py' '/home/cube/projects/richard/traning coach/.omo/evidence/task22-supplemental-compatibility-canonical.py'
printf '\nSystemd execution details:\n'; systemctl --user show hermes-gateway-dualcoachtest.service --property=ExecStart --property=Environment --property=EnvironmentFiles --property=FragmentPath --property=DropInPaths --no-pager


Offset 1360 is beyond end of file (1104 lines total)


# DualCoach start-work session handoff

## Resume point

- Plan: `.omo/plans/dualcoach-production-readiness.md`
- Execution repository: `/home/cube/projects/richard/hermes-agent`
- Evidence repository: `/home/cube/projects/richard/traning coach`
- Completed top-level checkboxes: `22/32`
- Remaining top-level checks: `10`
- First unchecked checkbox: `23. Run activation and customer check-in`
- Task 21 and Task 22 are complete. Task 23 is next.
- The gateway and rehearsal baseline are frozen. Do not restart or mutate them during the plan audit.

## Frozen candidate and baseline

- Authoritative manifest: `.omo/evidence/dualcoach-candidate-manifest.json`
- Frozen candidate: 96 paths,
  `0fa3c0d12c0e8a941eb5f44308893054b69381bf38c7a949dc2b76df4ac06ac1`.
- Task 21 evidence: `.omo/evidence/dualcoach-task-21.md`
- Historical reset archive and supplemental quarantine archive were strict-valid.
- `dualcoachtest` was stopped and unlocked with an empty rehearsal baseline.
- Telegram preflight was read-only and passed:
  - exactly one customer `/start`
  - exactly one owner/operator marker
  - no trainer marker, invite, claim, or membership
  - distinct customer and owner/operator identities
  - private topics-enabled customer-free owner/operator staff group
  - bot admin/topic permissions
  - no webhook
  - pending updates remained `10 -> 10`

## Frozen gateway and v1 authority boundary

Task 21 closure is recorded in the durable ledger. The exact gateway candidate and
rehearsal baseline are frozen for Task22. No service restart, reset, archive mutation,
Telegram update consumption, or profile mutation is permitted during this documentation
amendment.

The v1 authority boundary is:

- customer attestation transitions to `owner_review`;
- owner/operator is the sole nutrition review authority;
- the current frozen `trainer_review` projection migrates through a supported journaled
  reconciliation without re-answering;
- the migration preserves finalized answers, attestation, consent, and zero activation,
  generation, and delivery state;
- no trainer marker, claim, invite, card, UI, route, review, readiness, activation
  requirement, or data access exists in v1;
- optional trainer collaboration is deferred to a later version without v1 scaffolding.

## Required verification after repair

1. Preserve the frozen gateway candidate and Task21 baseline without restart or mutation.
2. Reconcile the current synthetic session from frozen `trainer_review` to `owner_review`
   through the supported journaled path, without re-answering.
3. Run one real owner/operator approval happy path and its owner/operator restart receipt.
4. Verify owner Revise, Reject, wrong-actor, stale, and duplicate branches through the
   exact automated matrix.
5. Keep activation, generation, and delivery at zero until the authorized downstream
   tasks. Real-customer activation and delivery remain prohibited.

## Existing user authorizations

The user explicitly authorized:

- reuse of the dedicated test bot/profile and synthetic customer and owner/operator identities
- `dualcoachtest` reset and archive permission migration already completed by Task21
- supplemental quarantine of the exact historical `data/data` empty lock residue
- Task22-25 rehearsal on the dedicated test resources, without trainer setup
- exactly one synthetic test coaching delivery to the authorized customer DM, only after
  explicit downstream approval
- restart/duplicate/stale checks and final disable/cleanup

Do not expand beyond those dedicated resources. Do not touch other profiles or real
customers. Do not consume Telegram pending updates before Task22. The frozen gateway
must not be restarted during this handoff amendment.

## Session-orchestration caution

The previous session repeatedly produced child IDs through nested/eval orchestration
that were not visible or resumable in the top-level session registry. In the fresh
session:

- use the top-level `task` tool directly
- do not create children through `eval`
- do not report a child as running until the top-level tool returns its real ID
- do not wait for any old child ID from the previous session