Files
openclaw/src/plugin-sdk/diagnostic-runtime.ts
Galin Iliev 5d799c2d20 fix: yield diagnostic event drains (#82937)
Summary:
- The branch caps async diagnostic drains at 100 events per turn, adds pending/full-drain diagnostic helpers,  ... rminal diagnostics to inspect pending events, and adds regression coverage plus changelog/baseline updates.
- Reproducibility: yes. from source inspection. Current main drains the entire async diagnostic queue in one s ... ck, and the PR body supplies a focused 250-event after-fix probe showing 100/200/250 delivery across turns.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix: yield diagnostic event drains

Validation:
- ClawSweeper review passed for head 95610934cd.
- Required merge gates passed before the squash merge.

Prepared head SHA: 95610934cd
Review: https://github.com/openclaw/openclaw/pull/82937#issuecomment-4469498220

Co-authored-by: Galin Iliev <galini@microsoft.com>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com>
2026-05-20 02:55:17 +00:00

28 lines
893 B
TypeScript

// Diagnostic flag/event helpers for plugins that want narrow runtime gating.
export { isDiagnosticFlagEnabled } from "../infra/diagnostic-flags.js";
export type {
DiagnosticEventMetadata,
DiagnosticEventPayload,
} from "../infra/diagnostic-events.js";
export {
emitDiagnosticEvent,
emitTrustedDiagnosticEvent,
hasPendingInternalDiagnosticEvent,
isDiagnosticsEnabled,
onInternalDiagnosticEvent,
onDiagnosticEvent,
resetDiagnosticEventsForTest,
waitForDiagnosticEventsDrained,
} from "../infra/diagnostic-events.js";
export type { DiagnosticTraceContext } from "../infra/diagnostic-trace-context.js";
export {
createChildDiagnosticTraceContext,
createDiagnosticTraceContext,
formatDiagnosticTraceparent,
isValidDiagnosticSpanId,
isValidDiagnosticTraceFlags,
isValidDiagnosticTraceId,
parseDiagnosticTraceparent,
} from "../infra/diagnostic-trace-context.js";