Repository navigation
feat(manager): WhatsApp pilot packaging and operations (WA-06) - #150
Conversation
The worker logs one `channel status:` line per configured interval with queue counts, the oldest unfinished and unsent ages, and unknown, failed, and blocked reply counts. The read is bounded to five seconds so monitoring cannot stall scheduling or a graceful drain. Every rejected webhook request logs a fixed reason. No line contains message text, sender IDs, tokens, or provider IDs. Adds EXTRA_WHATSAPP_STATUS_LOG_SECONDS (default 60). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The runbook covers preflight, deployment, staged enablement and pausing, health and status logs, restart recovery, rollback, retention, and the real-number smoke-test checklist. The example runs agent-manager on durable storage with a tool-free assistant and an allowlist identity resolver; its port is bound to loopback because the web conversation API is anonymous by default. A fake-provider rehearsal proves that paused intake survives restarts, is answered and sent exactly once, projects a delivered callback, and is not resent after a further restart. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # tasks/README.md
Asaf-prog
left a comment
There was a problem hiding this comment.
1. Summary
Reviewed the incremental monitoring, rejection logging, pilot packaging, allowlist resolver, runbook and restart rehearsal. Synced the updated #149 head, resolving tasks/README.md while preserving both entries.
2. Blocking issues
No new blocker confirmed in the incremental #150 changes. The inherited control/suppression defect in #149 blocks the stack: with intake/worker on and sender off, /stop becomes failed and subsequent text still runs. See #149 (review) . The Answering pause state documented here exercises that configuration.
3. Non-blocking issues
Automatic channel retention and operator reconciliation remain follow-ups. The status scan over retained history is an acknowledged pilot-volume limitation.
4. Architecture concerns
Monitoring uses a separate read port; status reads are bounded to five seconds and failures do not stop scheduling. The example keeps organization identity in its plugin and binds the manager port to loopback. No new engine/YAML contract or migration is introduced by #150.
5. Security concerns
Inspected rejection logging uses fixed reasons. The allowlist denies malformed entries and re-reads per lookup. The example is tool-free, all three stages default off, and the runbook requires forwarding only the webhook path plus real account linking before internal data access.
6. Testing gaps
make check passed on this head: 1,450 tests / 27 warnings, formatting, lint, mypy and generated-stub checks. A temporary merge with current main (ffe1d2f) also passed make check with 1,453 tests, plus agentctl validate examples/whatsapp-pilot/agents.yml. The temporary main merge was discarded after validation. Local tests use SQLite and fake provider/engine/identity; live Meta, live PostgreSQL and Docker startup were not exercised by this review.
7. Suggested improvements
Extend the staged-enable/restart rehearsal to cover worker-on/sender-off controls and suppression after fixing #149.
8. Final recommendation
Approve the incremental changes after the upstream #149 blocker is corrected and the stack is revalidated. Keep #150 unmerged meanwhile. This COMMENT is not a formal GitHub approval: the connected account is the author, and main requires an independent approving reviewer. Merge order after correction and review is #148, #149, #150. No main merge was performed.
Final planned stage of the WhatsApp integration plan: an administrator runbook, a deployable pilot example, operational monitoring, and a fake-provider restart rehearsal (task 0021).
Commits
feat(manager): log channel status and webhook rejections.channel status:line perEXTRA_WHATSAPP_STATUS_LOG_SECONDS(default 60). It reports queue counts, the oldest unfinished and unsent ages, and unknown, failed, and blocked reply counts.whatsapp webhook rejected: reason=<fixed reason>.feat(examples): add the WhatsApp pilot example, runbook, and rehearsal.docs/WHATSAPP_RUNBOOK.mdcovers preflight, deployment, staged enablement and pause states, health and monitoring, restart recovery, rollback, retention, and the smoke-test checklist.examples/whatsapp-pilot/contains a tool-free assistant, an allowlist identity resolver for a closed pilot,.env.examplewith every stage off, and a compose file that runsagent-manageron a durable volume.deliveredcallback is projected, and that nothing is resent after a further restart.The user chose structured log lines for monitoring, so there is no new HTTP endpoint, CLI, dependency, or migration.
Review corrections included
EXTRA_DB_URLin.envnow overrides the compose default, so a PostgreSQL configuration is no longer silently replaced by SQLite.docker compose run --entrypoint sh, because the image entrypoint passes other commands toagentctl.rolesgiven as a string, denies access instead of granting the wrong roles.Each code correction has a regression test that fails without it.
Validation
make checkpasses: 1441 tests, plus ruff and mypy. The first commit was also checked alone in a worktree: 1438 tests.agentctl validatepasses on the example.docker compose configwas checked with and without a PostgreSQL.env.0006was rehearsed on a temporary database: the channel tables are removed and conversations are kept.Still pending
🤖 Generated with Claude Code