Testing strategy and release gate for runtime, CLI, and docs consistency.
| Layer | Tooling |
|---|---|
| Unit/integration tests | Vitest (test/**/*.test.ts) |
| Type checks | TypeScript (tsc --noEmit) |
| Linting | ESLint |
| Coverage | Vitest V8 coverage |
Coverage thresholds in vitest.config.ts: statements/branches/functions/lines >= 80.
npm run typecheck
npm run lint
npm test
npm run buildOptional:
npm run test:watch
npm run test:coverage
npm run test:model-matrix:smoke
npm run bench:edit-formats:smokenpm run typechecknpm run lintnpm testnpm run build- run docs command checks for newly documented command paths
| Area | Minimum checks |
|---|---|
| Login flow | codex auth login completes and stores real account data |
| Switching flow | codex auth switch <index> updates active account behavior |
| Health operations | check, forecast, fix, doctor, report produce sane output |
| Storage durability | backup/WAL recovery remains valid |
| CLI state sync | active account sync with Codex CLI files |
| Live updates | account changes picked up without restart |
| Concurrency race safety | refresh/write races covered by deterministic tests |
| Windows transient FS handling | retry behavior for EBUSY/EPERM paths |
codex auth login
codex auth list
codex auth check
codex auth forecast --live
codex auth fix --dry-run
codex auth doctor --fix --dry-run
codex auth report --live --jsonOptional plugin-host smoke:
<run-your-host-runtime-smoke-command>| Scenario | Expected behavior |
|---|---|
| OAuth callback port conflict | clean error and retry path |
| Invalid/expired refresh token | account flagged/disabled by policy tools |
| All accounts rate-limited | forecast/report show wait and recommendation |
| Storage write error | StorageError has actionable hint |
| Unsupported model | policy fallback or strict failure as configured |
| Stream stalls | stream failover logic engages by policy |
- Verify every command snippet is runnable.
- Cross-check path references against runtime modules.
- Confirm cross-links are valid.
- Keep feature matrix in sync with implemented features.