Codex PR Coverage Workflow
Last updated: 2026-06-10Purpose
Use this workflow for iterative Codex coverage PRs: sync the default branch, choose the next coherent high-value coverage gap, open a ready PR, watch CI and Greptile, merge when clean, then clean up the merged branch locally and remotely.Working Loop
- Start from a clean, synced base branch after each merge.
- After every merge, delete the merged Codex branch locally and remotely when safe. Prune stale remotes as needed, but leave unrelated user branches and files alone.
- Create one ready-for-review PR per coherent coverage batch. Do not open drafts.
- Batch related work by feature/module or user workflow instead of opening many tiny PRs for individual functions.
- Prioritize high-value targets first: user-visible workflows, browser-only APIs, storage/security boundaries, cross-module integration, and files with many uncovered functions over low-risk pure helpers.
- Prefer Playwright for browser-visible behavior, modal/session flows, UI state, storage-backed flows, and cross-module integration.
- Use Vitest for pure helper functions, parsers, formatters, and narrow logic that does not need browser behavior.
- Avoid deduplication unless duplicated fixtures/helpers are causing real maintenance risk. Isolated test setup is acceptable when it keeps tests readable.
- For test-only changes, do not bump
version.js. If production app files change, bumpversion.js.
Verification
Before opening or updating a PR:- Run targeted tests for the changed area.
- Run
./run-tests.shwhen the change is broad or before marking the PR ready. - For Playwright coverage batches, use
npm run test:playwright -- <spec>for fast iteration. - Run coverage evaluation periodically to rank high-value targets, not after every PR. Use it when the next target is unclear or after several merged coverage batches.
- Check GitHub Actions CI.
- Check Greptile review comments and unresolved threads.
- Patch actionable Greptile findings, rerun targeted tests, push, then recheck.
- Treat non-blocking Greptile robustness notes as worth fixing when they are small and improve test quality.
PR Rules
- Open PRs as ready, not drafts.
- Include a focused summary and the test commands run.
- Keep scope to coverage or the specific reviewed fix.
- Do not mix unrelated refactors into coverage PRs.
- Keep watching CI and Greptile until both are clean enough to merge.