fix(openapi): declare shrunkR and tier on DiscoveredCorrelation

The correlation-discovery engine always sets shrunkR (the
sample-size-shrunk effect) and tier (the phrasing-confidence class)
on every surfaced pair, but the closed DiscoveredCorrelation schema
never declared either — same defect class as the dashboard snapshot:
additionalProperties: false rejecting a field the runtime actually
sends. Both are required, matching src/lib/insights/correlation-discovery.ts.
This commit is contained in:
Marc-André Bombeck committed 2026-07-31 01:26:21 +02:00
1 parent d04eab71a3
commit 9b69be8ab5
2 files changed
+24

No files matched your search

+14
View File
@@ -29870,6 +29870,18 @@ components:
qValue:
type: number
description: Benjamini-Hochberg FDR-adjusted q-value (≤ the surface threshold).
shrunkR:
type: number
description: Sample-size-shrunk effect (r shrunk toward null by depth), used for ranking and the effect-size floor.
Display still uses raw `r`.
tier:
type: string
enum:
- high
- moderate
- faint
description: "Phrasing-confidence tier the narration honours: `faint` is hedged, `high` is stated plainly, `moderate`
sits between. A below-floor pair never reaches this list."
interpretation:
type: string
description: Conservative, descriptive interpretation — never causal.
@@ -29904,6 +29916,8 @@ components:
- r
- pValue
- qValue
- shrunkR
- tier
- interpretation
- lagDays
additionalProperties: false
@@ -303,6 +303,16 @@ export const discoveredCorrelation = z
.describe(
"Benjamini-Hochberg FDR-adjusted q-value (≤ the surface threshold).",
),
shrunkR: z
.number()
.describe(
"Sample-size-shrunk effect (r shrunk toward null by depth), used for ranking and the effect-size floor. Display still uses raw `r`.",
),
tier: z
.enum(["high", "moderate", "faint"])
.describe(
"Phrasing-confidence tier the narration honours: `faint` is hedged, `high` is stated plainly, `moderate` sits between. A below-floor pair never reaches this list.",
),
interpretation: z
.string()
.describe("Conservative, descriptive interpretation — never causal."),