Repository navigation
fix(test): narrow Slack socket payload bytes - #150678
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 17, 2026, 2:30 AM ET / 06:30 UTC. ClawSweeper reviewWhat this changesThe PR explicitly distinguishes Buffer payloads in Slack’s WebSocket test fixture so acknowledgement bytes can be decoded with correctly narrowed types. Merge readiness✅ Ready for maintainer review Keep open: this is a focused, behavior-preserving test repair with no actionable findings. Neither related alternative has merged, and the member-authored PR is protected from cleanup closure. Priority: P3 Review scores
Verification
How this fits togetherOpenClaw’s Slack plugin uses Socket Mode to receive events and send acknowledgements. The changed test fixture decodes those acknowledgements from a local WebSocket server and checks their order and continued message handling. flowchart LR
A[Fixture event envelopes] --> B[Slack Socket Mode receiver]
B --> C[WebSocket acknowledgements]
C --> D[Normalize payload bytes]
D --> E[Decode envelope identifiers]
E --> F[Check order and continued delivery]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests 0. Total 0 across 1 file. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep the explicit payload narrowing within the existing acknowledgement fixture and preserve its behavioral assertions. Do we have a high-confidence way to reproduce the issue? Yes, the focused verification path is the extension-test TypeScript project and this interop suite; source and published types identify the narrowing boundary. The compiler failure was not independently reproduced during this read-only review. Is this the best way to solve the issue? Yes. The explicit Buffer predicate handles the declared union without casts, duplicate fixtures, weaker assertions, or production changes. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c49879668263. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
Summary
Buffer.isBuffermainWhy
The WebSocket
RawDataunion includesBuffer[],Buffer, andArrayBuffer. The existing ternary leftBuffer | ArrayBufferat theBuffer.fromcall, so the extension test-type job failed on every unrelated PR.Validation
node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.extensions.test.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/slack-ci-rebased.tsbuildinfopnpm test extensions/slack/src/monitor/provider.interop.test.ts(19/19)pnpm check:changedSupersedes the conflicting type-only alternatives #150646 and #150650. The shared Socket Mode acknowledgement fixture is already present on current
main; this PR does not duplicate it.