Skip to content

feat(cli): add inspect search and filter commands#985

Merged
christso merged 4 commits intomainfrom
feat/980-transcript-search
Apr 8, 2026
Merged

feat(cli): add inspect search and filter commands#985
christso merged 4 commits intomainfrom
feat/980-transcript-search

Conversation

@christso
Copy link
Copy Markdown
Collaborator

@christso christso commented Apr 8, 2026

Summary

  • Add agentv inspect search --pattern <regex> [path] to scan JSONL result files and transcripts for regex matches, with optional --target and --experiment pre-filters
  • Add agentv inspect filter [path] to filter evaluation results by target, experiment, score thresholds, execution status, and tool usage
  • Both commands support --format json for machine-readable output
  • Includes 27 unit tests covering search matching, filtering predicates, record parsing, and edge cases

Closes #980

Red/Green UAT

Red (main): agentv inspect search returns "Not a valid subcommand name"

Green (branch):

$ agentv inspect search --pattern "score" --dir .
Search Results pattern: /score/
49 matches found
...

$ agentv inspect filter --score-below 0.5
Filtered Results (24 matches)
  Test ID                         Target           Experiment             Score  Status
  ...

Test plan

  • Unit tests pass (27 tests, 81 assertions)
  • Full test suite passes (1928 tests, 0 failures)
  • Build succeeds
  • Lint passes (biome)
  • Typecheck passes
  • Manual CLI verification with real eval data
  • Review: confirm search handles large JSONL files gracefully
  • Review: confirm filter status inference logic for edge cases

Generated with Claude Code

christso and others added 2 commits April 8, 2026 22:23
Add two new subcommands to `agentv inspect`:

- `inspect search --pattern <regex> [path]` scans JSONL result files
  and transcripts for regex matches, with optional --target and
  --experiment pre-filters. Outputs file path, test_id, and matching
  snippet with context.

- `inspect filter [path]` filters evaluation results by target,
  experiment, score thresholds (--score-below/--score-above), execution
  status (pass/fail/error), and tool usage (--has-tool). Outputs
  matching test IDs with summary table.

Both support --format json for machine-readable output.

Closes #980

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Apply biome formatting and lint fixes: import sorting, template
literal preferences, line length formatting.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Apr 8, 2026

Deploying agentv with  Cloudflare Pages  Cloudflare Pages

Latest commit: 6ca9a64
Status: ✅  Deploy successful!
Preview URL: https://a431dccd.agentv.pages.dev
Branch Preview URL: https://feat-980-transcript-search.agentv.pages.dev

View logs

christso and others added 2 commits April 8, 2026 22:42
- Error on non-existent paths instead of silent empty results
- Use snake_case for JSON output (wire format convention)
- Validate --format flag with oneOf
- Clarify search output counts as record-level

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@christso christso marked this pull request as ready for review April 8, 2026 23:01
@christso christso merged commit f9057eb into main Apr 8, 2026
4 checks passed
@christso christso deleted the feat/980-transcript-search branch April 8, 2026 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: transcript search and filtering across agent runs

1 participant