devcontour-harness 0.1.0-alpha.42 → 0.1.0-alpha.45
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 +25 -2
- package/docs/architecture.md +38 -3
- package/docs/contracts.md +117 -3
- package/docs/release-notes/0.1.0-alpha.43.md +40 -0
- package/docs/release-notes/0.1.0-alpha.44.md +44 -0
- package/docs/release-notes/0.1.0-alpha.45.md +77 -0
- package/docs/upgrade.md +107 -17
- package/lib/contracts/cli.d.ts +115 -4
- package/lib/contracts/cli.js +6 -1
- package/lib/contracts/events.d.ts +65 -5
- package/lib/contracts/events.js +18 -1
- package/lib/contracts/execution.d.ts +76 -0
- package/lib/contracts/execution.js +35 -2
- package/lib/contracts/policy.d.ts +39 -0
- package/lib/contracts/policy.js +64 -0
- package/lib/contracts/profiles.d.ts +6 -0
- package/lib/contracts/published.d.ts +97 -2
- package/lib/contracts/report.d.ts +8 -0
- package/lib/contracts/report.js +7 -1
- package/lib/contracts/result.d.ts +93 -0
- package/lib/contracts/result.js +37 -1
- package/lib/contracts/review.d.ts +1 -1
- package/lib/control/harness.d.ts +29 -2
- package/lib/engine/engine.d.ts +54 -6
- package/lib/engine/engine.js +191 -24
- package/lib/engine/joint-runner.d.ts +2 -0
- package/lib/engine/joint-runner.js +13 -3
- package/lib/engine/result.js +7 -3
- package/lib/engine/runner.d.ts +8 -0
- package/lib/engine/runner.js +91 -3
- package/lib/environment/git-trust.js +3 -0
- package/lib/environment/isolation.d.ts +1 -1
- package/lib/environment/isolation.js +38 -4
- package/lib/environment/process.d.ts +2 -0
- package/lib/environment/process.js +7 -1
- package/lib/explain/state.js +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/integrations/connector/history.js +1 -1
- package/lib/integrations/connector/summary.js +2 -1
- package/lib/profiles/resolve.d.ts +6 -0
- package/lib/projections/attempt.d.ts +4 -2
- package/lib/projections/attempt.js +14 -1
- package/lib/report/compute.js +7 -3
- package/lib/report/document.js +1 -1
- package/lib/storage/document.d.ts +28 -2
- package/lib/testing/store-contract.d.ts +8 -2
- package/lib/testing/store-contract.js +56 -1
- package/lib/verification/acceptance.d.ts +12 -0
- package/lib/verification/acceptance.js +62 -7
- package/lib/verification/applicability.d.ts +134 -0
- package/lib/verification/applicability.js +373 -0
- package/lib/verification/gates.d.ts +6 -0
- package/lib/verification/joint.d.ts +179 -1
- package/lib/verification/joint.js +23 -3
- package/lib/verification/proof.d.ts +18 -4
- package/lib/verification/proof.js +52 -9
- package/package.json +1 -1
- package/schemas/execution-document.schema.json +77 -1
- package/schemas/execution-policy.schema.json +38 -0
- package/schemas/joint-verification.schema.json +4 -0
- package/schemas/result-envelope.schema.json +138 -2
- package/schemas/run-event.schema.json +100 -0
- package/schemas/run-result.schema.json +138 -2
- package/schemas/value-report.schema.json +20 -0
|
@@ -16,7 +16,184 @@ export declare function jointPolicyDigest(policy: ExecutionPolicy): string;
|
|
|
16
16
|
export declare function jointSpecDigest(view: ExecutionView, workIds: string[]): string;
|
|
17
17
|
/** Один и тот же набор поручений — один предмет проверки, независимо от порядка. */
|
|
18
18
|
export declare const sameWorks: (a: string[], b: string[]) => boolean;
|
|
19
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* Проверка, прерванная до результата gates (остановка хоста, потеря
|
|
21
|
+
* владения): без evidence она не говорит ничего о комбинации и предел не тратит.
|
|
22
|
+
*/
|
|
23
|
+
export declare const jointInterrupted: (v: JointVerificationState) => boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Окно бюджета набора: проверки, не закрытые принятием хоста и не снятые
|
|
26
|
+
* явным сбросом (`joint-budget-resets`). Checkpoints доверенного хоста
|
|
27
|
+
* проверяются целиком.
|
|
28
|
+
*/
|
|
29
|
+
export declare function jointBudgetWindow(view: ExecutionView, workIds: string[], checkpoints: readonly JointBudgetCheckpoint[]): ({
|
|
30
|
+
status: "active";
|
|
31
|
+
apiVersion: "devcontour-harness/v1alpha1";
|
|
32
|
+
id: string;
|
|
33
|
+
startedAt: string;
|
|
34
|
+
policyDigest: string;
|
|
35
|
+
specDigest: string;
|
|
36
|
+
workIds: string[];
|
|
37
|
+
evidence: {
|
|
38
|
+
gate: string;
|
|
39
|
+
passed: boolean;
|
|
40
|
+
command: string[];
|
|
41
|
+
exitCode: number;
|
|
42
|
+
log: string;
|
|
43
|
+
digest: string;
|
|
44
|
+
summary: string;
|
|
45
|
+
artifacts: {
|
|
46
|
+
path: string;
|
|
47
|
+
digest: string;
|
|
48
|
+
}[];
|
|
49
|
+
artifactFiles?: {
|
|
50
|
+
dir: string;
|
|
51
|
+
files: {
|
|
52
|
+
path: string;
|
|
53
|
+
sha256: string;
|
|
54
|
+
bytes: number;
|
|
55
|
+
redacted?: true | undefined;
|
|
56
|
+
}[];
|
|
57
|
+
skipped: {
|
|
58
|
+
path: string;
|
|
59
|
+
reason: "missing" | "symlink" | "outside" | "not-regular" | "hardlink" | "secret" | "extension" | "file-limit" | "total-limit" | "count-limit" | "scan-limit" | "copy-failed";
|
|
60
|
+
detail?: string | undefined;
|
|
61
|
+
}[];
|
|
62
|
+
skippedMore?: number | undefined;
|
|
63
|
+
} | undefined;
|
|
64
|
+
durationMs?: number | undefined;
|
|
65
|
+
}[];
|
|
66
|
+
token: string;
|
|
67
|
+
leaseUntil: number;
|
|
68
|
+
manifest?: Record<string, {
|
|
69
|
+
sha: string;
|
|
70
|
+
tree: string;
|
|
71
|
+
}> | undefined;
|
|
72
|
+
manifestDigest?: string | undefined;
|
|
73
|
+
impact?: {
|
|
74
|
+
changed: string[];
|
|
75
|
+
affected: string[];
|
|
76
|
+
gateIds: string[];
|
|
77
|
+
mode: "affected" | "all";
|
|
78
|
+
reason: string;
|
|
79
|
+
baseline?: string | undefined;
|
|
80
|
+
} | undefined;
|
|
81
|
+
engineVersion?: string | undefined;
|
|
82
|
+
} | {
|
|
83
|
+
status: "failed";
|
|
84
|
+
finishedAt: string;
|
|
85
|
+
error: string;
|
|
86
|
+
apiVersion: "devcontour-harness/v1alpha1";
|
|
87
|
+
id: string;
|
|
88
|
+
startedAt: string;
|
|
89
|
+
policyDigest: string;
|
|
90
|
+
specDigest: string;
|
|
91
|
+
workIds: string[];
|
|
92
|
+
evidence: {
|
|
93
|
+
gate: string;
|
|
94
|
+
passed: boolean;
|
|
95
|
+
command: string[];
|
|
96
|
+
exitCode: number;
|
|
97
|
+
log: string;
|
|
98
|
+
digest: string;
|
|
99
|
+
summary: string;
|
|
100
|
+
artifacts: {
|
|
101
|
+
path: string;
|
|
102
|
+
digest: string;
|
|
103
|
+
}[];
|
|
104
|
+
artifactFiles?: {
|
|
105
|
+
dir: string;
|
|
106
|
+
files: {
|
|
107
|
+
path: string;
|
|
108
|
+
sha256: string;
|
|
109
|
+
bytes: number;
|
|
110
|
+
redacted?: true | undefined;
|
|
111
|
+
}[];
|
|
112
|
+
skipped: {
|
|
113
|
+
path: string;
|
|
114
|
+
reason: "missing" | "symlink" | "outside" | "not-regular" | "hardlink" | "secret" | "extension" | "file-limit" | "total-limit" | "count-limit" | "scan-limit" | "copy-failed";
|
|
115
|
+
detail?: string | undefined;
|
|
116
|
+
}[];
|
|
117
|
+
skippedMore?: number | undefined;
|
|
118
|
+
} | undefined;
|
|
119
|
+
durationMs?: number | undefined;
|
|
120
|
+
}[];
|
|
121
|
+
token: string;
|
|
122
|
+
leaseUntil: number;
|
|
123
|
+
manifest?: Record<string, {
|
|
124
|
+
sha: string;
|
|
125
|
+
tree: string;
|
|
126
|
+
}> | undefined;
|
|
127
|
+
manifestDigest?: string | undefined;
|
|
128
|
+
interrupted?: true | undefined;
|
|
129
|
+
impact?: {
|
|
130
|
+
changed: string[];
|
|
131
|
+
affected: string[];
|
|
132
|
+
gateIds: string[];
|
|
133
|
+
mode: "affected" | "all";
|
|
134
|
+
reason: string;
|
|
135
|
+
baseline?: string | undefined;
|
|
136
|
+
} | undefined;
|
|
137
|
+
engineVersion?: string | undefined;
|
|
138
|
+
} | {
|
|
139
|
+
status: "passed";
|
|
140
|
+
finishedAt: string;
|
|
141
|
+
manifest: Record<string, {
|
|
142
|
+
sha: string;
|
|
143
|
+
tree: string;
|
|
144
|
+
}>;
|
|
145
|
+
manifestDigest: string;
|
|
146
|
+
apiVersion: "devcontour-harness/v1alpha1";
|
|
147
|
+
id: string;
|
|
148
|
+
startedAt: string;
|
|
149
|
+
policyDigest: string;
|
|
150
|
+
specDigest: string;
|
|
151
|
+
workIds: string[];
|
|
152
|
+
evidence: {
|
|
153
|
+
gate: string;
|
|
154
|
+
passed: boolean;
|
|
155
|
+
command: string[];
|
|
156
|
+
exitCode: number;
|
|
157
|
+
log: string;
|
|
158
|
+
digest: string;
|
|
159
|
+
summary: string;
|
|
160
|
+
artifacts: {
|
|
161
|
+
path: string;
|
|
162
|
+
digest: string;
|
|
163
|
+
}[];
|
|
164
|
+
artifactFiles?: {
|
|
165
|
+
dir: string;
|
|
166
|
+
files: {
|
|
167
|
+
path: string;
|
|
168
|
+
sha256: string;
|
|
169
|
+
bytes: number;
|
|
170
|
+
redacted?: true | undefined;
|
|
171
|
+
}[];
|
|
172
|
+
skipped: {
|
|
173
|
+
path: string;
|
|
174
|
+
reason: "missing" | "symlink" | "outside" | "not-regular" | "hardlink" | "secret" | "extension" | "file-limit" | "total-limit" | "count-limit" | "scan-limit" | "copy-failed";
|
|
175
|
+
detail?: string | undefined;
|
|
176
|
+
}[];
|
|
177
|
+
skippedMore?: number | undefined;
|
|
178
|
+
} | undefined;
|
|
179
|
+
durationMs?: number | undefined;
|
|
180
|
+
}[];
|
|
181
|
+
token: string;
|
|
182
|
+
leaseUntil: number;
|
|
183
|
+
impact?: {
|
|
184
|
+
changed: string[];
|
|
185
|
+
affected: string[];
|
|
186
|
+
gateIds: string[];
|
|
187
|
+
mode: "affected" | "all";
|
|
188
|
+
reason: string;
|
|
189
|
+
baseline?: string | undefined;
|
|
190
|
+
} | undefined;
|
|
191
|
+
engineVersion?: string | undefined;
|
|
192
|
+
})[];
|
|
193
|
+
/**
|
|
194
|
+
* Проверки набора, тратящие его предел: окно бюджета без прерванных до
|
|
195
|
+
* результата gates. Прерванная после evidence и отказ gate тратят.
|
|
196
|
+
*/
|
|
20
197
|
export declare function jointBudgetAttempts(view: ExecutionView, workIds: string[], checkpoints: readonly JointBudgetCheckpoint[]): ({
|
|
21
198
|
status: "active";
|
|
22
199
|
apiVersion: "devcontour-harness/v1alpha1";
|
|
@@ -116,6 +293,7 @@ export declare function jointBudgetAttempts(view: ExecutionView, workIds: string
|
|
|
116
293
|
tree: string;
|
|
117
294
|
}> | undefined;
|
|
118
295
|
manifestDigest?: string | undefined;
|
|
296
|
+
interrupted?: true | undefined;
|
|
119
297
|
impact?: {
|
|
120
298
|
changed: string[];
|
|
121
299
|
affected: string[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { digestOf, HarnessError, } from "../contracts/index.js";
|
|
1
|
+
import { digestOf, HarnessError, WORKSPACE_OWNER, } from "../contracts/index.js";
|
|
2
2
|
/**
|
|
3
3
|
* Совместная проверка закреплённой комбинации SHA репозиториев.
|
|
4
4
|
*
|
|
@@ -38,8 +38,17 @@ export function jointSpecDigest(view, workIds) {
|
|
|
38
38
|
}
|
|
39
39
|
/** Один и тот же набор поручений — один предмет проверки, независимо от порядка. */
|
|
40
40
|
export const sameWorks = (a, b) => JSON.stringify([...a].sort()) === JSON.stringify([...b].sort());
|
|
41
|
-
/**
|
|
42
|
-
|
|
41
|
+
/**
|
|
42
|
+
* Проверка, прерванная до результата gates (остановка хоста, потеря
|
|
43
|
+
* владения): без evidence она не говорит ничего о комбинации и предел не тратит.
|
|
44
|
+
*/
|
|
45
|
+
export const jointInterrupted = (v) => v.status === 'failed' && v.interrupted === true && v.evidence.length === 0;
|
|
46
|
+
/**
|
|
47
|
+
* Окно бюджета набора: проверки, не закрытые принятием хоста и не снятые
|
|
48
|
+
* явным сбросом (`joint-budget-resets`). Checkpoints доверенного хоста
|
|
49
|
+
* проверяются целиком.
|
|
50
|
+
*/
|
|
51
|
+
export function jointBudgetWindow(view, workIds, checkpoints) {
|
|
43
52
|
const invalid = () => {
|
|
44
53
|
throw new HarnessError('INVALID_INPUT', 'Невалидная принятая граница бюджета совместных проверок');
|
|
45
54
|
};
|
|
@@ -73,8 +82,19 @@ export function jointBudgetAttempts(view, workIds, checkpoints) {
|
|
|
73
82
|
settled.add(id);
|
|
74
83
|
}
|
|
75
84
|
}
|
|
85
|
+
for (const { value } of view.locals('joint-budget-resets', WORKSPACE_OWNER))
|
|
86
|
+
if (sameWorks(value.workIds, workIds))
|
|
87
|
+
for (const id of value.settledVerificationIds)
|
|
88
|
+
settled.add(id);
|
|
76
89
|
return view.verifications().filter((v) => sameWorks(v.workIds, workIds) && !settled.has(v.id));
|
|
77
90
|
}
|
|
91
|
+
/**
|
|
92
|
+
* Проверки набора, тратящие его предел: окно бюджета без прерванных до
|
|
93
|
+
* результата gates. Прерванная после evidence и отказ gate тратят.
|
|
94
|
+
*/
|
|
95
|
+
export function jointBudgetAttempts(view, workIds, checkpoints) {
|
|
96
|
+
return jointBudgetWindow(view, workIds, checkpoints).filter((v) => !jointInterrupted(v));
|
|
97
|
+
}
|
|
78
98
|
/** Gates совместной проверки в порядке их зависимостей. */
|
|
79
99
|
export function orderedWorkspaceGates(gates) {
|
|
80
100
|
const byId = new Map(gates.map((g) => [g.id, g]));
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type EvidenceRecord, type GateApplicability, type GatePolicy, type WorkOrder } from '../contracts/index.ts';
|
|
2
|
+
import { type ChangedPaths } from './applicability.ts';
|
|
2
3
|
type Requirement = WorkOrder['requirements'][number];
|
|
3
4
|
/**
|
|
4
5
|
* Что нужно доказательству от записи evidence: сама запись controller или её
|
|
@@ -9,6 +10,7 @@ export type ProofRecord = Pick<EvidenceRecord, 'kind' | 'gate' | 'phase' | 'sha'
|
|
|
9
10
|
checks?: string | undefined;
|
|
10
11
|
tests?: EvidenceRecord['tests'];
|
|
11
12
|
testsTruncated?: boolean | undefined;
|
|
13
|
+
notApplicable?: GateApplicability | undefined;
|
|
12
14
|
};
|
|
13
15
|
/**
|
|
14
16
|
* Уровни доказательства критерия. `testcase` — названный тест выполнился на
|
|
@@ -37,17 +39,29 @@ export declare function unprovenReason(requirements: readonly Requirement[] | un
|
|
|
37
39
|
* одноимённый test gate не закрывает. Какие записи относятся к поручению
|
|
38
40
|
* (попытки под текущим основанием, переносимый результат другого clone), —
|
|
39
41
|
* решает вызывающий; правило покрытия — одно.
|
|
42
|
+
*
|
|
43
|
+
* Gate с `when.paths`, который хотя бы одно поручение признало неприменимым
|
|
44
|
+
* (`not-applicable` на integration), решается по объединённому diff набора
|
|
45
|
+
* (`changes[repositoryId]`: `changedPaths` от зелёного SHA каждой такой записи
|
|
46
|
+
* — `notApplicable.ranges[0].from` — до итогового SHA; полный, с одним концом,
|
|
47
|
+
* иначе считается отсутствующим): задетый diff (или без `changes`, или под другим
|
|
48
|
+
* определением gate) он непокрыт, даже если другое поручение его прошло, —
|
|
49
|
+
* хост исполняет его один раз на итоговом SHA; не задетый — неприменим к
|
|
50
|
+
* набору и не непокрыт.
|
|
40
51
|
*/
|
|
41
52
|
export declare function uncoveredGates(repositories: readonly {
|
|
42
53
|
id: string;
|
|
43
|
-
gates: readonly {
|
|
54
|
+
gates: readonly ({
|
|
44
55
|
id: string;
|
|
45
|
-
}[];
|
|
56
|
+
} | GatePolicy)[];
|
|
57
|
+
protectedPaths?: readonly string[];
|
|
46
58
|
}[], works: readonly {
|
|
47
59
|
repositoryId: string;
|
|
48
60
|
resultSha: string | undefined;
|
|
49
61
|
evidence: readonly ProofRecord[];
|
|
50
|
-
}[]
|
|
62
|
+
}[], changes?: Readonly<Record<string, ChangedPaths>>,
|
|
63
|
+
/** Итоговый SHA каждого репозитория: конец объединённого diff (`changes`). */
|
|
64
|
+
finalShas?: Readonly<Record<string, string>>): {
|
|
51
65
|
repositoryId: string;
|
|
52
66
|
gates: string[];
|
|
53
67
|
}[];
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { gateDigest, } from "../contracts/index.js";
|
|
2
|
+
import { pathApplicability } from "./applicability.js";
|
|
1
3
|
export function requirementProof(link, evidence, resultSha, effective) {
|
|
2
4
|
const base = { id: link.id, ...(link.testId ? { testId: link.testId } : {}) };
|
|
3
5
|
if (!resultSha)
|
|
@@ -73,22 +75,63 @@ export function unprovenReason(requirements, evidence, resultSha, effective) {
|
|
|
73
75
|
* одноимённый test gate не закрывает. Какие записи относятся к поручению
|
|
74
76
|
* (попытки под текущим основанием, переносимый результат другого clone), —
|
|
75
77
|
* решает вызывающий; правило покрытия — одно.
|
|
78
|
+
*
|
|
79
|
+
* Gate с `when.paths`, который хотя бы одно поручение признало неприменимым
|
|
80
|
+
* (`not-applicable` на integration), решается по объединённому diff набора
|
|
81
|
+
* (`changes[repositoryId]`: `changedPaths` от зелёного SHA каждой такой записи
|
|
82
|
+
* — `notApplicable.ranges[0].from` — до итогового SHA; полный, с одним концом,
|
|
83
|
+
* иначе считается отсутствующим): задетый diff (или без `changes`, или под другим
|
|
84
|
+
* определением gate) он непокрыт, даже если другое поручение его прошло, —
|
|
85
|
+
* хост исполняет его один раз на итоговом SHA; не задетый — неприменим к
|
|
86
|
+
* набору и не непокрыт.
|
|
76
87
|
*/
|
|
77
|
-
export function uncoveredGates(repositories, works
|
|
88
|
+
export function uncoveredGates(repositories, works, changes,
|
|
89
|
+
/** Итоговый SHA каждого репозитория: конец объединённого diff (`changes`). */
|
|
90
|
+
finalShas) {
|
|
78
91
|
const result = [];
|
|
79
92
|
for (const repositoryId of [...new Set(works.map((w) => w.repositoryId))]) {
|
|
80
|
-
const
|
|
93
|
+
const own = works
|
|
81
94
|
.filter((w) => w.repositoryId === repositoryId)
|
|
82
|
-
.flatMap((w) => w.evidence
|
|
83
|
-
.filter((e) => e.kind === 'test' &&
|
|
84
|
-
e.phase === 'integration' &&
|
|
85
|
-
e.passed &&
|
|
95
|
+
.flatMap((w) => w.evidence.filter((e) => e.phase === 'integration' &&
|
|
86
96
|
!e.consumer &&
|
|
87
97
|
w.resultSha !== undefined &&
|
|
88
|
-
e.sha === w.resultSha)
|
|
89
|
-
|
|
98
|
+
e.sha === w.resultSha));
|
|
99
|
+
const covered = new Set(own.filter((e) => e.kind === 'test' && e.passed).map((e) => e.gate));
|
|
100
|
+
const skips = own.filter((e) => e.kind === 'not-applicable');
|
|
90
101
|
const repository = repositories.find((r) => r.id === repositoryId);
|
|
91
|
-
const missing =
|
|
102
|
+
const missing = [];
|
|
103
|
+
for (const gate of repository?.gates ?? []) {
|
|
104
|
+
const skipped = skips.filter((e) => e.gate === gate.id);
|
|
105
|
+
if (!skipped.length || !('when' in gate) || !gate.when) {
|
|
106
|
+
if (!covered.has(gate.id))
|
|
107
|
+
missing.push(gate.id);
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
110
|
+
// Объединённый diff засчитывается, только если он полон, у всех пар
|
|
111
|
+
// один конец — переданный итоговый SHA (`finalShas`) — и он начинается от зелёного SHA (`ranges[0].from`
|
|
112
|
+
// записи неприменимости) каждого поручения, где gate не исполнялся.
|
|
113
|
+
// Иначе diff хоста не доказывает покрытия и считается отсутствующим.
|
|
114
|
+
const given = changes?.[repositoryId];
|
|
115
|
+
const ends = new Set(given?.ranges.map((r) => r.to));
|
|
116
|
+
const starts = new Set(given?.ranges.map((r) => r.from));
|
|
117
|
+
const changed = given?.complete &&
|
|
118
|
+
ends.size === 1 &&
|
|
119
|
+
finalShas?.[repositoryId] !== undefined &&
|
|
120
|
+
ends.has(finalShas[repositoryId]) &&
|
|
121
|
+
skipped.every((e) => {
|
|
122
|
+
const from = e.notApplicable?.ranges[0]?.from;
|
|
123
|
+
return from !== undefined && starts.has(from);
|
|
124
|
+
})
|
|
125
|
+
? given
|
|
126
|
+
: undefined;
|
|
127
|
+
const same = skipped.every((e) => e.notApplicable?.gateDigest === gateDigest(gate));
|
|
128
|
+
const applies = !changed ||
|
|
129
|
+
!same ||
|
|
130
|
+
pathApplicability({ protectedPaths: repository?.protectedPaths ?? [] }, gate, changed)
|
|
131
|
+
.applies;
|
|
132
|
+
if (applies)
|
|
133
|
+
missing.push(gate.id);
|
|
134
|
+
}
|
|
92
135
|
if (missing.length)
|
|
93
136
|
result.push({ repositoryId, gates: missing });
|
|
94
137
|
}
|
package/package.json
CHANGED
|
@@ -2403,7 +2403,8 @@
|
|
|
2403
2403
|
"type": "string",
|
|
2404
2404
|
"enum": [
|
|
2405
2405
|
"test",
|
|
2406
|
-
"review"
|
|
2406
|
+
"review",
|
|
2407
|
+
"not-applicable"
|
|
2407
2408
|
]
|
|
2408
2409
|
},
|
|
2409
2410
|
"phase": {
|
|
@@ -3316,6 +3317,77 @@
|
|
|
3316
3317
|
"type": "string",
|
|
3317
3318
|
"pattern": "^[a-f0-9]{64}$"
|
|
3318
3319
|
},
|
|
3320
|
+
"gateBasis": {
|
|
3321
|
+
"type": "string",
|
|
3322
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
3323
|
+
},
|
|
3324
|
+
"notApplicable": {
|
|
3325
|
+
"type": "object",
|
|
3326
|
+
"properties": {
|
|
3327
|
+
"gateDigest": {
|
|
3328
|
+
"type": "string",
|
|
3329
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
3330
|
+
},
|
|
3331
|
+
"patterns": {
|
|
3332
|
+
"maxItems": 64,
|
|
3333
|
+
"type": "array",
|
|
3334
|
+
"items": {
|
|
3335
|
+
"type": "string",
|
|
3336
|
+
"minLength": 1,
|
|
3337
|
+
"maxLength": 200
|
|
3338
|
+
}
|
|
3339
|
+
},
|
|
3340
|
+
"ranges": {
|
|
3341
|
+
"maxItems": 4,
|
|
3342
|
+
"type": "array",
|
|
3343
|
+
"items": {
|
|
3344
|
+
"type": "object",
|
|
3345
|
+
"properties": {
|
|
3346
|
+
"from": {
|
|
3347
|
+
"type": "string",
|
|
3348
|
+
"pattern": "^[a-f0-9]{40}([a-f0-9]{24})?$"
|
|
3349
|
+
},
|
|
3350
|
+
"to": {
|
|
3351
|
+
"type": "string",
|
|
3352
|
+
"pattern": "^[a-f0-9]{40}([a-f0-9]{24})?$"
|
|
3353
|
+
}
|
|
3354
|
+
},
|
|
3355
|
+
"required": [
|
|
3356
|
+
"from",
|
|
3357
|
+
"to"
|
|
3358
|
+
],
|
|
3359
|
+
"additionalProperties": false
|
|
3360
|
+
}
|
|
3361
|
+
},
|
|
3362
|
+
"count": {
|
|
3363
|
+
"type": "integer",
|
|
3364
|
+
"minimum": 0,
|
|
3365
|
+
"maximum": 5000
|
|
3366
|
+
},
|
|
3367
|
+
"files": {
|
|
3368
|
+
"maxItems": 50,
|
|
3369
|
+
"type": "array",
|
|
3370
|
+
"items": {
|
|
3371
|
+
"type": "string",
|
|
3372
|
+
"minLength": 1,
|
|
3373
|
+
"maxLength": 1000
|
|
3374
|
+
}
|
|
3375
|
+
},
|
|
3376
|
+
"pathsDigest": {
|
|
3377
|
+
"type": "string",
|
|
3378
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
3379
|
+
}
|
|
3380
|
+
},
|
|
3381
|
+
"required": [
|
|
3382
|
+
"gateDigest",
|
|
3383
|
+
"patterns",
|
|
3384
|
+
"ranges",
|
|
3385
|
+
"count",
|
|
3386
|
+
"files",
|
|
3387
|
+
"pathsDigest"
|
|
3388
|
+
],
|
|
3389
|
+
"additionalProperties": false
|
|
3390
|
+
},
|
|
3319
3391
|
"alreadySatisfied": {
|
|
3320
3392
|
"type": "object",
|
|
3321
3393
|
"properties": {
|
|
@@ -4040,6 +4112,10 @@
|
|
|
4040
4112
|
"type": "string",
|
|
4041
4113
|
"minLength": 1
|
|
4042
4114
|
},
|
|
4115
|
+
"interrupted": {
|
|
4116
|
+
"type": "boolean",
|
|
4117
|
+
"const": true
|
|
4118
|
+
},
|
|
4043
4119
|
"token": {
|
|
4044
4120
|
"type": "string",
|
|
4045
4121
|
"minLength": 16,
|
|
@@ -379,6 +379,25 @@
|
|
|
379
379
|
"maxLength": 500,
|
|
380
380
|
"pattern": "^(?!\\/)(?!.*[\\\\:*?\\[\\]\\x00])(?!(?:.*\\/)?\\.{1,2}(?:\\/|$))(?=.{1,500}$).+$"
|
|
381
381
|
}
|
|
382
|
+
},
|
|
383
|
+
"when": {
|
|
384
|
+
"type": "object",
|
|
385
|
+
"properties": {
|
|
386
|
+
"paths": {
|
|
387
|
+
"minItems": 1,
|
|
388
|
+
"maxItems": 64,
|
|
389
|
+
"type": "array",
|
|
390
|
+
"items": {
|
|
391
|
+
"type": "string",
|
|
392
|
+
"minLength": 1,
|
|
393
|
+
"maxLength": 200
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
},
|
|
397
|
+
"required": [
|
|
398
|
+
"paths"
|
|
399
|
+
],
|
|
400
|
+
"additionalProperties": false
|
|
382
401
|
}
|
|
383
402
|
},
|
|
384
403
|
"required": [
|
|
@@ -475,6 +494,25 @@
|
|
|
475
494
|
"maxLength": 500,
|
|
476
495
|
"pattern": "^(?!\\/)(?!.*[\\\\:*?\\[\\]\\x00])(?!(?:.*\\/)?\\.{1,2}(?:\\/|$))(?=.{1,500}$).+$"
|
|
477
496
|
}
|
|
497
|
+
},
|
|
498
|
+
"when": {
|
|
499
|
+
"type": "object",
|
|
500
|
+
"properties": {
|
|
501
|
+
"paths": {
|
|
502
|
+
"minItems": 1,
|
|
503
|
+
"maxItems": 64,
|
|
504
|
+
"type": "array",
|
|
505
|
+
"items": {
|
|
506
|
+
"type": "string",
|
|
507
|
+
"minLength": 1,
|
|
508
|
+
"maxLength": 200
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
},
|
|
512
|
+
"required": [
|
|
513
|
+
"paths"
|
|
514
|
+
],
|
|
515
|
+
"additionalProperties": false
|
|
478
516
|
}
|
|
479
517
|
},
|
|
480
518
|
"required": [
|