fix(webhook): preview test endpoints without sending (#900) - #941
Merged
Merged
Conversation
The PR description includes a sufficient representative real-CLI verification record. |
|
No findings.
|
jeff-r2026
approved these changes
Oct 1, 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.
Summary
teamai webhook test --dry-runcurrently sends HTTP requests because the command does not forward the global preview flag. Forward that flag, load configuration without persisting migrations during a preview, and report the number of matching endpoints before returning without sending.The review follow-up handles dry-run before the empty-endpoint warning, so an unmatched
--urlor an empty endpoint list previews0targets. The normal sending path is unchanged.Type of Change
Test Plan
npm run buildnpm run typechecknpm run lintnpx vitest run src/__tests__/webhook.test.ts— 20 passed, including matching, unmatched-URL, and empty-list previews with no fetch callsnpx vitest run --config vitest.e2e.config.ts src/__tests__/e2e/webhook-test-dry-run.test.ts— 2 passed; runsdist/index.jswith both a configured unreachable endpoint and an unmatched--url, checks the preview counts (1 and 0), and verifies the local config remains byte-for-byte unchangedThe new zero-endpoint unit cases and unmatched-URL real-CLI case failed before the review fix and passed after rebuilding with the fix.
The full unit suite on the same upstream baseline was attempted locally on Windows but encountered POSIX file-mode expectations, shell differences, file locks, and timeouts in other modules. The full-suite result needs upstream CI.
Related Issues
Refs #900 (
webhook testrow).