> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getbased.health/llms.txt
> Use this file to discover all available pages before exploring further.

# Codex PR coverage workflow

> Contributor workflow for PR coverage checks and Codex-assisted work.

# Codex PR coverage workflow

Use a focused, reviewable change for one behavior or coverage gap. Follow the app repository's `AGENTS.md` and contributing guide, and preserve unrelated local work.

## Working loop

1. Start from a verified base and use an isolated branch or worktree when needed.
2. Choose a coherent user workflow, storage/security boundary, or uncovered feature. Prefer behavior tests over assertions that merely mirror implementation.
3. Edit canonical `.ts` and `.mts` sources and tests. Keep `.js`/`.mjs` runtime imports and commands; never patch emitted siblings.
4. Use Vitest for pure logic and narrow contracts, and Playwright for rendered behavior, browser storage, modal/session flows, and integrations. Use synthetic data and mocked providers for routine checks.
5. Run the relevant tests and lightweight gates. Compile with `npm run typescript:build` before direct Playwright or Node commands. `npm test` compiles automatically.
6. Open or update the authorized PR with the concrete behavior change and validation performed. Watch Actions and Greptile, fix actionable findings, and rerun the affected checks.

## Verification and coverage

```bash theme={null}
npm test -- tests/<relevant-test>.test.ts
npm run typecheck:migration
npm run typecheck:migration-tests
npm run typescript:build
npx playwright test tests/playwright/<relevant-spec>.spec.ts
```

Use `npx playwright test <spec>` for focused iteration. `npm run test:playwright` and `./run-tests.sh` invoke the guarded full matrix and are not shortcuts for one spec. GitHub Actions owns exhaustive verification; a local full run needs explicit approval for its high write volume and `GETBASED_ALLOW_HIGH_WRITE_TESTS=1`.

Combined function coverage has a committed global floor and independent feature floors. Critical-module line/branch gates are separate. Review the [testing guide](/developers/testing#coverage-status) and CI artifacts when selecting a coverage target; do not weaken thresholds to make a change pass.

## Releases and cleanup

Ordinary app patches do not require a release-version bump: production cache identity comes from the commit and deployment. Update `version.ts` and release notes for an intentional versioned release.

Merge only with the user's authorization and required checks. Branch-protection overrides need explicit authorization. After an authorized merge, verify GitHub's merged PR and exact head before deleting its local and remote branch; squash merges may not appear in `git branch --merged`. Preserve unrelated branches, stashes, worktrees, and uncommitted files, and snapshot recoverable work before retiring a checkout.

Keep task progress and audit records local in the app's ignored `.local-notes/` directory. Durable public guides belong here; stable architecture and executable engineering contracts remain alongside the app source.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.