You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The moderator was parked (not deployed, router route pointing at a
Lambda that is not maintained). Delete the project, its CI workflow and
dependabot entry, and drop it from the docs.
The router's button-click route now just acknowledges the request so
Slack does not retry, since nothing consumes those payloads anymore.
├── scripts/ # package.sh, deploy.sh (+ publish.sh for router)
22
21
├── tests/ # unit tests (+ e2e mocked tests for automator)
23
-
├── integration/ # integration tests (moderator only — LocalStack)
24
22
├── pyproject.toml # self-contained deps
25
23
├── uv.lock
26
24
└── README.md
27
25
```
28
26
29
27
CI is per-project and path-filtered (`.github/workflows/test-*.yml` and
30
-
`deploy-*.yml`): a project's tests run only when its files change, and the two
31
-
active projects deploy only after their own tests pass on `main`.
28
+
`deploy-*.yml`): a project's tests run only when its files change, and each
29
+
project deploys only after its own tests pass on `main`.
32
30
33
31
## How the AuTomator Works
34
32
35
-
The backend is split into **three Lambdas**, each with a clear responsibility.
33
+
The backend is split into **two Lambdas**, each with a clear responsibility.
36
34
37
35
### 1. Router — Routes Slack events to the right Lambda
38
36
@@ -45,9 +43,9 @@ Its only job is to look at the incoming event and quickly decide where it should
45
43
|**Reaction added by admin**| Automator |
46
44
|**App mention**| Automator / FAQ Assistant |
47
45
|**Message event**| Disabled for now |
48
-
|**Button click** (e.g. from an alert) |Moderator|
46
+
|**Button click** (e.g. from an alert) |Acknowledged only|
49
47
50
-
The router and automator are separate on purpose: Slack expects a response within about 3 seconds. The router responds immediately and invokes the automator (or moderator) asynchronously, so longer work doesn’t time out.
48
+
The router and automator are separate on purpose: Slack expects a response within about 3 seconds. The router responds immediately and invokes the automator asynchronously, so longer work doesn’t time out.
51
49
52
50
### 2. Automator — Acts based on emoji reactions by the admin and FAQ mentions
53
51
@@ -67,28 +65,16 @@ Examples:
67
65
68
66
The automator can also send a relevant reply to the author of the message you reacted to, so they get clear feedback.
69
67
70
-
### 3. Moderator — Watches message activity and helps you react quickly
71
-
72
-
The moderator **does not** decide what is spam by itself. It:
73
-
74
-
- Keeps track of how often people post (e.g. messages per user in a time window).
75
-
- Notices patterns like “too many messages too quickly.”
76
-
- When that happens, **alerts an admin** and provides **buttons** to act immediately.
77
-
78
-
Those buttons let you **delete recent messages**, **deactivate a user**, or **ignore** the alert—all from Slack, including on your phone. So you get early signals and can intervene quickly without opening a laptop.
79
-
80
-
For more on the moderator (DynamoDB, thresholds, LocalStack, etc.), see [moderator/README.md](moderator/README.md).
81
-
82
68
---
83
69
84
70
## Deployment
85
71
86
72
Each project is self-contained under its own directory (`src/`, `scripts/`,
87
-
`tests/`, `pyproject.toml`). CI deploys the two active projects automatically:
73
+
`tests/`, `pyproject.toml`). CI deploys both projects automatically:
88
74
each `Deploy *` workflow runs after its `Test *` workflow passes on `main`, and
89
75
only when files under that project changed. Deploy in this order:
90
76
91
-
**1. Router** (active)
77
+
**1. Router**
92
78
93
79
```bash
94
80
cd router
@@ -104,7 +90,7 @@ the repository variable `ROUTER_FUNCTION_NAME`; otherwise it defaults to
104
90
The AWS credentials used by GitHub Actions need `lambda:UpdateFunctionCode`,
105
91
`lambda:GetFunction`, and `lambda:GetFunctionConfiguration` for `slack-test`.
106
92
107
-
**2. Automator** (active)
93
+
**2. Automator**
108
94
109
95
```bash
110
96
cd automator
@@ -115,30 +101,6 @@ bash scripts/deploy.sh
115
101
Deployed by `.github/workflows/deploy-automator.yml` after `Test Automator`
116
102
passes on `main`.
117
103
118
-
**3. Moderator** (parked — not deployed)
119
-
120
-
The moderator is currently parked: its router route is disabled and it has no
121
-
deploy workflow. Its tests still run in CI (`Test Moderator`). To deploy it
122
-
manually:
123
-
124
-
```bash
125
-
cd moderator
126
-
bash scripts/package.sh
127
-
bash scripts/deploy.sh
128
-
```
129
-
130
-
---
131
-
132
-
## Message Moderator (reference)
133
-
134
-
- Tracks messages per user using **DynamoDB**.
135
-
- Configurable threshold (default: 5 messages in 3 minutes).
136
-
- Interactive admin alerts with action buttons.
137
-
- Bulk message deletion and user deactivation.
138
-
- LocalStack support for testing.
139
-
140
-
See [moderator/README.md](moderator/README.md) and [moderator/SLACK_SETUP.md](moderator/SLACK_SETUP.md) for setup and details.
0 commit comments