Repository navigation
test(discord): move ready abort proof to lifecycle - #122869
Merged
Merged
Conversation
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
Contributor
Author
|
Land-ready proof for
ClawSweeper had only its acknowledgement at prepare time, with no published finding or rank-up move; repository policy does not block on a late review publisher. Production/test-support delta is -6 lines; tests are -16 lines net. |
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Aug 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
The Discord READY-backoff abort regression was tested by exporting the private
waitForGatewayReadyhelper through a productiontestingobject and a plugin-roottest-api.tsbridge. That kept an implementation seam alive even though the behavior belongs to the full gateway lifecycle.Why This Change Was Made
Move the regression through
runDiscordGatewayLifecycle, where the channel-owned abort signal actually enters the lifecycle owner. The rewritten test proves startup reaches the READY retry backoff, abort immediately reaches the normal stop boundary, lifecycle cleanup runs, no retry timer remains, and no additional reconnect occurs.Delete the now-unused production
testingexport and the entire Discordtest-api.tsbridge. Discord's package metadata exposes onlyindex.ts, and bundled public-surface tests explicitly excludetest-api.js, so this is not a public or shipped Plugin SDK contract.User Impact
No behavior change. The existing abort-aware retry remains intact, but its regression coverage now exercises the real owner boundary instead of a private helper.
Production delta is -6 lines; tests are -16 lines net.
Evidence
runDiscordGatewayLifecycle.waitForDiscordGatewayStopwas not reached after abort; production was then restored.node scripts/run-vitest.mjs extensions/discord/src/monitor/provider.lifecycle.test.ts extensions/discord/src/monitor.gateway.test.ts packages/retry/src/index.test.ts src/plugins/contracts/extension-test-api-consumption.test.ts src/plugins/bundled-plugin-metadata.test.ts— 77 tests passed across four shards.node scripts/check-changed.mjs -- extensions/discord/src/monitor/provider.lifecycle.ts extensions/discord/src/monitor/provider.lifecycle.test.ts extensions/discord/test-api.ts— extension and extension-test gates passed, including API baseline, plugin boundaries, dead exports, both typechecks, lint, storage/media/runtime guards, and import cycles. The configured remote backend was unavailable because theblacksmithexecutable is not installed on this host, so the wrapper used its documented trusted-source local fallback.git diff --check— passed.