Repository navigation
fix(slack): require an acknowledgement sender for envelope guards - #150656
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:47 AM ET / 06:47 UTC (Revision 3). ClawSweeper reviewWhat this changesThe PR makes Slack envelope acknowledgements an explicit receiver-construction dependency, completes the receiver fixture, and replaces startup-test polling with an explicit signal. Merge readiness✅ Ready for maintainer review This remains a useful, bounded follow-up to the merged Slack crash fix; current main has not absorbed the remaining work. No blocking correctness or security findings were identified. Priority: P2 Review scores
Verification
How this fits togetherThe Slack plugin receives Socket Mode envelopes before Bolt dispatches events into OpenClaw. Its guard acknowledges event-less control notifications through Slack’s SDK while ordinary messages continue through the existing delivery path. flowchart TD
A[Slack Socket Mode connection] --> B[Envelope guard]
B --> C{Event type present?}
C -->|No| D[Warning and SDK acknowledgement]
C -->|Yes| E[Bolt event dispatch]
E --> F[OpenClaw durable ingress]
D --> A
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +3, Tests +7. Total +10 across 4 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep one SDK-owned acknowledgement path with an explicit construction contract and real-transport coverage for control envelopes and continued ordinary delivery. Do we have a high-confidence way to reproduce the issue? Not applicable to the remaining internal contract repair: the original crash protection already exists on main, and real-SDK loopback cases define the acknowledgement behavior being preserved. Is this the best way to solve the issue? Yes. Moving sender validation to receiver construction preserves SDK ownership, removes the fixture bypass, and introduces no public plugin API or configuration change. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8b9739cc48c0. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (2 earlier review cycles)
|
067f2b0 to
d431b50
Compare
Require a typed acknowledgement callback and bind Slack's checked private sender at receiver construction. Complete the Socket Mode fixtures and decode ws RawData without an ambiguous Buffer.from overload. Await the Enterprise startup fixture's actual start signal instead of polling its mock under a one-second deadline, retaining the exact call-count assertion. Follow up #150608 by @pash-openai while preserving its protection against event-less Events API envelopes. No operator configuration or migration changes.
d431b50 to
936e06b
Compare
|
Merged via squash.
|
Derive compiler concurrency and native worker shares from available CPUs, then schedule larger plugin implementations first. Compile Codex from its packaged entrypoints while preserving the production closure and excluding test-only roots. Related: #150656
Prevent extension package-boundary checks from timing out when CI requests more compiler concurrency than the available CPUs can support. Bound compiler processes and native worker shares by CPU capacity, and schedule larger plugin implementations first. Derive temporary compiler projects from the canonical packaged-source inventory, declared exports/main targets, and ambient declarations while preserving shared tsconfig inheritance, package roots, and SDK aliases. Bind root-selection metadata to the existing compiler receipts. The 120-second per-plugin deadline remains unchanged; no runtime behavior or operator-state migration changes. Validation: all 124 plugins compiled in three candidate Linux trials; Codex took 3.972–5.573 seconds. The recorded owner suite passed 19 tests, plugin contracts passed 47 files / 1,132 tests, and changed-file checks passed. Exact-head PR CI was green on run 35208148229. The scoped autoreview found no accepted/actionable findings. Related: #150656
…enclaw#150656) Complete the Slack Socket Mode envelope-guard construction repair following openclaw#150608 by @pash-openai. Require an explicit acknowledgement callback and bind the SDK sender during receiver construction, preserving SDK ownership of serialization and transport, event-less envelope acknowledgements, and continued ordinary message delivery. Complete the receiver fixture and await the Enterprise startup fixture's actual start signal while retaining the exact call-count assertion. No operator action, configuration change, or migration is required. Validation: 3,063 Slack tests across 165 files and full test typechecking passed on the patch-identical reviewed revision. Exact-head CI run 35190855262 is green; the scoped-clean review and exact-head ClawSweeper review have no actionable findings. Transport proof uses the real Slack SDK over isolated loopback sockets. Related: openclaw#150608, openclaw#150630
…50721) Prevent extension package-boundary checks from timing out when CI requests more compiler concurrency than the available CPUs can support. Bound compiler processes and native worker shares by CPU capacity, and schedule larger plugin implementations first. Derive temporary compiler projects from the canonical packaged-source inventory, declared exports/main targets, and ambient declarations while preserving shared tsconfig inheritance, package roots, and SDK aliases. Bind root-selection metadata to the existing compiler receipts. The 120-second per-plugin deadline remains unchanged; no runtime behavior or operator-state migration changes. Validation: all 124 plugins compiled in three candidate Linux trials; Codex took 3.972–5.573 seconds. The recorded owner suite passed 19 tests, plugin contracts passed 47 files / 1,132 tests, and changed-file checks passed. Exact-head PR CI was green on run 35208148229. The scoped autoreview found no accepted/actionable findings. Related: openclaw#150656
Related: #150608, #150630
What Problem This Solves
Completes the Socket Mode envelope-guard construction repair for the regression introduced by #150608, originally observed in run 35184520594. Main now contains the shared-fixture and RawData fixes; this PR makes acknowledgement an explicit guard dependency and covers the remaining receiver construction fixture.
User Impact
Preserves acknowledgement of event-less Slack envelopes and continued normal message delivery. No operator action or configuration migration is needed. The installed SDK already supplies the sender; no missing-sender production path was found.
Why This Change Was Made
The guard now requires a typed acknowledgement callback. Receiver construction validates and binds Slack's real sender, retaining SDK ownership of acknowledgement serialization and transport. Slack's declarations hide the private sender's signature, so that dependency check remains explicit at construction. The interop fixture now supplies a client, sender, and listener registry instead of bypassing guard installation.
The rebase preserves #150406's event contracts derived from upstream Slack types. It also retains #149291's shared EventEmitter/sender fixture and explicit ArrayBuffer narrowing for RawData. Those main changes absorb the original overlap with #150630; this PR follows up #150608 by @pash-openai.
Review: the lead review
pr-150656-autoreview.mdis scoped-clean ond431b50f64ad0e8075835a85e59df24f0766a06a, with the sender contract checked against @slack/socket-mode 3.0.1. The subsequent rebase is patch-identical (git range-diffreports=), preserving that reviewed change without another semantic resolution.Evidence
Before the original repair, reproduced
TS2769atprovider.interop.test.ts:508:81and the exact Slack baseline: 87 failed / 2,975 passed / 85 unhandled errors.Reviewed and locally tested candidate:
d431b50f64ad0e8075835a85e59df24f0766a06a, on main8f463a22fce001fdf43e385a6a800c5afb42c84a. Current head:936e06b4b2e06f5d6ee57739168972e028868278, rebased onto maina3bea6a8e38652729bfc32bbfde4124a911f6eb4. Range-diff:d431b50f64a = 936e06b4b2e. Frozen-lockfile installation passed again without dependency changes; a fresh exact-head CI run follows the new base.pnpm install --frozen-lockfile: passed; no dependency changes.pnpm check:test-types: passed.pnpm test extensions/slack: 3,063 passed across 165 files, no unhandled errors.--mode branch --base origin/main --max-priority P1): scoped-clean. Artifact:rebase-1/autoreview-branch.log; the separate lead review is also scoped-clean as recorded above.The original single-worker repeat observed candidate flake 58: “starts an org-wide Socket Mode account with its bot identity when auth.test omits app_id” missed a default one-second polling deadline for appStartMock. The test now awaits the mock's actual start signal and retains the exact one-call assertion. No configured timeout changed, and the construction repair adds no awaited startup work.
pnpm check:changedpassed every step before extension lint, which hit the documented nested-checkout declaration-input error. The authorized direct oxlint substitute was checked with a temporary violation and exact restoration:All four remaining database-store, media-download, runtime-sidecar, and import-cycle guards passed (exit 0); the import-cycle scan found zero runtime value cycles. CI's extension lint remains the authority for this host-specific substitution.
Production: +18 / -15 lines (net +3). Tests: +9 / -2 lines (net +7). No tests were disabled or assertions weakened. Proof uses isolated local state and loopback sockets, not authenticated Slack.
The previous exact-head run 35189702655 passed test types and the Slack extension shard. Its only failure was package-boundary compilation of the codex plugin exceeding the 120-second deadline (120,849 ms observed), tracked separately as candidate flake 59. That job was not rerun.