Greenlight
A proactive test-writing agent that finds risky coverage gaps, writes tests in your repository's conventions, runs them in isolation, and prepares a reviewable PR only when they are green.
Track: Developer Tools - OpenAI Build Week 2026
The problem
Teams know which modules lack coverage, but not which gaps are worth spending time on. Adding tests is slow because an author has to learn the module, reverse-engineer testing conventions, handle edge cases, run the suite, and fix generated failures. The result: risky code often stays untested.
Greenlight scans for high-signal gaps, selects a risky module, generates convention-matched tests, runs them in an isolated sandbox, retries only the generated tests up to three times, checks for flakes, and prepares a PR for a human review.
Run locally
cd testclaw
pnpm start
# Open http://localhost:3004
The complete local demo uses a representative TypeScript repository. Choose Generate & run tests to show a generated-test failure, test-only repair, green run, flake check, and reviewable PR. No credentials are needed.
pnpm test
GPT-5.6 integration
GPT-5.6 does the hard part: it reasons across the full source file and imports, uncovered-line coverage data, existing test conventions, and isolated test-run output. It writes complete tests that match a repository's mocking, assertion, and test structure conventions. If an output fails, the fix prompt is constrained to modify the generated test—not production source—and runs for at most three rounds.
The runnable demo has deterministic data for a reliable judge path. The intended structured GPT-5.6 contract is in src/services/test-engine.js.
Safety model
- Production source files are never modified.
- Every generated test runs in an isolated sandbox.
- A test gets at most three test-only repair attempts.
- Flake detection requires three consistent passing runs; flakes are excluded.
- A branch and PR are prepared for human review, never merged automatically.
Production path
Connect a GitHub App, coverage runner, and disposable Docker or Modal sandbox. The agent then detects language and test framework, learns conventions from current tests, scans on schedule or PR activity, and opens a branch only containing passing generated test files.
Codex workflow
This project was built in the primary Codex Build Week session. Codex implemented the agent loop, convention-aware test generation contract, test-only iteration safeguard, flake gate, local API, responsive product workspace, tests, and submission support. Add the /feedback Session ID from the primary build thread here and to Devpost before submitting.
License
MIT. See LICENSE.
Log in or sign up for Devpost to join the conversation.