Skip to content

fix(cli-test): stop the output wait timeout from killing run and activity --tail - #2865

Merged
mwbrooks merged 2 commits into
mainfrom
mwbrooks-fix-cli-test-spawn-timeout
Nov 17, 2026
Merged

mwbrooks merged 2 commits into
mainfrom
mwbrooks-fix-cli-test-spawn-timeout

Conversation

@mwbrooks

Copy link
Copy Markdown
Member

Summary

This pull request keeps slack run and slack activity --tail running in tests after their output arrives, for developers who use platform.runStart and platform.activityTailStart from @slack/cli-test. Fixes #2864.

  • SlackCLIProcess.execAsyncUntilOutputPresent passed its timeout to child.spawn as well as to shell.waitForOutput, so Node sent SIGTERM to the process once the timeout passed.
  • The timeout now goes only to shell.waitForOutput. Other shell options, such as cwd, still reach the process.
  • Adds a test that child.spawn gets no timeout, with a patch changeset.

Testing

  • The new test fails on main (child.spawn gets timeout) and passes with this change.
  • cli-process.test.ts runs all 13 tests (the 12 from main and the new one) and shell.test.ts runs all 12.

Requirements

  • I've read and understood the Contributing Guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I have signed the Salesforce CLA (required before your PR can be reviewed or merged). Not needed: maintainer and Salesforce employee.

…vity --tail

execAsyncUntilOutputPresent passed its shell options, timeout included, to
spawnProcess. Node's child.spawn then sent SIGTERM to the Slack CLI once the
timeout passed, even after the expected output arrived. The timeout now goes
only to waitForOutput.

Fixes #2864
@mwbrooks mwbrooks added this to the cli-test@next milestone Nov 17, 2026
@mwbrooks mwbrooks added bug M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented semver:patch pkg:cli-test applies to `@slack/cli-test` labels Nov 17, 2026
@mwbrooks mwbrooks self-assigned this Nov 17, 2026
@changeset-bot

changeset-bot Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 689dbc4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@slack/cli-test Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codecov

codecov Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.32%. Comparing base (ba1349b) to head (689dbc4).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2865      +/-   ##
==========================================
- Coverage   94.33%   94.32%   -0.01%     
==========================================
  Files          67       67              
  Lines       10824    10826       +2     
  Branches      676      677       +1     
==========================================
+ Hits        10211    10212       +1     
- Misses        580      583       +3     
+ Partials       33       31       -2     
Flag Coverage Δ
cli-hooks 94.26% <100.00%> (-0.02%) ⬇️
cli-test 94.26% <100.00%> (-0.02%) ⬇️
logger 94.26% <100.00%> (-0.02%) ⬇️
oauth 94.26% <100.00%> (-0.02%) ⬇️
socket-mode 94.26% <100.00%> (-0.02%) ⬇️
web-api 94.26% <100.00%> (-0.02%) ⬇️
webhook 94.26% <100.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mwbrooks
mwbrooks marked this pull request as ready for review November 17, 2026 14:33
@mwbrooks
mwbrooks requested a review from a team as a code owner November 17, 2026 14:33
@mwbrooks
mwbrooks requested a review from zimeg November 17, 2026 14:33

@srtaalej srtaalej left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed the new test fails against main's cli-process.ts (12 pass / 1 fail) and passes with this change. The full @slack/cli-test suite passes (109/109) ✅ Splitting timeout out of the spawn options is the right fix, and the changeset reads well. The codecov/project check is red but that looks like project-level drift and not this diff. LGTM!

@mwbrooks

Copy link
Copy Markdown
Member Author

Thanks @srtaalej for the review and for checking that the new test fails against main! 🙇

@mwbrooks
mwbrooks merged commit 3c473ca into main Nov 17, 2026
21 of 22 checks passed
@mwbrooks
mwbrooks deleted the mwbrooks-fix-cli-test-spawn-timeout branch November 17, 2026 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented pkg:cli-test applies to `@slack/cli-test` semver:patch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@slack/cli-test: runStart and activityTailStart stop the process once their timeout passes

2 participants