fix(package): accept expected doctor diagnostics

This commit is contained in:
morluto 2026-07-16 20:26:25 +08:00
parent 2b064335ea
commit 0f2d01300a
1 changed files with 6 additions and 2 deletions

View File

@ -692,10 +692,14 @@ try {
(await readFile(siblingSkillPath, "utf8")) !== "unrelated skill\n"
)
throw new Error("packaged stale-skill upgrade was not isolated");
const alignedDoctor = json(
await run(cli, ["doctor", "--json"], environment),
const alignedDoctorExecution = await runWithStatus(
cli,
["doctor", "--json"],
environment,
);
const alignedDoctor = json(alignedDoctorExecution.stdout);
if (
alignedDoctorExecution.status !== (alignedDoctor.healthy ? 0 : 1) ||
alignedDoctor.identity?.skill?.state !== "aligned" ||
alignedDoctor.identity?.skill?.installed_tool_count !==
TOOL_CONTRACTS.length ||