Skip to content

refactor: remove Slack and Discord daemon code (#525)#527

Merged
ALRubinger merged 1 commit intomainfrom
worktree-issue-525
May 7, 2026
Merged

refactor: remove Slack and Discord daemon code (#525)#527
ALRubinger merged 1 commit intomainfrom
worktree-issue-525

Conversation

@ALRubinger
Copy link
Copy Markdown
Owner

Summary

Removes the Slack and Discord daemon stack: in-process listeners, HTTP handlers, the Slack OAuth provider, the in-process Slack source connector, and the system vault.

The Slack/Discord stack was built for the cloud messaging gateway hypothesis. v1 (#493) shipped against Google and v2 (#505) ships the local Monday catch-up demo, so the daemon-side messaging code has no validated consumer post-pivot. The system vault was the companion piece (per archived ADR-0020) — Slack workspace bot tokens were its only driver — and goes with it.

Per the issue's intent, the comms SPI (Listener, OutgoingMessage, NotifyQueue, ListenerRegistry) is preserved as a primitive for any future channel implementation; StartListeners is a no-op until one exists. Draft approve/edit now dispatches via the listener registry generically — with no implementations registered the paths return 503, which is the correct behavior for "comms not configured."

ADR-0020 is amended in the archive with a superseded note.

Slack-as-outbound-action via the v2 connector (#513) is unaffected — that runs out of process via the connector model.

What was removed

  • internal/comms/{slack,discord}*.go and helpers (24 Slack files + 3 Discord files)
  • internal/account/slack_service*.go (Slack OAuth provider)
  • internal/app/handlers_slack_* and slack_agent_client* (HTTP route handlers)
  • internal/source/slack/ (in-process Slack source connector)
  • internal/vault/system*.go (system vault implementation)
  • Slack/Discord blocks in AileronConfig notifications schema
  • SlackEnabled()/SystemVaultEnabled() and the env-var plumbing in internal/config/auth.go
  • github.com/slack-go/slack and github.com/bwmarrin/discordgo dependencies
  • Slack route registrations and provider wiring from internal/app/app.go
  • Slack-specific OAuth nesting logic in cmd/aileron-enclave/oauth.go

What stayed

  • comms.Listener SPI, IncomingMessage/OutgoingMessage, NotifyQueue, ListenerRegistry
  • comms.IsVaultRef / comms.ResolveVaultRef helpers
  • model.ConnectedAccountProviderSlack enum value (the v2 connector model still uses slack as a service name)
  • The draft pipeline (now dispatches via the listener registry generically)

Acceptance

  • All listed files deleted
  • Route registrations and handler wiring removed from internal/app/app.go and cmd/aileron/
  • github.com/slack-go/slack and Discord deps removed via go mod tidy
  • System vault removed; ADR-0020 amended with a superseded note
  • task lint:go, task build, task test:go clean
  • No dead references to removed symbols

Test plan

  • task lint:go passes
  • task build passes (Go modules + docs)
  • task test:go passes across all modules (internal, cmd/aileron, cmd/aileron-enclave, cmd/aileron-mcp, cmd/aileron-sh)
  • CI green

Closes #525.
Closes #524 (superseded).
Refs ADR-0002 (core ships only primitives).

🤖 Generated with Claude Code

Removes the Slack and Discord daemon stack: in-process listeners
(`internal/comms/{slack,discord}*.go`), HTTP handlers
(`internal/app/handlers_slack_*`, `slack_agent_client*`), the Slack
OAuth provider (`internal/account/slack_service*.go`), the
in-process Slack source connector (`internal/source/slack/`), and
the system vault (`internal/vault/system*.go`) along with its
config plumbing.

The Slack/Discord stack was built for the cloud messaging gateway
hypothesis; v1 (#493) shipped against Google and v2 (#505) ships
the local Monday catch-up demo, so the daemon-side messaging code
has no validated consumer post-pivot. The system vault was the
companion piece (per archived ADR-0020) — bot tokens for Slack
workspace installs were the only driver — and goes with it.

`internal/comms` keeps the SPI (Listener, OutgoingMessage, the
NotifyQueue and registry) so a future channel implementation has
something to plug into; `StartListeners` is a no-op until one
exists. Draft send now dispatches via the listener registry
generically — with no implementations registered the approve/edit
paths return 503, which is the correct behavior for "comms not
configured."

ADR-0020 is amended in the archive with a superseded note.

Slack-as-outbound-action via the v2 connector (#513) is unaffected
— that runs out of process via the connector model.

Closes #525.
Closes #524 (superseded).
Refs ADR-0002 (core ships only primitives).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@railway-app
Copy link
Copy Markdown

railway-app Bot commented May 7, 2026

🚅 Deployed to the aileron-pr-527 environment in aileron

Service Status Web Updated (UTC)
docs ✅ Success (View Logs) Web May 7, 2026 at 6:05 pm

@railway-app railway-app Bot temporarily deployed to aileron / aileron-pr-527 May 7, 2026 18:04 Destroyed
@codecov
Copy link
Copy Markdown

codecov Bot commented May 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.34%. Comparing base (16e1f5f) to head (48ae323).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #527      +/-   ##
==========================================
+ Coverage   81.98%   82.34%   +0.36%     
==========================================
  Files         235      221      -14     
  Lines       23989    21908    -2081     
==========================================
- Hits        19667    18041    -1626     
+ Misses       3147     2758     -389     
+ Partials     1175     1109      -66     
Flag Coverage Δ
integration 17.55% <61.11%> (+8.91%) ⬆️
unit 77.82% <77.77%> (-0.84%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ALRubinger ALRubinger merged commit 970400c into main May 7, 2026
11 checks passed
@ALRubinger ALRubinger deleted the worktree-issue-525 branch May 7, 2026 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant