@haystackeditor/cli 0.27.2 → 0.28.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 +4 -3
- package/dist/commands/capture-brief.js +2 -2
- package/dist/commands/init.js +10 -2
- package/dist/commands/verify.js +85 -77
- package/dist/index.js +21 -41
- package/dist/schema.js +2 -3
- package/package.json +1 -1
- package/schemas/verify-raw.v1.json +672 -2
- package/schemas/verify.v2.json +672 -2
- package/schemas/pre-verify.v1.json +0 -235
- package/schemas/pre-verify.v2.json +0 -240
|
@@ -1,235 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://docs.haystackeditor.com/cli/schemas/pre-verify.v1.json",
|
|
4
|
-
"title": "haystack pre-verify --json",
|
|
5
|
-
"description": "CRAWL-V1 amendment 18: the brief of the current change before any crawl: the functions it touches (the front half's blast radius, nearest first) and, when incident planning ran, Haystack's own ideas of what could break. `run` is the run of this capture that holds or will hold the brief; `brief` is null until it does (or when the run ended without one).",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"required": ["schema_version", "change", "onboarding", "run", "brief", "capture"],
|
|
8
|
-
"properties": {
|
|
9
|
-
"schema_version": { "const": "1.0.2" },
|
|
10
|
-
"change": {
|
|
11
|
-
"type": "object",
|
|
12
|
-
"required": ["baseCommit", "workCommit", "files"],
|
|
13
|
-
"properties": {
|
|
14
|
-
"baseCommit": { "type": "string", "pattern": "^[0-9a-f]{40}$" },
|
|
15
|
-
"workCommit": { "type": "string", "pattern": "^[0-9a-f]{40}$" },
|
|
16
|
-
"files": { "type": "array", "items": { "type": "string" } }
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
"onboarding": { "description": "The app's onboarding for this base when this command met it (see `haystack schema verify-onboarding`), else null.", "oneOf": [{ "type": "null" }, { "type": "object" }] },
|
|
20
|
-
"run": {
|
|
21
|
-
"oneOf": [
|
|
22
|
-
{ "type": "null" },
|
|
23
|
-
{
|
|
24
|
-
"type": "object",
|
|
25
|
-
"required": ["runId", "status"],
|
|
26
|
-
"properties": {
|
|
27
|
-
"runId": { "type": "string", "pattern": "^cv_[0-9a-f]{48}$" },
|
|
28
|
-
"status": { "enum": ["queued", "preparing", "crawling", "draining", "completed", "prepared", "incomplete", "cancelled"] }
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
]
|
|
32
|
-
},
|
|
33
|
-
"brief": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/brief" }] },
|
|
34
|
-
"capture": {
|
|
35
|
-
"description": "CAPTURE-V1 rule 7b (1.0.2): what consenting real users do on the routes this change touches, from Haystack's capture tag; null when the checkout has no .haystack/capture.json (capture not set up). The change's files (the brief's function files and the changed files) are joined to routes through the route manifest's source entries; shares are of distinct captured sessions over the window; sessions on pages no route names are `unmapped`, never counted as zero. A read that fails is `unavailable` and never fails the command.",
|
|
36
|
-
"oneOf": [
|
|
37
|
-
{ "type": "null" },
|
|
38
|
-
{
|
|
39
|
-
"type": "object", "additionalProperties": false, "required": ["applicationId", "state", "window"],
|
|
40
|
-
"properties": { "applicationId": { "type": "string" }, "state": { "const": "ready" }, "window": { "$ref": "#/$defs/captureWindow" } }
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"type": "object", "additionalProperties": false, "required": ["applicationId", "state"],
|
|
44
|
-
"properties": { "applicationId": { "type": "string" }, "state": { "const": "no-data" } }
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
"type": "object", "additionalProperties": false, "required": ["applicationId", "state", "reason"],
|
|
48
|
-
"properties": { "applicationId": { "oneOf": [{ "type": "null" }, { "type": "string" }] }, "state": { "const": "unavailable" }, "reason": { "type": "string" } }
|
|
49
|
-
}
|
|
50
|
-
]
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
"$defs": {
|
|
54
|
-
"captureWindow": {
|
|
55
|
-
"type": "object",
|
|
56
|
-
"required": ["applicationId", "days", "newestHour", "ageHours", "stale", "sessions", "routes", "union", "unmapped", "releasesWithoutManifest", "dropped"],
|
|
57
|
-
"properties": {
|
|
58
|
-
"applicationId": { "type": "string" },
|
|
59
|
-
"days": { "description": "The UTC days the window covers, oldest first.", "type": "array", "items": { "type": "string" } },
|
|
60
|
-
"newestHour": { "description": "The newest receipt hour holding events, yyyy-mm-ddThh (UTC).", "oneOf": [{ "type": "null" }, { "type": "string" }] },
|
|
61
|
-
"ageHours": { "oneOf": [{ "type": "null" }, { "type": "number", "minimum": 0 }] },
|
|
62
|
-
"stale": { "description": "Older than 24 hours, or no data.", "type": "boolean" },
|
|
63
|
-
"sessions": { "description": "Distinct captured sessions in the window.", "type": "integer", "minimum": 0 },
|
|
64
|
-
"routes": {
|
|
65
|
-
"description": "The changed routes, most sessions first.",
|
|
66
|
-
"type": "array",
|
|
67
|
-
"items": {
|
|
68
|
-
"type": "object",
|
|
69
|
-
"required": ["route", "match", "source", "sessions", "share"],
|
|
70
|
-
"properties": {
|
|
71
|
-
"route": { "description": "The route id from the app's route manifest.", "type": "string" },
|
|
72
|
-
"match": { "description": "Its match rule, in the framework adapter's syntax.", "type": "string" },
|
|
73
|
-
"source": { "description": "The repository file that defines it.", "type": "string" },
|
|
74
|
-
"sessions": { "type": "integer", "minimum": 0 },
|
|
75
|
-
"share": { "oneOf": [{ "type": "null" }, { "type": "number", "minimum": 0, "maximum": 1 }] }
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
"union": {
|
|
80
|
-
"description": "Sessions that visited at least one changed route (exact, not a sum).",
|
|
81
|
-
"type": "object", "required": ["sessions", "share"],
|
|
82
|
-
"properties": { "sessions": { "type": "integer", "minimum": 0 }, "share": { "oneOf": [{ "type": "null" }, { "type": "number", "minimum": 0, "maximum": 1 }] } }
|
|
83
|
-
},
|
|
84
|
-
"unmapped": {
|
|
85
|
-
"description": "Sessions on pages no route names: unknown whether they reach the change.",
|
|
86
|
-
"oneOf": [{ "type": "null" }, { "type": "object", "required": ["sessions", "share"],
|
|
87
|
-
"properties": { "sessions": { "type": "integer", "minimum": 0 }, "share": { "oneOf": [{ "type": "null" }, { "type": "number", "minimum": 0, "maximum": 1 }] } } }]
|
|
88
|
-
},
|
|
89
|
-
"releasesWithoutManifest": { "description": "Releases whose route manifest Haystack does not hold; their pages are unmapped.", "type": "array", "items": { "type": "string" } },
|
|
90
|
-
"dropped": { "description": "Events dropped at ingest in the window, per reason.", "type": "object", "additionalProperties": { "type": "integer", "minimum": 0 } }
|
|
91
|
-
}
|
|
92
|
-
},
|
|
93
|
-
"brief": {
|
|
94
|
-
"type": "object",
|
|
95
|
-
"required": ["functions", "leftOut", "planning"],
|
|
96
|
-
"properties": {
|
|
97
|
-
"functions": {
|
|
98
|
-
"description": "Every affected function the front half listed (at most 2000), nearest first. distance 0 is edited by the change; 1 is one engine edge away.",
|
|
99
|
-
"type": "array",
|
|
100
|
-
"maxItems": 2000,
|
|
101
|
-
"items": {
|
|
102
|
-
"type": "object",
|
|
103
|
-
"required": ["file", "name", "lines", "distance", "direction"],
|
|
104
|
-
"properties": {
|
|
105
|
-
"file": { "type": "string" },
|
|
106
|
-
"name": { "type": "string" },
|
|
107
|
-
"lines": { "type": "array", "minItems": 2, "maxItems": 2, "items": { "type": "integer", "minimum": 0 } },
|
|
108
|
-
"distance": { "type": "integer", "minimum": 0 },
|
|
109
|
-
"direction": { "enum": ["changed", "upstream", "downstream"] }
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
},
|
|
113
|
-
"leftOut": {
|
|
114
|
-
"description": "Functions the blast radius found but did not list, counted with why.",
|
|
115
|
-
"type": "array",
|
|
116
|
-
"items": { "type": "object", "required": ["reason", "count"], "properties": { "reason": { "type": "string" }, "count": { "type": "integer", "minimum": 0 } } }
|
|
117
|
-
},
|
|
118
|
-
"production": {
|
|
119
|
-
"description": "CRAWL-V1 amendment 19, only when the repository's own Haystack telemetry holds data in the last 7 days: how the brief's functions ran in production, by their index in `functions` (production runs the code before the change; lines are moved through the change's diff). A function with no row is unknown, not unused.",
|
|
120
|
-
"type": "object",
|
|
121
|
-
"required": ["windowDays", "payloads", "newestAt", "partial", "functions"],
|
|
122
|
-
"properties": {
|
|
123
|
-
"windowDays": { "type": "integer", "minimum": 1 },
|
|
124
|
-
"payloads": { "type": "integer", "minimum": 1 },
|
|
125
|
-
"newestAt": { "type": "string" },
|
|
126
|
-
"partial": { "type": "boolean", "description": "The read stopped at its byte budget: every count is a lower bound." },
|
|
127
|
-
"functions": {
|
|
128
|
-
"type": "array",
|
|
129
|
-
"items": {
|
|
130
|
-
"type": "object",
|
|
131
|
-
"required": ["index", "branches", "branchesOmitted", "values", "valuesOmitted"],
|
|
132
|
-
"properties": {
|
|
133
|
-
"index": { "type": "integer", "minimum": 0 },
|
|
134
|
-
"branches": {
|
|
135
|
-
"type": "array",
|
|
136
|
-
"maxItems": 100,
|
|
137
|
-
"items": {
|
|
138
|
-
"type": "object",
|
|
139
|
-
"required": ["line", "whenTrue", "whenFalse", "capped"],
|
|
140
|
-
"properties": {
|
|
141
|
-
"line": { "type": "integer", "minimum": 1 },
|
|
142
|
-
"whenTrue": { "type": "integer", "minimum": 0 },
|
|
143
|
-
"whenFalse": { "type": "integer", "minimum": 0 },
|
|
144
|
-
"capped": { "type": "boolean", "description": "A counter hit its cap: the counts are lower bounds." }
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
},
|
|
148
|
-
"branchesOmitted": { "type": "integer", "minimum": 0 },
|
|
149
|
-
"values": {
|
|
150
|
-
"type": "array",
|
|
151
|
-
"maxItems": 100,
|
|
152
|
-
"items": {
|
|
153
|
-
"type": "object",
|
|
154
|
-
"required": ["line", "what", "shapes"],
|
|
155
|
-
"properties": {
|
|
156
|
-
"line": { "type": "integer", "minimum": 1 },
|
|
157
|
-
"what": { "type": "string", "description": "The value observed, e.g. parameter:email or binding:options." },
|
|
158
|
-
"shapes": {
|
|
159
|
-
"type": "array",
|
|
160
|
-
"items": {
|
|
161
|
-
"type": "object",
|
|
162
|
-
"required": ["shape", "count"],
|
|
163
|
-
"properties": {
|
|
164
|
-
"shape": { "type": "string", "description": "A value-free category, e.g. undefined, string:empty:empty, array:few." },
|
|
165
|
-
"count": { "type": "integer", "minimum": 0 }
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
},
|
|
172
|
-
"valuesOmitted": { "type": "integer", "minimum": 0 }
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
},
|
|
178
|
-
"planning": {
|
|
179
|
-
"description": "Incident planning; null when it did not run for this change.",
|
|
180
|
-
"oneOf": [
|
|
181
|
-
{ "type": "null" },
|
|
182
|
-
{
|
|
183
|
-
"type": "object",
|
|
184
|
-
"required": ["groups", "unresolved", "ideas"],
|
|
185
|
-
"properties": {
|
|
186
|
-
"groups": {
|
|
187
|
-
"description": "Behavior groups of the change, each with the failure patterns selected for it.",
|
|
188
|
-
"type": "array",
|
|
189
|
-
"items": {
|
|
190
|
-
"type": "object",
|
|
191
|
-
"required": ["id", "changeKeys", "patterns"],
|
|
192
|
-
"properties": {
|
|
193
|
-
"id": { "type": "string" },
|
|
194
|
-
"changeKeys": { "type": "array", "items": { "type": "string" } },
|
|
195
|
-
"patterns": {
|
|
196
|
-
"type": "array",
|
|
197
|
-
"items": { "type": "object", "required": ["entryId", "mechanism", "symptom"],
|
|
198
|
-
"properties": { "entryId": { "type": "string" }, "mechanism": { "type": "string" }, "symptom": { "type": "string" } } }
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
},
|
|
203
|
-
"unresolved": {
|
|
204
|
-
"description": "Changes no behavior group holds, and why.",
|
|
205
|
-
"type": "array",
|
|
206
|
-
"items": { "type": "object", "required": ["changeKey", "reason"], "properties": { "changeKey": { "type": "string" }, "reason": { "type": "string" } } }
|
|
207
|
-
},
|
|
208
|
-
"ideas": {
|
|
209
|
-
"description": "Haystack's own ideas: the selected situations, in plan order (at most 64). Every crawl explores them; pass the ones you want first, and your own, to `haystack verify --idea`.",
|
|
210
|
-
"type": "array",
|
|
211
|
-
"maxItems": 64,
|
|
212
|
-
"items": {
|
|
213
|
-
"type": "object",
|
|
214
|
-
"required": ["id", "groupId", "pattern", "why", "failure", "setup", "exercise", "watch", "start"],
|
|
215
|
-
"properties": {
|
|
216
|
-
"id": { "type": "string" },
|
|
217
|
-
"groupId": { "type": "string" },
|
|
218
|
-
"pattern": { "type": "string", "description": "The failure pattern's library id." },
|
|
219
|
-
"why": { "type": "string", "description": "How that pattern could arise in this code." },
|
|
220
|
-
"failure": { "type": "string", "description": "What would go wrong." },
|
|
221
|
-
"setup": { "type": "array", "items": { "type": "string" }, "description": "What must be set up or true first." },
|
|
222
|
-
"exercise": { "type": "string", "description": "What to do." },
|
|
223
|
-
"watch": { "type": "string", "description": "What to watch." },
|
|
224
|
-
"start": { "type": "string", "description": "Where it starts: the start screen, or a prepared start." }
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
]
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
}
|
|
@@ -1,240 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://docs.haystackeditor.com/cli/schemas/pre-verify.v2.json",
|
|
4
|
-
"title": "haystack pre-verify --json",
|
|
5
|
-
"description": "CRAWL-V1 amendment 18: the brief of the current change before any crawl: the functions it touches (the front half's blast radius, nearest first) and, when incident planning ran, Haystack's own ideas of what could break. `run` is the run of this capture that holds or will hold the brief; `brief` is null until it does (or when the run ended without one).",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"required": ["schema_version", "change", "onboarding", "run", "brief", "capture"],
|
|
8
|
-
"properties": {
|
|
9
|
-
"schema_version": { "const": "2.0.0" },
|
|
10
|
-
"change": {
|
|
11
|
-
"type": "object",
|
|
12
|
-
"required": ["baseCommit", "workCommit", "files"],
|
|
13
|
-
"properties": {
|
|
14
|
-
"baseCommit": { "type": "string", "pattern": "^[0-9a-f]{40}$" },
|
|
15
|
-
"workCommit": { "type": "string", "pattern": "^[0-9a-f]{40}$" },
|
|
16
|
-
"files": { "type": "array", "items": { "type": "string" } }
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
"onboarding": { "description": "The app's onboarding for this base when this command met it (see `haystack schema verify-onboarding`), else null.", "oneOf": [{ "type": "null" }, { "type": "object" }] },
|
|
20
|
-
"run": {
|
|
21
|
-
"oneOf": [
|
|
22
|
-
{ "type": "null" },
|
|
23
|
-
{
|
|
24
|
-
"type": "object",
|
|
25
|
-
"required": ["runId", "status"],
|
|
26
|
-
"properties": {
|
|
27
|
-
"runId": { "type": "string", "pattern": "^cv_[0-9a-f]{48}$" },
|
|
28
|
-
"status": { "enum": ["queued", "preparing", "crawling", "draining", "completed", "prepared", "incomplete", "cancelled"] }
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
]
|
|
32
|
-
},
|
|
33
|
-
"brief": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/brief" }] },
|
|
34
|
-
"capture": {
|
|
35
|
-
"description": "CAPTURE-V1 rule 7b (2.0.0): what consenting real users do on the routes this change touches, from Haystack's capture tag, one section per app whose .haystack/capture.json records it (`haystack init` writes it in the app's directory, such as apps/web in a monorepo; `app` is that directory, '.' for the root); null when the checkout has none (capture not set up). The change's files (the brief's function files and the changed files) are joined to routes through each app's route manifest source entries; shares are of distinct captured sessions over the window; sessions on pages no route names are `unmapped`, never counted as zero. A read that fails is `unavailable` and never fails the command.",
|
|
36
|
-
"oneOf": [
|
|
37
|
-
{ "type": "null" },
|
|
38
|
-
{ "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/captureSection" } }
|
|
39
|
-
]
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
"$defs": {
|
|
43
|
-
"captureSection": {
|
|
44
|
-
"oneOf": [
|
|
45
|
-
{
|
|
46
|
-
"type": "object", "additionalProperties": false, "required": ["app", "applicationId", "state", "window"],
|
|
47
|
-
"properties": { "app": { "type": "string" }, "applicationId": { "type": "string" }, "state": { "const": "ready" }, "window": { "$ref": "#/$defs/captureWindow" } }
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
"type": "object", "additionalProperties": false, "required": ["app", "applicationId", "state"],
|
|
51
|
-
"properties": { "app": { "type": "string" }, "applicationId": { "type": "string" }, "state": { "const": "no-data" } }
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"type": "object", "additionalProperties": false, "required": ["app", "applicationId", "state", "reason"],
|
|
55
|
-
"properties": { "app": { "type": "string" }, "applicationId": { "oneOf": [{ "type": "null" }, { "type": "string" }] }, "state": { "const": "unavailable" }, "reason": { "type": "string" } }
|
|
56
|
-
}
|
|
57
|
-
]
|
|
58
|
-
},
|
|
59
|
-
"captureWindow": {
|
|
60
|
-
"type": "object",
|
|
61
|
-
"required": ["applicationId", "days", "newestHour", "ageHours", "stale", "sessions", "routes", "union", "unmapped", "releasesWithoutManifest", "dropped"],
|
|
62
|
-
"properties": {
|
|
63
|
-
"applicationId": { "type": "string" },
|
|
64
|
-
"days": { "description": "The UTC days the window covers, oldest first.", "type": "array", "items": { "type": "string" } },
|
|
65
|
-
"newestHour": { "description": "The newest receipt hour holding events, yyyy-mm-ddThh (UTC).", "oneOf": [{ "type": "null" }, { "type": "string" }] },
|
|
66
|
-
"ageHours": { "oneOf": [{ "type": "null" }, { "type": "number", "minimum": 0 }] },
|
|
67
|
-
"stale": { "description": "Older than 24 hours, or no data.", "type": "boolean" },
|
|
68
|
-
"sessions": { "description": "Distinct captured sessions in the window.", "type": "integer", "minimum": 0 },
|
|
69
|
-
"routes": {
|
|
70
|
-
"description": "The changed routes, most sessions first.",
|
|
71
|
-
"type": "array",
|
|
72
|
-
"items": {
|
|
73
|
-
"type": "object",
|
|
74
|
-
"required": ["route", "match", "source", "sessions", "share"],
|
|
75
|
-
"properties": {
|
|
76
|
-
"route": { "description": "The route id from the app's route manifest.", "type": "string" },
|
|
77
|
-
"match": { "description": "Its match rule, in the framework adapter's syntax.", "type": "string" },
|
|
78
|
-
"source": { "description": "The repository file that defines it.", "type": "string" },
|
|
79
|
-
"sessions": { "type": "integer", "minimum": 0 },
|
|
80
|
-
"share": { "oneOf": [{ "type": "null" }, { "type": "number", "minimum": 0, "maximum": 1 }] }
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
"union": {
|
|
85
|
-
"description": "Sessions that visited at least one changed route (exact, not a sum).",
|
|
86
|
-
"type": "object", "required": ["sessions", "share"],
|
|
87
|
-
"properties": { "sessions": { "type": "integer", "minimum": 0 }, "share": { "oneOf": [{ "type": "null" }, { "type": "number", "minimum": 0, "maximum": 1 }] } }
|
|
88
|
-
},
|
|
89
|
-
"unmapped": {
|
|
90
|
-
"description": "Sessions on pages no route names: unknown whether they reach the change.",
|
|
91
|
-
"oneOf": [{ "type": "null" }, { "type": "object", "required": ["sessions", "share"],
|
|
92
|
-
"properties": { "sessions": { "type": "integer", "minimum": 0 }, "share": { "oneOf": [{ "type": "null" }, { "type": "number", "minimum": 0, "maximum": 1 }] } } }]
|
|
93
|
-
},
|
|
94
|
-
"releasesWithoutManifest": { "description": "Releases whose route manifest Haystack does not hold; their pages are unmapped.", "type": "array", "items": { "type": "string" } },
|
|
95
|
-
"dropped": { "description": "Events dropped at ingest in the window, per reason.", "type": "object", "additionalProperties": { "type": "integer", "minimum": 0 } }
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
"brief": {
|
|
99
|
-
"type": "object",
|
|
100
|
-
"required": ["functions", "leftOut", "planning"],
|
|
101
|
-
"properties": {
|
|
102
|
-
"functions": {
|
|
103
|
-
"description": "Every affected function the front half listed (at most 2000), nearest first. distance 0 is edited by the change; 1 is one engine edge away.",
|
|
104
|
-
"type": "array",
|
|
105
|
-
"maxItems": 2000,
|
|
106
|
-
"items": {
|
|
107
|
-
"type": "object",
|
|
108
|
-
"required": ["file", "name", "lines", "distance", "direction"],
|
|
109
|
-
"properties": {
|
|
110
|
-
"file": { "type": "string" },
|
|
111
|
-
"name": { "type": "string" },
|
|
112
|
-
"lines": { "type": "array", "minItems": 2, "maxItems": 2, "items": { "type": "integer", "minimum": 0 } },
|
|
113
|
-
"distance": { "type": "integer", "minimum": 0 },
|
|
114
|
-
"direction": { "enum": ["changed", "upstream", "downstream"] }
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
|
-
"leftOut": {
|
|
119
|
-
"description": "Functions the blast radius found but did not list, counted with why.",
|
|
120
|
-
"type": "array",
|
|
121
|
-
"items": { "type": "object", "required": ["reason", "count"], "properties": { "reason": { "type": "string" }, "count": { "type": "integer", "minimum": 0 } } }
|
|
122
|
-
},
|
|
123
|
-
"production": {
|
|
124
|
-
"description": "CRAWL-V1 amendment 19, only when the repository's own Haystack telemetry holds data in the last 7 days: how the brief's functions ran in production, by their index in `functions` (production runs the code before the change; lines are moved through the change's diff). A function with no row is unknown, not unused.",
|
|
125
|
-
"type": "object",
|
|
126
|
-
"required": ["windowDays", "payloads", "newestAt", "partial", "functions"],
|
|
127
|
-
"properties": {
|
|
128
|
-
"windowDays": { "type": "integer", "minimum": 1 },
|
|
129
|
-
"payloads": { "type": "integer", "minimum": 1 },
|
|
130
|
-
"newestAt": { "type": "string" },
|
|
131
|
-
"partial": { "type": "boolean", "description": "The read stopped at its byte budget: every count is a lower bound." },
|
|
132
|
-
"functions": {
|
|
133
|
-
"type": "array",
|
|
134
|
-
"items": {
|
|
135
|
-
"type": "object",
|
|
136
|
-
"required": ["index", "branches", "branchesOmitted", "values", "valuesOmitted"],
|
|
137
|
-
"properties": {
|
|
138
|
-
"index": { "type": "integer", "minimum": 0 },
|
|
139
|
-
"branches": {
|
|
140
|
-
"type": "array",
|
|
141
|
-
"maxItems": 100,
|
|
142
|
-
"items": {
|
|
143
|
-
"type": "object",
|
|
144
|
-
"required": ["line", "whenTrue", "whenFalse", "capped"],
|
|
145
|
-
"properties": {
|
|
146
|
-
"line": { "type": "integer", "minimum": 1 },
|
|
147
|
-
"whenTrue": { "type": "integer", "minimum": 0 },
|
|
148
|
-
"whenFalse": { "type": "integer", "minimum": 0 },
|
|
149
|
-
"capped": { "type": "boolean", "description": "A counter hit its cap: the counts are lower bounds." }
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
},
|
|
153
|
-
"branchesOmitted": { "type": "integer", "minimum": 0 },
|
|
154
|
-
"values": {
|
|
155
|
-
"type": "array",
|
|
156
|
-
"maxItems": 100,
|
|
157
|
-
"items": {
|
|
158
|
-
"type": "object",
|
|
159
|
-
"required": ["line", "what", "shapes"],
|
|
160
|
-
"properties": {
|
|
161
|
-
"line": { "type": "integer", "minimum": 1 },
|
|
162
|
-
"what": { "type": "string", "description": "The value observed, e.g. parameter:email or binding:options." },
|
|
163
|
-
"shapes": {
|
|
164
|
-
"type": "array",
|
|
165
|
-
"items": {
|
|
166
|
-
"type": "object",
|
|
167
|
-
"required": ["shape", "count"],
|
|
168
|
-
"properties": {
|
|
169
|
-
"shape": { "type": "string", "description": "A value-free category, e.g. undefined, string:empty:empty, array:few." },
|
|
170
|
-
"count": { "type": "integer", "minimum": 0 }
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
},
|
|
177
|
-
"valuesOmitted": { "type": "integer", "minimum": 0 }
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
},
|
|
183
|
-
"planning": {
|
|
184
|
-
"description": "Incident planning; null when it did not run for this change.",
|
|
185
|
-
"oneOf": [
|
|
186
|
-
{ "type": "null" },
|
|
187
|
-
{
|
|
188
|
-
"type": "object",
|
|
189
|
-
"required": ["groups", "unresolved", "ideas"],
|
|
190
|
-
"properties": {
|
|
191
|
-
"groups": {
|
|
192
|
-
"description": "Behavior groups of the change, each with the failure patterns selected for it.",
|
|
193
|
-
"type": "array",
|
|
194
|
-
"items": {
|
|
195
|
-
"type": "object",
|
|
196
|
-
"required": ["id", "changeKeys", "patterns"],
|
|
197
|
-
"properties": {
|
|
198
|
-
"id": { "type": "string" },
|
|
199
|
-
"changeKeys": { "type": "array", "items": { "type": "string" } },
|
|
200
|
-
"patterns": {
|
|
201
|
-
"type": "array",
|
|
202
|
-
"items": { "type": "object", "required": ["entryId", "mechanism", "symptom"],
|
|
203
|
-
"properties": { "entryId": { "type": "string" }, "mechanism": { "type": "string" }, "symptom": { "type": "string" } } }
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
},
|
|
208
|
-
"unresolved": {
|
|
209
|
-
"description": "Changes no behavior group holds, and why.",
|
|
210
|
-
"type": "array",
|
|
211
|
-
"items": { "type": "object", "required": ["changeKey", "reason"], "properties": { "changeKey": { "type": "string" }, "reason": { "type": "string" } } }
|
|
212
|
-
},
|
|
213
|
-
"ideas": {
|
|
214
|
-
"description": "Haystack's own ideas: the selected situations, in plan order (at most 64). Every crawl explores them; pass the ones you want first, and your own, to `haystack verify --idea`.",
|
|
215
|
-
"type": "array",
|
|
216
|
-
"maxItems": 64,
|
|
217
|
-
"items": {
|
|
218
|
-
"type": "object",
|
|
219
|
-
"required": ["id", "groupId", "pattern", "why", "failure", "setup", "exercise", "watch", "start"],
|
|
220
|
-
"properties": {
|
|
221
|
-
"id": { "type": "string" },
|
|
222
|
-
"groupId": { "type": "string" },
|
|
223
|
-
"pattern": { "type": "string", "description": "The failure pattern's library id." },
|
|
224
|
-
"why": { "type": "string", "description": "How that pattern could arise in this code." },
|
|
225
|
-
"failure": { "type": "string", "description": "What would go wrong." },
|
|
226
|
-
"setup": { "type": "array", "items": { "type": "string" }, "description": "What must be set up or true first." },
|
|
227
|
-
"exercise": { "type": "string", "description": "What to do." },
|
|
228
|
-
"watch": { "type": "string", "description": "What to watch." },
|
|
229
|
-
"start": { "type": "string", "description": "Where it starts: the start screen, or a prepared start." }
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
]
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
}
|