Skip to content

analyze-transcript: add test coverage for the analyzer script #782

Description

@guyoron1

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions