@xera-ai/core 0.9.7 → 0.10.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/dist/bin/internal.js +1415 -534
- package/dist/bin/templates/LICENSE-vis-network.txt +2 -0
- package/dist/bin/templates/coverage-panel.html.fragment +20 -0
- package/dist/bin/templates/graph.css +379 -43
- package/dist/bin/templates/graph.html.template +35 -15
- package/dist/bin/templates/graph.js +458 -56
- package/dist/bin/templates/vis-network.min.js +3 -24976
- package/dist/src/index.js +6 -0
- package/package.json +3 -3
- package/src/bin-internal/ac-coverage-backfill-finalize.ts +90 -0
- package/src/bin-internal/ac-coverage-backfill-prepare.ts +72 -0
- package/src/bin-internal/coverage-prepare.ts +123 -0
- package/src/bin-internal/fill-gap-finalize.ts +115 -0
- package/src/bin-internal/fill-gap-prepare.ts +150 -0
- package/src/bin-internal/graph-render.ts +32 -4
- package/src/bin-internal/index.ts +10 -0
- package/src/bin-internal/verify-prompts.ts +2 -0
- package/src/config/schema.ts +9 -0
- package/src/coverage/index.ts +29 -0
- package/src/coverage/report.ts +206 -0
- package/src/coverage/risk.ts +69 -0
- package/src/coverage/status.ts +76 -0
- package/src/coverage/types.ts +11 -0
- package/src/coverage/why.ts +122 -0
- package/src/graph/render.ts +16 -2
- package/src/graph/schema.ts +54 -1
- package/src/graph/store.ts +96 -6
- package/src/graph/templates/LICENSE-vis-network.txt +2 -0
- package/src/graph/templates/coverage-panel.html.fragment +20 -0
- package/src/graph/templates/graph.css +379 -43
- package/src/graph/templates/graph.html.template +35 -15
- package/src/graph/templates/graph.js +458 -56
- package/src/graph/templates/vis-network.min.js +3 -24976
- package/src/graph/types.ts +56 -1
package/src/graph/types.ts
CHANGED
|
@@ -4,7 +4,15 @@ export const SCHEMA_VERSION = 1 as const;
|
|
|
4
4
|
|
|
5
5
|
export type Priority = 'p0' | 'p1' | 'p2';
|
|
6
6
|
export type ScenarioStatus = 'pass' | 'fail';
|
|
7
|
-
export type EdgeKind =
|
|
7
|
+
export type EdgeKind =
|
|
8
|
+
| 'tests'
|
|
9
|
+
| 'uses'
|
|
10
|
+
| 'covers'
|
|
11
|
+
| 'modifies'
|
|
12
|
+
| 'jira-linked'
|
|
13
|
+
| 'similar'
|
|
14
|
+
| 'ran'
|
|
15
|
+
| 'satisfies';
|
|
8
16
|
|
|
9
17
|
export type Classification =
|
|
10
18
|
| 'REAL_BUG'
|
|
@@ -43,6 +51,7 @@ export interface ScenarioGeneratedPayload {
|
|
|
43
51
|
priority: Priority;
|
|
44
52
|
featureHash: string;
|
|
45
53
|
generatedAt: string;
|
|
54
|
+
satisfiesAcs?: number[]; // NEW v0.8: AC indices (0-based) this scenario asserts
|
|
46
55
|
}
|
|
47
56
|
|
|
48
57
|
export interface PomGeneratedPayload {
|
|
@@ -93,6 +102,37 @@ export interface EdgeDiscoveredPayload {
|
|
|
93
102
|
source: string;
|
|
94
103
|
}
|
|
95
104
|
|
|
105
|
+
export interface CoverageSnapshotPayload {
|
|
106
|
+
ts: string; // ISO8601
|
|
107
|
+
windowDays: number;
|
|
108
|
+
areas: Array<{
|
|
109
|
+
id: string;
|
|
110
|
+
status: 'UNCOVERED' | 'STALE' | 'COVERED';
|
|
111
|
+
risk: number;
|
|
112
|
+
breakdown: {
|
|
113
|
+
recentTickets: number;
|
|
114
|
+
recentBugs: number;
|
|
115
|
+
criticalBoost: 1 | 2;
|
|
116
|
+
};
|
|
117
|
+
}>;
|
|
118
|
+
tickets: Array<{
|
|
119
|
+
id: string;
|
|
120
|
+
acCount: number;
|
|
121
|
+
satisfiedCount: number;
|
|
122
|
+
gapScore: number;
|
|
123
|
+
}>;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export interface AcCoverageBackfilledPayload {
|
|
127
|
+
ts: string;
|
|
128
|
+
ticketId: string;
|
|
129
|
+
mappings: Array<{
|
|
130
|
+
scenarioId: string;
|
|
131
|
+
satisfiesAcs: number[];
|
|
132
|
+
confidence: number;
|
|
133
|
+
}>;
|
|
134
|
+
}
|
|
135
|
+
|
|
96
136
|
export type EventPayloadMap = {
|
|
97
137
|
'ticket.fetched': TicketFetchedPayload;
|
|
98
138
|
'ticket.enriched': TicketEnrichedPayload;
|
|
@@ -103,6 +143,8 @@ export type EventPayloadMap = {
|
|
|
103
143
|
'run.classified': RunClassifiedPayload;
|
|
104
144
|
'classification.disputed': ClassificationDisputedPayload;
|
|
105
145
|
'edge.discovered': EdgeDiscoveredPayload;
|
|
146
|
+
'coverage.snapshot': CoverageSnapshotPayload; // NEW
|
|
147
|
+
'ac-coverage.backfilled': AcCoverageBackfilledPayload; // NEW
|
|
106
148
|
};
|
|
107
149
|
|
|
108
150
|
export type EventType = keyof EventPayloadMap;
|
|
@@ -151,6 +193,13 @@ export interface AreaNode {
|
|
|
151
193
|
id: string;
|
|
152
194
|
}
|
|
153
195
|
|
|
196
|
+
export interface ACNode {
|
|
197
|
+
id: string; // `${ticketId}#ac-${index}` (0-based)
|
|
198
|
+
ticketId: string;
|
|
199
|
+
index: number;
|
|
200
|
+
text: string;
|
|
201
|
+
}
|
|
202
|
+
|
|
154
203
|
export interface FailureNode {
|
|
155
204
|
id: string;
|
|
156
205
|
scenarioId: string;
|
|
@@ -180,4 +229,10 @@ export interface Snapshot {
|
|
|
180
229
|
areas: Record<string, AreaNode>;
|
|
181
230
|
edges: EdgeRecord[];
|
|
182
231
|
latest_failures: Record<string, FailureNode>;
|
|
232
|
+
acNodes: Record<string, ACNode>; // NEW v0.8
|
|
233
|
+
classifications: Array<{
|
|
234
|
+
scenarioId: string;
|
|
235
|
+
classification: Classification;
|
|
236
|
+
ts: string;
|
|
237
|
+
}>; // NEW v0.8
|
|
183
238
|
}
|