Skip to content

test(slack): settle identity delivery proof - #128290

Merged
vincentkoc merged 1 commit into
validation/target-3203a6f7f8d7-1787493942617from
release/beta3-slack-proof-final
Aug 23, 2026
Merged

vincentkoc merged 1 commit into
validation/target-3203a6f7f8d7-1787493942617from
release/beta3-slack-proof-final

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Aug 23, 2026 •

Copy link
Copy Markdown
Member

Related: #128234
Related: #128226

What Problem This Solves

The frozen beta candidate still carries Slack tests that replace the real inbound dispatcher or poll final-send mocks after the Bolt handler returns. Those seams can hide reply-delivery teardown races in the release shard.

Why This Change Was Made

Backports the reviewed durable-ingress handler seam from #128234 without taking moving-main commits. The six affected identity/delivery cases now await the real dispatcher and final delivery. User-identity transport, connected identity health, and event-identity recovery live together in provider.identity.test.ts, leaving the auth-token file focused on boot and presence behavior.

The moved identity suite also restores vi.unstubAllEnvs() after Slack runtime reset, preserving the source suite's test-environment cleanup invariant.

This is test-only. No runtime, product, workflow, timeout, retry, skip, or suppression changes.

Evidence

  • Exact parent: 3203a6f7f8d79644fde2b4f091a694f4c1698538
  • Signed head: e347223a5858bda5907acda858404e5f7a4c3720
  • Prior hosted split-file proof before the one-line cleanup: 2 files passed, 28 tests passed.
  • Prior hosted fresh-process delivery repetitions: 3/3 passed; each repetition passed 6/6 selected cases.
  • Prior hosted exact Slack extension batch: 135 files passed, 2,413 tests passed.
  • Prior hosted Testbox: tbx_01m0qrg6b6ns7rkmcvc1gr7cqa
  • Prior hosted run: https://github.com/openclaw/openclaw/actions/runs/32652941029
  • Exact-head focused formatting: passed.
  • Exact-head focused type-aware oxlint: passed.
  • Exact-head git diff --check: passed.
  • Exact-head line counts: helper 529, auth 552, identity 658; total 1,739.
  • Local exact-head identity proof reproduced the known frozen-machine cold first-event timeout at 120 seconds; no timeout or retry policy was changed. Fresh exact-head hosted CI and the Slack-owned plugin shard are the runtime gates.

Production LOC: +0/-0

  • AI-assisted

@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
@openclaw-barnacle openclaw-barnacle Bot added channel: slack Channel integration: slack size: XL maintainer Maintainer-authored PR labels Aug 23, 2026
@vincentkoc
vincentkoc force-pushed the release/beta3-slack-proof-final branch from 5c95f81 to c8d7dea Compare August 23, 2026 16:50
@clawsweeper clawsweeper Bot added merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 23, 2026
@clawsweeper

clawsweeper Bot commented Aug 23, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: found issues before merge. Reviewed August 23, 2026, 1:38 PM ET / 17:38 UTC.

ClawSweeper review

What this changes

The branch reorganizes Slack identity tests and makes selected Bolt handler invocations await durable ingress dispatch before asserting final reply delivery.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

Keep open: the prior exact-head P2 blocker remains in this protected, member-authored draft. The new identity suite leaks stubbed Slack token environment values because its teardown omits the cleanup retained by the source suite and current main.

Priority: P3
Reviewed head: c8d7deaa628240bba72cc8cfb7290ce4587f908b

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The branch has focused hosted test evidence, but one concrete test-isolation defect remains.
Proof confidence 🌊 off-meta tidepool Not applicable: This member-authored test-only PR is exempt from the external-contributor real-behavior-proof gate; supplied hosted test results are supplemental.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

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; supplied hosted test results are supplemental.
Evidence reviewed 5 items Exact-head teardown defect: The new suite stubs SLACK_USER_TOKEN and SLACK_APP_TOKEN but its afterEach resets Slack state without calling vi.unstubAllEnvs, allowing those values to affect later non-isolated Slack tests.
Current-main invariant: Current main retains the durable-ingress helper and restores environment stubs in the source suite teardown, confirming this is required shared-state cleanup.
Dispatcher contract: The helper awaits a real handler invocation, while the Slack dispatch owner awaits dispatchChannelInboundTurn through its delivery boundary.
Findings 1 actionable finding [P2] Restore environment cleanup in the identity suite
Security None None.

Live Verification

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

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

node scripts/run-vitest.mjs extensions/slack/src/monitor/provider.identity.test.ts
runner@runnervm76f27:/tmp/clawsweeper-live-proof-128290-E2rp7G/target$ node scripts/run-vitest.mjs extensions/slack/src/monitor/provider.identity.test.ts
node scripts/run-vitest.mjs extensions/slack/src/monitor/provider.identity.test.ts
[test] starting test/vitest/vitest.extension-slack.config.ts

 RUN  v4.1.10 /tmp/clawsweeper-live-proof-128290-E2rp7G/target

[vitest] still running with no output for 30000ms (test/vitest/vitest.extension-slack.config.ts).











































Assertions:

  • FAIL expect_output: Tests

How this fits together

Slack’s monitor accepts Bolt events, passes them through the shared inbound dispatcher, and sends resolved replies through the Slack client. The changed tests exercise that ingress-to-delivery path without changing production behavior.

flowchart LR
  A[Slack Bolt event] --> B[Slack monitor handler]
  B --> C[Ingress lifecycle]
  C --> D[Shared inbound dispatcher]
  D --> E[Reply delivery]
  E --> F[Slack client send]
  G[Identity tests] --> B
Loading

Before merge

  • Restore environment cleanup in the identity suite (P2) - The moved cases use vi.stubEnv, but this suite’s afterEach never calls vi.unstubAllEnvs() as the source suite does. Empty token values can leak into later non-isolated Slack tests; restore the cleanup here.
  • Resolve merge risk (P1) - Without environment cleanup, empty token stubs can leak into later Slack tests and create nondeterministic CI failures.
  • Complete next step (P2) - The member-authored, maintainer-labeled draft needs its author or reviewer to apply the already identified one-line teardown repair before another merge review.

Findings

  • [P2] Restore environment cleanup in the identity suite — extensions/slack/src/monitor/provider.identity.test.ts:38-45
Agent review details

Security

None.

PR surface

Source -6, Tests -57. Total -63 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 1 12 18 -6
Tests 3 667 724 -57
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 679 742 -63

Review metrics

Metric Value Why it matters
Production versus test delta production +0/-0; tests/support net -63 (679 added, 742 removed) This is test-only suite reorganization, so preserving teardown equivalence is the material merge concern.

Merge-risk options

Maintainer options:

  1. Restore test-environment cleanup (recommended)
    Add the missing environment unstubbing to the new suite’s teardown and rerun the focused Slack identity tests.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Restore environment cleanup in the identity test teardown and run the focused Slack identity suite.

Technical review

Best possible solution:

Restore vi.unstubAllEnvs() in the identity suite teardown, retain the durable-ingress seam, and rerun the focused Slack identity suite.

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

Yes. The source directly shows stubbed environment values in the new suite without the cleanup used by the source suite; execution was not run because this is a read-only review.

Is this the best way to solve the issue?

Yes. Restoring the existing teardown invariant is the narrowest maintainable repair and does not alter production dispatch behavior.

Full review comments:

  • [P2] Restore environment cleanup in the identity suite — extensions/slack/src/monitor/provider.identity.test.ts:38-45
    The moved cases use vi.stubEnv, but this suite’s afterEach never calls vi.unstubAllEnvs() as the source suite does. Empty token values can leak into later non-isolated Slack tests; restore the cleanup here.
    Confidence: 0.98

Overall correctness: patch is incorrect
Overall confidence: 0.98

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P3: The defect affects test reliability rather than shipped Slack behavior.
  • merge-risk: 🚨 automation: Leaked process environment state can make later Slack CI tests nondeterministic.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: This member-authored test-only PR is exempt from the external-contributor real-behavior-proof gate; supplied hosted test results are supplemental.

Evidence

What I checked:

Likely related people:

  • vincentkoc: Authored both the current branch’s identity suite and the merged mainline durable-ingress Slack test seam. (role: recent area contributor; confidence: high; commits: c8d7deaa6282, c4e0c003a406; files: extensions/slack/src/monitor/provider.identity.test.ts, extensions/slack/src/monitor.test-helpers.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Restore vi.unstubAllEnvs() in the new suite and rerun node scripts/run-vitest.mjs extensions/slack/src/monitor/provider.identity.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-23T16:57:02.974Z sha c8d7dea :: needs changes before merge. :: [P2] Restore environment cleanup in the identity suite

@vincentkoc
vincentkoc force-pushed the release/beta3-slack-proof-final branch from c8d7dea to e347223 Compare August 23, 2026 20:31
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Exact head e347223a5858bda5907acda858404e5f7a4c3720 restores vi.unstubAllEnvs() in the moved identity suite teardown after Slack runtime reset. Please review this exact head.

@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 marked this pull request as ready for review August 23, 2026 20:47
@vincentkoc
vincentkoc merged commit 3fbe940 into validation/target-3203a6f7f8d7-1787493942617 Aug 23, 2026
87 checks passed
@vincentkoc
vincentkoc deleted the release/beta3-slack-proof-final branch August 23, 2026 20:47
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 merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant