@cat-factory/contracts 0.343.0 → 0.344.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/agent-presentation.d.ts +2 -2
- package/dist/bugFishing.d.ts +379 -0
- package/dist/bugFishing.d.ts.map +1 -0
- package/dist/bugFishing.js +412 -0
- package/dist/bugFishing.js.map +1 -0
- package/dist/deploy-fix.d.ts +53 -3
- package/dist/deploy-fix.d.ts.map +1 -1
- package/dist/deploy-fix.js +39 -2
- package/dist/deploy-fix.js.map +1 -1
- package/dist/entities.d.ts +18 -1
- package/dist/entities.d.ts.map +1 -1
- package/dist/entities.js +15 -0
- package/dist/entities.js.map +1 -1
- package/dist/environment-investigation.d.ts +55 -5
- package/dist/environment-investigation.d.ts.map +1 -1
- package/dist/environment-investigation.js +19 -2
- package/dist/environment-investigation.js.map +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +18 -0
- package/dist/errors.js.map +1 -1
- package/dist/execution.d.ts +104 -0
- package/dist/execution.d.ts.map +1 -1
- package/dist/execution.js +12 -0
- package/dist/execution.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/initiative.d.ts +15 -5
- package/dist/initiative.d.ts.map +1 -1
- package/dist/notification-routing.d.ts +3 -3
- package/dist/notification-webhooks.d.ts +7 -5
- package/dist/notification-webhooks.d.ts.map +1 -1
- package/dist/notifications.d.ts +25 -3
- package/dist/notifications.d.ts.map +1 -1
- package/dist/notifications.js +17 -0
- package/dist/notifications.js.map +1 -1
- package/dist/pipeline-purpose.d.ts +4 -0
- package/dist/pipeline-purpose.d.ts.map +1 -1
- package/dist/pipeline-purpose.js +6 -0
- package/dist/pipeline-purpose.js.map +1 -1
- package/dist/pr-report.d.ts +414 -6
- package/dist/pr-report.d.ts.map +1 -1
- package/dist/pr-report.js +143 -2
- package/dist/pr-report.js.map +1 -1
- package/dist/primitives.d.ts +71 -7
- package/dist/primitives.d.ts.map +1 -1
- package/dist/primitives.js +24 -1
- package/dist/primitives.js.map +1 -1
- package/dist/public-api.d.ts +6 -4
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-task-types.d.ts.map +1 -1
- package/dist/public-task-types.js +20 -0
- package/dist/public-task-types.js.map +1 -1
- package/dist/recurring.d.ts +12 -8
- package/dist/recurring.d.ts.map +1 -1
- package/dist/recurring.js +10 -5
- package/dist/recurring.js.map +1 -1
- package/dist/requests.d.ts +47 -7
- package/dist/requests.d.ts.map +1 -1
- package/dist/result-views.d.ts +1 -1
- package/dist/result-views.d.ts.map +1 -1
- package/dist/result-views.js +1 -0
- package/dist/result-views.js.map +1 -1
- package/dist/routes/agent-runs.d.ts +84 -0
- package/dist/routes/agent-runs.d.ts.map +1 -1
- package/dist/routes/board.d.ts +99 -20
- package/dist/routes/board.d.ts.map +1 -1
- package/dist/routes/bug-hunt.d.ts +92 -2
- package/dist/routes/bug-hunt.d.ts.map +1 -1
- package/dist/routes/bugFishing.d.ts +307 -0
- package/dist/routes/bugFishing.d.ts.map +1 -0
- package/dist/routes/bugFishing.js +51 -0
- package/dist/routes/bugFishing.js.map +1 -0
- package/dist/routes/execution.d.ts +428 -2
- package/dist/routes/execution.d.ts.map +1 -1
- package/dist/routes/human-review.d.ts +42 -0
- package/dist/routes/human-review.d.ts.map +1 -1
- package/dist/routes/human-test.d.ts +210 -0
- package/dist/routes/human-test.d.ts.map +1 -1
- package/dist/routes/index.d.ts +1 -0
- package/dist/routes/index.d.ts.map +1 -1
- package/dist/routes/index.js +1 -0
- package/dist/routes/index.js.map +1 -1
- package/dist/routes/initiative.d.ts +52 -17
- package/dist/routes/initiative.d.ts.map +1 -1
- package/dist/routes/notification-webhooks.d.ts +14 -14
- package/dist/routes/notifications.d.ts +12 -6
- package/dist/routes/notifications.d.ts.map +1 -1
- package/dist/routes/public-api.d.ts +17 -11
- package/dist/routes/public-api.d.ts.map +1 -1
- package/dist/routes/public-board.d.ts +2 -2
- package/dist/routes/public-evidence.d.ts +24 -1
- package/dist/routes/public-evidence.d.ts.map +1 -1
- package/dist/routes/recurring.d.ts +5 -5
- package/dist/routes/slack.d.ts +3 -3
- package/dist/routes/tasks.d.ts +12 -3
- package/dist/routes/tasks.d.ts.map +1 -1
- package/dist/routes/visual-confirm.d.ts +126 -0
- package/dist/routes/visual-confirm.d.ts.map +1 -1
- package/dist/routes/workspace-settings.d.ts +6 -3
- package/dist/routes/workspace-settings.d.ts.map +1 -1
- package/dist/routes/workspaces.d.ts +120 -14
- package/dist/routes/workspaces.d.ts.map +1 -1
- package/dist/slack.d.ts +2 -2
- package/dist/snapshot.d.ts +60 -7
- package/dist/snapshot.d.ts.map +1 -1
- package/dist/workspace-settings.d.ts +26 -3
- package/dist/workspace-settings.d.ts.map +1 -1
- package/dist/workspace-settings.js +23 -0
- package/dist/workspace-settings.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,412 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
// ---------------------------------------------------------------------------
|
|
3
|
+
// Bug-fishing expedition wire contracts. A `bug-fishing` task runs the read-only
|
|
4
|
+
// `bug-fisher` container agent over the service's codebase REPEATEDLY — once per
|
|
5
|
+
// ANGLE (a "phase") — hunting for genuine logic gaps, real defects, footguns and
|
|
6
|
+
// unhandled edge cases rather than style opinions. The engine drives the phases as
|
|
7
|
+
// successive dispatches of the SAME step (a container job cannot pause mid-run, the
|
|
8
|
+
// same reason the fork decision splits into two dispatches), recording each phase's
|
|
9
|
+
// findings onto `step.bugFishing` the moment it lands. So a human can triage a
|
|
10
|
+
// finished phase's findings while the later angles are still being fished.
|
|
11
|
+
//
|
|
12
|
+
// Triage is the point of the flow: a human MARKS the findings worth acting on, and
|
|
13
|
+
// each marked finding spawns its OWN bug-fix task (a separate block + run) linked
|
|
14
|
+
// back to the expedition. The pipeline those spawned tasks run is the workspace's
|
|
15
|
+
// `bugFishingFixPipelineId` setting, overridable per marking request, defaulting to
|
|
16
|
+
// the built-in `pl_bugfix`.
|
|
17
|
+
//
|
|
18
|
+
// All expedition state rides the run's `bug-fisher` step (`PipelineStep.bugFishing`)
|
|
19
|
+
// — no side table — so it is runtime-symmetric by construction, exactly like
|
|
20
|
+
// `prReview` / `forkDecision`. See docs/initiatives/bug-fishing-expedition.md.
|
|
21
|
+
// ---------------------------------------------------------------------------
|
|
22
|
+
/**
|
|
23
|
+
* The ANGLES an expedition fishes from, each one pass of the read-only agent over the
|
|
24
|
+
* codebase. They are deliberately disjoint LENSES rather than a difficulty ladder: one pass
|
|
25
|
+
* asked to find everything returns the shallow half of everything, whereas a pass told to
|
|
26
|
+
* think only about concurrency reads the same files with a question that makes the race
|
|
27
|
+
* visible.
|
|
28
|
+
*
|
|
29
|
+
* A PERSISTED closed vocabulary: a phase id is written onto the step's recorded phases and
|
|
30
|
+
* onto every finding, so a value retired here still comes back out of stored runs. Nothing
|
|
31
|
+
* renders a phase by looking its id up — {@link bugFishingPhaseSchema} carries the title and
|
|
32
|
+
* goal it ran under — and {@link describeBugFishingPhase} names an unrecognised id as retired
|
|
33
|
+
* rather than guessing at a current member or rendering `undefined`.
|
|
34
|
+
*/
|
|
35
|
+
export const BUG_FISHING_PHASE_IDS = [
|
|
36
|
+
'control-flow',
|
|
37
|
+
'error-handling',
|
|
38
|
+
'boundaries',
|
|
39
|
+
'concurrency',
|
|
40
|
+
'state-lifecycle',
|
|
41
|
+
'contracts',
|
|
42
|
+
'footguns',
|
|
43
|
+
'requirements',
|
|
44
|
+
];
|
|
45
|
+
export const bugFishingPhaseIdSchema = v.picklist(BUG_FISHING_PHASE_IDS);
|
|
46
|
+
/** Whether `id` is a phase angle this build still ships. Derived from the picklist itself. */
|
|
47
|
+
export function isBugFishingPhaseId(id) {
|
|
48
|
+
return BUG_FISHING_PHASE_IDS.includes(id);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* The shipped angle catalog, in the order an expedition fishes them. Ordered so the angles
|
|
52
|
+
* that most often hide a real defect run first, because an expedition a human stops early has
|
|
53
|
+
* then still covered the ground worth covering.
|
|
54
|
+
*/
|
|
55
|
+
export const BUG_FISHING_PHASES = [
|
|
56
|
+
{
|
|
57
|
+
id: 'control-flow',
|
|
58
|
+
title: 'Logic & control flow',
|
|
59
|
+
goal: 'Find branches that do the wrong thing, or that are missing entirely.',
|
|
60
|
+
focus: 'Read the decision points: conditionals, loops, early returns, switch/match arms and the ' +
|
|
61
|
+
'code paths that fall through them. Look for an inverted or short-circuited condition, a ' +
|
|
62
|
+
'case nobody handled, an off-by-one bound, a branch that cannot be reached, and a value ' +
|
|
63
|
+
'computed but never used where its absence changes the outcome.',
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
id: 'error-handling',
|
|
67
|
+
title: 'Failure handling',
|
|
68
|
+
goal: 'Find failures that are swallowed, mis-attributed, or left half-applied.',
|
|
69
|
+
focus: 'Read every failure path: caught exceptions, rejected promises, non-zero exits, error ' +
|
|
70
|
+
'returns. Look for a catch that discards the cause, a failure reported as a success, a ' +
|
|
71
|
+
'retry over a non-idempotent effect, a partially-applied write with no compensation, and ' +
|
|
72
|
+
'cleanup that only runs on the happy path.',
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
id: 'boundaries',
|
|
76
|
+
title: 'Inputs & boundary conditions',
|
|
77
|
+
goal: 'Find inputs the code does not actually survive.',
|
|
78
|
+
focus: 'Read the entry points and the values that cross them. Look for the empty collection, the ' +
|
|
79
|
+
'zero / negative / maximum number, the absent optional, the very long or non-ASCII string, ' +
|
|
80
|
+
'the duplicate key, and untrusted text that reaches a parsed surface (a shell argument, a ' +
|
|
81
|
+
'query, a rendered template) without being neutralised for it.',
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
id: 'concurrency',
|
|
85
|
+
title: 'Concurrency, ordering & idempotency',
|
|
86
|
+
goal: 'Find what breaks when two callers race, or when the same work arrives twice.',
|
|
87
|
+
focus: 'Read the shared state and the write paths. Look for a read-modify-write with no guard, a ' +
|
|
88
|
+
'check-then-act window, a delete-then-insert standing in for a uniqueness constraint, an ' +
|
|
89
|
+
'external side effect a retry or replay would perform twice, and ordering the code assumes ' +
|
|
90
|
+
'but nothing enforces.',
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
id: 'state-lifecycle',
|
|
94
|
+
title: 'State & resource lifecycle',
|
|
95
|
+
goal: 'Find state that outlives its purpose, or dies before it is finished with.',
|
|
96
|
+
focus: 'Read construction, mutation and teardown. Look for a resource never released on some ' +
|
|
97
|
+
'path, an unbounded cache or queue, a cached value nothing invalidates on the write that ' +
|
|
98
|
+
'moves it, a state machine that admits a transition it should refuse, and state left ' +
|
|
99
|
+
'inconsistent when an operation aborts halfway.',
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
id: 'contracts',
|
|
103
|
+
title: 'Interface contracts',
|
|
104
|
+
goal: 'Find places where a caller and a callee disagree about the deal.',
|
|
105
|
+
focus: 'Read the boundaries between modules, services and stored shapes. Look for a documented ' +
|
|
106
|
+
'guarantee the implementation does not hold, nullability the caller does not expect, a ' +
|
|
107
|
+
'unit or timezone mismatch, a persisted or wire shape a newer reader can no longer parse, ' +
|
|
108
|
+
'and an enum value that exists in stored data but has no arm in the current code.',
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
id: 'footguns',
|
|
112
|
+
title: 'Footguns',
|
|
113
|
+
goal: 'Find code that is correct today and will be broken by the next honest change.',
|
|
114
|
+
focus: 'Read as the next maintainer. Look for an API that is easy to call incorrectly, a silent ' +
|
|
115
|
+
'default that hides a missing decision, a name that misdescribes what the code does, two ' +
|
|
116
|
+
'sources of truth for one fact, and an invariant held only by convention with no test or ' +
|
|
117
|
+
'type enforcing it.',
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
id: 'requirements',
|
|
121
|
+
title: 'Requirements conformance',
|
|
122
|
+
goal: 'Find where the code disagrees with the product requirements and rules you were given.',
|
|
123
|
+
focus: 'Read the supplied requirement, specification and rules documents against the code that ' +
|
|
124
|
+
'implements them. Look for a stated rule with no implementation, an implementation that ' +
|
|
125
|
+
'contradicts a stated rule, and a requirement implemented on one path but not on its ' +
|
|
126
|
+
'siblings. Cite the document and the code side by side. If no such documents were ' +
|
|
127
|
+
'supplied, say exactly that in the summary and return no findings rather than inventing ' +
|
|
128
|
+
'requirements to measure the code against.',
|
|
129
|
+
},
|
|
130
|
+
];
|
|
131
|
+
const PHASE_BY_ID = new Map(BUG_FISHING_PHASES.map((p) => [p.id, p]));
|
|
132
|
+
/**
|
|
133
|
+
* The descriptor for a phase id, including one this build no longer ships.
|
|
134
|
+
*
|
|
135
|
+
* A retired angle is NAMED as retired rather than dropped or guessed onto a current member:
|
|
136
|
+
* stored runs keep the id they ran under, and the reader that hits it first is the window
|
|
137
|
+
* telling a human what an expedition actually covered. Answering `undefined` there would put
|
|
138
|
+
* an empty header over real findings.
|
|
139
|
+
*/
|
|
140
|
+
export function describeBugFishingPhase(id) {
|
|
141
|
+
const known = PHASE_BY_ID.get(id);
|
|
142
|
+
if (known)
|
|
143
|
+
return known;
|
|
144
|
+
return {
|
|
145
|
+
id,
|
|
146
|
+
title: `Retired angle (${id})`,
|
|
147
|
+
goal: 'This angle is no longer part of the shipped expedition.',
|
|
148
|
+
focus: '',
|
|
149
|
+
retired: true,
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
/** How serious a finding is, ordered critical → low. The window groups and colours by this. */
|
|
153
|
+
export const bugFishingSeveritySchema = v.picklist(['critical', 'high', 'medium', 'low']);
|
|
154
|
+
/** Severity order (most severe first) — the one place the ranking is stated. */
|
|
155
|
+
export const BUG_FISHING_SEVERITY_ORDER = [
|
|
156
|
+
'critical',
|
|
157
|
+
'high',
|
|
158
|
+
'medium',
|
|
159
|
+
'low',
|
|
160
|
+
];
|
|
161
|
+
/**
|
|
162
|
+
* What KIND of defect a finding is. Distinct from severity: an expedition is explicitly
|
|
163
|
+
* fishing for more than crashes, and a `footgun` that will cost a week next quarter is a
|
|
164
|
+
* different decision from an `edge-case` that fires today.
|
|
165
|
+
*/
|
|
166
|
+
export const bugFishingFindingKindSchema = v.picklist([
|
|
167
|
+
'bug',
|
|
168
|
+
'logic-gap',
|
|
169
|
+
'edge-case',
|
|
170
|
+
'footgun',
|
|
171
|
+
'requirement-gap',
|
|
172
|
+
'other',
|
|
173
|
+
]);
|
|
174
|
+
/** How sure the agent is that the finding is real — its own judgement, never platform-derived. */
|
|
175
|
+
export const bugFishingConfidenceSchema = v.picklist(['high', 'medium', 'low']);
|
|
176
|
+
/** A phase's lifecycle across the expedition's successive dispatches. */
|
|
177
|
+
export const bugFishingPhaseStatusSchema = v.picklist(['pending', 'fishing', 'completed', 'failed']);
|
|
178
|
+
/**
|
|
179
|
+
* One planned angle of the expedition, as recorded on the step.
|
|
180
|
+
*
|
|
181
|
+
* `title` and `goal` are COPIED from the catalog when the expedition is planned rather than
|
|
182
|
+
* looked up at render time, so a run keeps naming the angle it actually fished even after that
|
|
183
|
+
* angle is retired or reworded.
|
|
184
|
+
*/
|
|
185
|
+
export const bugFishingPhaseSchema = v.object({
|
|
186
|
+
/** The angle's id (a {@link BUG_FISHING_PHASE_IDS} member when it was planned). */
|
|
187
|
+
id: v.string(),
|
|
188
|
+
/** The angle's label as it stood when this expedition planned it. */
|
|
189
|
+
title: v.string(),
|
|
190
|
+
/** What this pass was told to hunt, as it stood when this expedition planned it. */
|
|
191
|
+
goal: v.string(),
|
|
192
|
+
status: bugFishingPhaseStatusSchema,
|
|
193
|
+
/** The agent's one-paragraph account of what it covered; null until the pass settles. */
|
|
194
|
+
summary: v.optional(v.nullable(v.string())),
|
|
195
|
+
/** Epoch ms the pass settled (completed or failed); null while pending / fishing. */
|
|
196
|
+
settledAt: v.optional(v.nullable(v.number())),
|
|
197
|
+
/** Why the pass failed, when it did. Null otherwise. */
|
|
198
|
+
failureReason: v.optional(v.nullable(v.string())),
|
|
199
|
+
});
|
|
200
|
+
/**
|
|
201
|
+
* How far a marked finding's spawn has got.
|
|
202
|
+
*
|
|
203
|
+
* - `pending`: the CLAIM. Written BEFORE the task exists, which is what makes marking safe
|
|
204
|
+
* against two people (or a retried request) marking one finding at the same time: the second
|
|
205
|
+
* claim finds the first and is refused, rather than both creating a task and a run.
|
|
206
|
+
* - `spawned`: terminal. The task exists and its run was started.
|
|
207
|
+
* - `failed`: the claim was taken and the work behind it did not land, carrying the cause. The
|
|
208
|
+
* finding is markable again, because nothing was created for it.
|
|
209
|
+
*/
|
|
210
|
+
export const bugFishingSpawnStatusSchema = v.picklist(['pending', 'spawned', 'failed']);
|
|
211
|
+
/**
|
|
212
|
+
* The record of a finding a human MARKED to be addressed: the bug-fix task the platform
|
|
213
|
+
* spawned for it, and the pipeline that task runs.
|
|
214
|
+
*
|
|
215
|
+
* It is what links the expedition to the work it caused: the window reads the spawned task's
|
|
216
|
+
* live status through it, and the spawned block carries the expedition's own block id back the
|
|
217
|
+
* other way (`Block.expeditionId`).
|
|
218
|
+
*
|
|
219
|
+
* Written TWICE, and the first write is the point. A spawn creates a board task and starts a run,
|
|
220
|
+
* so it is an external side effect in a path two callers can enter at once; the record is
|
|
221
|
+
* therefore taken as a `pending` CLAIM before any of that happens and settled to `spawned` or
|
|
222
|
+
* `failed` after. Reading it as "there is a fix task" means reading {@link
|
|
223
|
+
* bugFishingSpawnStatusSchema}, never merely the presence of this record.
|
|
224
|
+
*/
|
|
225
|
+
export const bugFishingSpawnSchema = v.object({
|
|
226
|
+
/** How far the spawn has got; see {@link bugFishingSpawnStatusSchema}. */
|
|
227
|
+
status: bugFishingSpawnStatusSchema,
|
|
228
|
+
/** The spawned task block's id, minted with the claim so the claimer can recognise its own. */
|
|
229
|
+
taskId: v.string(),
|
|
230
|
+
/**
|
|
231
|
+
* The run started on the task. Null while the claim is `pending`, and on a `spawned` record
|
|
232
|
+
* whose task was created but whose run reported no id.
|
|
233
|
+
*/
|
|
234
|
+
executionId: v.optional(v.nullable(v.string())),
|
|
235
|
+
/** The pipeline the spawned task runs (the resolved default, or the caller's override). */
|
|
236
|
+
pipelineId: v.string(),
|
|
237
|
+
/** Who marked the finding. Null for a system-initiated marking. */
|
|
238
|
+
requestedBy: v.optional(v.nullable(v.string())),
|
|
239
|
+
/** Epoch ms the claim was taken. */
|
|
240
|
+
requestedAt: v.number(),
|
|
241
|
+
/** Why the spawn failed, on a `failed` record. Null otherwise. */
|
|
242
|
+
failureReason: v.optional(v.nullable(v.string())),
|
|
243
|
+
});
|
|
244
|
+
/**
|
|
245
|
+
* How long a `pending` spawn claim holds a finding before another marking may take it.
|
|
246
|
+
*
|
|
247
|
+
* The claim is held across a board insert and a run start, so it is normally seconds. The window
|
|
248
|
+
* exists for the one case the claimer cannot clean up after itself: a process killed between
|
|
249
|
+
* taking the claim and settling it, which would otherwise leave the finding claimed by nobody,
|
|
250
|
+
* forever, with no fix task to show for it. Generous enough that it can never expire under a
|
|
251
|
+
* merely slow start, which would be exactly the double spawn the claim exists to prevent.
|
|
252
|
+
*/
|
|
253
|
+
export const BUG_FISHING_SPAWN_CLAIM_TTL_MS = 5 * 60_000;
|
|
254
|
+
/**
|
|
255
|
+
* Whether a finding is still OPEN: nothing is being done about it, so it may be marked (or
|
|
256
|
+
* dismissed) right now.
|
|
257
|
+
*
|
|
258
|
+
* Here rather than in the engine because both sides have to agree about it and neither owns the
|
|
259
|
+
* answer: the engine refuses a second marking with it, and the window counts "N left to triage"
|
|
260
|
+
* and decides which rows the working list shows with it. Stated once, the two cannot drift into
|
|
261
|
+
* a window that offers a mark the engine will refuse.
|
|
262
|
+
*
|
|
263
|
+
* Three ways to be open: nothing has been claimed, the last attempt `failed` (nothing was created,
|
|
264
|
+
* so there is nothing to collide with), or a `pending` claim has outlived
|
|
265
|
+
* {@link BUG_FISHING_SPAWN_CLAIM_TTL_MS} and its claimer is gone. A `spawned` record is terminal:
|
|
266
|
+
* the task exists, and marking again would file the same bug twice.
|
|
267
|
+
*/
|
|
268
|
+
export function bugFishingSpawnIsClaimable(spawn, now) {
|
|
269
|
+
if (!spawn)
|
|
270
|
+
return true;
|
|
271
|
+
if (spawn.status === 'spawned')
|
|
272
|
+
return false;
|
|
273
|
+
if (spawn.status === 'failed')
|
|
274
|
+
return true;
|
|
275
|
+
return now - spawn.requestedAt >= BUG_FISHING_SPAWN_CLAIM_TTL_MS;
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* One finding, id-stamped by the engine and anchored to the phase that surfaced it.
|
|
279
|
+
*
|
|
280
|
+
* `evidence` is kept apart from `detail` on purpose: an expedition that cannot point at the
|
|
281
|
+
* code it is describing is speculating, and separating the two makes that visible to the human
|
|
282
|
+
* triaging it rather than something they have to infer from the prose.
|
|
283
|
+
*/
|
|
284
|
+
export const bugFishingFindingSchema = v.object({
|
|
285
|
+
/** Engine-minted stable id (`bff_*`); the marking requests carry these ids. */
|
|
286
|
+
id: v.string(),
|
|
287
|
+
/** The phase that surfaced it (a phase id; see {@link describeBugFishingPhase}). */
|
|
288
|
+
phaseId: v.string(),
|
|
289
|
+
/** Repo-relative path the finding concerns; empty when it is not anchored to one file. */
|
|
290
|
+
path: v.string(),
|
|
291
|
+
/** The line the finding anchors to, or null. */
|
|
292
|
+
line: v.optional(v.nullable(v.number())),
|
|
293
|
+
severity: bugFishingSeveritySchema,
|
|
294
|
+
kind: bugFishingFindingKindSchema,
|
|
295
|
+
confidence: bugFishingConfidenceSchema,
|
|
296
|
+
/** Short headline. */
|
|
297
|
+
title: v.string(),
|
|
298
|
+
/** The full finding, in prose: what is wrong and what happens because of it. */
|
|
299
|
+
detail: v.string(),
|
|
300
|
+
/** How the defect manifests: the concrete inputs / interleaving / state that triggers it. */
|
|
301
|
+
failureScenario: v.optional(v.nullable(v.string())),
|
|
302
|
+
/** What the agent actually read that supports the claim (code it can point at). */
|
|
303
|
+
evidence: v.optional(v.nullable(v.string())),
|
|
304
|
+
/** A concrete suggested change, when the agent offered one. */
|
|
305
|
+
suggestedFix: v.optional(v.nullable(v.string())),
|
|
306
|
+
/**
|
|
307
|
+
* The bug-fix task spawned for this finding, when a human marked it. Null when nobody has.
|
|
308
|
+
* A record with a `failed` status is a mark that did not land: the finding is markable again,
|
|
309
|
+
* so a reader deciding whether this finding is being worked on reads the STATUS, not the
|
|
310
|
+
* presence of the record.
|
|
311
|
+
*/
|
|
312
|
+
spawn: v.optional(v.nullable(bugFishingSpawnSchema)),
|
|
313
|
+
/** Set when a human dismissed the finding: it stays on the record, struck through. */
|
|
314
|
+
dismissed: v.optional(v.boolean(), false),
|
|
315
|
+
});
|
|
316
|
+
/**
|
|
317
|
+
* The expedition lifecycle on a `bug-fisher` step:
|
|
318
|
+
* - `fishing`: a phase's read-only container job is in flight (or the next one is about to be).
|
|
319
|
+
* - `awaiting_triage`: every phase settled; parked for the human to finish triaging.
|
|
320
|
+
* - `done`: the human finished the expedition (the run advances past it).
|
|
321
|
+
*
|
|
322
|
+
* There is deliberately no `skipped`: an expedition with no angles cannot be asked for, because
|
|
323
|
+
* an empty selection means "fish every angle" (see `planBugFishingPhases`).
|
|
324
|
+
*
|
|
325
|
+
* There is deliberately no `triaging` state: marking a finding is available from the moment
|
|
326
|
+
* its phase lands, INCLUDING while later phases are still fishing, which is the whole reason
|
|
327
|
+
* the angles run as separate passes.
|
|
328
|
+
*/
|
|
329
|
+
export const bugFishingStatusSchema = v.picklist(['fishing', 'awaiting_triage', 'done']);
|
|
330
|
+
/**
|
|
331
|
+
* Live bug-fishing state carried on the run's `bug-fisher` step. Created by the engine when
|
|
332
|
+
* the step first runs (planning the phases from the task's selection), extended by each
|
|
333
|
+
* phase's completion, and mutated by the human's markings.
|
|
334
|
+
*/
|
|
335
|
+
export const bugFishingStepStateSchema = v.object({
|
|
336
|
+
status: bugFishingStatusSchema,
|
|
337
|
+
/** The planned angles, in the order they are fished. */
|
|
338
|
+
phases: v.optional(v.array(bugFishingPhaseSchema), []),
|
|
339
|
+
/**
|
|
340
|
+
* Index into {@link bugFishingStepStateSchema}'s `phases` of the pass currently being fished
|
|
341
|
+
* (or about to be). Equal to `phases.length` once every angle has settled, which is what the
|
|
342
|
+
* `awaiting_triage` status says in the other direction; an index rather than a pointer so an
|
|
343
|
+
* empty phase list still has an unambiguous value.
|
|
344
|
+
*/
|
|
345
|
+
currentPhaseIndex: v.optional(v.number(), 0),
|
|
346
|
+
/** Every finding surfaced so far, oldest phase first, severity-ordered within a phase. */
|
|
347
|
+
findings: v.optional(v.array(bugFishingFindingSchema), []),
|
|
348
|
+
/** Identifier of the model that fished, for transparency. */
|
|
349
|
+
model: v.optional(v.nullable(v.string())),
|
|
350
|
+
/**
|
|
351
|
+
* The pipeline a marked finding's spawned task runs when the marking names none: the
|
|
352
|
+
* workspace's `bugFishingFixPipelineId`, else the built-in bug-fix preset. Resolved when the
|
|
353
|
+
* expedition is planned and recorded here, so the window can state the default it will use
|
|
354
|
+
* without a second read and the record says which default a spawn actually took.
|
|
355
|
+
*/
|
|
356
|
+
defaultFixPipelineId: v.optional(v.nullable(v.string())),
|
|
357
|
+
});
|
|
358
|
+
// ---- Agent output (lenient) ----------------------------------------------
|
|
359
|
+
/**
|
|
360
|
+
* The LENIENT structured shape the read-only `bug-fisher` container agent returns as
|
|
361
|
+
* `result.custom` for ONE phase (the engine mints the finding ids and stamps the phase).
|
|
362
|
+
* Every field falls back to a safe default (`v.fallback`) — exactly like
|
|
363
|
+
* `prReviewAgentOutputSchema` — so a partially-malformed reply degrades sensibly rather than
|
|
364
|
+
* failing a pass whose other findings are fine.
|
|
365
|
+
*/
|
|
366
|
+
export const bugFishingAgentOutputSchema = v.object({
|
|
367
|
+
/** What this pass covered and what it concluded, in one paragraph. */
|
|
368
|
+
summary: v.fallback(v.optional(v.string()), undefined),
|
|
369
|
+
/** The findings this pass surfaced. */
|
|
370
|
+
findings: v.fallback(v.array(v.fallback(v.object({
|
|
371
|
+
path: v.fallback(v.string(), ''),
|
|
372
|
+
line: v.fallback(v.optional(v.number()), undefined),
|
|
373
|
+
severity: v.fallback(bugFishingSeveritySchema, 'medium'),
|
|
374
|
+
kind: v.fallback(bugFishingFindingKindSchema, 'other'),
|
|
375
|
+
confidence: v.fallback(bugFishingConfidenceSchema, 'medium'),
|
|
376
|
+
title: v.fallback(v.string(), ''),
|
|
377
|
+
detail: v.fallback(v.string(), ''),
|
|
378
|
+
failureScenario: v.fallback(v.optional(v.string()), undefined),
|
|
379
|
+
evidence: v.fallback(v.optional(v.string()), undefined),
|
|
380
|
+
suggestedFix: v.fallback(v.optional(v.string()), undefined),
|
|
381
|
+
}), {
|
|
382
|
+
path: '',
|
|
383
|
+
severity: 'medium',
|
|
384
|
+
kind: 'other',
|
|
385
|
+
confidence: 'medium',
|
|
386
|
+
title: '',
|
|
387
|
+
detail: '',
|
|
388
|
+
})), []),
|
|
389
|
+
});
|
|
390
|
+
// ---- Request bodies -------------------------------------------------------
|
|
391
|
+
/**
|
|
392
|
+
* Mark findings to be addressed: each one spawns its OWN bug-fix task, linked back to the
|
|
393
|
+
* expedition. Accepted while the expedition is still fishing later phases as well as once it
|
|
394
|
+
* has parked, because a completed phase's findings are actionable the moment they land.
|
|
395
|
+
*
|
|
396
|
+
* `pipelineId` overrides, for THIS request only, the pipeline the spawned tasks run; omitted
|
|
397
|
+
* ⇒ the expedition's resolved default (the workspace's `bugFishingFixPipelineId`, else the
|
|
398
|
+
* built-in bug-fix preset).
|
|
399
|
+
*/
|
|
400
|
+
export const addressBugFishingFindingsSchema = v.object({
|
|
401
|
+
/** The findings to act on. At least one; an unknown or already-spawned id is refused. */
|
|
402
|
+
findingIds: v.pipe(v.array(v.string()), v.minLength(1)),
|
|
403
|
+
/** Pipeline the spawned tasks run; omitted ⇒ the expedition's default. */
|
|
404
|
+
pipelineId: v.optional(v.string()),
|
|
405
|
+
});
|
|
406
|
+
/**
|
|
407
|
+
* Finish a parked expedition: the human is done triaging and the run advances past the step.
|
|
408
|
+
* Takes no fields — every marking already happened through its own request, so there is no
|
|
409
|
+
* curated selection left to carry here.
|
|
410
|
+
*/
|
|
411
|
+
export const resolveBugFishingSchema = v.object({});
|
|
412
|
+
//# sourceMappingURL=bugFishing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bugFishing.js","sourceRoot":"","sources":["../src/bugFishing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,8EAA8E;AAC9E,iFAAiF;AACjF,iFAAiF;AACjF,iFAAiF;AACjF,mFAAmF;AACnF,oFAAoF;AACpF,oFAAoF;AACpF,+EAA+E;AAC/E,2EAA2E;AAC3E,EAAE;AACF,mFAAmF;AACnF,kFAAkF;AAClF,kFAAkF;AAClF,oFAAoF;AACpF,4BAA4B;AAC5B,EAAE;AACF,qFAAqF;AACrF,6EAA6E;AAC7E,+EAA+E;AAC/E,8EAA8E;AAE9E;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,cAAc;IACd,gBAAgB;IAChB,YAAY;IACZ,aAAa;IACb,iBAAiB;IACjB,WAAW;IACX,UAAU;IACV,cAAc;CACN,CAAA;AAEV,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,QAAQ,CAAC,qBAAqB,CAAC,CAAA;AAGxE,8FAA8F;AAC9F,MAAM,UAAU,mBAAmB,CAAC,EAAU;IAC5C,OAAQ,qBAA2C,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;AAClE,CAAC;AAeD;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAyC;IACtE;QACE,EAAE,EAAE,cAAc;QAClB,KAAK,EAAE,sBAAsB;QAC7B,IAAI,EAAE,sEAAsE;QAC5E,KAAK,EACH,0FAA0F;YAC1F,0FAA0F;YAC1F,yFAAyF;YACzF,gEAAgE;KACnE;IACD;QACE,EAAE,EAAE,gBAAgB;QACpB,KAAK,EAAE,kBAAkB;QACzB,IAAI,EAAE,yEAAyE;QAC/E,KAAK,EACH,uFAAuF;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,SAAS,CAAC;KAC5D,CAAC,EACF;QACE,IAAI,EAAE,EAAE;QACR,QAAQ,EAAE,QAAiB;QAC3B,IAAI,EAAE,OAAgB;QACtB,UAAU,EAAE,QAAiB;QAC7B,KAAK,EAAE,EAAE;QACT,MAAM,EAAE,EAAE;KACX,CACF,CACF,EACD,EAAE,CACH;CACF,CAAC,CAAA;AAGF,8EAA8E;AAE9E;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC,MAAM,CAAC;IACtD,yFAAyF;IACzF,UAAU,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IACvD,0EAA0E;IAC1E,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CACnC,CAAC,CAAA;AAGF;;;;GAIG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA"}
|
package/dist/deploy-fix.d.ts
CHANGED
|
@@ -40,8 +40,21 @@ export type DeployFixConfig = v.InferOutput<typeof deployFixConfigSchema>;
|
|
|
40
40
|
* teardown probe and the bugfix reproduction proof are built on.
|
|
41
41
|
*/
|
|
42
42
|
export declare const deployFixAttemptSchema: v.ObjectSchema<{
|
|
43
|
-
/**
|
|
43
|
+
/**
|
|
44
|
+
* 1-based ordinal in this log. It matches `attempts` on a run that never loops back to the
|
|
45
|
+
* deployer, and diverges from it after one: the counter is re-armed for each provisioning cycle
|
|
46
|
+
* (`restartDeployFixState`) while these rows survive the whole run, being what the verification
|
|
47
|
+
* report reduces.
|
|
48
|
+
*/
|
|
44
49
|
readonly attempt: v.NumberSchema<undefined>;
|
|
50
|
+
/**
|
|
51
|
+
* The 0-based provisioning CYCLE this round was dispatched in. A loop-back to the deployer
|
|
52
|
+
* re-arms the budget and opens a new cycle (`restartDeployFixState`) while these rows
|
|
53
|
+
* survive the whole run, so the marker is what tells a reader which rounds were counted
|
|
54
|
+
* against the LIVE budget and how many cycles the log spans. Absent on a row written before
|
|
55
|
+
* the field existed, which reads as cycle 0, the only cycle such a run had reached.
|
|
56
|
+
*/
|
|
57
|
+
readonly cycle: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, undefined>;
|
|
45
58
|
/** Epoch ms when the fixer job settled. */
|
|
46
59
|
readonly at: v.NumberSchema<undefined>;
|
|
47
60
|
/** Whether the fixer's own job completed or died without finishing. */
|
|
@@ -78,10 +91,34 @@ export declare const deployFixStateSchema: v.ObjectSchema<{
|
|
|
78
91
|
readonly reason: v.StringSchema<undefined>;
|
|
79
92
|
/** The provisioning error the in-flight round was handed. */
|
|
80
93
|
readonly lastError: v.StringSchema<undefined>;
|
|
81
|
-
/**
|
|
94
|
+
/**
|
|
95
|
+
* The 0-based provisioning cycle now running, bumped by `restartDeployFixState`. It is
|
|
96
|
+
* what {@link deployFixAttemptSchema}'s own `cycle` is stamped from, and what scopes a read of
|
|
97
|
+
* the run-long log back to the rounds the live budget was spent on.
|
|
98
|
+
*/
|
|
99
|
+
readonly cycle: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, undefined>;
|
|
100
|
+
/**
|
|
101
|
+
* Per-round history, newest last, CAPPED at {@link MAX_DEPLOY_FIX_ATTEMPT_LOG}. The log
|
|
102
|
+
* survives the whole run (the verification report reduces it) while the state rides the run's
|
|
103
|
+
* `detail` JSON, which is re-serialized on every step write, so an uncapped log would grow
|
|
104
|
+
* with every loop-back for the rest of the run. See {@link droppedAttempts}.
|
|
105
|
+
*/
|
|
82
106
|
readonly attemptLog: v.OptionalSchema<v.NullableSchema<v.ArraySchema<v.ObjectSchema<{
|
|
83
|
-
/**
|
|
107
|
+
/**
|
|
108
|
+
* 1-based ordinal in this log. It matches `attempts` on a run that never loops back to the
|
|
109
|
+
* deployer, and diverges from it after one: the counter is re-armed for each provisioning cycle
|
|
110
|
+
* (`restartDeployFixState`) while these rows survive the whole run, being what the verification
|
|
111
|
+
* report reduces.
|
|
112
|
+
*/
|
|
84
113
|
readonly attempt: v.NumberSchema<undefined>;
|
|
114
|
+
/**
|
|
115
|
+
* The 0-based provisioning CYCLE this round was dispatched in. A loop-back to the deployer
|
|
116
|
+
* re-arms the budget and opens a new cycle (`restartDeployFixState`) while these rows
|
|
117
|
+
* survive the whole run, so the marker is what tells a reader which rounds were counted
|
|
118
|
+
* against the LIVE budget and how many cycles the log spans. Absent on a row written before
|
|
119
|
+
* the field existed, which reads as cycle 0, the only cycle such a run had reached.
|
|
120
|
+
*/
|
|
121
|
+
readonly cycle: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, undefined>;
|
|
85
122
|
/** Epoch ms when the fixer job settled. */
|
|
86
123
|
readonly at: v.NumberSchema<undefined>;
|
|
87
124
|
/** Whether the fixer's own job completed or died without finishing. */
|
|
@@ -93,6 +130,19 @@ export declare const deployFixStateSchema: v.ObjectSchema<{
|
|
|
93
130
|
/** The fixer's account of what it changed, or the job error when it failed. */
|
|
94
131
|
readonly summary: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
95
132
|
}, undefined>, undefined>, undefined>, undefined>;
|
|
133
|
+
/**
|
|
134
|
+
* How many of the oldest rounds the {@link attemptLog} cap has dropped. Recorded rather than
|
|
135
|
+
* silently truncated: the report counts finished and died rounds off the surviving rows, so a
|
|
136
|
+
* dropped one would otherwise turn into a round that reads as never having run.
|
|
137
|
+
*/
|
|
138
|
+
readonly droppedAttempts: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, undefined>;
|
|
96
139
|
}, undefined>;
|
|
97
140
|
export type DeployFixState = v.InferOutput<typeof deployFixStateSchema>;
|
|
141
|
+
/**
|
|
142
|
+
* How many `deploy-fixer` rounds the run-long {@link deployFixStateSchema.entries.attemptLog}
|
|
143
|
+
* keeps. Four times the per-cycle ceiling of 5, so only a run that looped its deployer back
|
|
144
|
+
* several times over reaches it, and what it then drops is the oldest cycle rather than the one
|
|
145
|
+
* a reader is looking at.
|
|
146
|
+
*/
|
|
147
|
+
export declare const MAX_DEPLOY_FIX_ATTEMPT_LOG = 20;
|
|
98
148
|
//# sourceMappingURL=deploy-fix.d.ts.map
|
package/dist/deploy-fix.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy-fix.d.ts","sourceRoot":"","sources":["../src/deploy-fix.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAiB5B;;;;;;GAMG;AACH,eAAO,MAAM,+BAA+B,IAAI,CAAA;AAEhD,8EAA8E;AAC9E,eAAO,MAAM,uBAAuB,4KAAgE,CAAA;AAEpG;;;;;;;;;;GAUG;AACH,eAAO,MAAM,qBAAqB;IAChC;;;;OAIG;;IAEH,wEAAwE;;aAExE,CAAA;AACF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEzE;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB;IACjC
|
|
1
|
+
{"version":3,"file":"deploy-fix.d.ts","sourceRoot":"","sources":["../src/deploy-fix.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAiB5B;;;;;;GAMG;AACH,eAAO,MAAM,+BAA+B,IAAI,CAAA;AAEhD,8EAA8E;AAC9E,eAAO,MAAM,uBAAuB,4KAAgE,CAAA;AAEpG;;;;;;;;;;GAUG;AACH,eAAO,MAAM,qBAAqB;IAChC;;;;OAIG;;IAEH,wEAAwE;;aAExE,CAAA;AACF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEzE;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB;IACjC;;;;;OAKG;;IAEH;;;;;;OAMG;;IAEH,2CAA2C;;IAE3C,uEAAuE;;IAEvE,8DAA8D;;IAE9D,oDAAoD;;IAEpD,+EAA+E;;aAE/E,CAAA;AACF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAE3E;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,oBAAoB;;IAE/B,sCAAsC;;IAEtC,oGAAoG;;IAEpG,6DAA6D;;IAE7D,uFAAuF;;IAEvF,6DAA6D;;IAE7D;;;;OAIG;;IAEH;;;;;OAKG;;QA/DH;;;;;WAKG;;QAEH;;;;;;WAMG;;QAEH,2CAA2C;;QAE3C,uEAAuE;;QAEvE,8DAA8D;;QAE9D,oDAAoD;;QAEpD,+EAA+E;;;IA0C/E;;;;OAIG;;aAEH,CAAA;AACF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEvE;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,KAAK,CAAA"}
|
package/dist/deploy-fix.js
CHANGED
|
@@ -53,8 +53,21 @@ export const deployFixConfigSchema = v.object({
|
|
|
53
53
|
* teardown probe and the bugfix reproduction proof are built on.
|
|
54
54
|
*/
|
|
55
55
|
export const deployFixAttemptSchema = v.object({
|
|
56
|
-
/**
|
|
56
|
+
/**
|
|
57
|
+
* 1-based ordinal in this log. It matches `attempts` on a run that never loops back to the
|
|
58
|
+
* deployer, and diverges from it after one: the counter is re-armed for each provisioning cycle
|
|
59
|
+
* (`restartDeployFixState`) while these rows survive the whole run, being what the verification
|
|
60
|
+
* report reduces.
|
|
61
|
+
*/
|
|
57
62
|
attempt: v.number(),
|
|
63
|
+
/**
|
|
64
|
+
* The 0-based provisioning CYCLE this round was dispatched in. A loop-back to the deployer
|
|
65
|
+
* re-arms the budget and opens a new cycle (`restartDeployFixState`) while these rows
|
|
66
|
+
* survive the whole run, so the marker is what tells a reader which rounds were counted
|
|
67
|
+
* against the LIVE budget and how many cycles the log spans. Absent on a row written before
|
|
68
|
+
* the field existed, which reads as cycle 0, the only cycle such a run had reached.
|
|
69
|
+
*/
|
|
70
|
+
cycle: v.optional(v.nullable(v.number())),
|
|
58
71
|
/** Epoch ms when the fixer job settled. */
|
|
59
72
|
at: v.number(),
|
|
60
73
|
/** Whether the fixer's own job completed or died without finishing. */
|
|
@@ -90,7 +103,31 @@ export const deployFixStateSchema = v.object({
|
|
|
90
103
|
reason: v.string(),
|
|
91
104
|
/** The provisioning error the in-flight round was handed. */
|
|
92
105
|
lastError: v.string(),
|
|
93
|
-
/**
|
|
106
|
+
/**
|
|
107
|
+
* The 0-based provisioning cycle now running, bumped by `restartDeployFixState`. It is
|
|
108
|
+
* what {@link deployFixAttemptSchema}'s own `cycle` is stamped from, and what scopes a read of
|
|
109
|
+
* the run-long log back to the rounds the live budget was spent on.
|
|
110
|
+
*/
|
|
111
|
+
cycle: v.optional(v.nullable(v.number())),
|
|
112
|
+
/**
|
|
113
|
+
* Per-round history, newest last, CAPPED at {@link MAX_DEPLOY_FIX_ATTEMPT_LOG}. The log
|
|
114
|
+
* survives the whole run (the verification report reduces it) while the state rides the run's
|
|
115
|
+
* `detail` JSON, which is re-serialized on every step write, so an uncapped log would grow
|
|
116
|
+
* with every loop-back for the rest of the run. See {@link droppedAttempts}.
|
|
117
|
+
*/
|
|
94
118
|
attemptLog: v.optional(v.nullable(v.array(deployFixAttemptSchema))),
|
|
119
|
+
/**
|
|
120
|
+
* How many of the oldest rounds the {@link attemptLog} cap has dropped. Recorded rather than
|
|
121
|
+
* silently truncated: the report counts finished and died rounds off the surviving rows, so a
|
|
122
|
+
* dropped one would otherwise turn into a round that reads as never having run.
|
|
123
|
+
*/
|
|
124
|
+
droppedAttempts: v.optional(v.nullable(v.number())),
|
|
95
125
|
});
|
|
126
|
+
/**
|
|
127
|
+
* How many `deploy-fixer` rounds the run-long {@link deployFixStateSchema.entries.attemptLog}
|
|
128
|
+
* keeps. Four times the per-cycle ceiling of 5, so only a run that looped its deployer back
|
|
129
|
+
* several times over reaches it, and what it then drops is the oldest cycle rather than the one
|
|
130
|
+
* a reader is looking at.
|
|
131
|
+
*/
|
|
132
|
+
export const MAX_DEPLOY_FIX_ATTEMPT_LOG = 20;
|
|
96
133
|
//# sourceMappingURL=deploy-fix.js.map
|
package/dist/deploy-fix.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy-fix.js","sourceRoot":"","sources":["../src/deploy-fix.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,8EAA8E;AAC9E,yFAAyF;AACzF,oDAAoD;AACpD,EAAE;AACF,gGAAgG;AAChG,0FAA0F;AAC1F,2CAA2C;AAC3C,EAAE;AACF,iGAAiG;AACjG,+FAA+F;AAC/F,gGAAgG;AAChG,wDAAwD;AACxD,wDAAwD;AACxD,8EAA8E;AAE9E;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAA;AAEhD,8EAA8E;AAC9E,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;AAEpG;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C;;;;OAIG;IACH,OAAO,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;IAChC,wEAAwE;IACxE,WAAW,EAAE,CAAC,CAAC,QAAQ,CAAC,uBAAuB,CAAC;CACjD,CAAC,CAAA;AAGF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C
|
|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}
|
package/dist/entities.d.ts
CHANGED
|
@@ -188,6 +188,21 @@ export declare const blockSchema: v.ObjectSchema<{
|
|
|
188
188
|
* initiative. Only meaningful on `task`-level blocks.
|
|
189
189
|
*/
|
|
190
190
|
readonly initiativeId: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
191
|
+
/**
|
|
192
|
+
* Membership link to the BUG-FISHING EXPEDITION task whose finding caused this task to
|
|
193
|
+
* exist, INDEPENDENT of `parentId` (which stays the enclosing service frame, so a spawned
|
|
194
|
+
* fix runs against the same repo the expedition fished).
|
|
195
|
+
*
|
|
196
|
+
* Written once, when a human marks a finding and the platform spawns the fix task; never
|
|
197
|
+
* cleared, because it records where the work came from rather than a current relationship.
|
|
198
|
+
* The other direction lives on the expedition's own step state
|
|
199
|
+
* (`step.bugFishing.findings[].spawn`), and that side is written FIRST, as a `pending` claim
|
|
200
|
+
* carrying the id this block is about to be created with: spawning is an external side effect
|
|
201
|
+
* two markings can enter at once, so the claim is what makes exactly one of them win. Which is
|
|
202
|
+
* why the finding's own record is read through its status rather than its presence.
|
|
203
|
+
* Absent/null ⇒ not spawned by an expedition. Only meaningful on `task`-level blocks.
|
|
204
|
+
*/
|
|
205
|
+
readonly expeditionId: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
191
206
|
/**
|
|
192
207
|
* Preceding-task toggle: when this task's PR merges (it reaches `done`), the
|
|
193
208
|
* engine automatically starts every task that `dependsOn` it and whose other
|
|
@@ -226,7 +241,7 @@ export declare const blockSchema: v.ObjectSchema<{
|
|
|
226
241
|
* fields, and the per-service running-task limit's optional per-type bucketing. Only
|
|
227
242
|
* meaningful on `task`-level blocks; absent ⇒ treated as `feature`.
|
|
228
243
|
*/
|
|
229
|
-
readonly taskType: v.OptionalSchema<v.UnionSchema<[v.PicklistSchema<readonly ["feature", "bug", "document", "spike", "review", "ralph", "media", "recurring"], undefined>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "Consumer id must be <namespace>:<name> (lowercase a-z0-9, dash-separated)">]>], undefined>, undefined>;
|
|
244
|
+
readonly taskType: v.OptionalSchema<v.UnionSchema<[v.PicklistSchema<readonly ["feature", "bug", "bug-fishing", "document", "spike", "review", "ralph", "media", "recurring"], undefined>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "Consumer id must be <namespace>:<name> (lowercase a-z0-9, dash-separated)">]>], undefined>, undefined>;
|
|
230
245
|
/**
|
|
231
246
|
* Small per-type fields collected on the create-task form (see {@link taskTypeFieldsSchema}),
|
|
232
247
|
* e.g. a bug's severity / repro steps, a spike's time-box. Only meaningful on `task`-level
|
|
@@ -256,6 +271,8 @@ export declare const blockSchema: v.ObjectSchema<{
|
|
|
256
271
|
readonly prUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 500, undefined>]>, undefined>;
|
|
257
272
|
readonly reviewFocus: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 4000, undefined>]>, undefined>;
|
|
258
273
|
readonly reviewSkillIds: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>, v.MaxLengthAction<string[], 8, undefined>]>, undefined>;
|
|
274
|
+
readonly fishingPhaseIds: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 60, undefined>]>, undefined>, v.MaxLengthAction<string[], 32, undefined>]>, undefined>;
|
|
275
|
+
readonly fishingFocus: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 4000, undefined>]>, undefined>;
|
|
259
276
|
readonly custom: v.OptionalSchema<v.RecordSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 80, undefined>]>, v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>, v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>, undefined>, v.MaxLengthAction<string[], 50, undefined>]>, v.BooleanSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>, undefined>;
|
|
260
277
|
}, undefined>, undefined>, undefined>;
|
|
261
278
|
/**
|