Upstream: fullsend-ai#5784
Summary
skills/analyze-transcript/analyze-transcript.py has no tests. The script has grown to ~770 lines with several heuristic-based functions (detect_file_type, host/method filtering, error detection, OTLP sniffing) that are easy to regress on.
Test data
- Real transcripts: pull from
fullsend-ai/.fullsend GitHub Actions artifacts (gh run download) to get representative agent runs with varied tool usage, error patterns, and network activity.
- Crafted fixtures: build small JSONL files to exercise specific paths -- OTLP telemetry detection, non-dict JSON lines, blank-line-heavy files, stdin input, non-UTF-8 content, edge cases in host matching and method filtering.
Key areas to cover
detect_file_type: OTLP detection, non-dict JSON, non-JSON lines, unreadable files, blank line budget consumption
cmd_audit / cmd_summary / cmd_errors: token accounting, error heuristics (tool_result errors, assistant-text mentions, <error> tags), stop reason counting
cmd_network: --http, --method, --host filter combinations in both text and JSON output modes; DENIED entry handling
iter_messages / parse_lines: line range filtering, malformed input resilience
Context
PR fullsend-ai#5164 added the audit subcommand, telemetry detection, and HTTP filters. Review rounds surfaced several edge-case bugs that were fixed iteratively. Tests would have caught most of them before review.
Summary
skills/analyze-transcript/analyze-transcript.pyhas no tests. The script has grown to ~770 lines with several heuristic-based functions (detect_file_type, host/method filtering, error detection, OTLP sniffing) that are easy to regress on.Test data
fullsend-ai/.fullsendGitHub Actions artifacts (gh run download) to get representative agent runs with varied tool usage, error patterns, and network activity.Key areas to cover
detect_file_type: OTLP detection, non-dict JSON, non-JSON lines, unreadable files, blank line budget consumptioncmd_audit/cmd_summary/cmd_errors: token accounting, error heuristics (tool_result errors, assistant-text mentions,<error>tags), stop reason countingcmd_network:--http,--method,--hostfilter combinations in both text and JSON output modes; DENIED entry handlingiter_messages/parse_lines: line range filtering, malformed input resilienceContext
PR fullsend-ai#5164 added the
auditsubcommand, telemetry detection, and HTTP filters. Review rounds surfaced several edge-case bugs that were fixed iteratively. Tests would have caught most of them before review.