From 32c52aa22e15455e0ebe9904aef08ccb5757f408 Mon Sep 17 00:00:00 2001 From: hsiegeln <37154749+hsiegeln@users.noreply.github.com> Date: Wed, 22 Apr 2026 18:13:57 +0200 Subject: [PATCH] docs(rules): update app-classes for BatchResultApplier MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task 6.2 housekeeping — add BatchResultApplier to the class map per CLAUDE.md convention. Introduced in Task 2.2 as the @Transactional wrapper for atomic per-rule batch commits (instance writes + notification enqueues + cursor advance). Also refreshes GitNexus index stats auto-emitted into AGENTS.md / CLAUDE.md (8778 -> 8893 nodes, 22647 -> 23049 edges). Co-Authored-By: Claude Opus 4.7 (1M context) --- .claude/rules/app-classes.md | 8 ++++++++ AGENTS.md | 2 +- CLAUDE.md | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.claude/rules/app-classes.md b/.claude/rules/app-classes.md index 49b613a4..bf80c2b0 100644 --- a/.claude/rules/app-classes.md +++ b/.claude/rules/app-classes.md @@ -171,6 +171,14 @@ Env-scoped read-path controllers (`AlertController`, `AlertRuleController`, `Ale - `JarRetentionJob` — @Scheduled 03:00 daily, per-environment retention, skips deployed versions +## alerting/eval/ — Rule evaluation + +- `AlertEvaluatorJob` — @Scheduled tick driver; per-rule claim/release via `AlertRuleRepository`, dispatches to per-kind `ConditionEvaluator`, persists advanced cursor on release via `AlertRule.withEvalState`. +- `BatchResultApplier` — `@Component` that wraps a single rule's tick outcome (`EvalResult.Batch` = `firings` + `nextEvalState`) in one `@Transactional` boundary: instance upserts + notification enqueues + cursor advance commit atomically or roll back together. This is the exactly-once-per-exchange guarantee for `PER_EXCHANGE` fire mode. +- `ConditionEvaluator` — interface; per-kind implementations: `ExchangeMatchEvaluator`, `AgentLifecycleEvaluator`, `AgentStateEvaluator`, `DeploymentStateEvaluator`, `JvmMetricEvaluator`, `LogPatternEvaluator`, `RouteMetricEvaluator`. +- `AlertStateTransitions` — PER_EXCHANGE vs rule-level FSM helpers (fire/resolve/ack). +- `PerKindCircuitBreaker` — trips noisy per-kind evaluators; `TickCache` — per-tick shared lookups (apps, envs, silences). + ## http/ — Outbound HTTP client implementation - `SslContextBuilder` — composes SSL context from `OutboundHttpProperties` + `OutboundHttpRequestContext`. Supports SYSTEM_DEFAULT (JDK roots + configured CA extras), TRUST_ALL (short-circuit no-op TrustManager), TRUST_PATHS (JDK roots + system extras + per-request extras). Throws `IllegalArgumentException("CA file not found: ...")` on missing PEM. diff --git a/AGENTS.md b/AGENTS.md index c93e196e..a6db2545 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,7 +1,7 @@ # GitNexus — Code Intelligence -This project is indexed by GitNexus as **cameleer-server** (8778 symbols, 22647 relationships, 300 execution flows). Use the GitNexus MCP tools to understand code, assess impact, and navigate safely. +This project is indexed by GitNexus as **cameleer-server** (8893 symbols, 23049 relationships, 300 execution flows). Use the GitNexus MCP tools to understand code, assess impact, and navigate safely. > If any GitNexus tool warns the index is stale, run `npx gitnexus analyze` in terminal first. diff --git a/CLAUDE.md b/CLAUDE.md index 9a48cb43..3f9831a0 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -85,7 +85,7 @@ When adding, removing, or renaming classes, controllers, endpoints, UI component # GitNexus — Code Intelligence -This project is indexed by GitNexus as **cameleer-server** (8778 symbols, 22647 relationships, 300 execution flows). Use the GitNexus MCP tools to understand code, assess impact, and navigate safely. +This project is indexed by GitNexus as **cameleer-server** (8893 symbols, 23049 relationships, 300 execution flows). Use the GitNexus MCP tools to understand code, assess impact, and navigate safely. > If any GitNexus tool warns the index is stale, run `npx gitnexus analyze` in terminal first.