test(automations): multi-pod e2e for webhook trigger fires#3451
Merged
Conversation
Boots the full multi-pod docker cluster (real PG/NATS/DBOS) and exercises the webhook callback path end-to-end: AUTOMATION_TRIGGER_ADD on pod-1, POST against pod-2, poll until the agent run completes. Also covers AUTOMATION_TRIGGER_ROTATE_TOKEN by asserting the old token is refused after rotation while the new one still fires. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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 is this contribution about?
Adds a real end-to-end test for the webhook trigger type introduced in #3426. Boots the full
tests/multi-poddocker stack (real Postgres + NATS + DBOS + 3 studio pods + mock-ai) and drives the public path:AUTOMATION_CREATE+AUTOMATION_TRIGGER_ADD(type=webhook) on pod-1, realAuthorization: BearerPOST to the callback URL against pod-2, then pollsCOLLECTION_THREADS_LISTfiltered bytrigger_idsuntil the agent run reachesstatus=completed. Cross-pod POST proves the fire works regardless of which pod DBOS picks for the workflow. A second scenario callsAUTOMATION_TRIGGER_ROTATE_TOKEN, asserts the old token is refused (401/403) while the new one still fires.How to Test
./tests/multi-pod/run.sh— brings up the cluster, runs all scenarios, tears down.bun test ./tests/multi-pod/scenarios/automation-webhook.test.ts.Migration Notes
None.
Review Checklist
Summary by cubic
Adds a full end-to-end test for webhook-triggered automations that boots the
tests/multi-podcluster and confirms a cross-pod webhook POST triggers an agent run to completion. Also verifiesAUTOMATION_TRIGGER_ROTATE_TOKENby rejecting the old token (401/403) while the new token fires successfully.Written for commit e58dc36. Summary will update on new commits. Review in cubic