@checkstack/anomaly-frontend 0.3.1 → 0.4.1

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,94 @@
1
1
  # @checkstack/anomaly-frontend
2
2
 
3
+ ## 0.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [9016526]
8
+ - @checkstack/common@0.10.0
9
+ - @checkstack/catalog-common@2.2.0
10
+ - @checkstack/healthcheck-common@1.1.0
11
+ - @checkstack/notification-common@1.1.0
12
+ - @checkstack/anomaly-common@1.2.0
13
+ - @checkstack/frontend-api@0.5.1
14
+ - @checkstack/healthcheck-frontend@0.19.1
15
+ - @checkstack/notification-frontend@0.4.1
16
+ - @checkstack/ui@1.8.1
17
+ - @checkstack/signal-frontend@0.1.3
18
+
19
+ ## 0.4.0
20
+
21
+ ### Minor Changes
22
+
23
+ - 42abfff: Remove global anomaly settings — configuration is now field-only.
24
+
25
+ `AnomalySettings` (template- and assignment-level) no longer carries
26
+ `sensitivity`, `confirmationWindow`, `driftEnabled`, or `driftThreshold`.
27
+ These were duplicating the per-field configuration path with awkward
28
+ cascade semantics, and a single global multiplier was meaningless across
29
+ fields with different units (ms, %, counts).
30
+
31
+ The schema retains only the truly global concerns:
32
+
33
+ - `enabled` — master kill switch for the assignment
34
+ - `baselineWindow` — there is one history per system, not per field
35
+ - `notify` — one notification preference per assignment
36
+ - `fieldOverrides` — per-field configuration (where everything else now lives)
37
+
38
+ `resolveEffectiveConfig` collapses to two layers: field override → schema
39
+ default → engine fallback constant. The plugin-author defaults set via
40
+ `x-anomaly-*` annotations now drive sensitivity/window/drift across the
41
+ detector and drift evaluator (previously only floors were threaded
42
+ through the schema layer).
43
+
44
+ **Breaking changes:**
45
+
46
+ - Any global `sensitivity`/`confirmationWindow`/`driftEnabled`/
47
+ `driftThreshold` values previously stored in `anomaly_configurations`
48
+ or `anomaly_assignments` are silently stripped on parse. Users who
49
+ customized these globals will revert to the plugin's tuned per-field
50
+ defaults; if they want to keep those values they must re-apply them
51
+ per field in the new UI.
52
+ - `AnomalySettingsForm` no longer renders the global sliders. The form
53
+ now shows: enable toggle, baseline window selector, notify toggle,
54
+ field overrides editor.
55
+ - `AnomalyFieldOverridesEditor` props `defaultSensitivity`,
56
+ `defaultConfirmationWindow`, `defaultDriftEnabled`, `defaultDriftThreshold`
57
+ are removed. Engine fallbacks (1.0, 3, true, 2) are now hard-coded
58
+ internal constants used only when neither field override nor schema
59
+ default is set.
60
+ - The GitOps `System.anomaly` entry schema (in `anomaly-gitops-kinds`)
61
+ drops `sensitivity`, `confirmationWindow`, `driftEnabled`, and
62
+ `driftThreshold` to match the new `AnomalySettings` shape. YAML files
63
+ declaring those fields will be rejected at parse time — operators
64
+ must move per-field tuning into `fieldOverrides`.
65
+
66
+ This change makes the override model trivial to explain ("plugin defaults,
67
+ overridden per field") and removes a class of confusing "where did this
68
+ threshold come from?" questions.
69
+
70
+ ### Patch Changes
71
+
72
+ - Updated dependencies [42abfff]
73
+ - Updated dependencies [42abfff]
74
+ - Updated dependencies [3547670]
75
+ - Updated dependencies [1ef2e79]
76
+ - Updated dependencies [aa89bc5]
77
+ - Updated dependencies [3547670]
78
+ - Updated dependencies [950d6ec]
79
+ - Updated dependencies [3547670]
80
+ - Updated dependencies [3547670]
81
+ - @checkstack/anomaly-common@1.1.0
82
+ - @checkstack/common@0.9.0
83
+ - @checkstack/ui@1.8.0
84
+ - @checkstack/catalog-common@2.1.0
85
+ - @checkstack/frontend-api@0.5.0
86
+ - @checkstack/notification-frontend@0.4.0
87
+ - @checkstack/healthcheck-frontend@0.19.0
88
+ - @checkstack/healthcheck-common@1.0.2
89
+ - @checkstack/notification-common@1.0.2
90
+ - @checkstack/signal-frontend@0.1.2
91
+
3
92
  ## 0.3.1
4
93
 
5
94
  ### 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.1",
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.1.0",
17
+ "@checkstack/catalog-common": "2.1.0",
18
+ "@checkstack/common": "0.9.0",
19
+ "@checkstack/frontend-api": "0.5.0",
20
+ "@checkstack/healthcheck-common": "1.0.2",
21
+ "@checkstack/healthcheck-frontend": "0.19.0",
22
+ "@checkstack/notification-common": "1.0.2",
23
+ "@checkstack/notification-frontend": "0.4.0",
24
+ "@checkstack/signal-frontend": "0.1.2",
25
+ "@checkstack/ui": "1.8.0",
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.1",
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
  {},