Separate alarm definitions from action configuration #35

Closed
opened 2026-07-20 21:41:21 +02:00 by minimons · 0 comments
Owner

alarms.conf currently mixes alarm detection with action-specific settings such as severity and note. JupiterPerpsPositionIncreaseAlarmAction also contains hardcoded alarm IDs, wallet details, assets, amounts, and trade parameters.

Separate when an alarm triggers from what each action does.

Alarm configuration

Reduce alarms.conf to:

ID  ASSET  CONDITION  TRIGGER

Remove severity and note from PriceAlarmDefinition and ResolvedPriceAlarm.

Configured actions

Keep the existing AlarmAction interface unchanged and introduce:

public interface ConfiguredAlarmAction extends AlarmAction {
    String getConfigurationFileName();
}

CompositeAlarmAction continues to implement only AlarmAction. It has no configuration file and simply forwards triggered alarms to all configured actions.

The concrete actions implement ConfiguredAlarmAction and use these files:

alarmaction_Console.conf
alarmaction_Pushover.conf
alarmaction_JupiterPerpsPositionIncreaseAlarmAction.conf

The files should live alongside alarms.conf. Each action loads its own file during initialization and uses the alarm ID as the link between the alarm and its action-specific configuration.

If an alarm ID is absent from an action configuration, that action must ignore the alarm.

Action-specific settings

  • Console: alarm IDs that should be printed.
  • Pushover: application token, user key, and per-alarm severity and note.
  • Jupiter position increase: wallet, signer key, and per-alarm asset, direction, collateral amount, position-size delta, and maximum slippage.

Remove the corresponding hardcoded Jupiter action values.

Acceptance criteria

  • alarms.conf contains only alarm detection and trigger settings.
  • An alarm may have zero, one, or multiple actions.
  • Each concrete action owns and loads its configuration.
  • CompositeAlarmAction remains configuration-free.
  • Missing alarm IDs are treated as “no action”.
  • Existing alarm condition, range, and trigger behavior remains unchanged.
`alarms.conf` currently mixes alarm detection with action-specific settings such as `severity` and `note`. `JupiterPerpsPositionIncreaseAlarmAction` also contains hardcoded alarm IDs, wallet details, assets, amounts, and trade parameters. Separate **when an alarm triggers** from **what each action does**. ### Alarm configuration Reduce `alarms.conf` to: ```text ID ASSET CONDITION TRIGGER ``` Remove `severity` and `note` from `PriceAlarmDefinition` and `ResolvedPriceAlarm`. ### Configured actions Keep the existing `AlarmAction` interface unchanged and introduce: ```java public interface ConfiguredAlarmAction extends AlarmAction { String getConfigurationFileName(); } ``` `CompositeAlarmAction` continues to implement only `AlarmAction`. It has no configuration file and simply forwards triggered alarms to all configured actions. The concrete actions implement `ConfiguredAlarmAction` and use these files: ```text alarmaction_Console.conf alarmaction_Pushover.conf alarmaction_JupiterPerpsPositionIncreaseAlarmAction.conf ``` The files should live alongside `alarms.conf`. Each action loads its own file during initialization and uses the alarm ID as the link between the alarm and its action-specific configuration. If an alarm ID is absent from an action configuration, that action must ignore the alarm. ### Action-specific settings * Console: alarm IDs that should be printed. * Pushover: application token, user key, and per-alarm severity and note. * Jupiter position increase: wallet, signer key, and per-alarm asset, direction, collateral amount, position-size delta, and maximum slippage. Remove the corresponding hardcoded Jupiter action values. ### Acceptance criteria * `alarms.conf` contains only alarm detection and trigger settings. * An alarm may have zero, one, or multiple actions. * Each concrete action owns and loads its configuration. * `CompositeAlarmAction` remains configuration-free. * Missing alarm IDs are treated as “no action”. * Existing alarm condition, range, and trigger behavior remains unchanged.
minimons added the enhancement label 2026-07-20 21:41:21 +02:00
minimons self-assigned this 2026-07-20 21:41:21 +02:00
minimons added this to the Evelyn project 2026-07-20 21:41:21 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: r35157/com_r35157_nenjim-hubd-impl_ref#35