@deksden-com/dd-flow-cli 0.4.0 → 0.4.2
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/CHANGELOG.md +22 -0
- package/README.md +25 -9
- package/dist/build-info.json +5 -5
- package/dist/cli/help.js +45 -29
- package/dist/cli/run-cli.js +229 -49
- package/dist/domain/entity-ids.js +4 -4
- package/dist/domain/flow-contract.js +502 -36
- package/dist/domain/validation.js +34 -0
- package/dist/protocol/local-files.js +8 -6
- package/dist/schemas/code-stage-report.schema.json +197 -2
- package/dist/schemas/flow-contract.schema.json +126 -0
- package/dist/schemas/flow-run-index-v3.schema.json +203 -0
- package/dist/schemas/flow-run-index.schema.json +22 -2
- package/dist/schemas/flow-run.schema.json +36 -0
- package/dist/schemas/merge-stage-report.schema.json +213 -2
- package/dist/schemas/plan-stage-report.schema.json +156 -2
- package/dist/schemas/release-impact.schema.json +16 -0
- package/dist/services/audit.js +3 -3
- package/dist/services/branch-context.js +17 -5
- package/dist/services/canon.js +0 -1
- package/dist/services/cleanup.js +6 -6
- package/dist/services/cli-operation-classifier.js +1 -1
- package/dist/services/compatibility-preflight.js +3 -75
- package/dist/services/dashboard.js +48 -11
- package/dist/services/engines.js +124 -13
- package/dist/services/hooks.js +6 -6
- package/dist/services/ids.js +40 -49
- package/dist/services/merge-queue.js +33 -26
- package/dist/services/merge-worker.js +2 -1
- package/dist/services/migrations.js +64 -0
- package/dist/services/plans.js +23 -16
- package/dist/services/projects.js +2 -2
- package/dist/services/prompts.js +322 -0
- package/dist/services/protocols.js +77 -46
- package/dist/services/run-projection.js +80 -0
- package/dist/services/runs.js +360 -22
- package/dist/services/schema-validation.js +35 -12
- package/dist/services/sessions.js +81 -3
- package/dist/services/status.js +32 -1
- package/dist/services/usage.js +233 -0
- package/dist/services/worktrees.js +24 -19
- package/dist/storage/database.js +223 -9
- package/package.json +1 -1
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "dd-flow/flow-run-index@3",
|
|
4
|
+
"title": "dd-flow run index v3",
|
|
5
|
+
"description": "Compact, privacy-safe navigation projection for one flow RUN.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": [
|
|
9
|
+
"schema_id",
|
|
10
|
+
"run_id",
|
|
11
|
+
"short_id",
|
|
12
|
+
"flow_kind",
|
|
13
|
+
"subject",
|
|
14
|
+
"project",
|
|
15
|
+
"workspace",
|
|
16
|
+
"stage_runs",
|
|
17
|
+
"sessions",
|
|
18
|
+
"artifacts",
|
|
19
|
+
"status",
|
|
20
|
+
"verdict",
|
|
21
|
+
"next_action",
|
|
22
|
+
"created_at",
|
|
23
|
+
"updated_at",
|
|
24
|
+
"started_at",
|
|
25
|
+
"timing_status",
|
|
26
|
+
"runtime_revision",
|
|
27
|
+
"snapshot_revision",
|
|
28
|
+
"snapshot_checksum",
|
|
29
|
+
"reconciliation_status",
|
|
30
|
+
"flow_flags"
|
|
31
|
+
],
|
|
32
|
+
"properties": {
|
|
33
|
+
"schema_id": { "const": "dd-flow/flow-run-index@3" },
|
|
34
|
+
"run_id": { "type": "string", "pattern": "^RUN-[0-9]{3}-[a-z0-9]+(?:-[a-z0-9]+)*$" },
|
|
35
|
+
"short_id": { "type": "string", "pattern": "^RUN-[0-9]{3}$" },
|
|
36
|
+
"flow_kind": { "type": "string", "minLength": 1 },
|
|
37
|
+
"subject": {
|
|
38
|
+
"type": "object",
|
|
39
|
+
"additionalProperties": false,
|
|
40
|
+
"required": ["type", "id"],
|
|
41
|
+
"properties": { "type": { "type": "string", "minLength": 1 }, "id": { "type": "string", "minLength": 1 } }
|
|
42
|
+
},
|
|
43
|
+
"project": {
|
|
44
|
+
"type": "object",
|
|
45
|
+
"additionalProperties": false,
|
|
46
|
+
"required": ["id", "root"],
|
|
47
|
+
"properties": { "id": { "type": "string", "minLength": 1 }, "root": { "type": "string", "minLength": 1 } }
|
|
48
|
+
},
|
|
49
|
+
"workspace": {
|
|
50
|
+
"type": "object",
|
|
51
|
+
"additionalProperties": false,
|
|
52
|
+
"required": ["root", "run_dir"],
|
|
53
|
+
"properties": { "root": { "type": "string", "minLength": 1 }, "run_dir": { "type": "string", "minLength": 1 } }
|
|
54
|
+
},
|
|
55
|
+
"run_home": {
|
|
56
|
+
"type": "object",
|
|
57
|
+
"additionalProperties": false,
|
|
58
|
+
"required": ["storage", "path"],
|
|
59
|
+
"properties": {
|
|
60
|
+
"storage": { "type": "string", "enum": ["dd_flow_home", "workspace_tasks_legacy", "project_projection"] },
|
|
61
|
+
"path": { "type": "string", "minLength": 1 },
|
|
62
|
+
"relative_path": { "type": "string", "minLength": 1 }
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"execution": {
|
|
66
|
+
"type": "object",
|
|
67
|
+
"additionalProperties": false,
|
|
68
|
+
"required": ["project_root", "workspace_root"],
|
|
69
|
+
"properties": {
|
|
70
|
+
"project_root": { "type": "string", "minLength": 1 },
|
|
71
|
+
"workspace_root": { "type": "string", "minLength": 1 },
|
|
72
|
+
"git": {
|
|
73
|
+
"type": "object",
|
|
74
|
+
"additionalProperties": false,
|
|
75
|
+
"required": ["branch", "head"],
|
|
76
|
+
"properties": { "branch": { "type": ["string", "null"] }, "head": { "type": ["string", "null"] } }
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"legacy": {
|
|
81
|
+
"type": "object",
|
|
82
|
+
"additionalProperties": false,
|
|
83
|
+
"properties": { "project_tasks_run_dir": { "type": ["string", "null"] } }
|
|
84
|
+
},
|
|
85
|
+
"stage_runs": { "type": "array", "items": { "$ref": "#/definitions/stageRun" } },
|
|
86
|
+
"sessions": { "type": "array", "items": { "$ref": "#/definitions/session" } },
|
|
87
|
+
"artifacts": { "type": "array", "items": { "type": "object" } },
|
|
88
|
+
"status": { "type": "string", "enum": ["running", "done", "blocked", "cancelled", "failed"] },
|
|
89
|
+
"verdict": { "type": "string", "minLength": 1 },
|
|
90
|
+
"next_action": { "type": ["string", "null"] },
|
|
91
|
+
"created_at": { "type": "string", "format": "date-time" },
|
|
92
|
+
"updated_at": { "type": "string", "format": "date-time" },
|
|
93
|
+
"started_at": { "type": "string", "format": "date-time" },
|
|
94
|
+
"completed_at": { "type": "string", "format": "date-time" },
|
|
95
|
+
"timing_status": { "enum": ["measured", "legacy_incomplete"] },
|
|
96
|
+
"runtime_revision": { "type": "integer", "minimum": 1 },
|
|
97
|
+
"snapshot_revision": { "type": "integer", "minimum": 1 },
|
|
98
|
+
"snapshot_checksum": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
|
|
99
|
+
"reconciliation_status": { "enum": ["reconciled", "reconciliation_required", "legacy_incomplete"] },
|
|
100
|
+
"flow_flags": { "$ref": "#/definitions/flowFlags" }
|
|
101
|
+
},
|
|
102
|
+
"definitions": {
|
|
103
|
+
"stageRun": {
|
|
104
|
+
"type": "object",
|
|
105
|
+
"additionalProperties": false,
|
|
106
|
+
"required": ["order", "stage", "dir", "status", "updated_at"],
|
|
107
|
+
"properties": {
|
|
108
|
+
"order": { "type": "integer", "minimum": 1 },
|
|
109
|
+
"stage": { "type": "string", "minLength": 1 },
|
|
110
|
+
"dir": { "type": "string", "pattern": "^[0-9]{2}-[a-z0-9]+(?:-[a-z0-9]+)*$" },
|
|
111
|
+
"status": { "enum": ["pending", "running", "done", "blocked", "skipped", "failed"] },
|
|
112
|
+
"stage_report": { "type": "string", "minLength": 1 },
|
|
113
|
+
"dashboard": { "type": "string", "minLength": 1 },
|
|
114
|
+
"data": { "type": "string", "minLength": 1 },
|
|
115
|
+
"data_schema_id": { "type": "string", "minLength": 1 },
|
|
116
|
+
"report": { "type": "string", "minLength": 1 },
|
|
117
|
+
"artifact_aliases": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
118
|
+
"updated_at": { "type": "string", "format": "date-time" },
|
|
119
|
+
"started_at": { "type": "string", "format": "date-time" },
|
|
120
|
+
"completed_at": { "type": "string", "format": "date-time" },
|
|
121
|
+
"attempt": { "type": "string", "pattern": "^try-[0-9]{3}$" }
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"session": {
|
|
125
|
+
"type": "object",
|
|
126
|
+
"additionalProperties": false,
|
|
127
|
+
"required": ["session_id", "status", "created_at", "updated_at", "coverage_units"],
|
|
128
|
+
"properties": {
|
|
129
|
+
"session_id": { "type": "string", "minLength": 1 },
|
|
130
|
+
"parent_session_id": { "type": ["string", "null"] },
|
|
131
|
+
"role": { "type": ["string", "null"] },
|
|
132
|
+
"session_kind": { "type": ["string", "null"] },
|
|
133
|
+
"worker_id": { "type": ["string", "null"] },
|
|
134
|
+
"current_stage": { "type": ["string", "null"] },
|
|
135
|
+
"status": { "type": "string", "minLength": 1 },
|
|
136
|
+
"created_at": { "type": "string", "format": "date-time" },
|
|
137
|
+
"updated_at": { "type": "string", "format": "date-time" },
|
|
138
|
+
"stopped_at": { "type": ["string", "null"], "format": "date-time" },
|
|
139
|
+
"coverage_units": { "type": "array", "items": { "$ref": "#/definitions/coverageUnit" } }
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"coverageUnit": {
|
|
143
|
+
"type": "object",
|
|
144
|
+
"additionalProperties": false,
|
|
145
|
+
"required": ["unit_id"],
|
|
146
|
+
"properties": {
|
|
147
|
+
"unit_id": { "type": "string", "minLength": 1 },
|
|
148
|
+
"group_id": { "type": ["string", "null"] },
|
|
149
|
+
"job_id": { "type": ["string", "null"] },
|
|
150
|
+
"kind": { "type": ["string", "null"] }
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
"flowFlags": {
|
|
154
|
+
"type": "object",
|
|
155
|
+
"additionalProperties": false,
|
|
156
|
+
"required": ["contract", "flow_kind", "snapshot_revision", "resolution_status", "values", "snapshot_checksum"],
|
|
157
|
+
"properties": {
|
|
158
|
+
"contract": {
|
|
159
|
+
"type": "object",
|
|
160
|
+
"additionalProperties": false,
|
|
161
|
+
"required": ["id", "version"],
|
|
162
|
+
"properties": { "id": { "type": "string" }, "version": { "type": "integer", "minimum": 1 }, "capabilities": { "type": "array", "items": { "type": "string" } } }
|
|
163
|
+
},
|
|
164
|
+
"flow_kind": { "type": "string", "minLength": 1 },
|
|
165
|
+
"preset": {
|
|
166
|
+
"type": "object",
|
|
167
|
+
"additionalProperties": false,
|
|
168
|
+
"required": ["requested", "applied", "source_ref"],
|
|
169
|
+
"properties": {
|
|
170
|
+
"requested": { "type": ["string", "null"] },
|
|
171
|
+
"applied": { "type": "string", "minLength": 1 },
|
|
172
|
+
"source_ref": { "type": "string", "minLength": 1 }
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
"snapshot_revision": { "type": "integer", "minimum": 1 },
|
|
176
|
+
"resolution_status": { "enum": ["valid", "legacy_incomplete", "reconciliation_required"] },
|
|
177
|
+
"values": { "type": "object", "additionalProperties": { "$ref": "#/definitions/flagValue" } },
|
|
178
|
+
"snapshot_checksum": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
|
|
179
|
+
"compatibility_projection": { "type": "object" },
|
|
180
|
+
"resolved_at": { "type": "string", "format": "date-time" },
|
|
181
|
+
"floors_applied": { "type": "array", "items": { "type": "string" } }
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
"flagValue": {
|
|
185
|
+
"type": "object",
|
|
186
|
+
"additionalProperties": false,
|
|
187
|
+
"required": ["value", "value_type", "owner", "source", "rationale", "resolved_at"],
|
|
188
|
+
"properties": {
|
|
189
|
+
"value": {},
|
|
190
|
+
"value_type": { "type": "string" },
|
|
191
|
+
"owner": { "type": "string" },
|
|
192
|
+
"source": {
|
|
193
|
+
"type": "object",
|
|
194
|
+
"additionalProperties": false,
|
|
195
|
+
"required": ["kind", "ref"],
|
|
196
|
+
"properties": { "kind": { "type": "string" }, "ref": { "type": "string" }, "revision": { "type": ["integer", "null"] } }
|
|
197
|
+
},
|
|
198
|
+
"rationale": { "type": "string" },
|
|
199
|
+
"resolved_at": { "type": "string", "format": "date-time" }
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
@@ -81,7 +81,16 @@
|
|
|
81
81
|
"required": ["project_root", "workspace_root"],
|
|
82
82
|
"properties": {
|
|
83
83
|
"project_root": { "type": "string", "minLength": 1 },
|
|
84
|
-
"workspace_root": { "type": "string", "minLength": 1 }
|
|
84
|
+
"workspace_root": { "type": "string", "minLength": 1 },
|
|
85
|
+
"git": {
|
|
86
|
+
"type": "object",
|
|
87
|
+
"additionalProperties": false,
|
|
88
|
+
"required": ["branch", "head"],
|
|
89
|
+
"properties": {
|
|
90
|
+
"branch": { "type": ["string", "null"] },
|
|
91
|
+
"head": { "type": ["string", "null"] }
|
|
92
|
+
}
|
|
93
|
+
}
|
|
85
94
|
}
|
|
86
95
|
},
|
|
87
96
|
"legacy": {
|
|
@@ -123,6 +132,14 @@
|
|
|
123
132
|
"completed_at": {
|
|
124
133
|
"type": "string",
|
|
125
134
|
"minLength": 1
|
|
135
|
+
},
|
|
136
|
+
"started_at": {
|
|
137
|
+
"type": "string",
|
|
138
|
+
"minLength": 1
|
|
139
|
+
},
|
|
140
|
+
"timing_status": {
|
|
141
|
+
"type": "string",
|
|
142
|
+
"enum": ["measured", "legacy_incomplete"]
|
|
126
143
|
}
|
|
127
144
|
},
|
|
128
145
|
"definitions": {
|
|
@@ -148,7 +165,10 @@
|
|
|
148
165
|
"type": "array",
|
|
149
166
|
"items": { "type": "string", "minLength": 1 }
|
|
150
167
|
},
|
|
151
|
-
"updated_at": { "type": "string", "minLength": 1 }
|
|
168
|
+
"updated_at": { "type": "string", "minLength": 1 },
|
|
169
|
+
"started_at": { "type": "string", "minLength": 1 },
|
|
170
|
+
"completed_at": { "type": "string", "minLength": 1 },
|
|
171
|
+
"attempt": { "type": "string", "pattern": "^try-[0-9]{3}$" }
|
|
152
172
|
}
|
|
153
173
|
}
|
|
154
174
|
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "dd-flow/flow-run@1",
|
|
4
|
+
"title": "dd-flow runtime snapshot",
|
|
5
|
+
"description": "Continuation/runtime authority for one RUN; navigation is projected separately to flow-run-index@3.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": true,
|
|
8
|
+
"required": ["schema_id", "run_index_schema_id", "run_id", "runtime_revision", "snapshot_revision", "snapshot_checksum", "flow_flags"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"schema_id": { "const": "dd-flow/flow-run@1" },
|
|
11
|
+
"run_index_schema_id": { "type": "string" },
|
|
12
|
+
"run_id": { "type": "string", "minLength": 1 },
|
|
13
|
+
"runtime_revision": { "type": "integer", "minimum": 1 },
|
|
14
|
+
"snapshot_revision": { "type": "integer", "minimum": 1 },
|
|
15
|
+
"snapshot_checksum": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
|
|
16
|
+
"flow_flags": { "$ref": "#/definitions/flowFlags" },
|
|
17
|
+
"flag_revision_history": { "type": "array", "maxItems": 32, "items": { "type": "object" } }
|
|
18
|
+
},
|
|
19
|
+
"definitions": {
|
|
20
|
+
"flowFlags": {
|
|
21
|
+
"type": "object",
|
|
22
|
+
"required": ["contract", "flow_kind", "snapshot_revision", "resolution_status", "values", "snapshot_checksum"],
|
|
23
|
+
"properties": {
|
|
24
|
+
"contract": { "type": "object" },
|
|
25
|
+
"flow_kind": { "type": "string" },
|
|
26
|
+
"preset": { "type": "object" },
|
|
27
|
+
"snapshot_revision": { "type": "integer", "minimum": 1 },
|
|
28
|
+
"resolution_status": { "type": "string" },
|
|
29
|
+
"values": { "type": "object" },
|
|
30
|
+
"snapshot_checksum": { "type": "string" },
|
|
31
|
+
"compatibility_projection": { "type": "object" },
|
|
32
|
+
"floors_applied": { "type": "array", "items": { "type": "string" } }
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -1,9 +1,49 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"$id": "dd-flow/merge-stage-report@
|
|
3
|
+
"$id": "dd-flow/merge-stage-report@2",
|
|
4
4
|
"title": "Merge stage report data",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"additionalProperties": true,
|
|
7
|
+
"allOf": [
|
|
8
|
+
{
|
|
9
|
+
"if": {
|
|
10
|
+
"properties": {
|
|
11
|
+
"schema_id": { "const": "dd-flow/merge-stage-report@2" },
|
|
12
|
+
"overall": {
|
|
13
|
+
"properties": {
|
|
14
|
+
"verdict": { "const": "merged" }
|
|
15
|
+
},
|
|
16
|
+
"required": ["verdict"]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"required": ["schema_id", "overall"]
|
|
20
|
+
},
|
|
21
|
+
"then": {
|
|
22
|
+
"required": ["operational_access"],
|
|
23
|
+
"properties": {
|
|
24
|
+
"operational_access": { "properties": { "outcome": { "enum": ["authorized", "not_required"] } } },
|
|
25
|
+
"git": {
|
|
26
|
+
"properties": {
|
|
27
|
+
"result_commit": { "$ref": "#/definitions/realCommitEvidence" }
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"integration": {
|
|
31
|
+
"required": ["result_commit"],
|
|
32
|
+
"properties": {
|
|
33
|
+
"result_commit": { "$ref": "#/definitions/realCommitEvidence" }
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"if": {
|
|
41
|
+
"properties": { "schema_id": { "const": "dd-flow/merge-stage-report@2" } },
|
|
42
|
+
"required": ["schema_id"]
|
|
43
|
+
},
|
|
44
|
+
"then": { "required": ["flow_flags"] }
|
|
45
|
+
}
|
|
46
|
+
],
|
|
7
47
|
"required": [
|
|
8
48
|
"schema_id",
|
|
9
49
|
"run",
|
|
@@ -24,12 +64,14 @@
|
|
|
24
64
|
"defs"
|
|
25
65
|
],
|
|
26
66
|
"properties": {
|
|
27
|
-
"schema_id": { "
|
|
67
|
+
"schema_id": { "enum": ["dd-flow/merge-stage-report@1", "dd-flow/merge-stage-report@2"] },
|
|
28
68
|
"run": { "$ref": "#/definitions/run" },
|
|
29
69
|
"stage": { "$ref": "#/definitions/stage" },
|
|
30
70
|
"project": { "$ref": "#/definitions/namedEntity" },
|
|
31
71
|
"subject": { "$ref": "#/definitions/namedEntity" },
|
|
72
|
+
"flow_flags": { "$ref": "#/definitions/flowFlags" },
|
|
32
73
|
"overall": { "$ref": "#/definitions/overall" },
|
|
74
|
+
"operational_access": { "$ref": "#/definitions/operationalAccess" },
|
|
33
75
|
"breadcrumbs": {
|
|
34
76
|
"type": "array",
|
|
35
77
|
"items": { "$ref": "#/definitions/breadcrumb" }
|
|
@@ -113,6 +155,8 @@
|
|
|
113
155
|
"type": "array",
|
|
114
156
|
"items": { "$ref": "#/definitions/check" }
|
|
115
157
|
},
|
|
158
|
+
"policy_context": { "$ref": "#/definitions/policyContext" },
|
|
159
|
+
"sdlc_contours": { "$ref": "#/definitions/sdlcContours" },
|
|
116
160
|
"cleanup": {
|
|
117
161
|
"type": "array",
|
|
118
162
|
"items": { "$ref": "#/definitions/check" }
|
|
@@ -120,9 +164,74 @@
|
|
|
120
164
|
"defs": {
|
|
121
165
|
"type": "array",
|
|
122
166
|
"items": { "$ref": "#/definitions/deferral" }
|
|
167
|
+
},
|
|
168
|
+
"knowledge_promotion": {
|
|
169
|
+
"type": "object",
|
|
170
|
+
"additionalProperties": true,
|
|
171
|
+
"required": [
|
|
172
|
+
"status",
|
|
173
|
+
"summary",
|
|
174
|
+
"source_candidates",
|
|
175
|
+
"candidate_results",
|
|
176
|
+
"code_derived",
|
|
177
|
+
"durable_writes",
|
|
178
|
+
"deferred_defs",
|
|
179
|
+
"blocked_promotions"
|
|
180
|
+
],
|
|
181
|
+
"properties": {
|
|
182
|
+
"status": {
|
|
183
|
+
"type": "string",
|
|
184
|
+
"enum": ["passed", "not_applicable", "degraded", "blocked"]
|
|
185
|
+
},
|
|
186
|
+
"summary": { "type": "string", "minLength": 1 },
|
|
187
|
+
"report_path": { "type": "string" },
|
|
188
|
+
"source_candidates": { "type": "string" },
|
|
189
|
+
"candidate_results": {
|
|
190
|
+
"type": "object",
|
|
191
|
+
"additionalProperties": { "type": "integer", "minimum": 0 }
|
|
192
|
+
},
|
|
193
|
+
"code_derived": {
|
|
194
|
+
"type": "object",
|
|
195
|
+
"additionalProperties": { "type": "integer", "minimum": 0 }
|
|
196
|
+
},
|
|
197
|
+
"durable_writes": { "type": "integer", "minimum": 0 },
|
|
198
|
+
"deferred_defs": { "type": "integer", "minimum": 0 },
|
|
199
|
+
"blocked_promotions": { "type": "integer", "minimum": 0 }
|
|
200
|
+
}
|
|
123
201
|
}
|
|
124
202
|
},
|
|
125
203
|
"definitions": {
|
|
204
|
+
"operationalAccess": {
|
|
205
|
+
"type": "object",
|
|
206
|
+
"additionalProperties": true,
|
|
207
|
+
"required": ["schema_id", "applicability", "outcome", "verdicts", "next_action"],
|
|
208
|
+
"properties": {
|
|
209
|
+
"schema_id": { "const": "dd-flow/operational-access-preflight@1" },
|
|
210
|
+
"applicability": { "type": "string", "enum": ["required", "not_required"] },
|
|
211
|
+
"outcome": { "type": "string", "enum": ["authorized", "authorization_required", "identity_mismatch", "target_mismatch", "insufficient_authority", "approval_required", "blocked", "failed", "not_required"] },
|
|
212
|
+
"verdicts": {
|
|
213
|
+
"type": "object",
|
|
214
|
+
"required": ["identity", "authority", "target", "approval"],
|
|
215
|
+
"properties": {
|
|
216
|
+
"identity": { "type": "string", "enum": ["verified", "mismatch", "not_observable", "not_required"] },
|
|
217
|
+
"authority": { "type": "string", "enum": ["verified", "mismatch", "not_observable", "not_required"] },
|
|
218
|
+
"target": { "type": "string", "enum": ["verified", "mismatch", "not_observable", "not_required"] },
|
|
219
|
+
"approval": { "type": "string", "enum": ["verified", "missing", "stale", "revoked", "scope_mismatch", "not_observable", "not_required"] }
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
"next_action": { "type": "string", "minLength": 1 }
|
|
223
|
+
},
|
|
224
|
+
"allOf": [
|
|
225
|
+
{
|
|
226
|
+
"if": { "properties": { "outcome": { "const": "authorized" } }, "required": ["outcome"] },
|
|
227
|
+
"then": { "properties": { "applicability": { "const": "required" }, "verdicts": { "properties": { "identity": { "const": "verified" }, "authority": { "enum": ["verified", "not_required"] }, "target": { "const": "verified" }, "approval": { "enum": ["verified", "not_required"] } } } } }
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"if": { "properties": { "outcome": { "const": "not_required" } }, "required": ["outcome"] },
|
|
231
|
+
"then": { "properties": { "applicability": { "const": "not_required" }, "verdicts": { "properties": { "identity": { "const": "not_required" }, "authority": { "const": "not_required" }, "target": { "const": "not_required" }, "approval": { "const": "not_required" } } } } }
|
|
232
|
+
}
|
|
233
|
+
]
|
|
234
|
+
},
|
|
126
235
|
"run": {
|
|
127
236
|
"type": "object",
|
|
128
237
|
"additionalProperties": true,
|
|
@@ -190,6 +299,108 @@
|
|
|
190
299
|
"status": { "type": "string", "minLength": 1 },
|
|
191
300
|
"summary": { "type": "string", "minLength": 1 }
|
|
192
301
|
}
|
|
302
|
+
},
|
|
303
|
+
"sdlcContours": {
|
|
304
|
+
"type": "object",
|
|
305
|
+
"additionalProperties": true,
|
|
306
|
+
"properties": {
|
|
307
|
+
"summary": { "type": "string" },
|
|
308
|
+
"contours": {
|
|
309
|
+
"type": "array",
|
|
310
|
+
"items": { "$ref": "#/definitions/sdlcContour" }
|
|
311
|
+
},
|
|
312
|
+
"policy_migration": { "type": "string" },
|
|
313
|
+
"next_delivery_action": { "type": "string" }
|
|
314
|
+
}
|
|
315
|
+
},
|
|
316
|
+
"sdlcContour": {
|
|
317
|
+
"type": "object",
|
|
318
|
+
"additionalProperties": true,
|
|
319
|
+
"required": ["name", "applicability_status", "gate_status", "summary"],
|
|
320
|
+
"properties": {
|
|
321
|
+
"name": { "type": "string", "minLength": 1 },
|
|
322
|
+
"applicability_status": { "type": "string", "minLength": 1 },
|
|
323
|
+
"verification_state": { "type": "string" },
|
|
324
|
+
"closure_state": { "type": "string" },
|
|
325
|
+
"gate_status": { "type": "string", "minLength": 1 },
|
|
326
|
+
"target_stage": { "type": "string" },
|
|
327
|
+
"delivery_target": { "type": "string" },
|
|
328
|
+
"summary": { "type": "string", "minLength": 1 },
|
|
329
|
+
"reason": { "type": "string" },
|
|
330
|
+
"evidence": { "type": "string" },
|
|
331
|
+
"next_action": { "type": "string" }
|
|
332
|
+
}
|
|
333
|
+
},
|
|
334
|
+
"realCommitEvidence": {
|
|
335
|
+
"type": "string",
|
|
336
|
+
"minLength": 1,
|
|
337
|
+
"not": {
|
|
338
|
+
"pattern": "^(pending.*|todo|not_yet|none|n/a|N/A)$"
|
|
339
|
+
}
|
|
340
|
+
},
|
|
341
|
+
"policyContext": {
|
|
342
|
+
"type": "object",
|
|
343
|
+
"additionalProperties": true,
|
|
344
|
+
"required": ["sources", "git", "checks", "delivery", "gaps"],
|
|
345
|
+
"properties": {
|
|
346
|
+
"sources": { "type": "object", "additionalProperties": true },
|
|
347
|
+
"git": {
|
|
348
|
+
"type": "object",
|
|
349
|
+
"additionalProperties": true,
|
|
350
|
+
"properties": {
|
|
351
|
+
"workspace_route": { "type": "string" },
|
|
352
|
+
"delivery_strategy": {
|
|
353
|
+
"type": "string",
|
|
354
|
+
"enum": ["direct_commit", "direct_commit_push", "feature_merge", "pull_request", "merge_queue", "squash_merge", "rebase_ff", "release_branch", "external_handoff", "local_only", "no_git"]
|
|
355
|
+
},
|
|
356
|
+
"fixation_required": { "type": "boolean" },
|
|
357
|
+
"result_evidence_required": { "type": "array", "items": { "type": "string" } },
|
|
358
|
+
"actual_result_evidence": { "type": "array", "items": { "type": "string" } },
|
|
359
|
+
"evidence_verdict": { "type": "string" }
|
|
360
|
+
}
|
|
361
|
+
},
|
|
362
|
+
"checks": { "type": "object", "additionalProperties": true },
|
|
363
|
+
"delivery": { "type": "object", "additionalProperties": true },
|
|
364
|
+
"gaps": { "type": "object", "additionalProperties": true }
|
|
365
|
+
}
|
|
366
|
+
},
|
|
367
|
+
"flowFlags": {
|
|
368
|
+
"type": "object",
|
|
369
|
+
"additionalProperties": false,
|
|
370
|
+
"required": ["flow_kind", "snapshot_revision", "resolution_status", "values", "snapshot_checksum"],
|
|
371
|
+
"properties": {
|
|
372
|
+
"contract": { "type": "object", "additionalProperties": true },
|
|
373
|
+
"flow_kind": { "type": "string", "minLength": 1 },
|
|
374
|
+
"preset": { "type": "object", "additionalProperties": true },
|
|
375
|
+
"snapshot_revision": { "type": "integer", "minimum": 1 },
|
|
376
|
+
"resolution_status": { "type": "string", "enum": ["valid", "legacy_incomplete", "reconciliation_required"] },
|
|
377
|
+
"values": { "type": "object", "additionalProperties": { "$ref": "#/definitions/flagValue" } },
|
|
378
|
+
"snapshot_checksum": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
|
|
379
|
+
"floors_applied": { "type": "array", "items": { "type": "string" } },
|
|
380
|
+
"resolved_at": { "type": "string", "format": "date-time" }
|
|
381
|
+
}
|
|
382
|
+
},
|
|
383
|
+
"flagValue": {
|
|
384
|
+
"type": "object",
|
|
385
|
+
"additionalProperties": false,
|
|
386
|
+
"required": ["value", "value_type", "owner", "source", "rationale", "resolved_at"],
|
|
387
|
+
"properties": {
|
|
388
|
+
"value": {},
|
|
389
|
+
"value_type": { "type": "string", "minLength": 1 },
|
|
390
|
+
"owner": { "type": "string", "minLength": 1 },
|
|
391
|
+
"source": {
|
|
392
|
+
"type": "object",
|
|
393
|
+
"additionalProperties": false,
|
|
394
|
+
"required": ["kind", "ref"],
|
|
395
|
+
"properties": {
|
|
396
|
+
"kind": { "type": "string", "minLength": 1 },
|
|
397
|
+
"ref": { "type": "string", "minLength": 1 },
|
|
398
|
+
"revision": { "type": ["integer", "null"] }
|
|
399
|
+
}
|
|
400
|
+
},
|
|
401
|
+
"rationale": { "type": "string", "minLength": 1 },
|
|
402
|
+
"resolved_at": { "type": "string", "format": "date-time" }
|
|
403
|
+
}
|
|
193
404
|
}
|
|
194
405
|
}
|
|
195
406
|
}
|