mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 09:20:43 +00:00
fix(commands): require gateway memory probe skipped state
Co-authored-by: openclaw-clawsweeper[bot] <280122609+openclaw-clawsweeper[bot]@users.noreply.github.com>
This commit is contained in:
@@ -17,7 +17,7 @@ export type GatewayMemoryProbe = {
|
||||
* unavailable gateway. Renderers should suppress warnings only for skipped
|
||||
* probes, not for transport failures.
|
||||
*/
|
||||
skipped?: boolean;
|
||||
skipped: boolean;
|
||||
};
|
||||
|
||||
function isGatewayCallTimeout(message: string): boolean {
|
||||
|
||||
@@ -22,7 +22,9 @@ vi.mock("./doctor-gateway-daemon-flow.js", () => ({
|
||||
|
||||
vi.mock("./doctor-gateway-health.js", () => ({
|
||||
checkGatewayHealth: vi.fn().mockResolvedValue({ healthOk: false }),
|
||||
probeGatewayMemoryStatus: vi.fn().mockResolvedValue({ checked: false, ready: false }),
|
||||
probeGatewayMemoryStatus: vi
|
||||
.fn()
|
||||
.mockResolvedValue({ checked: false, ready: false, skipped: false }),
|
||||
}));
|
||||
|
||||
vi.mock("./doctor-memory-search.js", () => ({
|
||||
|
||||
@@ -465,7 +465,7 @@ async function runGatewayHealthChecks(ctx: DoctorHealthFlowContext): Promise<voi
|
||||
cfg: ctx.cfg,
|
||||
timeoutMs: ctx.options.nonInteractive === true ? 3000 : 10_000,
|
||||
})
|
||||
: { checked: false, ready: false };
|
||||
: { checked: false, ready: false, skipped: false };
|
||||
}
|
||||
|
||||
async function runMemorySearchHealthContribution(ctx: DoctorHealthFlowContext): Promise<void> {
|
||||
@@ -478,7 +478,7 @@ async function runMemorySearchHealthContribution(ctx: DoctorHealthFlowContext):
|
||||
});
|
||||
}
|
||||
await noteMemorySearchHealth(ctx.cfg, {
|
||||
gatewayMemoryProbe: ctx.gatewayMemoryProbe ?? { checked: false, ready: false },
|
||||
gatewayMemoryProbe: ctx.gatewayMemoryProbe ?? { checked: false, ready: false, skipped: false },
|
||||
});
|
||||
if (ctx.options.deep === true) {
|
||||
await noteMemoryRecallHealth(ctx.cfg);
|
||||
|
||||
Reference in New Issue
Block a user