Skip to content

Conversation

@WilliamBergamin
Copy link
Contributor

Summary

Since #2283 event requests are no longer auto acknowledged in the processEvent function. This behavior was handed over to the autoAcknowledge middleware. This created a gap in the ignoreSelf middleware since the events reaching it were assumed to already be acknowledged. This PR aims to add auto acknowledge behavior into the ignoreSelf global middleware.

Requirements (place an x in each [ ])

@WilliamBergamin WilliamBergamin added the bug M-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented label Nov 11, 2024
@WilliamBergamin WilliamBergamin self-assigned this Nov 11, 2024
@codecov
Copy link

codecov bot commented Nov 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.09%. Comparing base (2f25b21) to head (e44cac8).
Report is 3 commits behind head on autoack.

Additional details and impacted files
@@           Coverage Diff            @@
##           autoack    #2329   +/-   ##
========================================
  Coverage    91.08%   91.09%           
========================================
  Files           22       22           
  Lines         6116     6122    +6     
  Branches       655      655           
========================================
+ Hits          5571     5577    +6     
  Misses         540      540           
  Partials         5        5           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@misscoded
Copy link
Contributor

Does this address the current non-acknowledged events in the Assistant class, or unrelated?

@WilliamBergamin
Copy link
Contributor Author

@misscoded this should be unrelated

Copy link
Contributor

@filmaj filmaj left a comment

Choose a reason for hiding this comment

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

I have a concern about the test utilities, which is likely a symptom of a deeper issue relating to TS union types.

args: Args,
ctx?: Context,
): Args & AllMiddlewareArgs & { next: SinonSpy } {
): Args & AllMiddlewareArgs & { next: SinonSpy; ack: SinonSpy } {
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this is correct. Args here extends AnyMiddlewareArgs which is a union of different kinds of middleware args. Some of these middleware args contain ack and others do not, so in theory Args should be carrying the correct type, including the conditional presence of ack.

You may have to narrow the return type from this method appropriately to get the right kind of Args depending on the situation, which should in theory sometimes carry ack.

I assume the issue was asserting on ack in the test file you changed in this PR?

@WilliamBergamin WilliamBergamin changed the base branch from main to autoack November 13, 2024 20:25
@zimeg
Copy link
Member

zimeg commented May 1, 2025

👋 QQ: Is this branch safe to delete? Hoping to avoid a potential confusion in later housekeepings and chore 😅

@WilliamBergamin WilliamBergamin deleted the ignore-self-events branch May 2, 2025 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug M-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants