fix(doctor): use gateway health status for memory search key check (#22327)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 2f02ec9403
Co-authored-by: therk <901920+therk@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
This commit is contained in:
Ruslan Kharitonov
2026-02-23 14:07:16 -05:00
committed by GitHub
parent bf373eeb43
commit 8d69251475
11 changed files with 338 additions and 11 deletions

View File

@@ -29,7 +29,7 @@ import {
import { doctorShellCompletion } from "./doctor-completion.js";
import { loadAndMaybeMigrateDoctorConfig } from "./doctor-config-flow.js";
import { maybeRepairGatewayDaemon } from "./doctor-gateway-daemon-flow.js";
import { checkGatewayHealth } from "./doctor-gateway-health.js";
import { checkGatewayHealth, probeGatewayMemoryStatus } from "./doctor-gateway-health.js";
import {
maybeRepairGatewayServiceConfig,
maybeScanExtraGatewayServices,
@@ -264,7 +264,6 @@ export async function doctorCommand(
}
noteWorkspaceStatus(cfg);
await noteMemorySearchHealth(cfg);
// Check and fix shell completion
await doctorShellCompletion(runtime, prompter, {
@@ -276,6 +275,13 @@ export async function doctorCommand(
cfg,
timeoutMs: options.nonInteractive === true ? 3000 : 10_000,
});
const gatewayMemoryProbe = healthOk
? await probeGatewayMemoryStatus({
cfg,
timeoutMs: options.nonInteractive === true ? 3000 : 10_000,
})
: { checked: false, ready: false };
await noteMemorySearchHealth(cfg, { gatewayMemoryProbe });
await maybeRepairGatewayDaemon({
cfg,
runtime,