feat(bus): post activity-channel to Slack instead of never-configured Telegram - #180
feat(bus): post activity-channel to Slack instead of never-configured Telegram#180asachs01 wants to merge 2 commits into
Conversation
… Telegram postActivity now targets Slack (SlackAPI.postMessage) instead of a Telegram bot that has never been configured anywhere in the fleet (verified absent 2026-08-15, 2026-09-03, 2026-09-08 — a stuck [HUMAN] BotFather task with 6+ duplicate filings since 2026-07-16). Text-only: interactive Approve/Deny buttons need Slack Block Kit + inbound interactive-payload handling that isn't built yet, so postApprovalToActivityChannel drops the Telegram inline keyboard and points operators at the dashboard instead. Config: one new value (ACTIVITY_SLACK_CHANNEL_ID in activity-channel.env). Token reuses SLACK_BOT_TOKEN from secrets.env, the same key the daemon's Socket Mode connection already uses. Live-verified against wyre's #agent-ops (adopted after conversations.create for a fresh channel came back missing_scope: channels:manage) via a real create-approval round trip, test message posted and deleted, test approval rejected. Boss-approved (msg 1788869841715-boss-xmbgu), task_1788869860840_01459423.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Reviewed. Correctness on the two call sites is solid — verified against the actual dependencies rather than trusting the diff in isolation:
On the One finding beyond what was asked, not a blocker given the PR's stated scope: this PR removes LGTM given the stated scope — recommend filing the orphaned-inbound-chain cleanup as a separate follow-up rather than blocking this PR on it. |
dev's review of #180: grepped every call site on this branch (approval.ts, both test files) and confirmed zero callers pass a 5th arg anymore, so the Telegram-inline-keyboard-shaped param buys nothing kept around -- Block Kit is a different shape and SP3c will define its own param when it lands. Also documents (code comment + CHANGELOG) a real behavior note dev caught: the config lookups now keep searching past a candidate file that exists but lacks the needed key, rather than stopping at the first existing file regardless of content -- more correct than the old Telegram version, worth naming since nobody asked for it.
Summary
postActivity(src/bus/system.ts) now posts to Slack viaSlackAPIinstead of a Telegram bot that has never been configured anywhere in the fleet (verified absent 2026-08-15, 2026-09-03, 2026-09-08 — the[HUMAN]BotFather task has 6+ duplicate filings since 2026-07-16 with no progress:task_1786122601201_28151267)postApprovalToActivityChannel(src/bus/approval.ts) drops the Telegram inline Approve/Deny keyboard — Slack's equivalent needs Block Kit + inboundinteractive-payload handling that isn't built yet (socket-mode.tscurrently only parsesevents_apienvelopes) — and adds a "resolve via the dashboard" line insteadACTIVITY_SLACK_CHANNEL_ID. Token is not a new secret — reusesSLACK_BOT_TOKENfromsecrets.env, the same key the daemon's Socket Mode connection already useswyreagainst#agent-ops(verified empty before adopting —conversations.createfor a fresh#org-activitychannel came backmissing_scope: channels:manageon the available token)1788869841715-boss-xmbgu, tasktask_1788869860840_01459423Test plan
npx tsc --noEmitcleannpm run buildsucceedstests/unit/bus/system.test.ts,tests/unit/bus/approval.test.ts) — 73/73 passingcortextos bus create-approvalthrough the built CLI created a real approval, message verified present in#agent-opsviaconversations.history, then deleted (chat.delete) and the test approval rejected — no residue left in Slack or the approvals storeNeed help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.