Skip to content

Telemetry: command outcomes, per-kind failure streaks, periodic flush, per-tool output schemas #56

Description

@cf-pages

Targeted: 0.5.0 (reliability program). Baseline: release/0.3.0.

Four measurement defects that keep real failures invisible:

  1. Non-zero exits count as success. processes.py:280 hardcodes "ok": True for any command that ran; test/build failures never reach the dashboards. Keep ok = "the tool call worked", add an outcome dimension (exited_0 | exited_nonzero | timeout | signal | spawn_error) and bucket tool_summary/session_end by it.
  2. _failure_streak is one global slot cleared by any success (telemetry.py:400-407): 17 consecutive apply_patch failures interleaved with successful read_file calls never exceeds a streak of 5. Track per (tool, error_code) (bounded, LRU ~16), cleared only by a success of the same tool.
  3. Summaries only flush at finish(). A long-lived HTTP process emits session_end once at shutdown (documented in 0.3.0); add periodic/incremental flush (every N calls or T minutes) so aggregate data survives.
  4. One shared output schema for the whole catalog (tool_output_schema()): command_id, next_action, truncated, status, exit_code are undeclared. Give each tool a real output schema — also a prerequisite for the structured-edit tool.

Privacy red lines carried over from 0.3.0: closed schema, no paths/content, sanitized clientInfo only.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions