fix(verify): report final success only after resource cleanup

This commit is contained in:
morluto
2026-10-09 04:12:49 +08:00
parent 3eb7dbdc16
commit ee043e2cbf
17 changed files with 277 additions and 195 deletions
+39 -3
View File
@@ -34,6 +34,7 @@ let tarball;
let mcpStartup;
let mcpModuleLoading;
let update;
let report;
try {
({ tarball } = await verifyPackagePack({ root, workspace }));
@@ -132,9 +133,44 @@ try {
evidenceRoot,
artifactArchive,
});
process.stdout.write(
`${JSON.stringify({ verifier_run: await completeVerifierRun(verifierRun), cli: true, analysisCli: true, artifactCli: true, managedCli: true, managedReconstructionCli: true, managedNativeVerificationCli: true, managedApplicationGraphCli: true, evidenceCli: true, incurMcpCommand: PRODUCT_IDENTITY.mcpCommand, lifecycleScriptsRequired: false, doctor: "platform-appropriate", setup: supportedSetupHost ? "planned-then-idempotent" : "unsupported-host-rejected", setupPlanReadOnly: supportedSetupHost, existingHopperPreserved: supportedSetupHost, clients: supportedSetupHost ? 4 : 0, backupReadback: supportedSetupHost, failureRecovery: supportedSetupHost, configSymlinkLifecycle: supportedSetupHost, skill: supportedSetupHost, skillReferences: supportedSetupHost, mcpTools: TOOL_CONTRACTS.length, mcpPrompts: prompts.names.length, promptCompletion: true, promptCompletionLifecycle: true, evidenceMcp: true, targetFree: true, targetLifecycle: true, boundedRegexBridge: true, update, mcpStartup, mcpModuleLoading })}\n`,
);
report = {
cli: true,
analysisCli: true,
artifactCli: true,
managedCli: true,
managedReconstructionCli: true,
managedNativeVerificationCli: true,
managedApplicationGraphCli: true,
evidenceCli: true,
incurMcpCommand: PRODUCT_IDENTITY.mcpCommand,
lifecycleScriptsRequired: false,
doctor: "platform-appropriate",
setup: supportedSetupHost
? "planned-then-idempotent"
: "unsupported-host-rejected",
setupPlanReadOnly: supportedSetupHost,
existingHopperPreserved: supportedSetupHost,
clients: supportedSetupHost ? 4 : 0,
backupReadback: supportedSetupHost,
failureRecovery: supportedSetupHost,
configSymlinkLifecycle: supportedSetupHost,
skill: supportedSetupHost,
skillReferences: supportedSetupHost,
mcpTools: TOOL_CONTRACTS.length,
mcpPrompts: prompts.names.length,
promptCompletion: true,
promptCompletionLifecycle: true,
evidenceMcp: true,
targetFree: true,
targetLifecycle: true,
boundedRegexBridge: true,
update,
mcpStartup,
mcpModuleLoading,
};
} finally {
await rm(workspace, { recursive: true, force: true });
}
process.stdout.write(
`${JSON.stringify({ verifier_run: await completeVerifierRun(verifierRun), ...report })}\n`,
);