@akagilnc/pi-workflow-roles 0.1.5707 → 0.1.5714
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/acp-host/production-host.js +7 -74
- package/dist/headless-host/production-host.js +7 -74
- package/dist/migrate-book-topology.js +5 -0
- package/dist/package-contracts/terminating-infrastructure.js +5 -0
- package/dist/public-cli/main.js +7 -74
- package/dist/public-role-summons.js +2 -74
- package/package.json +1 -1
- package/src/package-contracts/terminating-infrastructure.ts +15 -4
- package/src/public-role-summons.ts +9 -81
|
@@ -1500,6 +1500,11 @@ function withTerminatingOutputDeclarations(schema) {
|
|
|
1500
1500
|
description: "\u53EF\u9009\u672C\u7968\u53F7\u3002\u5C1A\u672A\u7ED1\u5B9A\u65F6\u7531\u89D2\u8272\u5728\u65E2\u6709\u56DE\u6267\u4E2D\u7533\u62A5\uFF08\u6B63\u6574\u6570\u3001\u6570\u5B57\u4E32\u6216\u524D\u5BFC #N\uFF1B\u5F52\u4F4D\u53EA\u8BFB\u672C\u5B57\u6BB5\uFF09\u3002"
|
|
1501
1501
|
})
|
|
1502
1502
|
} : {},
|
|
1503
|
+
...baseProperties?.summary === void 0 ? {
|
|
1504
|
+
summary: Type2.Unknown({
|
|
1505
|
+
description: "\u672C\u5E2D\u81EA\u884C\u586B\u5199\u7684\u4E00\u4E24\u53E5\u300120\u201350 \u5B57\u7ED3\u8BBA\u6458\u8981\u3002\u53EF\u9009\uFF1B\u4E0D\u56E0\u7F3A\u5931\u6216\u8D85\u957F\u62D2\u6536\u3001\u622A\u65AD\u6216\u4EE3\u586B\u3002"
|
|
1506
|
+
})
|
|
1507
|
+
} : {},
|
|
1503
1508
|
[INFRASTRUCTURE_FAILURE_DECLARATION_KEY]: infrastructureFailureDeclarationSchema.properties[INFRASTRUCTURE_FAILURE_DECLARATION_KEY]
|
|
1504
1509
|
};
|
|
1505
1510
|
const object = Type2.Object(properties, { additionalProperties: true });
|
|
@@ -18956,35 +18961,8 @@ async function summonParallelReviewerLenses(options) {
|
|
|
18956
18961
|
const failure = failedResult(error);
|
|
18957
18962
|
return { completeness: failure, correctness: failure };
|
|
18958
18963
|
};
|
|
18959
|
-
let sourceProjectRoot;
|
|
18960
|
-
let targetCommit;
|
|
18961
|
-
const statusArgs = [
|
|
18962
|
-
"status",
|
|
18963
|
-
"--porcelain=v1",
|
|
18964
|
-
"--untracked-files=all",
|
|
18965
|
-
"--",
|
|
18966
|
-
":/",
|
|
18967
|
-
":(top,exclude).claude/worktrees/**"
|
|
18968
|
-
];
|
|
18969
18964
|
try {
|
|
18970
|
-
sourceProjectRoot = await resolveReviewerGitToplevel(options.projectRoot);
|
|
18971
|
-
const { stdout: statusStdout } = await execFileAsync3("git", statusArgs, {
|
|
18972
|
-
cwd: sourceProjectRoot
|
|
18973
|
-
});
|
|
18974
|
-
if (statusStdout !== "") {
|
|
18975
|
-
const diagnostic = [
|
|
18976
|
-
"Reviewer target status gate failed:",
|
|
18977
|
-
"git status --porcelain=v1 --untracked-files=all -- :/ ':(top,exclude).claude/worktrees/**'",
|
|
18978
|
-
statusStdout
|
|
18979
|
-
].join("\n");
|
|
18980
|
-
return dualFailure(new Error(diagnostic));
|
|
18981
|
-
}
|
|
18982
|
-
const { stdout: targetStdout } = await execFileAsync3(
|
|
18983
|
-
"git",
|
|
18984
|
-
["rev-parse", "--verify", "HEAD^{commit}"],
|
|
18985
|
-
{ cwd: sourceProjectRoot }
|
|
18986
|
-
);
|
|
18987
|
-
targetCommit = targetStdout.trim();
|
|
18965
|
+
const sourceProjectRoot = await resolveReviewerGitToplevel(options.projectRoot);
|
|
18988
18966
|
await execFileAsync3(
|
|
18989
18967
|
"git",
|
|
18990
18968
|
["rev-parse", "--verify", `${options.baseRevision}^{commit}`],
|
|
@@ -19020,55 +18998,10 @@ async function summonParallelReviewerLenses(options) {
|
|
|
19020
18998
|
summon("completeness"),
|
|
19021
18999
|
summon("correctness")
|
|
19022
19000
|
]);
|
|
19023
|
-
|
|
19001
|
+
return {
|
|
19024
19002
|
completeness: settled[0].status === "fulfilled" ? settled[0].value : failedResult(settled[0].reason),
|
|
19025
19003
|
correctness: settled[1].status === "fulfilled" ? settled[1].value : failedResult(settled[1].reason)
|
|
19026
19004
|
};
|
|
19027
|
-
let sealDiagnostic;
|
|
19028
|
-
try {
|
|
19029
|
-
const { stdout: headBeforeStdout } = await execFileAsync3(
|
|
19030
|
-
"git",
|
|
19031
|
-
["rev-parse", "--verify", "HEAD^{commit}"],
|
|
19032
|
-
{ cwd: sourceProjectRoot }
|
|
19033
|
-
);
|
|
19034
|
-
const { stdout: sealedStatusStdout } = await execFileAsync3("git", statusArgs, {
|
|
19035
|
-
cwd: sourceProjectRoot
|
|
19036
|
-
});
|
|
19037
|
-
const { stdout: headAfterStdout } = await execFileAsync3(
|
|
19038
|
-
"git",
|
|
19039
|
-
["rev-parse", "--verify", "HEAD^{commit}"],
|
|
19040
|
-
{ cwd: sourceProjectRoot }
|
|
19041
|
-
);
|
|
19042
|
-
const headBefore = headBeforeStdout.trim();
|
|
19043
|
-
const headAfter = headAfterStdout.trim();
|
|
19044
|
-
if (headBefore !== targetCommit || headAfter !== targetCommit || sealedStatusStdout !== "") {
|
|
19045
|
-
sealDiagnostic = [
|
|
19046
|
-
"Reviewer target final seal failed:",
|
|
19047
|
-
`HEAD before status => ${headBefore}`,
|
|
19048
|
-
`HEAD after status => ${headAfter}`,
|
|
19049
|
-
`expected PRE_HEAD ${targetCommit}`,
|
|
19050
|
-
"git status --porcelain=v1 --untracked-files=all -- :/ ':(top,exclude).claude/worktrees/**'",
|
|
19051
|
-
sealedStatusStdout
|
|
19052
|
-
].join("\n");
|
|
19053
|
-
}
|
|
19054
|
-
} catch (error) {
|
|
19055
|
-
sealDiagnostic = `Reviewer target final seal failed:
|
|
19056
|
-
${serializeThrownValue(error)}`;
|
|
19057
|
-
}
|
|
19058
|
-
if (sealDiagnostic !== void 0) {
|
|
19059
|
-
const withSealFailure = (result) => ({
|
|
19060
|
-
...result,
|
|
19061
|
-
exitCode: 1,
|
|
19062
|
-
stderr: [result.stderr, sealDiagnostic].filter(
|
|
19063
|
-
(text) => typeof text === "string" && text !== ""
|
|
19064
|
-
).join("\n")
|
|
19065
|
-
});
|
|
19066
|
-
results = {
|
|
19067
|
-
completeness: withSealFailure(results.completeness),
|
|
19068
|
-
correctness: withSealFailure(results.correctness)
|
|
19069
|
-
};
|
|
19070
|
-
}
|
|
19071
|
-
return results;
|
|
19072
19005
|
}
|
|
19073
19006
|
async function summonGateOfficer(options) {
|
|
19074
19007
|
let home = options.home;
|
|
@@ -455,6 +455,11 @@ function withTerminatingOutputDeclarations(schema) {
|
|
|
455
455
|
description: "\u53EF\u9009\u672C\u7968\u53F7\u3002\u5C1A\u672A\u7ED1\u5B9A\u65F6\u7531\u89D2\u8272\u5728\u65E2\u6709\u56DE\u6267\u4E2D\u7533\u62A5\uFF08\u6B63\u6574\u6570\u3001\u6570\u5B57\u4E32\u6216\u524D\u5BFC #N\uFF1B\u5F52\u4F4D\u53EA\u8BFB\u672C\u5B57\u6BB5\uFF09\u3002"
|
|
456
456
|
})
|
|
457
457
|
} : {},
|
|
458
|
+
...baseProperties?.summary === void 0 ? {
|
|
459
|
+
summary: Type.Unknown({
|
|
460
|
+
description: "\u672C\u5E2D\u81EA\u884C\u586B\u5199\u7684\u4E00\u4E24\u53E5\u300120\u201350 \u5B57\u7ED3\u8BBA\u6458\u8981\u3002\u53EF\u9009\uFF1B\u4E0D\u56E0\u7F3A\u5931\u6216\u8D85\u957F\u62D2\u6536\u3001\u622A\u65AD\u6216\u4EE3\u586B\u3002"
|
|
461
|
+
})
|
|
462
|
+
} : {},
|
|
458
463
|
[INFRASTRUCTURE_FAILURE_DECLARATION_KEY]: infrastructureFailureDeclarationSchema.properties[INFRASTRUCTURE_FAILURE_DECLARATION_KEY]
|
|
459
464
|
};
|
|
460
465
|
const object = Type.Object(properties, { additionalProperties: true });
|
|
@@ -19150,35 +19155,8 @@ async function summonParallelReviewerLenses(options) {
|
|
|
19150
19155
|
const failure = failedResult(error);
|
|
19151
19156
|
return { completeness: failure, correctness: failure };
|
|
19152
19157
|
};
|
|
19153
|
-
let sourceProjectRoot;
|
|
19154
|
-
let targetCommit;
|
|
19155
|
-
const statusArgs = [
|
|
19156
|
-
"status",
|
|
19157
|
-
"--porcelain=v1",
|
|
19158
|
-
"--untracked-files=all",
|
|
19159
|
-
"--",
|
|
19160
|
-
":/",
|
|
19161
|
-
":(top,exclude).claude/worktrees/**"
|
|
19162
|
-
];
|
|
19163
19158
|
try {
|
|
19164
|
-
sourceProjectRoot = await resolveReviewerGitToplevel(options.projectRoot);
|
|
19165
|
-
const { stdout: statusStdout } = await execFileAsync3("git", statusArgs, {
|
|
19166
|
-
cwd: sourceProjectRoot
|
|
19167
|
-
});
|
|
19168
|
-
if (statusStdout !== "") {
|
|
19169
|
-
const diagnostic = [
|
|
19170
|
-
"Reviewer target status gate failed:",
|
|
19171
|
-
"git status --porcelain=v1 --untracked-files=all -- :/ ':(top,exclude).claude/worktrees/**'",
|
|
19172
|
-
statusStdout
|
|
19173
|
-
].join("\n");
|
|
19174
|
-
return dualFailure(new Error(diagnostic));
|
|
19175
|
-
}
|
|
19176
|
-
const { stdout: targetStdout } = await execFileAsync3(
|
|
19177
|
-
"git",
|
|
19178
|
-
["rev-parse", "--verify", "HEAD^{commit}"],
|
|
19179
|
-
{ cwd: sourceProjectRoot }
|
|
19180
|
-
);
|
|
19181
|
-
targetCommit = targetStdout.trim();
|
|
19159
|
+
const sourceProjectRoot = await resolveReviewerGitToplevel(options.projectRoot);
|
|
19182
19160
|
await execFileAsync3(
|
|
19183
19161
|
"git",
|
|
19184
19162
|
["rev-parse", "--verify", `${options.baseRevision}^{commit}`],
|
|
@@ -19214,55 +19192,10 @@ async function summonParallelReviewerLenses(options) {
|
|
|
19214
19192
|
summon("completeness"),
|
|
19215
19193
|
summon("correctness")
|
|
19216
19194
|
]);
|
|
19217
|
-
|
|
19195
|
+
return {
|
|
19218
19196
|
completeness: settled[0].status === "fulfilled" ? settled[0].value : failedResult(settled[0].reason),
|
|
19219
19197
|
correctness: settled[1].status === "fulfilled" ? settled[1].value : failedResult(settled[1].reason)
|
|
19220
19198
|
};
|
|
19221
|
-
let sealDiagnostic;
|
|
19222
|
-
try {
|
|
19223
|
-
const { stdout: headBeforeStdout } = await execFileAsync3(
|
|
19224
|
-
"git",
|
|
19225
|
-
["rev-parse", "--verify", "HEAD^{commit}"],
|
|
19226
|
-
{ cwd: sourceProjectRoot }
|
|
19227
|
-
);
|
|
19228
|
-
const { stdout: sealedStatusStdout } = await execFileAsync3("git", statusArgs, {
|
|
19229
|
-
cwd: sourceProjectRoot
|
|
19230
|
-
});
|
|
19231
|
-
const { stdout: headAfterStdout } = await execFileAsync3(
|
|
19232
|
-
"git",
|
|
19233
|
-
["rev-parse", "--verify", "HEAD^{commit}"],
|
|
19234
|
-
{ cwd: sourceProjectRoot }
|
|
19235
|
-
);
|
|
19236
|
-
const headBefore = headBeforeStdout.trim();
|
|
19237
|
-
const headAfter = headAfterStdout.trim();
|
|
19238
|
-
if (headBefore !== targetCommit || headAfter !== targetCommit || sealedStatusStdout !== "") {
|
|
19239
|
-
sealDiagnostic = [
|
|
19240
|
-
"Reviewer target final seal failed:",
|
|
19241
|
-
`HEAD before status => ${headBefore}`,
|
|
19242
|
-
`HEAD after status => ${headAfter}`,
|
|
19243
|
-
`expected PRE_HEAD ${targetCommit}`,
|
|
19244
|
-
"git status --porcelain=v1 --untracked-files=all -- :/ ':(top,exclude).claude/worktrees/**'",
|
|
19245
|
-
sealedStatusStdout
|
|
19246
|
-
].join("\n");
|
|
19247
|
-
}
|
|
19248
|
-
} catch (error) {
|
|
19249
|
-
sealDiagnostic = `Reviewer target final seal failed:
|
|
19250
|
-
${serializeThrownValue(error)}`;
|
|
19251
|
-
}
|
|
19252
|
-
if (sealDiagnostic !== void 0) {
|
|
19253
|
-
const withSealFailure = (result) => ({
|
|
19254
|
-
...result,
|
|
19255
|
-
exitCode: 1,
|
|
19256
|
-
stderr: [result.stderr, sealDiagnostic].filter(
|
|
19257
|
-
(text) => typeof text === "string" && text !== ""
|
|
19258
|
-
).join("\n")
|
|
19259
|
-
});
|
|
19260
|
-
results = {
|
|
19261
|
-
completeness: withSealFailure(results.completeness),
|
|
19262
|
-
correctness: withSealFailure(results.correctness)
|
|
19263
|
-
};
|
|
19264
|
-
}
|
|
19265
|
-
return results;
|
|
19266
19199
|
}
|
|
19267
19200
|
async function summonGateOfficer(options) {
|
|
19268
19201
|
let home = options.home;
|
|
@@ -8638,6 +8638,11 @@ function withTerminatingOutputDeclarations(schema) {
|
|
|
8638
8638
|
description: "\u53EF\u9009\u672C\u7968\u53F7\u3002\u5C1A\u672A\u7ED1\u5B9A\u65F6\u7531\u89D2\u8272\u5728\u65E2\u6709\u56DE\u6267\u4E2D\u7533\u62A5\uFF08\u6B63\u6574\u6570\u3001\u6570\u5B57\u4E32\u6216\u524D\u5BFC #N\uFF1B\u5F52\u4F4D\u53EA\u8BFB\u672C\u5B57\u6BB5\uFF09\u3002"
|
|
8639
8639
|
})
|
|
8640
8640
|
} : {},
|
|
8641
|
+
...baseProperties?.summary === void 0 ? {
|
|
8642
|
+
summary: typebox_exports.Unknown({
|
|
8643
|
+
description: "\u672C\u5E2D\u81EA\u884C\u586B\u5199\u7684\u4E00\u4E24\u53E5\u300120\u201350 \u5B57\u7ED3\u8BBA\u6458\u8981\u3002\u53EF\u9009\uFF1B\u4E0D\u56E0\u7F3A\u5931\u6216\u8D85\u957F\u62D2\u6536\u3001\u622A\u65AD\u6216\u4EE3\u586B\u3002"
|
|
8644
|
+
})
|
|
8645
|
+
} : {},
|
|
8641
8646
|
[INFRASTRUCTURE_FAILURE_DECLARATION_KEY]: infrastructureFailureDeclarationSchema.properties[INFRASTRUCTURE_FAILURE_DECLARATION_KEY]
|
|
8642
8647
|
};
|
|
8643
8648
|
const object = typebox_exports.Object(properties, { additionalProperties: true });
|
|
@@ -29,6 +29,11 @@ function withTerminatingOutputDeclarations(schema) {
|
|
|
29
29
|
description: "\u53EF\u9009\u672C\u7968\u53F7\u3002\u5C1A\u672A\u7ED1\u5B9A\u65F6\u7531\u89D2\u8272\u5728\u65E2\u6709\u56DE\u6267\u4E2D\u7533\u62A5\uFF08\u6B63\u6574\u6570\u3001\u6570\u5B57\u4E32\u6216\u524D\u5BFC #N\uFF1B\u5F52\u4F4D\u53EA\u8BFB\u672C\u5B57\u6BB5\uFF09\u3002"
|
|
30
30
|
})
|
|
31
31
|
} : {},
|
|
32
|
+
...baseProperties?.summary === void 0 ? {
|
|
33
|
+
summary: Type.Unknown({
|
|
34
|
+
description: "\u672C\u5E2D\u81EA\u884C\u586B\u5199\u7684\u4E00\u4E24\u53E5\u300120\u201350 \u5B57\u7ED3\u8BBA\u6458\u8981\u3002\u53EF\u9009\uFF1B\u4E0D\u56E0\u7F3A\u5931\u6216\u8D85\u957F\u62D2\u6536\u3001\u622A\u65AD\u6216\u4EE3\u586B\u3002"
|
|
35
|
+
})
|
|
36
|
+
} : {},
|
|
32
37
|
[INFRASTRUCTURE_FAILURE_DECLARATION_KEY]: infrastructureFailureDeclarationSchema.properties[INFRASTRUCTURE_FAILURE_DECLARATION_KEY]
|
|
33
38
|
};
|
|
34
39
|
const object = Type.Object(properties, { additionalProperties: true });
|
package/dist/public-cli/main.js
CHANGED
|
@@ -9105,6 +9105,11 @@ function withTerminatingOutputDeclarations(schema) {
|
|
|
9105
9105
|
description: "\u53EF\u9009\u672C\u7968\u53F7\u3002\u5C1A\u672A\u7ED1\u5B9A\u65F6\u7531\u89D2\u8272\u5728\u65E2\u6709\u56DE\u6267\u4E2D\u7533\u62A5\uFF08\u6B63\u6574\u6570\u3001\u6570\u5B57\u4E32\u6216\u524D\u5BFC #N\uFF1B\u5F52\u4F4D\u53EA\u8BFB\u672C\u5B57\u6BB5\uFF09\u3002"
|
|
9106
9106
|
})
|
|
9107
9107
|
} : {},
|
|
9108
|
+
...baseProperties?.summary === void 0 ? {
|
|
9109
|
+
summary: typebox_exports.Unknown({
|
|
9110
|
+
description: "\u672C\u5E2D\u81EA\u884C\u586B\u5199\u7684\u4E00\u4E24\u53E5\u300120\u201350 \u5B57\u7ED3\u8BBA\u6458\u8981\u3002\u53EF\u9009\uFF1B\u4E0D\u56E0\u7F3A\u5931\u6216\u8D85\u957F\u62D2\u6536\u3001\u622A\u65AD\u6216\u4EE3\u586B\u3002"
|
|
9111
|
+
})
|
|
9112
|
+
} : {},
|
|
9108
9113
|
[INFRASTRUCTURE_FAILURE_DECLARATION_KEY]: infrastructureFailureDeclarationSchema.properties[INFRASTRUCTURE_FAILURE_DECLARATION_KEY]
|
|
9109
9114
|
};
|
|
9110
9115
|
const object = typebox_exports.Object(properties, { additionalProperties: true });
|
|
@@ -20836,35 +20841,8 @@ async function summonParallelReviewerLenses(options) {
|
|
|
20836
20841
|
const failure = failedResult(error);
|
|
20837
20842
|
return { completeness: failure, correctness: failure };
|
|
20838
20843
|
};
|
|
20839
|
-
let sourceProjectRoot;
|
|
20840
|
-
let targetCommit;
|
|
20841
|
-
const statusArgs = [
|
|
20842
|
-
"status",
|
|
20843
|
-
"--porcelain=v1",
|
|
20844
|
-
"--untracked-files=all",
|
|
20845
|
-
"--",
|
|
20846
|
-
":/",
|
|
20847
|
-
":(top,exclude).claude/worktrees/**"
|
|
20848
|
-
];
|
|
20849
20844
|
try {
|
|
20850
|
-
sourceProjectRoot = await resolveReviewerGitToplevel(options.projectRoot);
|
|
20851
|
-
const { stdout: statusStdout } = await execFileAsync3("git", statusArgs, {
|
|
20852
|
-
cwd: sourceProjectRoot
|
|
20853
|
-
});
|
|
20854
|
-
if (statusStdout !== "") {
|
|
20855
|
-
const diagnostic = [
|
|
20856
|
-
"Reviewer target status gate failed:",
|
|
20857
|
-
"git status --porcelain=v1 --untracked-files=all -- :/ ':(top,exclude).claude/worktrees/**'",
|
|
20858
|
-
statusStdout
|
|
20859
|
-
].join("\n");
|
|
20860
|
-
return dualFailure(new Error(diagnostic));
|
|
20861
|
-
}
|
|
20862
|
-
const { stdout: targetStdout } = await execFileAsync3(
|
|
20863
|
-
"git",
|
|
20864
|
-
["rev-parse", "--verify", "HEAD^{commit}"],
|
|
20865
|
-
{ cwd: sourceProjectRoot }
|
|
20866
|
-
);
|
|
20867
|
-
targetCommit = targetStdout.trim();
|
|
20845
|
+
const sourceProjectRoot = await resolveReviewerGitToplevel(options.projectRoot);
|
|
20868
20846
|
await execFileAsync3(
|
|
20869
20847
|
"git",
|
|
20870
20848
|
["rev-parse", "--verify", `${options.baseRevision}^{commit}`],
|
|
@@ -20900,55 +20878,10 @@ async function summonParallelReviewerLenses(options) {
|
|
|
20900
20878
|
summon("completeness"),
|
|
20901
20879
|
summon("correctness")
|
|
20902
20880
|
]);
|
|
20903
|
-
|
|
20881
|
+
return {
|
|
20904
20882
|
completeness: settled[0].status === "fulfilled" ? settled[0].value : failedResult(settled[0].reason),
|
|
20905
20883
|
correctness: settled[1].status === "fulfilled" ? settled[1].value : failedResult(settled[1].reason)
|
|
20906
20884
|
};
|
|
20907
|
-
let sealDiagnostic;
|
|
20908
|
-
try {
|
|
20909
|
-
const { stdout: headBeforeStdout } = await execFileAsync3(
|
|
20910
|
-
"git",
|
|
20911
|
-
["rev-parse", "--verify", "HEAD^{commit}"],
|
|
20912
|
-
{ cwd: sourceProjectRoot }
|
|
20913
|
-
);
|
|
20914
|
-
const { stdout: sealedStatusStdout } = await execFileAsync3("git", statusArgs, {
|
|
20915
|
-
cwd: sourceProjectRoot
|
|
20916
|
-
});
|
|
20917
|
-
const { stdout: headAfterStdout } = await execFileAsync3(
|
|
20918
|
-
"git",
|
|
20919
|
-
["rev-parse", "--verify", "HEAD^{commit}"],
|
|
20920
|
-
{ cwd: sourceProjectRoot }
|
|
20921
|
-
);
|
|
20922
|
-
const headBefore = headBeforeStdout.trim();
|
|
20923
|
-
const headAfter = headAfterStdout.trim();
|
|
20924
|
-
if (headBefore !== targetCommit || headAfter !== targetCommit || sealedStatusStdout !== "") {
|
|
20925
|
-
sealDiagnostic = [
|
|
20926
|
-
"Reviewer target final seal failed:",
|
|
20927
|
-
`HEAD before status => ${headBefore}`,
|
|
20928
|
-
`HEAD after status => ${headAfter}`,
|
|
20929
|
-
`expected PRE_HEAD ${targetCommit}`,
|
|
20930
|
-
"git status --porcelain=v1 --untracked-files=all -- :/ ':(top,exclude).claude/worktrees/**'",
|
|
20931
|
-
sealedStatusStdout
|
|
20932
|
-
].join("\n");
|
|
20933
|
-
}
|
|
20934
|
-
} catch (error) {
|
|
20935
|
-
sealDiagnostic = `Reviewer target final seal failed:
|
|
20936
|
-
${serializeThrownValue(error)}`;
|
|
20937
|
-
}
|
|
20938
|
-
if (sealDiagnostic !== void 0) {
|
|
20939
|
-
const withSealFailure = (result) => ({
|
|
20940
|
-
...result,
|
|
20941
|
-
exitCode: 1,
|
|
20942
|
-
stderr: [result.stderr, sealDiagnostic].filter(
|
|
20943
|
-
(text) => typeof text === "string" && text !== ""
|
|
20944
|
-
).join("\n")
|
|
20945
|
-
});
|
|
20946
|
-
results = {
|
|
20947
|
-
completeness: withSealFailure(results.completeness),
|
|
20948
|
-
correctness: withSealFailure(results.correctness)
|
|
20949
|
-
};
|
|
20950
|
-
}
|
|
20951
|
-
return results;
|
|
20952
20885
|
}
|
|
20953
20886
|
async function summonGateOfficer(options) {
|
|
20954
20887
|
let home = options.home;
|
|
@@ -298,35 +298,8 @@ async function summonParallelReviewerLenses(options) {
|
|
|
298
298
|
const failure = failedResult(error);
|
|
299
299
|
return { completeness: failure, correctness: failure };
|
|
300
300
|
};
|
|
301
|
-
let sourceProjectRoot;
|
|
302
|
-
let targetCommit;
|
|
303
|
-
const statusArgs = [
|
|
304
|
-
"status",
|
|
305
|
-
"--porcelain=v1",
|
|
306
|
-
"--untracked-files=all",
|
|
307
|
-
"--",
|
|
308
|
-
":/",
|
|
309
|
-
":(top,exclude).claude/worktrees/**"
|
|
310
|
-
];
|
|
311
301
|
try {
|
|
312
|
-
sourceProjectRoot = await resolveReviewerGitToplevel(options.projectRoot);
|
|
313
|
-
const { stdout: statusStdout } = await execFileAsync("git", statusArgs, {
|
|
314
|
-
cwd: sourceProjectRoot
|
|
315
|
-
});
|
|
316
|
-
if (statusStdout !== "") {
|
|
317
|
-
const diagnostic = [
|
|
318
|
-
"Reviewer target status gate failed:",
|
|
319
|
-
"git status --porcelain=v1 --untracked-files=all -- :/ ':(top,exclude).claude/worktrees/**'",
|
|
320
|
-
statusStdout
|
|
321
|
-
].join("\n");
|
|
322
|
-
return dualFailure(new Error(diagnostic));
|
|
323
|
-
}
|
|
324
|
-
const { stdout: targetStdout } = await execFileAsync(
|
|
325
|
-
"git",
|
|
326
|
-
["rev-parse", "--verify", "HEAD^{commit}"],
|
|
327
|
-
{ cwd: sourceProjectRoot }
|
|
328
|
-
);
|
|
329
|
-
targetCommit = targetStdout.trim();
|
|
302
|
+
const sourceProjectRoot = await resolveReviewerGitToplevel(options.projectRoot);
|
|
330
303
|
await execFileAsync(
|
|
331
304
|
"git",
|
|
332
305
|
["rev-parse", "--verify", `${options.baseRevision}^{commit}`],
|
|
@@ -362,55 +335,10 @@ async function summonParallelReviewerLenses(options) {
|
|
|
362
335
|
summon("completeness"),
|
|
363
336
|
summon("correctness")
|
|
364
337
|
]);
|
|
365
|
-
|
|
338
|
+
return {
|
|
366
339
|
completeness: settled[0].status === "fulfilled" ? settled[0].value : failedResult(settled[0].reason),
|
|
367
340
|
correctness: settled[1].status === "fulfilled" ? settled[1].value : failedResult(settled[1].reason)
|
|
368
341
|
};
|
|
369
|
-
let sealDiagnostic;
|
|
370
|
-
try {
|
|
371
|
-
const { stdout: headBeforeStdout } = await execFileAsync(
|
|
372
|
-
"git",
|
|
373
|
-
["rev-parse", "--verify", "HEAD^{commit}"],
|
|
374
|
-
{ cwd: sourceProjectRoot }
|
|
375
|
-
);
|
|
376
|
-
const { stdout: sealedStatusStdout } = await execFileAsync("git", statusArgs, {
|
|
377
|
-
cwd: sourceProjectRoot
|
|
378
|
-
});
|
|
379
|
-
const { stdout: headAfterStdout } = await execFileAsync(
|
|
380
|
-
"git",
|
|
381
|
-
["rev-parse", "--verify", "HEAD^{commit}"],
|
|
382
|
-
{ cwd: sourceProjectRoot }
|
|
383
|
-
);
|
|
384
|
-
const headBefore = headBeforeStdout.trim();
|
|
385
|
-
const headAfter = headAfterStdout.trim();
|
|
386
|
-
if (headBefore !== targetCommit || headAfter !== targetCommit || sealedStatusStdout !== "") {
|
|
387
|
-
sealDiagnostic = [
|
|
388
|
-
"Reviewer target final seal failed:",
|
|
389
|
-
`HEAD before status => ${headBefore}`,
|
|
390
|
-
`HEAD after status => ${headAfter}`,
|
|
391
|
-
`expected PRE_HEAD ${targetCommit}`,
|
|
392
|
-
"git status --porcelain=v1 --untracked-files=all -- :/ ':(top,exclude).claude/worktrees/**'",
|
|
393
|
-
sealedStatusStdout
|
|
394
|
-
].join("\n");
|
|
395
|
-
}
|
|
396
|
-
} catch (error) {
|
|
397
|
-
sealDiagnostic = `Reviewer target final seal failed:
|
|
398
|
-
${serializeThrownValue(error)}`;
|
|
399
|
-
}
|
|
400
|
-
if (sealDiagnostic !== void 0) {
|
|
401
|
-
const withSealFailure = (result) => ({
|
|
402
|
-
...result,
|
|
403
|
-
exitCode: 1,
|
|
404
|
-
stderr: [result.stderr, sealDiagnostic].filter(
|
|
405
|
-
(text) => typeof text === "string" && text !== ""
|
|
406
|
-
).join("\n")
|
|
407
|
-
});
|
|
408
|
-
results = {
|
|
409
|
-
completeness: withSealFailure(results.completeness),
|
|
410
|
-
correctness: withSealFailure(results.correctness)
|
|
411
|
-
};
|
|
412
|
-
}
|
|
413
|
-
return results;
|
|
414
342
|
}
|
|
415
343
|
async function summonGateOfficer(options) {
|
|
416
344
|
let home = options.home;
|
package/package.json
CHANGED
|
@@ -48,10 +48,11 @@ const infrastructureFailureDeclarationSchema = Type.Object(
|
|
|
48
48
|
);
|
|
49
49
|
|
|
50
50
|
/**
|
|
51
|
-
* Compose declarations shared by terminating output tools: infrastructure failure
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
51
|
+
* Compose declarations shared by terminating output tools: infrastructure failure,
|
|
52
|
+
* the optional role-asserted ticket identity, and the optional seat-written conclusion
|
|
53
|
+
* summary (#1198). Returns an open object (additionalProperties: true) with the base
|
|
54
|
+
* schema's properties plus the shared declarations. Incoming required keys that still
|
|
55
|
+
* exist are kept; every other key stays optional.
|
|
55
56
|
* Static typing is preserved on the base (`as S`), so existing
|
|
56
57
|
* `Static<typeof ...>` derived parameter types are unchanged.
|
|
57
58
|
*/
|
|
@@ -72,6 +73,16 @@ export function withTerminatingOutputDeclarations<
|
|
|
72
73
|
}
|
|
73
74
|
: {}
|
|
74
75
|
),
|
|
76
|
+
...(
|
|
77
|
+
baseProperties?.summary === undefined
|
|
78
|
+
? {
|
|
79
|
+
summary: Type.Unknown({
|
|
80
|
+
description:
|
|
81
|
+
"本席自行填写的一两句、20–50 字结论摘要。可选;不因缺失或超长拒收、截断或代填。",
|
|
82
|
+
}),
|
|
83
|
+
}
|
|
84
|
+
: {}
|
|
85
|
+
),
|
|
75
86
|
[INFRASTRUCTURE_FAILURE_DECLARATION_KEY]:
|
|
76
87
|
infrastructureFailureDeclarationSchema.properties[
|
|
77
88
|
INFRASTRUCTURE_FAILURE_DECLARATION_KEY
|
|
@@ -554,7 +554,7 @@ function withReviewerLens(
|
|
|
554
554
|
return [...argv.slice(0, separator), "--lens", lens, ...argv.slice(separator)];
|
|
555
555
|
}
|
|
556
556
|
|
|
557
|
-
/** Git toplevel for Reviewer
|
|
557
|
+
/** Git toplevel for Reviewer pre-dispatch --base existence check (subdir-safe). */
|
|
558
558
|
async function resolveReviewerGitToplevel(projectRoot: string): Promise<string> {
|
|
559
559
|
const callerProjectRoot = await realpath(projectRoot);
|
|
560
560
|
return await realpath((await execFileAsync(
|
|
@@ -570,6 +570,10 @@ async function resolveReviewerGitToplevel(projectRoot: string): Promise<string>
|
|
|
570
570
|
* caller's public argv and only adds `--lens` (10a). No seat-specific ephemeral
|
|
571
571
|
* copy — same shared tree as other seats. Lifecycle stays in this shared
|
|
572
572
|
* summons seam, never in the role module (#946 / ADR 0018).
|
|
573
|
+
*
|
|
574
|
+
* Work-tree dirt and mid-batch HEAD drift are not package hard-stops (#1133):
|
|
575
|
+
* each ordinary Reviewer leg judges and reports object state itself; this seam
|
|
576
|
+
* records original child terminals as returned.
|
|
573
577
|
*/
|
|
574
578
|
export async function summonParallelReviewerLenses(options: {
|
|
575
579
|
/** Public argv after the role token; must not already carry `--lens`. */
|
|
@@ -606,37 +610,10 @@ export async function summonParallelReviewerLenses(options: {
|
|
|
606
610
|
return { completeness: failure, correctness: failure } as const;
|
|
607
611
|
};
|
|
608
612
|
|
|
609
|
-
// Pre-dispatch
|
|
610
|
-
// keeps the
|
|
611
|
-
let sourceProjectRoot: string;
|
|
612
|
-
let targetCommit: string;
|
|
613
|
-
const statusArgs = [
|
|
614
|
-
"status",
|
|
615
|
-
"--porcelain=v1",
|
|
616
|
-
"--untracked-files=all",
|
|
617
|
-
"--",
|
|
618
|
-
":/",
|
|
619
|
-
":(top,exclude).claude/worktrees/**",
|
|
620
|
-
] as const;
|
|
613
|
+
// Pre-dispatch: only verify typed --base resolves (subdir-safe). Missing base
|
|
614
|
+
// keeps the dual-child batch surface. Status / HEAD are not package gates.
|
|
621
615
|
try {
|
|
622
|
-
sourceProjectRoot = await resolveReviewerGitToplevel(options.projectRoot);
|
|
623
|
-
const { stdout: statusStdout } = await execFileAsync("git", statusArgs, {
|
|
624
|
-
cwd: sourceProjectRoot,
|
|
625
|
-
});
|
|
626
|
-
if (statusStdout !== "") {
|
|
627
|
-
const diagnostic = [
|
|
628
|
-
"Reviewer target status gate failed:",
|
|
629
|
-
"git status --porcelain=v1 --untracked-files=all -- :/ ':(top,exclude).claude/worktrees/**'",
|
|
630
|
-
statusStdout,
|
|
631
|
-
].join("\n");
|
|
632
|
-
return dualFailure(new Error(diagnostic));
|
|
633
|
-
}
|
|
634
|
-
const { stdout: targetStdout } = await execFileAsync(
|
|
635
|
-
"git",
|
|
636
|
-
["rev-parse", "--verify", "HEAD^{commit}"],
|
|
637
|
-
{ cwd: sourceProjectRoot },
|
|
638
|
-
);
|
|
639
|
-
targetCommit = targetStdout.trim();
|
|
616
|
+
const sourceProjectRoot = await resolveReviewerGitToplevel(options.projectRoot);
|
|
640
617
|
// Typed base from the public parse — covers --base value and --base=value alike.
|
|
641
618
|
// Child legs still carry the original argv token unchanged (10a).
|
|
642
619
|
await execFileAsync(
|
|
@@ -682,7 +659,7 @@ export async function summonParallelReviewerLenses(options: {
|
|
|
682
659
|
summon("completeness"),
|
|
683
660
|
summon("correctness"),
|
|
684
661
|
]);
|
|
685
|
-
|
|
662
|
+
return {
|
|
686
663
|
completeness: settled[0].status === "fulfilled"
|
|
687
664
|
? settled[0].value
|
|
688
665
|
: failedResult(settled[0].reason),
|
|
@@ -690,55 +667,6 @@ export async function summonParallelReviewerLenses(options: {
|
|
|
690
667
|
? settled[1].value
|
|
691
668
|
: failedResult(settled[1].reason),
|
|
692
669
|
};
|
|
693
|
-
|
|
694
|
-
let sealDiagnostic: string | undefined;
|
|
695
|
-
try {
|
|
696
|
-
const { stdout: headBeforeStdout } = await execFileAsync(
|
|
697
|
-
"git",
|
|
698
|
-
["rev-parse", "--verify", "HEAD^{commit}"],
|
|
699
|
-
{ cwd: sourceProjectRoot },
|
|
700
|
-
);
|
|
701
|
-
const { stdout: sealedStatusStdout } = await execFileAsync("git", statusArgs, {
|
|
702
|
-
cwd: sourceProjectRoot,
|
|
703
|
-
});
|
|
704
|
-
const { stdout: headAfterStdout } = await execFileAsync(
|
|
705
|
-
"git",
|
|
706
|
-
["rev-parse", "--verify", "HEAD^{commit}"],
|
|
707
|
-
{ cwd: sourceProjectRoot },
|
|
708
|
-
);
|
|
709
|
-
const headBefore = headBeforeStdout.trim();
|
|
710
|
-
const headAfter = headAfterStdout.trim();
|
|
711
|
-
if (
|
|
712
|
-
headBefore !== targetCommit
|
|
713
|
-
|| headAfter !== targetCommit
|
|
714
|
-
|| sealedStatusStdout !== ""
|
|
715
|
-
) {
|
|
716
|
-
sealDiagnostic = [
|
|
717
|
-
"Reviewer target final seal failed:",
|
|
718
|
-
`HEAD before status => ${headBefore}`,
|
|
719
|
-
`HEAD after status => ${headAfter}`,
|
|
720
|
-
`expected PRE_HEAD ${targetCommit}`,
|
|
721
|
-
"git status --porcelain=v1 --untracked-files=all -- :/ ':(top,exclude).claude/worktrees/**'",
|
|
722
|
-
sealedStatusStdout,
|
|
723
|
-
].join("\n");
|
|
724
|
-
}
|
|
725
|
-
} catch (error) {
|
|
726
|
-
sealDiagnostic = `Reviewer target final seal failed:\n${serializeThrownValue(error)}`;
|
|
727
|
-
}
|
|
728
|
-
if (sealDiagnostic !== undefined) {
|
|
729
|
-
const withSealFailure = (result: PublicSummonResult): PublicSummonResult => ({
|
|
730
|
-
...result,
|
|
731
|
-
exitCode: 1,
|
|
732
|
-
stderr: [result.stderr, sealDiagnostic].filter(
|
|
733
|
-
(text): text is string => typeof text === "string" && text !== "",
|
|
734
|
-
).join("\n"),
|
|
735
|
-
});
|
|
736
|
-
results = {
|
|
737
|
-
completeness: withSealFailure(results.completeness),
|
|
738
|
-
correctness: withSealFailure(results.correctness),
|
|
739
|
-
};
|
|
740
|
-
}
|
|
741
|
-
return results;
|
|
742
670
|
}
|
|
743
671
|
|
|
744
672
|
/** Gate officer summons: notary/auditor via --source-run; inspector via pointer; countersign via parentRunPath (#969 / #987). */
|