diff --git a/README_alarm.md b/README_alarm.md index 74e3751..feea2ad 100644 --- a/README_alarm.md +++ b/README_alarm.md @@ -4,10 +4,11 @@ The Jupiter Perps Price Alarm monitors the Jupiter Perps aggregated oracle accou Oracle prices are received through Solana WebSocket `accountSubscribe` using `processed` commitment. The application does not poll prices once per second. It also fetches the current oracle account state whenever a WebSocket connection opens, reconnects automatically, and supports multiple RPC endpoints for redundancy. -The alarm is currently initialized and started by `NenjimHubImpl`. Its -`SolanaWallet` and `JupiterPerpsService` are selected by the Hub and injected -before startup. The alarm action configuration files do not select a wallet or -signing key. +The Registry service manager currently constructs and registers the alarm as +`jupiter-perps-alarm.default`, but deliberately does not start it. Its +`SolanaWallet` and `JupiterPerpsService` are selected by the manager's hardcoded +composition and injected before registration. The alarm action configuration +files do not select a wallet or signing key. > **Important:** This application is not necessarily notification-only. Every active entry in a Jupiter Perps position action file can sign and submit a real transaction. Review both transaction action files before running it. @@ -56,27 +57,29 @@ There is currently no alarm-specific automated self-test task. ## Running through Nenjim -The alarm no longer has a standalone `main` method. `NenjimHubImpl` constructs -the wallet, Jupiter service and alarm, then starts the alarm as part of normal -Hub startup. Run the configured application with: +The alarm no longer has a standalone `main` method. The Registry service +manager constructs and registers the wallet, Jupiter service and alarm, but the +alarm is intentionally absent from the current explicit application startup +list. Running the Hub therefore leaves the registered alarm inactive: ```bash ./gradlew run ``` -After `./gradlew prepareLibs`, it can also be started explicitly with the Nenjim -Hub main class: +After `./gradlew prepareLibs`, the same Registry-managed Hub can be invoked with +its main class (the alarm still remains inactive): ```bash java --enable-preview \ -cp "build/libs/*" \ - com.r35157.nenjim.hubd.impl.ref.Main + com.r35157.nenjim.hubd.Main ``` -The current Hub composition binds the alarm to `conf/alarms.conf` and to the +The current manager composition binds the alarm to `conf/alarms.conf` and to the test Jupiter Perps wallet and service. Until Nenjim provides configured -injection, a different configuration or wallet must be selected in the Hub's -composition code, not in an alarm action file. +injection and activation, a different configuration, wallet, or startup choice +must be selected in the Registry manager's composition code, not in an alarm +action file. The repository contains example files for the alarm configuration and every action configuration. The real `conf/*.conf` files are ignored by Git; keep @@ -84,8 +87,8 @@ credentials and operational details out of version control. ### Environment variables -The Hub does not currently forward alarm-specific command-line options. Solana -WebSocket endpoints can be overridden with: +The Registry manager does not currently forward alarm-specific command-line +options. Solana WebSocket endpoints can be overridden with: ```bash export SOLANA_WS_URLS='wss://first-provider.example,wss://second-provider.example' diff --git a/build.gradle.kts b/build.gradle.kts index 5c6047f..1d34cd0 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -11,7 +11,7 @@ if (version == "UNSET" && gradle.startParameter.taskNames.any { it.startsWith("p } application { - mainClass.set("com.r35157.nenjim.hubd.impl.ref.Main") + mainClass.set("com.r35157.nenjim.hubd.Main") applicationDefaultJvmArgs = listOf("--enable-preview") } @@ -54,6 +54,7 @@ dependencies { implementation("org.slf4j:slf4j-api:2.0.18") testImplementation("org.junit.jupiter:junit-jupiter:5.13.4") + testRuntimeOnly("org.junit.platform:junit-platform-launcher:1.13.4") } java { diff --git a/debug.sh b/debug.sh index 3993249..b0636e3 100755 --- a/debug.sh +++ b/debug.sh @@ -21,4 +21,4 @@ exec java \ "-agentlib:jdwp=transport=dt_socket,server=y,suspend=${DEBUG_SUSPEND},address=*:${DEBUG_PORT}" \ -Dlog4j.configurationFile=conf/log4j2.xml \ -cp "$CLASSPATH" \ - com.r35157.nenjim.hubd.impl.ref.Main + com.r35157.nenjim.hubd.Main diff --git a/docs/Nenjim-public.html b/docs/Nenjim-public.html index 88c5c20..0cbd55c 100644 --- a/docs/Nenjim-public.html +++ b/docs/Nenjim-public.html @@ -3,7 +3,7 @@
-