Review round on #148903 (Greptile 4467193888..4467194077):
- Bot Mode gate (agent/bot_chain.py, tools/bot_mode_dm_chain.py) runs once per
message_agent call before any transport, on #144789's code. Recipients are keyed
by the author id their turns carry (bot:default for @hermes, bot:<conn>/<profile>
for relay rows, the peer's bot:<host>/<profile> or peer:<name>/<agent>).
- Every call inside a bot-authored turn is one more hop; a person's turn sends at 1.
- A definite no-send (offline relay target, refused admission) releases its ask
and hop; queued/ambiguous keep them.
- A reply to the turn's sender reuses #144789's notify-only path (marker +
wake="none"); the receiver reads the marker from the text, so it survives the
Desktop relay, which rebuilds the author. The parallel expects_reply author field
is gone.
- Forks (_turn_origin) neither reset nor advance the chain; the chain is bound
after compression recovery and follows a session id change (rotation carry and
per-agent rebinding).
- gateway.bot_loop_guard.enabled: false switches the Bot Mode rules off too.
- Gateway: gateway/bot_peer_notices.automatic_notices_allowed is the one policy
at every runtime-notice egress (platform notices incl. delegation failure,
inactivity warning, hygiene, background failure, approval timeout, command
acks, context-ref refusals, STT echo, status/progress lanes).
- A bot may end in silence even when it addressed us (reply_expected=True).
- reply_to_reply keys on a reply this bot DELIVERED (note_reply), not on admission.
- Tests split by owner: tests/agent/test_bot_chain.py, tests/tools/test_bot_mode_dm_chain.py,
gateway ingress stays; config keys covered through the real config.yaml loader.
Each finding's test fails with its guard removed (mutant run).