fix: quiet auth probe diagnostics
This commit is contained in:
@@ -13,6 +13,7 @@ Docs: https://docs.clawd.bot
|
|||||||
- TUI: forward unknown slash commands (for example, `/context`) to the Gateway.
|
- TUI: forward unknown slash commands (for example, `/context`) to the Gateway.
|
||||||
- TUI: include Gateway slash commands in autocomplete and `/help`.
|
- TUI: include Gateway slash commands in autocomplete and `/help`.
|
||||||
- CLI: skip usage lines in `clawdbot models status` when provider usage is unavailable.
|
- CLI: skip usage lines in `clawdbot models status` when provider usage is unavailable.
|
||||||
|
- CLI: suppress diagnostic session/run noise during auth probes.
|
||||||
- Linux: include env-configured user bin roots in systemd PATH and align PATH audits. (#1512) Thanks @robbyczgw-cla.
|
- Linux: include env-configured user bin roots in systemd PATH and align PATH audits. (#1512) Thanks @robbyczgw-cla.
|
||||||
- TUI: render Gateway slash-command replies as system output (for example, `/context`).
|
- TUI: render Gateway slash-command replies as system output (for example, `/context`).
|
||||||
- Media: preserve PNG alpha when possible; fall back to JPEG when still over size cap. (#1491) Thanks @robbyczgw-cla.
|
- Media: preserve PNG alpha when possible; fall back to JPEG when still over size cap. (#1491) Thanks @robbyczgw-cla.
|
||||||
|
|||||||
@@ -109,14 +109,18 @@ export function setActiveEmbeddedRun(sessionId: string, handle: EmbeddedPiQueueH
|
|||||||
state: "processing",
|
state: "processing",
|
||||||
reason: wasActive ? "run_replaced" : "run_started",
|
reason: wasActive ? "run_replaced" : "run_started",
|
||||||
});
|
});
|
||||||
diag.info(`run registered: sessionId=${sessionId} totalActive=${ACTIVE_EMBEDDED_RUNS.size}`);
|
if (!sessionId.startsWith("probe-")) {
|
||||||
|
diag.info(`run registered: sessionId=${sessionId} totalActive=${ACTIVE_EMBEDDED_RUNS.size}`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function clearActiveEmbeddedRun(sessionId: string, handle: EmbeddedPiQueueHandle) {
|
export function clearActiveEmbeddedRun(sessionId: string, handle: EmbeddedPiQueueHandle) {
|
||||||
if (ACTIVE_EMBEDDED_RUNS.get(sessionId) === handle) {
|
if (ACTIVE_EMBEDDED_RUNS.get(sessionId) === handle) {
|
||||||
ACTIVE_EMBEDDED_RUNS.delete(sessionId);
|
ACTIVE_EMBEDDED_RUNS.delete(sessionId);
|
||||||
logSessionStateChange({ sessionId, state: "idle", reason: "run_completed" });
|
logSessionStateChange({ sessionId, state: "idle", reason: "run_completed" });
|
||||||
diag.info(`run cleared: sessionId=${sessionId} totalActive=${ACTIVE_EMBEDDED_RUNS.size}`);
|
if (!sessionId.startsWith("probe-")) {
|
||||||
|
diag.info(`run cleared: sessionId=${sessionId} totalActive=${ACTIVE_EMBEDDED_RUNS.size}`);
|
||||||
|
}
|
||||||
notifyEmbeddedRunEnded(sessionId);
|
notifyEmbeddedRunEnded(sessionId);
|
||||||
} else {
|
} else {
|
||||||
diag.debug(`run clear skipped: sessionId=${sessionId} reason=handle_mismatch`);
|
diag.debug(`run clear skipped: sessionId=${sessionId} reason=handle_mismatch`);
|
||||||
|
|||||||
@@ -197,17 +197,20 @@ export function logSessionStateChange(
|
|||||||
},
|
},
|
||||||
) {
|
) {
|
||||||
const state = getSessionState(params);
|
const state = getSessionState(params);
|
||||||
|
const isProbeSession = state.sessionId?.startsWith("probe-") ?? false;
|
||||||
const prevState = state.state;
|
const prevState = state.state;
|
||||||
state.state = params.state;
|
state.state = params.state;
|
||||||
state.lastActivity = Date.now();
|
state.lastActivity = Date.now();
|
||||||
if (params.state === "idle") state.queueDepth = Math.max(0, state.queueDepth - 1);
|
if (params.state === "idle") state.queueDepth = Math.max(0, state.queueDepth - 1);
|
||||||
diag.info(
|
if (!isProbeSession) {
|
||||||
`session state: sessionId=${state.sessionId ?? "unknown"} sessionKey=${
|
diag.info(
|
||||||
state.sessionKey ?? "unknown"
|
`session state: sessionId=${state.sessionId ?? "unknown"} sessionKey=${
|
||||||
} prev=${prevState} new=${params.state} reason="${params.reason ?? ""}" queueDepth=${
|
state.sessionKey ?? "unknown"
|
||||||
state.queueDepth
|
} prev=${prevState} new=${params.state} reason="${params.reason ?? ""}" queueDepth=${
|
||||||
}`,
|
state.queueDepth
|
||||||
);
|
}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
emitDiagnosticEvent({
|
emitDiagnosticEvent({
|
||||||
type: "session.state",
|
type: "session.state",
|
||||||
sessionId: state.sessionId,
|
sessionId: state.sessionId,
|
||||||
|
|||||||
@@ -68,9 +68,12 @@ function drainLane(lane: string) {
|
|||||||
entry.resolve(result);
|
entry.resolve(result);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
state.active -= 1;
|
state.active -= 1;
|
||||||
diag.error(
|
const isProbeLane = lane.startsWith("auth-probe:") || lane.startsWith("session:probe-");
|
||||||
`lane task error: lane=${lane} durationMs=${Date.now() - startTime} error="${String(err)}"`,
|
if (!isProbeLane) {
|
||||||
);
|
diag.error(
|
||||||
|
`lane task error: lane=${lane} durationMs=${Date.now() - startTime} error="${String(err)}"`,
|
||||||
|
);
|
||||||
|
}
|
||||||
pump();
|
pump();
|
||||||
entry.reject(err);
|
entry.reject(err);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user