docs(cron): correct stale 'no new seed code' comments for in_channel

The in_channel surface DOES add a seed: _seed_cron_channel_session CREATES
the flat (platform, chat_id, None) session and mirrors the brief into it,
because mirror_to_session only APPENDS to an existing session and the flat
channel row is otherwise absent for a chat_postMessage delivery. Correct
the scheduler thread-skip comment and the test class docstring, which still
described the earlier 'let the existing mirror seed it' design.
This commit is contained in:
teknium1 2026-07-01 02:51:30 -07:00 committed by Teknium
parent 751a300fca
commit ac3f4aed96
2 changed files with 11 additions and 7 deletions

View file

@ -1411,11 +1411,13 @@ def _deliver_result(job: dict, content: str, adapters=None, loop=None) -> Option
# the origin DM session (handled after delivery). Cf. _process_handoff.
#
# in_channel surface (D2): SKIP thread creation entirely — leave
# thread_id=None so the delivery posts flat, and let the existing
# origin-mirror (below) seed the shared-channel session (F5: for a
# channel-origin job with thread_id=None, _target_matches_origin matches
# and _maybe_mirror_cron_delivery seeds (platform, chat_id, None)). No
# new seed call is needed.
# thread_id=None so the delivery posts flat, then
# ``_seed_cron_channel_session`` (below) CREATES the shared-channel
# session and mirrors the brief into it. The shipped mirror alone is
# NOT enough here: ``mirror_to_session`` only APPENDS to an existing
# session and a flat ``(platform, chat_id, None)`` row is otherwise
# absent for a ``chat_postMessage`` delivery, so the seed must create
# the row first (F5).
thread_seeded = False
opened_thread_id: Optional[str] = None
if (

View file

@ -4153,8 +4153,10 @@ class TestCronContinuableSurfaceInChannel:
generically from pconfig.extra; the in_channel branch is gated on the
adapter capability flag ``supports_inchannel_continuable`` (Slack=True,
others fail SAFE to thread). In in_channel mode the thread-open branch is
SKIPPED (thread_id stays None), so the existing origin-mirror seeds the
shared-channel session no new seed code (G6).
SKIPPED (thread_id stays None), then ``_seed_cron_channel_session`` CREATES
the flat shared-channel session and mirrors the brief into it (the shipped
mirror only APPENDS to an existing session, and the flat channel row is
otherwise absent for a chat_postMessage delivery).
"""
def _slack_cfg(self, extra):