@crvouga/atlas 1.2.0 → 1.3.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.
Files changed (43) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/reports/src/evidence-detail.d.ts +14 -3
  3. package/dist/reports/src/evidence-detail.js +33 -19
  4. package/dist/reports/src/evidence-scope.d.ts +83 -0
  5. package/dist/reports/src/evidence-scope.js +129 -0
  6. package/dist/reports/src/evidence-types.d.ts +3 -1
  7. package/dist/reports/src/explorer-types.d.ts +1 -1
  8. package/dist/reports/src/layer-merge.js +3 -2
  9. package/dist/reports/src/layer-types.d.ts +1 -1
  10. package/dist/reports/src/publish-checks.js +1 -0
  11. package/dist/reports/src/reporter.d.ts +1 -1
  12. package/dist/reports/src/reports-explorer-route.d.ts +276 -0
  13. package/dist/reports/src/reports-route.d.ts +276 -0
  14. package/dist/reports/src/test-catalog.d.ts +7 -1
  15. package/dist/reports/src/test-catalog.js +15 -3
  16. package/dist/schema/src/api.d.ts +520 -0
  17. package/dist/schema/src/api.js +7 -4
  18. package/dist/schema/src/layer.d.ts +981 -0
  19. package/dist/schema/src/layer.js +43 -4
  20. package/dist/server/src/openapi.js +1 -0
  21. package/docs/extending.md +1 -0
  22. package/docs/reference/http-api.md +2 -0
  23. package/docs/reference/reports.md +179 -7
  24. package/docs/reference/schema.md +23 -0
  25. package/docs/rich-evidence.md +47 -0
  26. package/llms-full.txt +50 -0
  27. package/package.json +1 -1
  28. package/packages/schema/schemas/check-detail.schema.json +673 -1
  29. package/packages/schema/schemas/effective-delta.schema.json +192 -0
  30. package/packages/schema/schemas/effective-evidence.schema.json +192 -0
  31. package/packages/schema/schemas/evidence-page.schema.json +96 -0
  32. package/packages/schema/schemas/layer-rows.schema.json +96 -0
  33. package/packages/schema/schemas/layer.schema.json +1598 -62
  34. package/packages/schema/schemas/publish-checks.schema.json +768 -0
  35. package/packages/schema/schemas/report-run.schema.json +96 -0
  36. package/packages/schema/schemas/test-catalog.schema.json +128 -0
  37. package/packages/schema/schemas/test-history.schema.json +202 -0
  38. package/packages/server/openapi.json +2581 -23
  39. package/packages/visualizer/src/evidence/artifacts.tsx +24 -18
  40. package/packages/visualizer/src/evidence/evidence-scope.tsx +106 -0
  41. package/packages/visualizer/src/evidence/format.ts +11 -0
  42. package/packages/visualizer/src/explorer/Explorer.tsx +19 -0
  43. package/packages/visualizer/src/explorer/search.ts +5 -1
@@ -14,7 +14,7 @@
14
14
  * @see docs/server.md
15
15
  */
16
16
  import { z } from 'zod/v4';
17
- import { CheckSchema, LayerRunSchema } from './layer.js';
17
+ import { CheckSchema, EvidenceScopeSchema, LayerRunSchema } from './layer.js';
18
18
  /** One of the statuses a check has in a report: `passed`, `failed`, `running` (not finished) or `not-run`. Closed. */
19
19
  export const EvidenceStatusSchema = z.enum(['passed', 'failed', 'running', 'not-run']);
20
20
  /**
@@ -70,7 +70,8 @@ export const VideoRefSchema = z.looseObject({
70
70
  step: z.string().optional().describe('The name of the step that holds it'),
71
71
  tags: z.array(z.string()).optional().describe('The normalized tags of this attachment itself. Absent when it has none (and in documents of older servers)'),
72
72
  recording: z.string().optional().describe('What identifies the bytes; references with the same value are one recording. Absent when it cannot be played'),
73
- available: z.boolean().describe('False when the reference names no bytes (no bundle key, address or inline text)')
73
+ available: z.boolean().describe('False when the reference names no bytes (no bundle key, address or inline text)'),
74
+ scope: EvidenceScopeSchema.optional().describe('What this recording shows as its producer declared it: its own `scope`, else its attempt\'s, check\'s, part\'s or layer\'s. Absent: the scope is unknown, never live, physical or audible')
74
75
  });
75
76
  /** Video references as counts: how many are referenced, how many distinct recordings can be played, how many cannot. */
76
77
  export const VideoCountsSchema = z.looseObject({
@@ -189,7 +190,8 @@ export const CheckDetailSchema = z.looseObject({
189
190
  layer: z.string(),
190
191
  kind: z.string(),
191
192
  check: CheckSchema,
192
- run: z.looseObject({}).describe('What the run as a whole carries: its logs, links, labels, annotations and extensions')
193
+ run: z.looseObject({}).describe('What the run as a whole carries: its logs, links, labels, annotations, scope and extensions'),
194
+ inheritedScope: EvidenceScopeSchema.optional().describe('The scope the check inherits: its part\'s declaration, else its layer\'s. Absent when neither declared one: unknown, not live or physical')
193
195
  });
194
196
  /** `GET /api/store?prefix=…`: one page of keys under `layers/`, in code-unit order. */
195
197
  export const StoreListingSchema = z.looseObject({
@@ -295,6 +297,7 @@ export const TestSummarySchema = z.looseObject({
295
297
  tags: z.array(z.string()),
296
298
  artifactTags: z.array(z.string()).optional().describe('Normalized tags of the attachments of its current results, such as `demo` (shown `#demo`). Not inherited from a check or run, unlike `tags`'),
297
299
  inheritedArtifactTags: z.array(z.string()).optional().describe('Normalized tags its attachments inherit from their check and run, apart from `artifactTags`: what `?artifactTag=…&inherited=1` also matches'),
300
+ scopeProfiles: z.array(z.array(z.string())).optional().describe('The scope tokens each distinct playable recording of its current results declares (`device:physical`, `audio:silent`); `["unknown"]` for a recording that declared none. What `?scope=` matches, one recording at a time. Absent when it has no playable recording'),
298
301
  labels: z.record(z.string(), z.string()),
299
302
  evidence: z.looseObject({ attachments: z.number().int().nonnegative(), steps: z.number().int().nonnegative(), attempts: z.number().int().nonnegative(), roles: z.array(z.string()) }),
300
303
  lastRecordedAtMs: z.number(),
@@ -321,7 +324,7 @@ export const TestCatalogSchema = z.looseObject({
321
324
  facets: z.looseObject({
322
325
  statuses: z.array(FacetValueSchema), environments: z.array(FacetValueSchema), producers: z.array(FacetValueSchema), domains: z.array(FacetValueSchema),
323
326
  specs: z.array(CatalogSpecSchema.extend({ tests: z.number().int().nonnegative(), counts: StatusCountsSchema })),
324
- tags: z.array(FacetValueSchema), artifactTags: z.array(FacetValueSchema).optional(), branches: z.array(FacetValueSchema), labels: z.record(z.string(), z.array(FacetValueSchema))
327
+ tags: z.array(FacetValueSchema), artifactTags: z.array(FacetValueSchema).optional(), scopes: z.array(FacetValueSchema).optional().describe('Scope tokens of recordings (`device:simulator`, `unknown`) with the number of tests that have a recording stating each'), branches: z.array(FacetValueSchema), labels: z.record(z.string(), z.array(FacetValueSchema))
325
328
  }),
326
329
  total: z.number().int().nonnegative().describe('Tests the query matched, before offset and limit'),
327
330
  offset: z.number().int().nonnegative(),