@crvouga/atlas 1.7.0 → 1.9.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 +13 -1
- package/dist/reports/src/evidence-detail.js +6 -1
- package/dist/reports/src/evidence-types.d.ts +2 -0
- package/dist/reports/src/explorer-types.d.ts +19 -0
- package/dist/reports/src/latency.d.ts +204 -0
- package/dist/reports/src/latency.js +219 -0
- package/dist/reports/src/reliability.d.ts +181 -0
- package/dist/reports/src/reliability.js +294 -0
- package/dist/reports/src/report-index.js +1 -1
- package/dist/reports/src/reports-explorer-route.d.ts +19 -6
- package/dist/reports/src/reports-route.d.ts +19 -6
- package/dist/reports/src/test-catalog.d.ts +11 -3
- package/dist/reports/src/test-catalog.js +12 -5
- package/dist/schema/src/api.d.ts +377 -0
- package/dist/schema/src/api.js +55 -3
- package/dist/schema/src/layer.d.ts +90 -0
- package/dist/schema/src/layer.js +20 -1
- package/dist/server/src/app.js +15 -0
- package/dist/server/src/llms.js +1 -0
- package/dist/server/src/openapi.js +25 -2
- package/docs/extending.md +1 -1
- package/docs/reference/http-api.md +48 -0
- package/docs/reference/reports.md +619 -1
- package/docs/reference/schema.md +39 -0
- package/docs/rich-evidence.md +43 -0
- package/docs/server.md +18 -0
- package/docs/ui.md +20 -1
- package/llms-full.txt +130 -2
- package/package.json +1 -1
- package/packages/schema/schemas/check-detail.schema.json +56 -1
- package/packages/schema/schemas/effective-delta.schema.json +86 -2
- package/packages/schema/schemas/effective-evidence.schema.json +86 -2
- package/packages/schema/schemas/evidence-page.schema.json +13 -0
- package/packages/schema/schemas/layer-rows.schema.json +73 -2
- package/packages/schema/schemas/layer.schema.json +112 -2
- package/packages/schema/schemas/publish-checks.schema.json +56 -1
- package/packages/schema/schemas/test-catalog.schema.json +102 -0
- package/packages/schema/schemas/test-history.schema.json +204 -0
- package/packages/schema/schemas/test-reliability.schema.json +629 -0
- package/packages/server/openapi.json +2354 -661
- package/packages/visualizer/src/evidence/check-detail.tsx +9 -0
- package/packages/visualizer/src/explorer/ProductLatency.tsx +214 -0
- package/packages/visualizer/src/explorer/Reliability.tsx +337 -0
- package/packages/visualizer/src/explorer/TestDetail.tsx +12 -2
- package/packages/visualizer/src/explorer/catalog.tsx +1 -1
- package/packages/visualizer/src/explorer/search.ts +36 -0
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* `type`, `label`, `branch`, `outcome`, `since` and `until`, so a link to one tab's filters opens the same query on another.
|
|
11
11
|
*/
|
|
12
12
|
import { joinList, splitList, type ArtifactFilter } from '@crvouga/atlas/reports/artifact-query';
|
|
13
|
+
import type { ReliabilityScope } from '@crvouga/atlas/reports/reliability';
|
|
13
14
|
import { TEST_SORTS, type TestQuery } from '@crvouga/atlas/reports/test-catalog';
|
|
14
15
|
import { z } from 'zod/v4';
|
|
15
16
|
|
|
@@ -71,6 +72,18 @@ export const ExplorerSearchFields = {
|
|
|
71
72
|
source: text,
|
|
72
73
|
/** With `openRun` and `layer`: the one file of that layer (an `artifactRef`: `id:…`, `key:…` or `name:…`) the run's Artifacts select. */
|
|
73
74
|
artifact: text,
|
|
75
|
+
/** The scope of the open test's reliability figure: environments, producers, branches, `key=value` parameters. */
|
|
76
|
+
relEnv: text,
|
|
77
|
+
relProducer: text,
|
|
78
|
+
relBranch: text,
|
|
79
|
+
relParam: text,
|
|
80
|
+
/** The reliability window, as `since` and `until` (`YYYY-MM-DD`, local time). */
|
|
81
|
+
relSince: text,
|
|
82
|
+
relUntil: text,
|
|
83
|
+
/** `any`: count every spec revision. Otherwise only the current one is counted. */
|
|
84
|
+
relRevision: z.enum(['any']).optional().catch(undefined),
|
|
85
|
+
/** The reliability's independent executions (its denominator) are open. */
|
|
86
|
+
relOpen: z.preprocess((value) => (value === 'true' ? true : value), z.literal(true)).optional().catch(undefined),
|
|
74
87
|
/** Only the runs, and the results of an opened run, that have a playable video recording. */
|
|
75
88
|
video: z.preprocess((value) => (value === 'true' ? true : value), z.literal(true)).optional().catch(undefined)
|
|
76
89
|
};
|
|
@@ -102,6 +115,14 @@ export type ExplorerSearch = {
|
|
|
102
115
|
readonly layer?: string;
|
|
103
116
|
readonly source?: string;
|
|
104
117
|
readonly artifact?: string;
|
|
118
|
+
readonly relEnv?: string;
|
|
119
|
+
readonly relProducer?: string;
|
|
120
|
+
readonly relBranch?: string;
|
|
121
|
+
readonly relParam?: string;
|
|
122
|
+
readonly relSince?: string;
|
|
123
|
+
readonly relUntil?: string;
|
|
124
|
+
readonly relRevision?: 'any';
|
|
125
|
+
readonly relOpen?: true;
|
|
105
126
|
readonly video?: true;
|
|
106
127
|
};
|
|
107
128
|
|
|
@@ -153,6 +174,21 @@ export function narrowed(search: ExplorerSearch): boolean {
|
|
|
153
174
|
return !!(search.q || search.status || search.env || search.producer || search.domain || search.spec || search.tag || search.scope || search.artifactTag || search.inRun || search.video);
|
|
154
175
|
}
|
|
155
176
|
|
|
177
|
+
/** The reliability scope an address asks for, in the shape `reliability` reads: days are the viewer's local days. */
|
|
178
|
+
export function reliabilityScopeOf(search: ExplorerSearch): ReliabilityScope {
|
|
179
|
+
const list = (value: string | undefined) => (values(value).length ? values(value) : undefined);
|
|
180
|
+
const parts = {
|
|
181
|
+
environment: list(search.relEnv),
|
|
182
|
+
producer: list(search.relProducer),
|
|
183
|
+
branch: list(search.relBranch),
|
|
184
|
+
parameter: list(search.relParam),
|
|
185
|
+
...(search.relRevision ? { revision: search.relRevision } : {}),
|
|
186
|
+
since: dayMs(search.relSince, false),
|
|
187
|
+
until: dayMs(search.relUntil, true)
|
|
188
|
+
};
|
|
189
|
+
return Object.fromEntries(Object.entries(parts).filter(([, value]) => value !== undefined)) as ReliabilityScope;
|
|
190
|
+
}
|
|
191
|
+
|
|
156
192
|
/** The filters of the Runs and Artifacts tabs, in the address. */
|
|
157
193
|
export const FILTER_FIELDS = ['q', 'artifactTag', 'inherited', 'type', 'label', 'env', 'producer', 'branch', 'outcome', 'domain', 'spec', 'since', 'until', 'video'] as const;
|
|
158
194
|
|