pi-spine 1.0.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/LICENSE +21 -0
- package/README.md +563 -0
- package/bin/get-version.mjs +35 -0
- package/bin/spine-batch.mjs +425 -0
- package/bin/spine-cli/batch.mjs +47 -0
- package/bin/spine-cli/gate.mjs +10 -0
- package/bin/spine-cli/integrate.mjs +10 -0
- package/bin/spine-cli/plan.mjs +12 -0
- package/bin/spine-cli/shared.mjs +73 -0
- package/bin/spine-cli/status.mjs +18 -0
- package/bin/spine-cli/verify.mjs +199 -0
- package/bin/spine-config.mjs +212 -0
- package/bin/spine-dashboard.mjs +178 -0
- package/bin/spine-deps.mjs +69 -0
- package/bin/spine-doctor.mjs +468 -0
- package/bin/spine-gate.mjs +137 -0
- package/bin/spine-init.mjs +398 -0
- package/bin/spine-integrate.mjs +77 -0
- package/bin/spine-journal.mjs +198 -0
- package/bin/spine-migrate-from-taskplane.mjs +136 -0
- package/bin/spine-plan.mjs +83 -0
- package/bin/spine-preflight.mjs +700 -0
- package/bin/spine-report-progress.d.mts +28 -0
- package/bin/spine-report-progress.mjs +126 -0
- package/bin/spine-review-step.d.mts +24 -0
- package/bin/spine-review-step.mjs +124 -0
- package/bin/spine-rules.mjs +35 -0
- package/bin/spine-settings.mjs +186 -0
- package/bin/spine-state.mjs +110 -0
- package/bin/spine-status.mjs +79 -0
- package/bin/spine-tasks.mjs +293 -0
- package/bin/spine-worker-runner.mjs +314 -0
- package/bin/spine.mjs +404 -0
- package/extensions/spine/settings-slash.ts +20 -0
- package/extensions/spine/slash-commands.ts +806 -0
- package/extensions/spine/worker-tools.ts +279 -0
- package/extensions/spine-orchestrator.ts +12 -0
- package/package.json +72 -0
- package/skills/.gitkeep +0 -0
- package/skills/create-spine-tasks/SKILL.md +375 -0
- package/skills/create-spine-tasks/references/context-template.md +25 -0
- package/skills/create-spine-tasks/references/contract-template.md +98 -0
- package/skills/create-spine-tasks/references/explore-template.md +63 -0
- package/skills/create-spine-tasks/references/prompt-template.md +276 -0
- package/src/batch/abort.mjs +272 -0
- package/src/batch/agent-session-worker.mjs +297 -0
- package/src/batch/batch-state-io.mjs +53 -0
- package/src/batch/contract-verify.mjs +310 -0
- package/src/batch/detached-start.mjs +778 -0
- package/src/batch/diagnosis.mjs +378 -0
- package/src/batch/engine-lanes/merge.mjs +632 -0
- package/src/batch/engine-lanes/queue.mjs +208 -0
- package/src/batch/engine-lanes/review.mjs +970 -0
- package/src/batch/engine-lanes.mjs +388 -0
- package/src/batch/engine-scope.mjs +251 -0
- package/src/batch/engine.mjs +445 -0
- package/src/batch/evidence-command.mjs +157 -0
- package/src/batch/evidence.mjs +203 -0
- package/src/batch/gate.mjs +359 -0
- package/src/batch/git-commit-env.mjs +46 -0
- package/src/batch/git-exec.mjs +26 -0
- package/src/batch/heartbeat.mjs +430 -0
- package/src/batch/integrate.mjs +414 -0
- package/src/batch/journal-rebuild.mjs +388 -0
- package/src/batch/journal.mjs +373 -0
- package/src/batch/lane-commit.mjs +153 -0
- package/src/batch/lifecycle.mjs +364 -0
- package/src/batch/metrics.mjs +265 -0
- package/src/batch/orphan-detect.mjs +210 -0
- package/src/batch/post-merge-limbo.mjs +80 -0
- package/src/batch/postmortem.mjs +296 -0
- package/src/batch/readers/spine-state.mjs +95 -0
- package/src/batch/readers/taskplane-state.mjs +136 -0
- package/src/batch/reconcile.mjs +729 -0
- package/src/batch/resume-common.mjs +104 -0
- package/src/batch/resume-engine.mjs +66 -0
- package/src/batch/resume-multi-lanes.mjs +479 -0
- package/src/batch/resume-multi-validate.mjs +187 -0
- package/src/batch/resume-multi.mjs +254 -0
- package/src/batch/resume.mjs +475 -0
- package/src/batch/retry.mjs +257 -0
- package/src/batch/review-scope.mjs +136 -0
- package/src/batch/review.mjs +1045 -0
- package/src/batch/salvage.mjs +332 -0
- package/src/batch/state.mjs +680 -0
- package/src/batch/task-stall-budget.mjs +88 -0
- package/src/batch/worker-host.mjs +683 -0
- package/src/batch/worker-output.mjs +253 -0
- package/src/batch/worker-prompt.mjs +84 -0
- package/src/batch/worktree.mjs +290 -0
- package/src/cli/deps.mjs +141 -0
- package/src/cli/handoff.mjs +364 -0
- package/src/cli/rules.mjs +429 -0
- package/src/cli/settings-set.mjs +171 -0
- package/src/cli/settings-show.mjs +140 -0
- package/src/cli/settings-slash.mjs +107 -0
- package/src/config/contract.mjs +56 -0
- package/src/config/cursor-rules/discover.mjs +416 -0
- package/src/config/cursor-rules/index.mjs +39 -0
- package/src/config/cursor-rules/match-globs.mjs +132 -0
- package/src/config/cursor-rules/parse-frontmatter.mjs +222 -0
- package/src/config/cursor-rules/priority.mjs +26 -0
- package/src/config/cursor-rules/profile.mjs +403 -0
- package/src/config/cursor-rules/select.mjs +259 -0
- package/src/config/defaults.mjs +36 -0
- package/src/config/env-overrides.mjs +207 -0
- package/src/config/merge-defaults.mjs +47 -0
- package/src/config/pi-spine-root.mjs +93 -0
- package/src/config/reviewer-context.mjs +243 -0
- package/src/config/settings-fields.mjs +265 -0
- package/src/config/worker-backend.mjs +116 -0
- package/src/config/worker-context.mjs +402 -0
- package/src/config/worker-launch-script.mjs +130 -0
- package/src/config/worktree-setup-hook.mjs +122 -0
- package/src/dashboard/public/dashboard.css +77 -0
- package/src/dashboard/public/dashboard.js +349 -0
- package/src/dashboard/public/index.html +80 -0
- package/src/dashboard/server.mjs +155 -0
- package/src/dashboard/snapshot.mjs +414 -0
- package/src/dashboard/sse.mjs +15 -0
- package/src/dashboard/view.mjs +292 -0
- package/src/doctor/agent-model-inherit.mjs +101 -0
- package/src/doctor/batch-size-guidance.mjs +72 -0
- package/src/doctor/coexistence.mjs +312 -0
- package/src/doctor/rules-manifest.mjs +133 -0
- package/src/doctor/stale-path.mjs +156 -0
- package/src/doctor/stall-config.mjs +108 -0
- package/src/doctor/suggest-max-parallel.mjs +53 -0
- package/src/doctor/task-packet-size.mjs +110 -0
- package/src/doctor/worktree-health.mjs +71 -0
- package/src/migrate/taskplane-config.mjs +116 -0
- package/src/planner/cycles.mjs +63 -0
- package/src/planner/format-plan.mjs +132 -0
- package/src/planner/graph.mjs +99 -0
- package/src/planner/index.mjs +125 -0
- package/src/planner/lanes.mjs +111 -0
- package/src/planner/pending.mjs +39 -0
- package/src/planner/scope.mjs +142 -0
- package/src/process/liveness.mjs +21 -0
- package/src/tasks/packet/discover.mjs +40 -0
- package/src/tasks/packet/index.mjs +81 -0
- package/src/tasks/packet/merge-deps.mjs +79 -0
- package/src/tasks/packet/parse-prompt.mjs +445 -0
- package/src/tasks/packet/parse-status.mjs +118 -0
- package/src/tasks/packet/validate-contract.mjs +115 -0
- package/src/tasks/packet/validate-prompt.mjs +99 -0
- package/src/worker-tools/report-progress.d.mts +18 -0
- package/src/worker-tools/report-progress.mjs +59 -0
- package/src/worker-tools/request-gate.d.mts +17 -0
- package/src/worker-tools/request-gate.mjs +54 -0
- package/templates/agents/reviewer.md +123 -0
- package/templates/agents/supervisor.md +59 -0
- package/templates/agents/worker.md +122 -0
- package/templates/rules-profile.json +27 -0
- package/templates/spine-config.json +64 -0
- package/templates/tasks/CONTEXT.md +30 -0
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FR-STALL-03A/03B: salvage inspection and optional WIP commit on stall (no `.DONE`).
|
|
3
|
+
*
|
|
4
|
+
* Scope (intentionally narrow): paths listed in the task File Scope plus everything
|
|
5
|
+
* under the task folder in the lane worktree — not the full worktree (see brief OQ #3).
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import fs from "node:fs";
|
|
9
|
+
import path from "node:path";
|
|
10
|
+
import { execFileSync } from "node:child_process";
|
|
11
|
+
import { resolveScopedDirtyPaths } from "./heartbeat.mjs";
|
|
12
|
+
import { appendJournalEvent } from "./journal.mjs";
|
|
13
|
+
import { evidenceDir } from "./evidence.mjs";
|
|
14
|
+
|
|
15
|
+
const INDEX_CONFLICT_PORCELAIN = /^(UU|AA|DD|AU|UA|DU|UD)/;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @param {object} [config]
|
|
19
|
+
*/
|
|
20
|
+
export function resolveSalvageConfig(config = {}) {
|
|
21
|
+
const lanes = config.lanes ?? {};
|
|
22
|
+
return {
|
|
23
|
+
autoCommitOnStall: lanes.autoCommitOnStall === true,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* @param {string} worktreePath
|
|
29
|
+
* @param {string[]} paths
|
|
30
|
+
*/
|
|
31
|
+
function readScopedDiffStat(worktreePath, paths) {
|
|
32
|
+
if (paths.length === 0) return "";
|
|
33
|
+
try {
|
|
34
|
+
return execFileSync("git", ["diff", "--stat", "--", ...paths], {
|
|
35
|
+
cwd: worktreePath,
|
|
36
|
+
encoding: "utf-8",
|
|
37
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
38
|
+
}).trim();
|
|
39
|
+
} catch {
|
|
40
|
+
return "";
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* @param {string} worktreePath
|
|
46
|
+
* @param {string[]} args
|
|
47
|
+
*/
|
|
48
|
+
function git(worktreePath, args) {
|
|
49
|
+
return execFileSync("git", args, {
|
|
50
|
+
cwd: worktreePath,
|
|
51
|
+
encoding: "utf-8",
|
|
52
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
53
|
+
}).trim();
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* @param {string} worktreePath
|
|
58
|
+
*/
|
|
59
|
+
export function hasWorktreeIndexConflicts(worktreePath) {
|
|
60
|
+
for (const ref of ["MERGE_HEAD", "CHERRY_PICK_HEAD", "REVERT_HEAD"]) {
|
|
61
|
+
try {
|
|
62
|
+
execFileSync("git", ["rev-parse", "-q", "--verify", ref], {
|
|
63
|
+
cwd: worktreePath,
|
|
64
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
65
|
+
});
|
|
66
|
+
return true;
|
|
67
|
+
} catch {
|
|
68
|
+
// not in this in-progress operation
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
try {
|
|
73
|
+
const unmerged = execFileSync("git", ["ls-files", "-u"], {
|
|
74
|
+
cwd: worktreePath,
|
|
75
|
+
encoding: "utf-8",
|
|
76
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
77
|
+
}).trim();
|
|
78
|
+
if (unmerged) return true;
|
|
79
|
+
} catch {
|
|
80
|
+
return false;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
let porcelain = "";
|
|
84
|
+
try {
|
|
85
|
+
porcelain = execFileSync("git", ["status", "--porcelain"], {
|
|
86
|
+
cwd: worktreePath,
|
|
87
|
+
encoding: "utf-8",
|
|
88
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
89
|
+
});
|
|
90
|
+
} catch {
|
|
91
|
+
return false;
|
|
92
|
+
}
|
|
93
|
+
for (const line of porcelain.split("\n")) {
|
|
94
|
+
if (!line.trim()) continue;
|
|
95
|
+
if (INDEX_CONFLICT_PORCELAIN.test(line)) return true;
|
|
96
|
+
}
|
|
97
|
+
return false;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* @param {object} params
|
|
102
|
+
* @param {string} [params.batchPhase]
|
|
103
|
+
*/
|
|
104
|
+
export function resolveSalvageCommitRefusal({ batchPhase, worktreePath }) {
|
|
105
|
+
if (String(batchPhase ?? "") === "merging") {
|
|
106
|
+
return { refused: true, reason: "merge_in_progress" };
|
|
107
|
+
}
|
|
108
|
+
if (hasWorktreeIndexConflicts(worktreePath)) {
|
|
109
|
+
return { refused: true, reason: "index_conflicts" };
|
|
110
|
+
}
|
|
111
|
+
return { refused: false, reason: null };
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* @param {object} params
|
|
116
|
+
* @param {string} params.worktreePath
|
|
117
|
+
* @param {string} params.taskBranch
|
|
118
|
+
* @param {string} params.taskId
|
|
119
|
+
* @param {string[]} params.dirtyPaths
|
|
120
|
+
* @param {string} [params.batchPhase]
|
|
121
|
+
*/
|
|
122
|
+
export function attemptScopedSalvageCommit({
|
|
123
|
+
worktreePath,
|
|
124
|
+
taskBranch,
|
|
125
|
+
taskId,
|
|
126
|
+
dirtyPaths,
|
|
127
|
+
batchPhase,
|
|
128
|
+
}) {
|
|
129
|
+
if (!Array.isArray(dirtyPaths) || dirtyPaths.length === 0) {
|
|
130
|
+
return { committed: false, refused: true, reason: "no_scoped_dirty_paths" };
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
const refusal = resolveSalvageCommitRefusal({ worktreePath, batchPhase });
|
|
134
|
+
if (refusal.refused) {
|
|
135
|
+
return { committed: false, refused: true, reason: refusal.reason };
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
const iso = new Date().toISOString();
|
|
139
|
+
const message = `wip(${taskId}): stall salvage ${iso}`;
|
|
140
|
+
|
|
141
|
+
try {
|
|
142
|
+
git(worktreePath, ["checkout", taskBranch]);
|
|
143
|
+
git(worktreePath, ["add", "--", ...dirtyPaths]);
|
|
144
|
+
git(worktreePath, ["commit", "-m", message]);
|
|
145
|
+
const commitSha = git(worktreePath, ["rev-parse", "HEAD"]);
|
|
146
|
+
return { committed: true, refused: false, reason: null, commitSha, message };
|
|
147
|
+
} catch (err) {
|
|
148
|
+
const error = err instanceof Error ? err.message : String(err);
|
|
149
|
+
return { committed: false, refused: true, reason: "hook_or_commit_failed", error };
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* @param {object} params
|
|
155
|
+
* @param {string} params.worktreePath
|
|
156
|
+
* @param {string[]} [params.fileScopePaths]
|
|
157
|
+
* @param {string} params.taskFolder
|
|
158
|
+
*/
|
|
159
|
+
export function inspectLaneSalvage({ worktreePath, fileScopePaths = [], taskFolder }) {
|
|
160
|
+
const dirtyPaths = resolveScopedDirtyPaths(worktreePath, fileScopePaths, taskFolder);
|
|
161
|
+
const changedFileCount = dirtyPaths.length;
|
|
162
|
+
const diffStat = readScopedDiffStat(worktreePath, dirtyPaths);
|
|
163
|
+
const salvageable = changedFileCount > 0;
|
|
164
|
+
const recommendedAction = salvageable
|
|
165
|
+
? "retry_with_salvage_review"
|
|
166
|
+
: "no_scoped_uncommitted_changes";
|
|
167
|
+
|
|
168
|
+
return {
|
|
169
|
+
dirtyPaths,
|
|
170
|
+
diffStat,
|
|
171
|
+
changedFileCount,
|
|
172
|
+
salvageable,
|
|
173
|
+
recommendedAction,
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* @param {object} params
|
|
179
|
+
* @param {boolean} params.salvageable
|
|
180
|
+
* @param {string} [params.taskId]
|
|
181
|
+
*/
|
|
182
|
+
export function resolveSalvageRetryCommand({ salvageable, taskId }) {
|
|
183
|
+
if (salvageable && taskId) return `spine batch retry ${taskId}`;
|
|
184
|
+
return null;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* @param {object} params
|
|
189
|
+
*/
|
|
190
|
+
export function writeSalvageEvidence({
|
|
191
|
+
projectRoot,
|
|
192
|
+
batchId,
|
|
193
|
+
taskId,
|
|
194
|
+
inspection,
|
|
195
|
+
recommendedAction,
|
|
196
|
+
classification,
|
|
197
|
+
salvageCommit,
|
|
198
|
+
}) {
|
|
199
|
+
const dir = evidenceDir(projectRoot, batchId);
|
|
200
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
201
|
+
const rel = `evidence/salvage-${taskId}.json`;
|
|
202
|
+
const abs = path.join(dir, `salvage-${taskId}.json`);
|
|
203
|
+
const payload = {
|
|
204
|
+
taskId,
|
|
205
|
+
batchId,
|
|
206
|
+
classification: classification ?? null,
|
|
207
|
+
salvageable: inspection.salvageable,
|
|
208
|
+
changedFileCount: inspection.changedFileCount,
|
|
209
|
+
dirtyPaths: inspection.dirtyPaths,
|
|
210
|
+
diffStat: inspection.diffStat,
|
|
211
|
+
recommendedAction,
|
|
212
|
+
retryCommand: resolveSalvageRetryCommand({
|
|
213
|
+
salvageable: inspection.salvageable,
|
|
214
|
+
taskId,
|
|
215
|
+
}),
|
|
216
|
+
salvageCommit: salvageCommit ?? null,
|
|
217
|
+
recordedAt: new Date().toISOString(),
|
|
218
|
+
};
|
|
219
|
+
fs.writeFileSync(abs, `${JSON.stringify(payload, null, 2)}\n`, "utf-8");
|
|
220
|
+
return rel;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* @param {object[]} events
|
|
225
|
+
* @param {string|null|undefined} taskId
|
|
226
|
+
*/
|
|
227
|
+
export function findLatestSalvageInspection(events, taskId) {
|
|
228
|
+
if (!taskId) return null;
|
|
229
|
+
for (let i = events.length - 1; i >= 0; i -= 1) {
|
|
230
|
+
const event = events[i];
|
|
231
|
+
if (event.type !== "lane.salvage_inspection") continue;
|
|
232
|
+
if (event.taskId !== taskId) continue;
|
|
233
|
+
return event.payload && typeof event.payload === "object" ? event.payload : {};
|
|
234
|
+
}
|
|
235
|
+
return null;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Run salvage inspection, journal, and evidence for a terminal worker failure without `.DONE`.
|
|
240
|
+
*
|
|
241
|
+
* @param {object} params
|
|
242
|
+
*/
|
|
243
|
+
export function recordTaskFailureSalvage({
|
|
244
|
+
projectRoot,
|
|
245
|
+
batchId,
|
|
246
|
+
laneNumber,
|
|
247
|
+
laneId,
|
|
248
|
+
taskId,
|
|
249
|
+
correlationId,
|
|
250
|
+
worktreePath,
|
|
251
|
+
fileScopePaths = [],
|
|
252
|
+
taskFolder,
|
|
253
|
+
workerResult,
|
|
254
|
+
config,
|
|
255
|
+
batchPhase,
|
|
256
|
+
taskBranch,
|
|
257
|
+
}) {
|
|
258
|
+
if (workerResult.doneFound) return {};
|
|
259
|
+
if (workerResult.classification === "aborted") return {};
|
|
260
|
+
|
|
261
|
+
const salvageConfig = resolveSalvageConfig(config);
|
|
262
|
+
const inspection = inspectLaneSalvage({ worktreePath, fileScopePaths, taskFolder });
|
|
263
|
+
const retryCommand = resolveSalvageRetryCommand({
|
|
264
|
+
salvageable: inspection.salvageable,
|
|
265
|
+
taskId,
|
|
266
|
+
});
|
|
267
|
+
const recommendedAction =
|
|
268
|
+
retryCommand ??
|
|
269
|
+
(inspection.salvageable ? "review_scoped_changes" : "spine status --diagnose");
|
|
270
|
+
|
|
271
|
+
appendJournalEvent(projectRoot, batchId, "lane.salvage_inspection", {
|
|
272
|
+
laneNumber,
|
|
273
|
+
laneId,
|
|
274
|
+
taskId,
|
|
275
|
+
correlationId,
|
|
276
|
+
classification: workerResult.classification ?? null,
|
|
277
|
+
dirtyPaths: inspection.dirtyPaths,
|
|
278
|
+
diffStat: inspection.diffStat,
|
|
279
|
+
changedFileCount: inspection.changedFileCount,
|
|
280
|
+
salvageable: inspection.salvageable,
|
|
281
|
+
recommendedAction,
|
|
282
|
+
retryCommand,
|
|
283
|
+
});
|
|
284
|
+
|
|
285
|
+
let salvageCommit = null;
|
|
286
|
+
if (salvageConfig.autoCommitOnStall && inspection.salvageable && taskBranch) {
|
|
287
|
+
const result = attemptScopedSalvageCommit({
|
|
288
|
+
worktreePath,
|
|
289
|
+
taskBranch,
|
|
290
|
+
taskId,
|
|
291
|
+
dirtyPaths: inspection.dirtyPaths,
|
|
292
|
+
batchPhase,
|
|
293
|
+
});
|
|
294
|
+
salvageCommit = {
|
|
295
|
+
committed: result.committed === true,
|
|
296
|
+
refused: result.refused === true,
|
|
297
|
+
reason: result.reason ?? null,
|
|
298
|
+
commitSha: result.commitSha ?? null,
|
|
299
|
+
message: result.message ?? null,
|
|
300
|
+
error: result.error ?? null,
|
|
301
|
+
};
|
|
302
|
+
appendJournalEvent(projectRoot, batchId, "lane.salvage_commit", {
|
|
303
|
+
laneNumber,
|
|
304
|
+
laneId,
|
|
305
|
+
taskId,
|
|
306
|
+
correlationId,
|
|
307
|
+
...salvageCommit,
|
|
308
|
+
dirtyPaths: inspection.dirtyPaths,
|
|
309
|
+
});
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
const salvageEvidenceRef = writeSalvageEvidence({
|
|
313
|
+
projectRoot,
|
|
314
|
+
batchId,
|
|
315
|
+
taskId,
|
|
316
|
+
inspection,
|
|
317
|
+
recommendedAction,
|
|
318
|
+
classification: workerResult.classification,
|
|
319
|
+
salvageCommit,
|
|
320
|
+
});
|
|
321
|
+
|
|
322
|
+
return {
|
|
323
|
+
salvageable: inspection.salvageable,
|
|
324
|
+
changedFileCount: inspection.changedFileCount,
|
|
325
|
+
salvageEvidenceRef,
|
|
326
|
+
retryCommand,
|
|
327
|
+
salvageCommitted: salvageCommit?.committed === true,
|
|
328
|
+
salvageCommitSha: salvageCommit?.commitSha ?? null,
|
|
329
|
+
salvageCommitRefused: salvageCommit?.refused === true,
|
|
330
|
+
salvageCommitReason: salvageCommit?.reason ?? null,
|
|
331
|
+
};
|
|
332
|
+
}
|