mirror of
https://github.com/MoonshotAI/kimi-code.git
synced 2026-10-26 00:20:20 +00:00
* fix(telemetry): stop silently dropping key event attributes - turn_ended now carries error_type (the engine error code) when a turn fails, matching the v2 event catalog definition that no emitter set - TelemetryClient reports properties dropped by sanitizeProperties via a new onUnexpectedError hook, wired to the CLI, web, and v2-print logs - session_started client attribution keys emit empty strings instead of null so they survive payload flattening * fix(telemetry): sanitize at sink accept time and guard the drop handler Addresses review on #3638: - Properties are sanitized when the sink accepts the event (at track time on the direct path, at drain time for the pre-init queue), so drops on events queued before initialization are reported once onUnexpectedError is installed - The onUnexpectedError hook is invoked behind a guard, mirroring the agent-core-v2 unexpectedError path, so a faulty host handler cannot abort track() * fix(telemetry): snapshot queued properties at track time Addresses review on #3638: the pre-init queue now stores the sanitized snapshot taken at track time (only primitives survive, so the snapshot is exact), and the dropped keys ride along as pending diagnostics that are replayed once the handler is installed. Callers mutating a reused properties object between track() and initialization can no longer alter the emitted event or its drop reports |
||
|---|---|---|
| .. | ||
| src | ||
| test | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
| tsdown.config.ts | ||
| vitest.config.ts | ||