Skip to content

Conversation

@mootz12
Copy link
Contributor

@mootz12 mootz12 commented Dec 31, 2025

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a notification level filtering system to control which notifications are sent to external services (Slack/Discord) or logged to the console. The filtering system has three levels: HIGH (critical alerts), MED (successful operations and moderate warnings), and LOW (informational messages).

Key changes include:

  • Added NotificationLevel enum (HIGH, MED, LOW) with filtering logic in the sendNotification function
  • Updated all sendNotification calls throughout the codebase to specify appropriate notification levels
  • Added getNotificationLevelForAuction helper function to determine notification levels based on auction type and fill status
  • Added configuration validation and documentation for the new notificationLevel config option

Reviewed changes

Copilot reviewed 17 out of 18 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
src/utils/notifier.ts Added NotificationLevel enum, implemented level-based filtering in sendNotification, and added getNotificationLevelForAuction helper function
src/utils/config.ts Added notificationLevel field to AppConfig interface and validation logic
src/work_submitter.ts Updated sendNotification calls to use appropriate notification levels; fixed spelling error "transfering" → "transferring"
src/work_handler.ts Updated sendNotification call to use NotificationLevel.MED
src/pool_event_handler.ts Updated multiple sendNotification calls to use getNotificationLevelForAuction for appropriate level assignment
src/liquidations.ts Updated sendNotification call to use NotificationLevel.MED
src/bidder_submitter.ts Updated sendNotification calls throughout to use getNotificationLevelForAuction and appropriate levels
src/bidder_handler.ts Updated sendNotification call to use getNotificationLevelForAuction
src/utils/soroban_helper.ts Adjusted transaction timeout from 6 seconds to 12 seconds; moved submitStartTime initialization
test/utils/notifier.test.ts Added comprehensive test suite for notification filtering, webhook integration, and getNotificationLevelForAuction function
test/utils/config.test.ts Added test for notification level validation
test/bidder_submitter.test.ts Updated test expectations to include notification level parameter
example.config.json Added example notificationLevel configuration
README.md Added documentation for the new notificationLevel configuration option
start.sh Removed extra blank lines
example.env Removed example environment file

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

mootz12 and others added 5 commits January 1, 2026 08:53
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@mootz12 mootz12 merged commit 5c80e0b into main Jan 1, 2026
1 check passed
@mootz12 mootz12 deleted the better-logging branch January 1, 2026 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants