File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ export type { RecceServerFlags } from "./flag";
6262export { getServerFlag , markRelaunchHintCompleted } from "./flag" ;
6363// Server info API (lineage, environment, dbt metadata)
6464export type {
65+ CatalogCoverage ,
6566 CatalogMetadata ,
6667 GitInfo ,
6768 LineageData ,
Original file line number Diff line number Diff line change 1+ import { describe , expectTypeOf , it } from "vitest" ;
2+
3+ import type { CatalogCoverage , ServerInfoResult } from "./index" ;
4+
5+ type CatalogStatus =
6+ | "complete"
7+ | "partial"
8+ | "empty"
9+ | "absent"
10+ | "not_applicable"
11+ | "unknown" ;
12+
13+ describe ( "ServerInfoResult catalog coverage contract" , ( ) => {
14+ it ( "exports the canonical optional and nullable cloud payload" , ( ) => {
15+ expectTypeOf < CatalogCoverage > ( ) . toEqualTypeOf < {
16+ status : CatalogStatus ;
17+ warn : boolean ;
18+ covered_count : number ;
19+ expected_count : number ;
20+ catalog_entry_count : number ;
21+ computed_at : string ;
22+ } > ( ) ;
23+
24+ expectTypeOf < ServerInfoResult [ "catalog_coverage" ] > ( ) . toEqualTypeOf <
25+ CatalogCoverage | null | undefined
26+ > ( ) ;
27+ } ) ;
28+ } ) ;
Original file line number Diff line number Diff line change @@ -158,6 +158,25 @@ export interface StateMetadata {
158158 generated_at : string ;
159159}
160160
161+ /**
162+ * Catalog coverage fields returned by the cloud backend after artifact
163+ * classification.
164+ */
165+ export interface CatalogCoverage {
166+ status :
167+ | "complete"
168+ | "partial"
169+ | "empty"
170+ | "absent"
171+ | "not_applicable"
172+ | "unknown" ;
173+ warn : boolean ;
174+ covered_count : number ;
175+ expected_count : number ;
176+ catalog_entry_count : number ;
177+ computed_at : string ;
178+ }
179+
161180/**
162181 * Session staleness fields returned by the backend when the PR session's
163182 * frozen-snapshot base may have diverged from the project's current shared base.
@@ -227,6 +246,11 @@ export interface ServerInfoResult {
227246 support_tasks : Record < string , boolean > ;
228247 /** Session staleness fields (cloud mode only, null for OSS / legacy sessions). */
229248 session_staleness ?: SessionStaleness ;
249+ /**
250+ * Catalog coverage fields in cloud mode. Omitted by OSS and legacy servers;
251+ * null when the cloud session has not produced a conclusive classification.
252+ */
253+ catalog_coverage ?: CatalogCoverage | null ;
230254}
231255
232256/**
You can’t perform that action at this time.
0 commit comments