Overview
Build a full test suite and benchmark harness to validate correctness and measure performance vs Pinchtab/Pathik.
Tasks
- Unit tests:
- CDP client: message framing, response parsing, error handling
- Snapshot builder: filter, depth, format, diff modes
- Markdown converter: headings, lists, tables, code blocks, links
- URL validator: private IPs, schemes, edge cases
- Rate limiter: token bucket correctness
- JSON response helpers
- Integration tests:
- Full server start → navigate → snapshot → action flow
- Crawl pipeline: fetch → extract → convert → save
- Tab lifecycle: create → use → close → clean stale
- Benchmarks:
- Snapshot generation latency (target: <100ms for typical page)
- JSON serialization throughput
- Crawl pipeline throughput (URLs/sec)
- Memory usage per request (target: <5MB arena)
- Compare vs Pinchtab Go and Pathik Go baselines
- Mock Chrome CDP server for offline testing
Acceptance Criteria
-
80% code coverage on core modules
- All benchmarks have baseline numbers documented
- Tests pass without requiring a running Chrome instance (via mocks)
- CI-friendly:
zig build test runs all tests
Overview
Build a full test suite and benchmark harness to validate correctness and measure performance vs Pinchtab/Pathik.
Tasks
Acceptance Criteria
zig build testruns all tests