ccqa 1.57.3 → 1.58.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/ccqa.mjs +21 -14
- package/dist/hub-client/index.d.cts +2 -2
- package/dist/hub-client/index.d.mts +2 -2
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/bin/ccqa.mjs
CHANGED
|
@@ -17910,8 +17910,9 @@ const AttestationSchema = z.object({
|
|
|
17910
17910
|
const AttestationsSchema = z.object({ specs: z.record(z.string(), AttestationSchema).default({}) });
|
|
17911
17911
|
/**
|
|
17912
17912
|
* Why an attestation stopped covering the spec. One reason is named even when
|
|
17913
|
-
* several hold, in the order the checks run (
|
|
17914
|
-
*
|
|
17913
|
+
* several hold, in the order the checks run (a later red that is still the
|
|
17914
|
+
* latest run, then coverage, then the spec's own edits, then a later red since
|
|
17915
|
+
* replaced by a green) — enough for a reader to see what to verify
|
|
17915
17916
|
* before attesting again.
|
|
17916
17917
|
*/
|
|
17917
17918
|
const AttestationLapseSchema = z.enum([
|
|
@@ -31915,7 +31916,7 @@ function computeRerun(input) {
|
|
|
31915
31916
|
const runMoved = specMovedSince(spec.changedAt, coords.lastRun?.deployedSha ?? null, coords.lastRun?.at ?? "", deployTimes);
|
|
31916
31917
|
if (auditMoved && audit.audit !== "due") audit = { audit: "due" };
|
|
31917
31918
|
if (runMoved && execution.execution === "passed") execution = { execution: "stale" };
|
|
31918
|
-
const manualState = readAttestation(attestations.specs[spec.key], spec, coords
|
|
31919
|
+
const manualState = readAttestation(attestations.specs[spec.key], spec, coords, range, log, deployTimes);
|
|
31919
31920
|
const lapsedOverRed = manualState?.kind === "lapsed" && manualState.because !== "newerRed";
|
|
31920
31921
|
if (execution.execution === "failed" && lapsedOverRed) execution = { execution: "stale" };
|
|
31921
31922
|
const held = heldBy(locks, spec.key, now);
|
|
@@ -31946,18 +31947,24 @@ function computeRerun(input) {
|
|
|
31946
31947
|
return out;
|
|
31947
31948
|
}
|
|
31948
31949
|
/**
|
|
31949
|
-
* Does the attestation still speak for what is deployed?
|
|
31950
|
-
* the
|
|
31951
|
-
*
|
|
31952
|
-
*
|
|
31953
|
-
*
|
|
31954
|
-
*
|
|
31955
|
-
*
|
|
31956
|
-
*
|
|
31957
|
-
* stays true.
|
|
31950
|
+
* Does the attestation still speak for what is deployed? A red run recorded
|
|
31951
|
+
* after the person looked and still the latest run is checked first, since it
|
|
31952
|
+
* alone keeps the spec parked (see the caller). Then deploy coverage (a sha the
|
|
31953
|
+
* log cannot place reads as reached, ADR-0014, with the hole kept as an
|
|
31954
|
+
* annotation), then the spec's own edits — compared against when the person
|
|
31955
|
+
* looked, because they read the spec as it stood that moment, which
|
|
31956
|
+
* `specMovedSince` covers via a null baseline sha — then a later red a green
|
|
31957
|
+
* run has since replaced. The null-sha case is the profile that had no deploy
|
|
31958
|
+
* log when they checked: their word covers exactly as long as that stays true.
|
|
31958
31959
|
*/
|
|
31959
|
-
function readAttestation(attest, spec, lastRed, range, log, deployTimes) {
|
|
31960
|
+
function readAttestation(attest, spec, { lastRun, lastRed }, range, log, deployTimes) {
|
|
31960
31961
|
if (!attest) return null;
|
|
31962
|
+
const newerRed = lastRed !== null && lastRed.at > attest.at;
|
|
31963
|
+
if (newerRed && lastRed.runId === lastRun?.runId) return {
|
|
31964
|
+
kind: "lapsed",
|
|
31965
|
+
attest,
|
|
31966
|
+
because: "newerRed"
|
|
31967
|
+
};
|
|
31961
31968
|
const coverage = attest.deployedSha === null ? log.entries.length === 0 ? { kind: "current" } : {
|
|
31962
31969
|
kind: "unanswerable",
|
|
31963
31970
|
reason: "unknownDeployedSha"
|
|
@@ -31979,7 +31986,7 @@ function readAttestation(attest, spec, lastRed, range, log, deployTimes) {
|
|
|
31979
31986
|
attest,
|
|
31980
31987
|
because: "specEdited"
|
|
31981
31988
|
};
|
|
31982
|
-
if (
|
|
31989
|
+
if (newerRed) return {
|
|
31983
31990
|
kind: "lapsed",
|
|
31984
31991
|
attest,
|
|
31985
31992
|
because: "newerRed"
|
|
@@ -35,9 +35,9 @@ declare const RunSchema: z.ZodObject<{
|
|
|
35
35
|
running: "running";
|
|
36
36
|
}>;
|
|
37
37
|
kind: z.ZodDefault<z.ZodEnum<{
|
|
38
|
-
record: "record";
|
|
39
38
|
run: "run";
|
|
40
39
|
drift: "drift";
|
|
40
|
+
record: "record";
|
|
41
41
|
}>>;
|
|
42
42
|
drift: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
43
43
|
specs: z.ZodNumber;
|
|
@@ -831,9 +831,9 @@ type ReportSpecResult = z.infer<typeof ReportSpecResultSchema>;
|
|
|
831
831
|
declare const RunReportDataSchema: z.ZodObject<{
|
|
832
832
|
schemaVersion: z.ZodLiteral<1>;
|
|
833
833
|
kind: z.ZodDefault<z.ZodEnum<{
|
|
834
|
-
record: "record";
|
|
835
834
|
run: "run";
|
|
836
835
|
drift: "drift";
|
|
836
|
+
record: "record";
|
|
837
837
|
}>>;
|
|
838
838
|
createdAt: z.ZodString;
|
|
839
839
|
runId: z.ZodNullable<z.ZodString>;
|
|
@@ -35,9 +35,9 @@ declare const RunSchema: z.ZodObject<{
|
|
|
35
35
|
running: "running";
|
|
36
36
|
}>;
|
|
37
37
|
kind: z.ZodDefault<z.ZodEnum<{
|
|
38
|
-
record: "record";
|
|
39
38
|
run: "run";
|
|
40
39
|
drift: "drift";
|
|
40
|
+
record: "record";
|
|
41
41
|
}>>;
|
|
42
42
|
drift: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
43
43
|
specs: z.ZodNumber;
|
|
@@ -831,9 +831,9 @@ type ReportSpecResult = z.infer<typeof ReportSpecResultSchema>;
|
|
|
831
831
|
declare const RunReportDataSchema: z.ZodObject<{
|
|
832
832
|
schemaVersion: z.ZodLiteral<1>;
|
|
833
833
|
kind: z.ZodDefault<z.ZodEnum<{
|
|
834
|
-
record: "record";
|
|
835
834
|
run: "run";
|
|
836
835
|
drift: "drift";
|
|
836
|
+
record: "record";
|
|
837
837
|
}>>;
|
|
838
838
|
createdAt: z.ZodString;
|
|
839
839
|
runId: z.ZodNullable<z.ZodString>;
|
package/dist/package.json
CHANGED