@crvouga/atlas 1.16.0 → 1.17.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 +7 -1
- package/dist/reports/src/test-catalog.d.ts +13 -0
- package/dist/reports/src/test-catalog.js +21 -5
- package/dist/schema/src/api.d.ts +29 -0
- package/dist/schema/src/api.js +6 -1
- package/docs/extending.md +1 -1
- package/docs/reference/reports.md +17 -0
- package/docs/ui.md +8 -0
- package/llms-full.txt +9 -1
- package/package.json +1 -1
- package/packages/schema/schemas/test-catalog.schema.json +26 -0
- package/packages/schema/schemas/test-history.schema.json +40 -0
- package/packages/server/openapi.json +66 -0
- package/packages/visualizer/src/evidence/applicability-view.tsx +46 -20
- package/packages/visualizer/src/evidence/applicability.test.ts +68 -1
- package/packages/visualizer/src/evidence/applicability.ts +121 -26
- package/packages/visualizer/src/explorer/Explorer.tsx +96 -8
- package/packages/visualizer/src/explorer/TestDetail.tsx +14 -1
- package/packages/visualizer/src/explorer/applicability.ts +43 -0
- package/packages/visualizer/src/explorer/search.ts +14 -4
|
@@ -19,8 +19,8 @@ export const TEST_GROUPS = ['spec', 'domain', 'environment', 'status', 'producer
|
|
|
19
19
|
/** One of {@link TEST_GROUPS}. */
|
|
20
20
|
export type TestGroup = (typeof TEST_GROUPS)[number];
|
|
21
21
|
|
|
22
|
-
/** The orders the explorer offers: `relevance` (best match first, only with words to match) and those of the catalog. */
|
|
23
|
-
export const EXPLORER_SORTS = ['relevance', ...TEST_SORTS] as const;
|
|
22
|
+
/** The orders the explorer offers: `relevance` (best match first, only with words to match), `evidence` (tests whose evidence is stale or unverified first, worked out in the viewer) and those of the catalog. */
|
|
23
|
+
export const EXPLORER_SORTS = ['relevance', 'evidence', ...TEST_SORTS] as const;
|
|
24
24
|
/** One of {@link EXPLORER_SORTS}. */
|
|
25
25
|
export type ExplorerSort = (typeof EXPLORER_SORTS)[number];
|
|
26
26
|
|
|
@@ -61,6 +61,12 @@ export const ExplorerSearchFields = {
|
|
|
61
61
|
until: text,
|
|
62
62
|
/** Only the tests a CI run recorded (a `RunSummary.key`). Not `run`, which already names a recorded statechart run. */
|
|
63
63
|
inRun: text,
|
|
64
|
+
/** `stale`: only tests whose evidence is stale or unverified (not that applies to the current promise and, when one is named, the release). Never a test status. */
|
|
65
|
+
evidence: z.enum(['stale']).optional().catch(undefined),
|
|
66
|
+
/** The release evidence is read against: its build, commit and platform (the names a spec page uses). A build such as `90` is read from a typed link as a number: coerced back to its text. */
|
|
67
|
+
release: text,
|
|
68
|
+
releaseSha: text,
|
|
69
|
+
releasePlatform: text,
|
|
64
70
|
group: z.enum(TEST_GROUPS).optional().catch(undefined),
|
|
65
71
|
sort: z.enum(EXPLORER_SORTS).optional().catch(undefined),
|
|
66
72
|
tab: z.enum(['runs', 'artifacts', 'collections', 'compare', 'health']).optional().catch(undefined),
|
|
@@ -127,6 +133,10 @@ export type ExplorerSearch = {
|
|
|
127
133
|
readonly since?: string;
|
|
128
134
|
readonly until?: string;
|
|
129
135
|
readonly inRun?: string;
|
|
136
|
+
readonly evidence?: 'stale';
|
|
137
|
+
readonly release?: string;
|
|
138
|
+
readonly releaseSha?: string;
|
|
139
|
+
readonly releasePlatform?: string;
|
|
130
140
|
readonly group?: TestGroup;
|
|
131
141
|
readonly sort?: ExplorerSort;
|
|
132
142
|
readonly tab?: 'runs' | 'artifacts' | 'collections' | 'compare' | 'health';
|
|
@@ -189,7 +199,7 @@ export function queryOf(search: ExplorerSearch): TestQuery {
|
|
|
189
199
|
...(values(search.scope).length ? { scope: values(search.scope) } : {}),
|
|
190
200
|
artifactTag: values(search.artifactTag),
|
|
191
201
|
...(search.inherited ? { inherited: true } : {}),
|
|
192
|
-
sort: search.sort === 'relevance' || !search.sort ? 'spec' : search.sort
|
|
202
|
+
sort: search.sort === 'relevance' || search.sort === 'evidence' || !search.sort ? 'spec' : search.sort
|
|
193
203
|
};
|
|
194
204
|
}
|
|
195
205
|
|
|
@@ -200,7 +210,7 @@ export function explorerSearch(search: Record<string, unknown>): ExplorerSearch
|
|
|
200
210
|
|
|
201
211
|
/** True when any filter or search narrows the list. */
|
|
202
212
|
export function narrowed(search: ExplorerSearch): boolean {
|
|
203
|
-
return !!(search.q || search.status || search.env || search.producer || search.domain || search.spec || search.tag || search.scope || search.artifactTag || search.inRun || search.video);
|
|
213
|
+
return !!(search.q || search.status || search.env || search.producer || search.domain || search.spec || search.tag || search.scope || search.artifactTag || search.inRun || search.video || search.evidence);
|
|
204
214
|
}
|
|
205
215
|
|
|
206
216
|
/** The reliability scope an address asks for, in the shape `reliability` reads: days are the viewer's local days. */
|