Skip to content

fix(ci): await Slack provider reply delivery - #128234

Merged
vincentkoc merged 3 commits into
mainfrom
test/slack-reply-delivery-seam
Aug 23, 2026
Merged

vincentkoc merged 3 commits into
mainfrom
test/slack-reply-delivery-seam

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Aug 23, 2026 •

Copy link
Copy Markdown
Member

Related: #128192
Related: #128226

What Problem This Solves

Fixes an issue where five Slack provider-auth tests could finish their Bolt handler before asynchronous reply delivery completed, then poll sendMock as an indirect completion signal. Beta release validation exposed this as nondeterministic harness evidence.

Why This Change Was Made

Adds one shared Slack test seam that attaches the existing durable-ingress lifecycle to a Bolt handler invocation. The affected Enterprise Grid startup, stalled-presence, user-mention, user-DM, and recovered Enterprise identity cases now await the real dispatcher and delivery boundary, then assert the dispatched context and final send.

No dispatcher behavior is replaced or reproduced. There are no runtime, auth, product, release, or publication code changes.

User Impact

No user-visible behavior changes. Slack provider CI now records deterministic reply-delivery completion instead of relying on mock polling timing.

Evidence

  • node scripts/run-vitest.mjs extensions/slack/src/monitor/provider.auth-test-token.test.ts
    • 1 file passed, 26 tests passed
  • Three fresh-process repetitions of the five affected cases
    • each run: 5 passed, 21 skipped
  • pnpm format extensions/slack/src/monitor.test-helpers.ts extensions/slack/src/monitor/provider.auth-test-token.test.ts
  • git diff --check
  • node scripts/check-changed.mjs -- extensions/slack/src/monitor.test-helpers.ts extensions/slack/src/monitor/provider.auth-test-token.test.ts
    • all pre-typecheck checks passed
    • extension test typecheck remains blocked by unrelated current-main dependency drift in ACPX, CUA Computer, and terminal-core
    • no Slack errors were reported

Production LOC: +0/-0
Tests: +60/-12

Provenance: beta repair PRs #128192 and #128226 exposed and mitigated the race while qualifying the frozen release candidate. This PR carries only the reusable test-harness repair onto current main.

Review follow-up: the first exact-head ClawSweeper review correctly rejected a synthetic dispatcher override. The replacement waits through the existing durable-ingress lifecycle instead. Exact review then identified the remaining recovered-identity polling sibling; this head migrates that fifth case to the same seam.

AI-assisted: yes.

@clawsweeper

clawsweeper Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@vincentkoc vincentkoc self-assigned this Aug 23, 2026
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper review

@openclaw-barnacle openclaw-barnacle Bot added channel: slack Channel integration: slack size: S maintainer Maintainer-authored PR labels Aug 23, 2026
@clawsweeper

clawsweeper Bot commented Aug 23, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 23, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 23, 2026
@clawsweeper

clawsweeper Bot commented Aug 23, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 23, 2026, 11:01 AM ET / 15:01 UTC.

ClawSweeper review

What this changes

The PR adds a shared Slack test helper that waits through durable ingress and updates five provider-auth tests to assert the prepared context and final send without timing-based polling.

Merge readiness

✅ Ready for maintainer review

Keep open for normal maintainer review. No blocking correctness or security findings: the test-only patch reuses the established Slack ingress lifecycle and makes the five assertions wait for dispatch and final mocked delivery.

Priority: P3
Reviewed head: 0db8e08c461a6e7919957f4041341e24d7144152

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, coherent test-harness repair with direct boundary assertions and no actionable review finding.
Proof confidence 🌊 off-meta tidepool Not applicable: This MEMBER-authored test-only PR is exempt from the external-contributor real-behavior-proof gate; its focused test evidence is supplemental.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This MEMBER-authored test-only PR is exempt from the external-contributor real-behavior-proof gate; its focused test evidence is supplemental.
Evidence reviewed 6 items Existing completion boundary: A lifecycle in the handler context causes the Slack message handler to request and await dispatch completion; the test helper supplies that lifecycle rather than replacing the dispatcher.
End-to-end test seam: The shared helper injects the same ingress lifecycle already used by runSlackEventOnce, while the dispatcher reaches the Slack reply sender through the real plugin path before the mocked transport boundary.
Affected assertions: All five changed cases now await the shared helper and directly verify dispatched context plus final Slack send, covering Enterprise, presence, user-identity, DM, and recovered-identity paths.
Findings None None.
Security None None.

Live Verification

Command: node scripts/run-vitest.mjs extensions/slack/src/monitor/provider.auth-test-token.test.ts

Result: FAIL (partial) — step 2 expect_output 26 passed: expected terminal output was not visible within 30 seconds: "26 passed"

node scripts/run-vitest.mjs extensions/slack/src/monitor/provider.auth-test-token.test.ts
runner@runnervm76f27:/tmp/clawsweeper-live-proof-128234-4Q4zMT/target$ node scripts/run-vitest.mjs extensions/slack/src/monitor/provider.auth-test-token.test.ts
node scripts/run-vitest.mjs extensions/slack/src/monitor/provider.auth-test-token.test.ts
[test] starting test/vitest/vitest.extension-slack.config.ts

 RUN  v4.1.10 /tmp/clawsweeper-live-proof-128234-4Q4zMT/target

stderr | extensions/slack/src/monitor/provider.auth-test-token.test.ts › auth.test boot call › settles and closes a real stalled startup auth request before deg
raded startup
[WARN]  web-api:WebClient:0 http request failed The operation was aborted due to timeout

stderr | extensions/slack/src/monitor/provider.auth-test-token.test.ts › auth.test boot call › settles and closes a real stalled startup auth request before deg
raded startup
[WARN]  web-api:WebClient:0 http request failed The operation was aborted due to timeout

stderr | extensions/slack/src/monitor/provider.auth-test-token.test.ts › auth.test boot call › settles and closes a real stalled startup auth request before deg
raded startup
[WARN]  web-api:WebClient:0 http request failed The operation was aborted due to timeout

































Assertions:

  • FAIL expect_output: 26 passed

How this fits together

Slack event handlers pass inbound messages through durable ingress, the message dispatcher, and the Slack send adapter. The changed tests now wait for that existing completion chain before inspecting the reply and send mocks.

flowchart LR
  A[Slack event fixture] --> B[Bolt message handler]
  B --> C[Durable ingress lifecycle]
  C --> D[Message dispatcher]
  D --> E[Reply delivery]
  E --> F[Slack send mock]
  F --> G[Test assertions]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +10, Tests +38. Total +48 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 12 2 +10
Tests 1 48 10 +38
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 60 12 +48

Review metrics

Metric Value Why it matters
Production vs test LOC production +0/-0; tests and test support +60/-12 Both touched files are Slack test infrastructure or tests, so the repair does not alter runtime behavior.

Technical review

Best possible solution:

Retain the single durable-ingress test seam and land this focused harness repair after exact-head CI completes successfully.

Do we have a high-confidence way to reproduce the issue?

Yes—source reproducible: direct Bolt handlers previously returned after queue admission while the affected tests then polled a send mock; the lifecycle path makes the handler await dispatch completion. The mandated read-only review did not execute the focused suite.

Is this the best way to solve the issue?

Yes—the PR reuses the canonical durable-ingress lifecycle already used by sibling Slack tests, rather than introducing a synthetic dispatcher or a new timing wait.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against cd91a8996f06.

Labels

Label justifications:

  • P3: This is a bounded CI-test reliability repair with no user-facing runtime or configuration change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This MEMBER-authored test-only PR is exempt from the external-contributor real-behavior-proof gate; its focused test evidence is supplemental.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: History for the shared Slack test-helper surface includes delivery work in commit 7700a3b, and shortlog shows the largest sampled contribution count on these files. (role: historical area contributor; confidence: medium; commits: 7700a3b3e331; files: extensions/slack/src/monitor.test-helpers.ts, extensions/slack/src/monitor/provider.auth-test-token.test.ts)
  • Vincent Koc: The current head owns the changed assertions, and the related merged release work explicitly included Slack reply-lifecycle repairs. (role: recent Slack lifecycle contributor; confidence: high; commits: 0db8e08c461a, 554baf9b3328, 3203a6f7f8d7; files: extensions/slack/src/monitor.test-helpers.ts, extensions/slack/src/monitor/provider.auth-test-token.test.ts)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-08-23T14:35:53.206Z sha d2ef397 :: needs maintainer review before merge. :: none

@vincentkoc
vincentkoc marked this pull request as ready for review August 23, 2026 14:56
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 23, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@vincentkoc
vincentkoc merged commit c4e0c00 into main Aug 23, 2026
157 of 165 checks passed
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

@vincentkoc
vincentkoc deleted the test/slack-reply-delivery-seam branch August 23, 2026 15:26
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 24, 2026
* test(slack): await provider reply delivery

* fix(ci): exercise real Slack dispatch lifecycle

* test(slack): await recovered identity delivery
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: slack Channel integration: slack maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant