Repository navigation
feat(cli): send a test event from webhooks test when --data is not given - #95
Merged
thebrandonlucas merged 1 commit intoOct 22, 2026
Merged
Conversation
thebrandonlucas
marked this pull request as ready for review
October 22, 2026 19:43
thebrandonlucas
force-pushed
the
feat/cli-webhook-test-default
branch
from
October 22, 2026 20:33
286c6b2 to
26ace56
Compare
thebrandonlucas
force-pushed
the
feat/cli-webhook-test-default
branch
from
October 22, 2026 21:14
26ace56 to
1612d08
Compare
tee8z
approved these changes
Oct 22, 2026
tee8z
left a comment
Contributor
There was a problem hiding this comment.
Approved 1612d08 against feat/cli-list-all-hint (#94 30481de). The patch matches 26ace56, and only the CHANGELOG context changed in the rebase.
--datastill wins:api_invocationmatchesDataFlags { data: Some(_) }asBodySource::Rawbefore it asksfriendly_flags, so the default body applies only without--data.- The body matches the contract:
TestWebhookRequest { delivery_id, payload }, withpayloadas{type: "test", detail: TestPayload { event: "created", data }}. Each call gets a newdelivery_id. - The test for the "requires --data" error moves to
payments check, which still needs a body, so that error path is still covered.
Validation: on 26ace56, the same patch, cargo fmt --check, cargo clippy --locked --all-targets -- -D warnings, cargo machete --with-metadata, cargo test --locked (141 unit, 123 integration, on a rerun without load) and python3 scripts/check-coverage.py passed. CRAP measured 632 functions with none at or above 20. The highest was wait_for_payment at 19.95; its coverage varies with timing between runs, and this PR does not touch it. I did not run the gate locally on this head. CI is green.
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.
voltage webhooks test WEBHOOK_IDwithout--datanow sends a test event. Before, it failed with "This operation requires --data @file or --data -" and didn't say what to send.The body is the contract's
testpayload, with a newdelivery_ideach time:{"delivery_id": "<new UUID>", "payload": {"type": "test", "detail": {"event": "created", "data": "Test delivery from voltage webhooks test"}}}It goes through
check_payloadlike any other friendly body.--datastill sends your own payload. Without--execute, the command only describes the change, as before. The help has an example for each form, and the long help explains the default.In the CLI benchmark, both CLI setups hit this error on T4. Agents read the help twice, or built the payload with curl. Closes #81.
Stack: 6 of 6, on #94. It doesn't depend on the PRs below it.
CHANGELOG.md(Unreleased) anddocs/guides/webhooks.mdare updated.cargo test(262 tests) andcheck-coverage.py. The new help example also runs offline without--execute.delivery_id. An integration test sends it to a mock API: the response is a 202, and the request body has typetest, eventcreatedand a UUIDdelivery_id. The existing test for the "requires --data" error now usespayments check, which still needs a body.286c6b2: 0 functions at or above 20. The highest iswait_for_paymentat 19.60.friendly_bodyis 16.28 andfriendly_flagsis 8.0.test_webhook_testexample.