The following is a regression after a small refactor of the incoming webhook audit service. The method is supposed to inspect a batch of events, collect record identifiers with invalid payloads, and log failures from a user-provided handler. After the changes, the behavior became unstable: some elements do not appear in the result, and some errors are no longer visible in the log.
WebhookBatchAudit#invalid_event_ids method accepts:
events hashes;id only for those events where:
payload is missing;payload is not a hash;payload[:status] is missing or empty.logger.error;ruby audit_demo.rb
ids;ids.3.3.0ruby, without a Fiber schedulerevents element is a hash with a :id key and an optional :payload keyerror(message)Use line comments to explain the problem, its impact, the fix and how to test it.