Repository navigation
refactor(slack): derive event contracts from upstream types - #150406
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 16, 2026, 10:29 PM ET / September 17, 2026, 02:29 UTC (Revision 4). ClawSweeper reviewWhat this changesDerives Slack event contracts from upstream types, validates persisted relay messages before dispatch, and reorganizes relay regression coverage. Merge readiness✅ Ready for maintainer review Keep open: the refactor remains useful and is absent from current main. Both earlier relay findings are resolved, and no blocking introduced defect was found. The member-authored PR is also protected from automated closure. Priority: P2 Review scores
Verification
How this fits togetherThe Slack plugin accepts messages from a trusted relay and stores them in a durable queue before acknowledgement. Queue replay validates each message before passing it to the normal Slack message handler. flowchart LR
A[Trusted Slack relay] --> B[Validate message shape]
B --> C[Durable ingress queue]
C --> D[Validate replayed message]
D -->|Valid| E[Slack message handler]
D -->|Malformed| F[Record terminal failure]
F --> G[Continue conversation lane]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -52, Tests +64, Other 0. Total +12 across 9 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep upstream-derived contracts private to Slack and reuse the existing relay admission predicate during replay, preserving valid queued messages and terminally rejecting malformed rows. Do we have a high-confidence way to reproduce the issue? Not applicable to the primary type refactor; malformed replay has a focused same-lane regression and reported before/after sensitivity, but this review did not execute tests. Is this the best way to solve the issue? Yes. Upstream-derived private types remove copied declarations, while replay validation reuses the existing transport predicate without changing valid payload formats. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 9ce12dfa6125. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
f32849e to
f660a4b
Compare
e442b46 to
d43117a
Compare
|
Coordination for required CI repair in #150026: exact CI run35170756418 reports a Madge cycle between |
d43117a to
f2873d1
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
What Problem This Solves
Slack ingress event DTOs manually copied Bolt event shapes and erased subtype ownership, while persisted relay messages crossed an
unknownboundary through assertions.User Impact
User impact: no intended user-visible change; Slack event contracts now track
@slack/types, and malformed persisted relay messages fail closed before dispatch.Why This Change Was Made
Project permissive runtime DTOs from upstream event types, retain OpenClaw-only compatibility fields explicitly, and validate message identity at relay persistence boundaries.
Evidence
node scripts/check-changed.mjs