@checkstack/anomaly-frontend 0.3.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,78 @@
1
1
  # @checkstack/anomaly-frontend
2
2
 
3
+ ## 0.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 42abfff: Remove global anomaly settings — configuration is now field-only.
8
+
9
+ `AnomalySettings` (template- and assignment-level) no longer carries
10
+ `sensitivity`, `confirmationWindow`, `driftEnabled`, or `driftThreshold`.
11
+ These were duplicating the per-field configuration path with awkward
12
+ cascade semantics, and a single global multiplier was meaningless across
13
+ fields with different units (ms, %, counts).
14
+
15
+ The schema retains only the truly global concerns:
16
+
17
+ - `enabled` — master kill switch for the assignment
18
+ - `baselineWindow` — there is one history per system, not per field
19
+ - `notify` — one notification preference per assignment
20
+ - `fieldOverrides` — per-field configuration (where everything else now lives)
21
+
22
+ `resolveEffectiveConfig` collapses to two layers: field override → schema
23
+ default → engine fallback constant. The plugin-author defaults set via
24
+ `x-anomaly-*` annotations now drive sensitivity/window/drift across the
25
+ detector and drift evaluator (previously only floors were threaded
26
+ through the schema layer).
27
+
28
+ **Breaking changes:**
29
+
30
+ - Any global `sensitivity`/`confirmationWindow`/`driftEnabled`/
31
+ `driftThreshold` values previously stored in `anomaly_configurations`
32
+ or `anomaly_assignments` are silently stripped on parse. Users who
33
+ customized these globals will revert to the plugin's tuned per-field
34
+ defaults; if they want to keep those values they must re-apply them
35
+ per field in the new UI.
36
+ - `AnomalySettingsForm` no longer renders the global sliders. The form
37
+ now shows: enable toggle, baseline window selector, notify toggle,
38
+ field overrides editor.
39
+ - `AnomalyFieldOverridesEditor` props `defaultSensitivity`,
40
+ `defaultConfirmationWindow`, `defaultDriftEnabled`, `defaultDriftThreshold`
41
+ are removed. Engine fallbacks (1.0, 3, true, 2) are now hard-coded
42
+ internal constants used only when neither field override nor schema
43
+ default is set.
44
+ - The GitOps `System.anomaly` entry schema (in `anomaly-gitops-kinds`)
45
+ drops `sensitivity`, `confirmationWindow`, `driftEnabled`, and
46
+ `driftThreshold` to match the new `AnomalySettings` shape. YAML files
47
+ declaring those fields will be rejected at parse time — operators
48
+ must move per-field tuning into `fieldOverrides`.
49
+
50
+ This change makes the override model trivial to explain ("plugin defaults,
51
+ overridden per field") and removes a class of confusing "where did this
52
+ threshold come from?" questions.
53
+
54
+ ### Patch Changes
55
+
56
+ - Updated dependencies [42abfff]
57
+ - Updated dependencies [42abfff]
58
+ - Updated dependencies [3547670]
59
+ - Updated dependencies [1ef2e79]
60
+ - Updated dependencies [aa89bc5]
61
+ - Updated dependencies [3547670]
62
+ - Updated dependencies [950d6ec]
63
+ - Updated dependencies [3547670]
64
+ - Updated dependencies [3547670]
65
+ - @checkstack/anomaly-common@1.1.0
66
+ - @checkstack/common@0.9.0
67
+ - @checkstack/ui@1.8.0
68
+ - @checkstack/catalog-common@2.1.0
69
+ - @checkstack/frontend-api@0.5.0
70
+ - @checkstack/notification-frontend@0.4.0
71
+ - @checkstack/healthcheck-frontend@0.19.0
72
+ - @checkstack/healthcheck-common@1.0.2
73
+ - @checkstack/notification-common@1.0.2
74
+ - @checkstack/signal-frontend@0.1.2
75
+
3
76
  ## 0.3.1
4
77
 
5
78
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkstack/anomaly-frontend",
3
- "version": "0.3.1",
3
+ "version": "0.4.0",
4
4
  "license": "Elastic-2.0",
5
5
  "type": "module",
6
6
  "main": "src/index.tsx",
@@ -13,16 +13,16 @@
13
13
  "lint:code": "eslint . --max-warnings 0"
14
14
  },
15
15
  "dependencies": {
16
- "@checkstack/anomaly-common": "1.0.0",
17
- "@checkstack/catalog-common": "2.0.0",
18
- "@checkstack/common": "0.7.0",
19
- "@checkstack/frontend-api": "0.4.1",
20
- "@checkstack/healthcheck-common": "1.0.0",
21
- "@checkstack/healthcheck-frontend": "0.18.1",
22
- "@checkstack/notification-common": "1.0.0",
23
- "@checkstack/notification-frontend": "0.3.0",
24
- "@checkstack/signal-frontend": "0.1.0",
25
- "@checkstack/ui": "1.7.0",
16
+ "@checkstack/anomaly-common": "1.0.1",
17
+ "@checkstack/catalog-common": "2.0.1",
18
+ "@checkstack/common": "0.8.0",
19
+ "@checkstack/frontend-api": "0.4.2",
20
+ "@checkstack/healthcheck-common": "1.0.1",
21
+ "@checkstack/healthcheck-frontend": "0.18.2",
22
+ "@checkstack/notification-common": "1.0.1",
23
+ "@checkstack/notification-frontend": "0.3.1",
24
+ "@checkstack/signal-frontend": "0.1.1",
25
+ "@checkstack/ui": "1.7.1",
26
26
  "date-fns": "^4.1.0",
27
27
  "lucide-react": "^0.344.0",
28
28
  "react": "^18.2.0",
@@ -30,8 +30,8 @@
30
30
  "zod": "^4.2.1"
31
31
  },
32
32
  "devDependencies": {
33
- "@checkstack/scripts": "0.1.2",
34
- "@checkstack/tsconfig": "0.0.6",
33
+ "@checkstack/scripts": "0.3.0",
34
+ "@checkstack/tsconfig": "0.0.7",
35
35
  "@types/react": "^18.2.0",
36
36
  "typescript": "^5.0.0"
37
37
  }
@@ -24,10 +24,8 @@ import {
24
24
 
25
25
  const DEFAULT_VALUES: AnomalySettingsFormValues = {
26
26
  enabled: true,
27
- sensitivity: 1,
28
- confirmationWindow: 3,
29
- driftEnabled: true,
30
- driftThreshold: 2,
27
+ baselineWindow: "7d",
28
+ notify: true,
31
29
  fieldOverrides: {},
32
30
  };
33
31
 
@@ -74,13 +72,9 @@ export function AnomalyConfigPanel({ context }: { context: AssignmentIDEContext
74
72
  const tpl = templateRecord?.data;
75
73
  setValues({
76
74
  enabled: configRecord.data.enabled ?? true,
77
- sensitivity: configRecord.data.sensitivity ?? tpl?.sensitivity ?? 1,
78
- confirmationWindow:
79
- configRecord.data.confirmationWindow ?? tpl?.confirmationWindow ?? 3,
80
- driftEnabled:
81
- configRecord.data.driftEnabled ?? tpl?.driftEnabled ?? true,
82
- driftThreshold:
83
- configRecord.data.driftThreshold ?? tpl?.driftThreshold ?? 2,
75
+ baselineWindow:
76
+ configRecord.data.baselineWindow ?? tpl?.baselineWindow ?? "7d",
77
+ notify: configRecord.data.notify ?? tpl?.notify ?? true,
84
78
  fieldOverrides:
85
79
  (configRecord.data.fieldOverrides as Record<string, AnomalyFieldConfig>) ??
86
80
  {},