Skip to content

feat(comms): log one message to several leads — iris comms log <ids..> (#186156) - #85

Merged
mayoalexander merged 1 commit into
mainfrom
comms-multi-recipient
Sep 19, 2026
Merged

mayoalexander merged 1 commit into
mainfrom
comms-multi-recipient

Conversation

@mayoalexander

Copy link
Copy Markdown

iris comms log now takes one or more leads: one copy each, linked by a shared message group id, with the full recipient list on every copy and "also sent to" on each timeline. --group re-runs idempotently; --cc records non-lead addresses. A copy only counts as logged if the returned row is on that lead — a wrong-lead 2xx is a failure (the old silent-drop). Needs the fl-api LeadComm::logManual fix deployed first.

Tests: comms-log-group 8/8 (mutation-checked); src/cli/cmd 1545/0.

🤖 Generated with Claude Code

….>` (#186156)

`comms log` took exactly one lead, so an email to three people was three unrelated rows, logged
by hand, with nothing saying they were one message.

  iris comms log 29019 29016 29021 --channel apple_mail --subject "…" -m "…"

Every lead gets its own copy, all with ONE shared message group id, ONE timestamp and the full
recipient list; `comms list` shows "also sent to: …" on each lead's timeline. --group reuses a
group to add someone later or re-run safely (idempotent per lead on the server). --cc records
non-lead addresses without logging to them. A lead name that does not resolve logs NOTHING,
rather than logging to some recipients and quietly skipping one.

Read-back, not trust: a copy only counts as logged if the row that comes back is on THAT lead.
Before the server fix, recipients 2..N got a 200 carrying the first lead's row and the CLI said
"Logged" — so checkLogged() treats a wrong-lead 2xx as a failure (exit 1). Mutation-checked:
trusting any 2xx fails exactly that test.

Pure half in comms-log-group.ts, 8 tests. Full src/cli/cmd suite 1545/0.
Server side: fl-api LeadComm::logManual (same issue number).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K9LZmfMCptv6tUqxryDrTx
@mayoalexander
mayoalexander merged commit 7302678 into main Sep 19, 2026
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant