fix(doctor): preview missing transcript cleanup (#83630)

* fix(doctor): preview missing transcript cleanup

* fix(doctor): preview missing transcript cleanup

---------

Co-authored-by: YuanHanzhong <YuanHanzhong@users.noreply.github.com>
Co-authored-by: openclaw-clownfish[bot] <280122609+openclaw-clownfish[bot]@users.noreply.github.com>
This commit is contained in:
袁焊忠
2026-07-07 13:49:44 +08:00
committed by GitHub
parent 80bb0cd24e
commit 6ed2aafe3c
2 changed files with 7 additions and 2 deletions

View File

@@ -633,7 +633,12 @@ describe("doctor state integrity oauth dir checks", () => {
const text = await runStateIntegrityText(cfg);
expect(text).toContain("recent sessions are missing transcripts");
expect(text).toMatch(/openclaw sessions --store ".*sessions\.json"/);
expect(text).toMatch(/openclaw sessions cleanup --store ".*sessions\.json" --dry-run/);
expect(text).toMatch(
/openclaw sessions cleanup --store ".*sessions\.json" --dry-run --fix-missing/,
);
expect(text).not.toMatch(
/openclaw sessions cleanup --store ".*sessions\.json" --dry-run(?! --fix-missing)/,
);
expect(text).toMatch(
/openclaw sessions cleanup --store ".*sessions\.json" --enforce --fix-missing/,
);

View File

@@ -1298,7 +1298,7 @@ export async function noteStateIntegrity(
[
`- ${missing.length}/${recentTranscriptCandidates.length} recent sessions are missing transcripts.`,
` Verify sessions in store: ${formatCliCommand(`openclaw sessions --store "${absoluteStorePath}"`)}`,
` Preview cleanup impact: ${formatCliCommand(`openclaw sessions cleanup --store "${absoluteStorePath}" --dry-run`)}`,
` Preview cleanup impact: ${formatCliCommand(`openclaw sessions cleanup --store "${absoluteStorePath}" --dry-run --fix-missing`)}`,
` Prune missing entries: ${formatCliCommand(`openclaw sessions cleanup --store "${absoluteStorePath}" --enforce --fix-missing`)}`,
].join("\n"),
);