ccqa 1.18.0 → 1.20.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/README.md +6 -5
- package/dist/bin/ccqa.mjs +3712 -3400
- package/dist/hub-client/index.d.mts +50 -65
- package/dist/package.json +1 -1
- package/package.json +1 -1
|
@@ -85,6 +85,7 @@ declare const TriageCaseSchema: z.ZodObject<{
|
|
|
85
85
|
TEST_DRIFT: "TEST_DRIFT";
|
|
86
86
|
SPEC_CHANGE: "SPEC_CHANGE";
|
|
87
87
|
PRODUCT_BUG: "PRODUCT_BUG";
|
|
88
|
+
ENVIRONMENT: "ENVIRONMENT";
|
|
88
89
|
UNKNOWN: "UNKNOWN";
|
|
89
90
|
}>;
|
|
90
91
|
confidence: z.ZodNumber;
|
|
@@ -96,10 +97,12 @@ declare const TriageCaseSchema: z.ZodObject<{
|
|
|
96
97
|
TEST_DRIFT: "TEST_DRIFT";
|
|
97
98
|
SPEC_CHANGE: "SPEC_CHANGE";
|
|
98
99
|
PRODUCT_BUG: "PRODUCT_BUG";
|
|
100
|
+
ENVIRONMENT: "ENVIRONMENT";
|
|
99
101
|
NO_DRIFT: "NO_DRIFT";
|
|
100
102
|
}>;
|
|
101
103
|
note: z.ZodOptional<z.ZodString>;
|
|
102
104
|
recordedAt: z.ZodString;
|
|
105
|
+
invalidForKind: z.ZodOptional<z.ZodBoolean>;
|
|
103
106
|
}, z.core.$strip>>;
|
|
104
107
|
}, z.core.$strip>;
|
|
105
108
|
type TriageCase = z.infer<typeof TriageCaseSchema>;
|
|
@@ -115,6 +118,7 @@ declare const RunTriageSchema: z.ZodObject<{
|
|
|
115
118
|
TEST_DRIFT: "TEST_DRIFT";
|
|
116
119
|
SPEC_CHANGE: "SPEC_CHANGE";
|
|
117
120
|
PRODUCT_BUG: "PRODUCT_BUG";
|
|
121
|
+
ENVIRONMENT: "ENVIRONMENT";
|
|
118
122
|
UNKNOWN: "UNKNOWN";
|
|
119
123
|
}>;
|
|
120
124
|
confidence: z.ZodNumber;
|
|
@@ -126,13 +130,16 @@ declare const RunTriageSchema: z.ZodObject<{
|
|
|
126
130
|
TEST_DRIFT: "TEST_DRIFT";
|
|
127
131
|
SPEC_CHANGE: "SPEC_CHANGE";
|
|
128
132
|
PRODUCT_BUG: "PRODUCT_BUG";
|
|
133
|
+
ENVIRONMENT: "ENVIRONMENT";
|
|
129
134
|
NO_DRIFT: "NO_DRIFT";
|
|
130
135
|
}>;
|
|
131
136
|
note: z.ZodOptional<z.ZodString>;
|
|
132
137
|
recordedAt: z.ZodString;
|
|
138
|
+
invalidForKind: z.ZodOptional<z.ZodBoolean>;
|
|
133
139
|
}, z.core.$strip>>;
|
|
134
140
|
}, z.core.$strip>>;
|
|
135
141
|
recorded: z.ZodNumber;
|
|
142
|
+
recordedInvalidForKind: z.ZodNumber;
|
|
136
143
|
total: z.ZodNumber;
|
|
137
144
|
}, z.core.$strip>;
|
|
138
145
|
type RunTriage = z.infer<typeof RunTriageSchema>;
|
|
@@ -141,11 +148,22 @@ declare const PutActualCauseRequestSchema: z.ZodObject<{
|
|
|
141
148
|
TEST_DRIFT: "TEST_DRIFT";
|
|
142
149
|
SPEC_CHANGE: "SPEC_CHANGE";
|
|
143
150
|
PRODUCT_BUG: "PRODUCT_BUG";
|
|
151
|
+
ENVIRONMENT: "ENVIRONMENT";
|
|
144
152
|
NO_DRIFT: "NO_DRIFT";
|
|
145
153
|
}>;
|
|
146
154
|
note: z.ZodOptional<z.ZodString>;
|
|
147
155
|
}, z.core.$strip>;
|
|
148
156
|
type PutActualCauseRequest = z.infer<typeof PutActualCauseRequestSchema>;
|
|
157
|
+
/** Response of `PUT /runs/:id/triage/actual-causes`. */
|
|
158
|
+
declare const ImportActualCausesResponseSchema: z.ZodObject<{
|
|
159
|
+
imported: z.ZodNumber;
|
|
160
|
+
rejected: z.ZodArray<z.ZodObject<{
|
|
161
|
+
feature: z.ZodString;
|
|
162
|
+
spec: z.ZodString;
|
|
163
|
+
reason: z.ZodString;
|
|
164
|
+
}, z.core.$strip>>;
|
|
165
|
+
}, z.core.$strip>;
|
|
166
|
+
type ImportActualCausesResponse = z.infer<typeof ImportActualCausesResponseSchema>;
|
|
149
167
|
/**
|
|
150
168
|
* One spec's "last time it passed" record in the last-green ledger. The hub
|
|
151
169
|
* updates the ledger whenever a `kind: "run"` run reaches a terminal state:
|
|
@@ -199,14 +217,13 @@ declare const AuditNeedReportSchema: z.ZodObject<{
|
|
|
199
217
|
profile: z.ZodString;
|
|
200
218
|
specs: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
201
219
|
because: z.ZodEnum<{
|
|
202
|
-
cannotTell: "cannotTell";
|
|
203
220
|
neverAudited: "neverAudited";
|
|
204
221
|
deployReached: "deployReached";
|
|
222
|
+
cannotTell: "cannotTell";
|
|
205
223
|
held: "held";
|
|
206
224
|
current: "current";
|
|
207
225
|
}>;
|
|
208
226
|
reason: z.ZodOptional<z.ZodEnum<{
|
|
209
|
-
notEvaluated: "notEvaluated";
|
|
210
227
|
noSelectionInRange: "noSelectionInRange";
|
|
211
228
|
selectionUnknown: "selectionUnknown";
|
|
212
229
|
noDeployLog: "noDeployLog";
|
|
@@ -233,26 +250,33 @@ declare const RerunReportSchema: z.ZodObject<{
|
|
|
233
250
|
needsRepair: "needsRepair";
|
|
234
251
|
rerunNeeded: "rerunNeeded";
|
|
235
252
|
verified: "verified";
|
|
236
|
-
unanswerable: "unanswerable";
|
|
237
253
|
}>;
|
|
238
254
|
audit: z.ZodEnum<{
|
|
239
255
|
due: "due";
|
|
240
256
|
clean: "clean";
|
|
241
257
|
drifted: "drifted";
|
|
242
258
|
undecided: "undecided";
|
|
243
|
-
cannotTell: "cannotTell";
|
|
244
259
|
}>;
|
|
245
260
|
execution: z.ZodEnum<{
|
|
246
261
|
passed: "passed";
|
|
247
262
|
failed: "failed";
|
|
263
|
+
stale: "stale";
|
|
248
264
|
neverRun: "neverRun";
|
|
249
265
|
}>;
|
|
250
266
|
driftLabel: z.ZodOptional<z.ZodEnum<{
|
|
251
267
|
TEST_DRIFT: "TEST_DRIFT";
|
|
252
268
|
SPEC_CHANGE: "SPEC_CHANGE";
|
|
253
269
|
}>>;
|
|
254
|
-
|
|
255
|
-
|
|
270
|
+
auditAssumedReached: z.ZodOptional<z.ZodEnum<{
|
|
271
|
+
noSelectionInRange: "noSelectionInRange";
|
|
272
|
+
selectionUnknown: "selectionUnknown";
|
|
273
|
+
noDeployLog: "noDeployLog";
|
|
274
|
+
unknownDeployedSha: "unknownDeployedSha";
|
|
275
|
+
ambiguousDeployedSha: "ambiguousDeployedSha";
|
|
276
|
+
deployedShaNotInLog: "deployedShaNotInLog";
|
|
277
|
+
gapInRange: "gapInRange";
|
|
278
|
+
}>>;
|
|
279
|
+
executionAssumedReached: z.ZodOptional<z.ZodEnum<{
|
|
256
280
|
noSelectionInRange: "noSelectionInRange";
|
|
257
281
|
selectionUnknown: "selectionUnknown";
|
|
258
282
|
noDeployLog: "noDeployLog";
|
|
@@ -366,19 +390,25 @@ type DriftLedgerResponse = z.infer<typeof DriftLedgerResponseSchema>;
|
|
|
366
390
|
* the names without a circular import.
|
|
367
391
|
*
|
|
368
392
|
* Two kinds share one namespace:
|
|
369
|
-
* - "guidance":
|
|
370
|
-
*
|
|
371
|
-
*
|
|
372
|
-
*
|
|
373
|
-
*
|
|
374
|
-
*
|
|
375
|
-
*
|
|
393
|
+
* - "guidance": Markdown — every `.user.md` file, plus the record/live/
|
|
394
|
+
* playwright/runn `.agent.md` notes (despite the "agent" name, these are
|
|
395
|
+
* plain prose, not the learned JSON below).
|
|
396
|
+
* - "custom-prompt": JSON Claude writes — only `triage.agent` and
|
|
397
|
+
* `audit.agent`, calibration distilled from graded cases and injected at
|
|
398
|
+
* run time.
|
|
399
|
+
*
|
|
400
|
+
* `triage.*` belongs to `ccqa run`'s failure classification and `audit.*` to
|
|
401
|
+
* `ccqa audit`. They are two prompts because they answer two questions in one
|
|
402
|
+
* shared vocabulary: the audit decides whether a spec still describes the
|
|
403
|
+
* code (from the source alone), and the run decides why it failed, using the
|
|
404
|
+
* execution evidence — the two commands run independently, neither gating the
|
|
405
|
+
* other (ADR-0016).
|
|
376
406
|
*
|
|
377
407
|
* Hub names are extensionless (`record.agent`), local files keep their real
|
|
378
408
|
* extensions; `PROMPT_LOCAL_PATHS` is the single mapping every caller (push,
|
|
379
409
|
* pull, learn, UI) goes through so the two never drift.
|
|
380
410
|
*/
|
|
381
|
-
declare const PROMPT_NAMES: readonly ["record.user", "record.agent", "live.user", "live.agent", "playwright.user", "playwright.agent", "runn.user", "runn.agent", "triage.user", "
|
|
411
|
+
declare const PROMPT_NAMES: readonly ["record.user", "record.agent", "live.user", "live.agent", "playwright.user", "playwright.agent", "runn.user", "runn.agent", "triage.user", "triage.agent", "audit.user", "audit.agent"];
|
|
382
412
|
type PromptName = (typeof PROMPT_NAMES)[number];
|
|
383
413
|
//#endregion
|
|
384
414
|
//#region src/report/schema.d.ts
|
|
@@ -417,6 +447,7 @@ declare const ReportSpecResultSchema: z.ZodObject<{
|
|
|
417
447
|
TEST_DRIFT: "TEST_DRIFT";
|
|
418
448
|
SPEC_CHANGE: "SPEC_CHANGE";
|
|
419
449
|
PRODUCT_BUG: "PRODUCT_BUG";
|
|
450
|
+
ENVIRONMENT: "ENVIRONMENT";
|
|
420
451
|
UNKNOWN: "UNKNOWN";
|
|
421
452
|
}>;
|
|
422
453
|
confidence: z.ZodNumber;
|
|
@@ -445,30 +476,6 @@ declare const ReportSpecResultSchema: z.ZodObject<{
|
|
|
445
476
|
ref: z.ZodString;
|
|
446
477
|
sha: z.ZodString;
|
|
447
478
|
}, z.core.$strip>>>;
|
|
448
|
-
driftAudit: z.ZodNullable<z.ZodObject<{
|
|
449
|
-
label: z.ZodEnum<{
|
|
450
|
-
TEST_DRIFT: "TEST_DRIFT";
|
|
451
|
-
SPEC_CHANGE: "SPEC_CHANGE";
|
|
452
|
-
UNKNOWN: "UNKNOWN";
|
|
453
|
-
}>;
|
|
454
|
-
confidence: z.ZodNumber;
|
|
455
|
-
surface: z.ZodDefault<z.ZodEnum<{
|
|
456
|
-
spec: "spec";
|
|
457
|
-
generated: "generated";
|
|
458
|
-
}>>;
|
|
459
|
-
subDiagnosis: z.ZodDefault<z.ZodEnum<{
|
|
460
|
-
OVER_ASSERTION: "OVER_ASSERTION";
|
|
461
|
-
SELECTOR_DRIFT: "SELECTOR_DRIFT";
|
|
462
|
-
NONE: "NONE";
|
|
463
|
-
}>>;
|
|
464
|
-
headline: z.ZodString;
|
|
465
|
-
recommendation: z.ZodDefault<z.ZodString>;
|
|
466
|
-
evidence: z.ZodArray<z.ZodObject<{
|
|
467
|
-
file: z.ZodOptional<z.ZodString>;
|
|
468
|
-
detail: z.ZodString;
|
|
469
|
-
}, z.core.$strip>>;
|
|
470
|
-
reasoning: z.ZodDefault<z.ZodString>;
|
|
471
|
-
}, z.core.$strip>>;
|
|
472
479
|
failureLogExcerpt: z.ZodNullable<z.ZodString>;
|
|
473
480
|
diffExcerpt: z.ZodNullable<z.ZodString>;
|
|
474
481
|
specYaml: z.ZodNullable<z.ZodString>;
|
|
@@ -603,6 +610,7 @@ declare const RunReportDataSchema: z.ZodObject<{
|
|
|
603
610
|
TEST_DRIFT: "TEST_DRIFT";
|
|
604
611
|
SPEC_CHANGE: "SPEC_CHANGE";
|
|
605
612
|
PRODUCT_BUG: "PRODUCT_BUG";
|
|
613
|
+
ENVIRONMENT: "ENVIRONMENT";
|
|
606
614
|
UNKNOWN: "UNKNOWN";
|
|
607
615
|
}>;
|
|
608
616
|
confidence: z.ZodNumber;
|
|
@@ -631,30 +639,6 @@ declare const RunReportDataSchema: z.ZodObject<{
|
|
|
631
639
|
ref: z.ZodString;
|
|
632
640
|
sha: z.ZodString;
|
|
633
641
|
}, z.core.$strip>>>;
|
|
634
|
-
driftAudit: z.ZodNullable<z.ZodObject<{
|
|
635
|
-
label: z.ZodEnum<{
|
|
636
|
-
TEST_DRIFT: "TEST_DRIFT";
|
|
637
|
-
SPEC_CHANGE: "SPEC_CHANGE";
|
|
638
|
-
UNKNOWN: "UNKNOWN";
|
|
639
|
-
}>;
|
|
640
|
-
confidence: z.ZodNumber;
|
|
641
|
-
surface: z.ZodDefault<z.ZodEnum<{
|
|
642
|
-
spec: "spec";
|
|
643
|
-
generated: "generated";
|
|
644
|
-
}>>;
|
|
645
|
-
subDiagnosis: z.ZodDefault<z.ZodEnum<{
|
|
646
|
-
OVER_ASSERTION: "OVER_ASSERTION";
|
|
647
|
-
SELECTOR_DRIFT: "SELECTOR_DRIFT";
|
|
648
|
-
NONE: "NONE";
|
|
649
|
-
}>>;
|
|
650
|
-
headline: z.ZodString;
|
|
651
|
-
recommendation: z.ZodDefault<z.ZodString>;
|
|
652
|
-
evidence: z.ZodArray<z.ZodObject<{
|
|
653
|
-
file: z.ZodOptional<z.ZodString>;
|
|
654
|
-
detail: z.ZodString;
|
|
655
|
-
}, z.core.$strip>>;
|
|
656
|
-
reasoning: z.ZodDefault<z.ZodString>;
|
|
657
|
-
}, z.core.$strip>>;
|
|
658
642
|
failureLogExcerpt: z.ZodNullable<z.ZodString>;
|
|
659
643
|
diffExcerpt: z.ZodNullable<z.ZodString>;
|
|
660
644
|
specYaml: z.ZodNullable<z.ZodString>;
|
|
@@ -742,12 +726,15 @@ declare const LabelsExportSchema: z.ZodObject<{
|
|
|
742
726
|
TEST_DRIFT: "TEST_DRIFT";
|
|
743
727
|
SPEC_CHANGE: "SPEC_CHANGE";
|
|
744
728
|
PRODUCT_BUG: "PRODUCT_BUG";
|
|
729
|
+
ENVIRONMENT: "ENVIRONMENT";
|
|
745
730
|
UNKNOWN: "UNKNOWN";
|
|
746
731
|
}>;
|
|
747
732
|
label: z.ZodEnum<{
|
|
748
733
|
TEST_DRIFT: "TEST_DRIFT";
|
|
749
734
|
SPEC_CHANGE: "SPEC_CHANGE";
|
|
750
735
|
PRODUCT_BUG: "PRODUCT_BUG";
|
|
736
|
+
ENVIRONMENT: "ENVIRONMENT";
|
|
737
|
+
NO_DRIFT: "NO_DRIFT";
|
|
751
738
|
}>;
|
|
752
739
|
note: z.ZodOptional<z.ZodString>;
|
|
753
740
|
}, z.core.$strip>>;
|
|
@@ -873,9 +860,7 @@ interface HubClient {
|
|
|
873
860
|
feature: string;
|
|
874
861
|
spec: string;
|
|
875
862
|
}): Promise<void>;
|
|
876
|
-
importActualCauses(id: string, labels: LabelsExport): Promise<
|
|
877
|
-
imported: number;
|
|
878
|
-
}>;
|
|
863
|
+
importActualCauses(id: string, labels: LabelsExport): Promise<ImportActualCausesResponse>;
|
|
879
864
|
/** Every project the hub knows (from runs and stored secrets). */
|
|
880
865
|
listProjects(): Promise<string[]>;
|
|
881
866
|
/**
|
package/dist/package.json
CHANGED