Skip to content

test: fix gateway workflow webhook integration cooldown - #1889

Merged
henrypark133 merged 1 commit into
stagingfrom
fix/gateway-workflow-webhook-cooldown-2
Apr 1, 2026
Merged

henrypark133 merged 1 commit into
stagingfrom
fix/gateway-workflow-webhook-cooldown-2

Conversation

@henrypark133

Copy link
Copy Markdown
Collaborator

Summary

  • set the gateway webhook workflow test routine cooldown to 0
  • document that the test intentionally fires the same routine via event_emit and webhook back-to-back
  • keep production routine cooldown behavior unchanged

Root cause

The test created a system_event routine, fired it once via , then immediately asserted that the webhook path would fire it again. With the routine_create default , the second trigger was correctly suppressed, so the test expectation was stale.

Verification

  • cargo test --features libsql gateway_workflow_harness_chat_and_webhook --test gateway_workflow_integration -- --nocapture
  • cargo test --features libsql web_toggle_disables_system_event_routine_without_restart --test gateway_workflow_integration -- --nocapture

Copilot AI review requested due to automatic review settings April 1, 2026 21:28
@github-actions github-actions Bot added size: XS < 10 changed lines (excluding docs) risk: low Changes to docs, tests, or low-risk modules contributor: core 20+ merged PRs labels Apr 1, 2026

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request updates the integration tests in tests/gateway_workflow_integration.rs by setting cooldown_secs to 0 for a specific routine. This change ensures that the cooldown mechanism does not suppress events when the routine is triggered consecutively via event_emit and the webhook endpoint during the test execution. I have no feedback to provide.

Copilot AI 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.

Pull request overview

Updates the gateway workflow integration test to avoid routine cooldown suppressing a second, immediate trigger, while leaving production cooldown behavior unchanged.

Changes:

  • Set the test-created system_event routine’s cooldown_secs to 0 to allow back-to-back triggers.
  • Added an inline comment documenting that the test intentionally triggers the same routine via event_emit and the webhook endpoint sequentially.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor: core 20+ merged PRs risk: low Changes to docs, tests, or low-risk modules size: XS < 10 changed lines (excluding docs)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants