How The New York Times is scaling Unit Test Coverage using AI Tools
The New York Times Web Platforms team used an AI coding agent to raise unit test coverage across its News monorepo, taking six projects from an average of 28% to 83% coverage and the Story template from 53% to 83%, with an estimated 70% reduction in effort. The workflow nests an AI loop (run a custom test-cov package, find gaps, generate and run tests, re-measure) inside a human review loop. It is constrained by two hard "walls": a rule never to touch source code, and a read-only coverage report the agent cannot game. A seven-page prompt covering role, targets, commands, success criteria, guardrails such as a 10-iteration cap, and a reporting template made the process reusable. Key lessons are to keep context minimal to avoid context rot, limit scope per run so diffs stay reviewable, and involve owning teams in formal review of AI-generated tests.
Related posts
- ClickGap: Autonomous QA for ClickHouse
ClickHouse mediumAdept
ClickGap is an autonomous QA agent that reviews every pull request merged into ClickHouse, writes and runs tests against real builds, bisects regressions, and files issues and test-only PRs without human sign-off. In five months it filed about 500 issues and 200 coverage PRs, more than half of the issues already closed as completed. Candidate findings must survive an adversarial reviewer and ten gates, eight enforced as plain code, including executed reproducers, valid citations, existing-test searches, mutation kill-tests for coverage claims, and matching against past false positives. Reviews cost a couple of dollars each, smaller models handle recoverable subtasks, and every cost cut must pass a recall benchmark that replays previously confirmed bugs.
- Everything We Talked About at O11yDay London 2026
Honeycomb mediumAdeptAcross ten sessions at O11yDay London, the recurring bottleneck was not writing code but reviewing it, operating agents in production, and proving the spend is worth it. Speakers described instrumenting AI agents like any other production system: OpenTelemetry pipelines repaired to expose hidden Claude Agent SDK subagents, per-conversation Agent Timelines showing tokens and cost (about $1.70 and seven minutes for one review), and anomaly detection that tied a failure spike to a switch from per-PR to per-commit review. Concrete findings include roughly 80% of merged PRs at Honeycomb having no human-driven changes (prompting a rule that two developers must participate, one of whom may be a machine), Fin's measured wins from enforcing Claude Code configuration (brief mode cut output tokens ~20%, a hard nudge to cheaper models saved 7.4%), and HelloFresh seeing restores 20% faster but over 10% of investigations stalling. Corey Quinn closed by treating AI cost as an observability problem: put cost, price at time of request, and whether the result was accepted on every span, share one request ID across retries, use the OpenTelemetry GenAI semantic conventions, and enforce spend limits outside the agent loop.
- Autoresearch isn’t just for training models
Shopify Engineering easyNoviceGeneralizing Karpathy's Autoresearch beyond model training, Shopify built pi-autoresearch, an extension for the Pi agent harness that runs an agent in an endless loop against a single measurable metric: establish a baseline, form a hypothesis, test it, keep improvements and discard crashes or regressions. Applied to the Polaris build, it cut build time 65% by skipping a redundant full component pipeline before Storybook and limiting a TypeScript transform to the 105 of 580 files that needed it, though humans still had to discard hacks like deleting files. Tobi Lütke added multi-metric support and auto-commits, then ran it on Liquid for 53% faster parse+render and 61% fewer allocations. The open-sourced tool has been used internally to speed up unit tests, React mounting, Playwright tests and pnpm.
- Agents, Randomness, and Receipts: Notes from trivago's QA Meetup
trivago tech easyNoviceRecap of three QA meetup talks on verifying testing and delivery. Qase.io measured AI adoption with git-ai, an open-source tool that records per-commit attribution in git notes; teams showed 61–92% AI-authored code, deployment frequency roughly tripled, and MTTR halved, while lead time stayed low because the bottleneck moved to planning and review. Curio IT argued for randomizing test inputs to counter the pesticide effect, using a seeded test data broker for reproducibility and treating flakiness as signal rather than noise. trivago described an AI agent that tests about 200 advertiser API connectors using randomized inputs, a shared CLI, AGENTS.md constraints, two-stage mechanical and LLM validation, and a 0–100 self-audit score.
- Harness engineering: leveraging Codex in an agent-first world
OpenAI mediumAdept
A small OpenAI team built and shipped an internal product of roughly a million lines over five months with zero manually written code, merging about 1,500 Codex-authored PRs at around 3.5 PRs per engineer per day, an estimated 10x faster than writing it by hand. The engineers' job shifted to building the environment agents work in. Each git worktree boots its own app instance, the Chrome DevTools Protocol lets agents drive the UI, and a per-worktree ephemeral observability stack can be queried with LogQL, PromQL and TraceQL. A short AGENTS.md acts as a map into a structured, CI-validated docs/ directory instead of one giant instruction file. A rigid layered domain architecture is enforced by custom linters whose error messages carry remediation instructions for the agent.