This guide describes the current validation surface for oc-codex-multi-auth on main.
Run these before opening a PR:
npm run lint
npm run typecheck
npm test
npm run buildWhat they cover:
lint: ESLint for TypeScript sources andscripts/typecheck:tsc --noEmittest: Vitest suite across auth, config, request transformation, storage, UI, recovery, and rotationbuild: compile TypeScript and copylib/oauth-success.htmlintodist/lib/
Representative suites on main:
| File / area | Focus |
|---|---|
test/gpt54-models.test.ts |
GPT-5.4 family defaults and model surface |
test/request-transformer.test.ts |
model normalization, request shaping, store: false, reasoning options |
test/config.test.ts |
config loading and provider model handling |
test/plugin-config.test.ts |
plugin runtime config defaults and env overrides |
test/index.test.ts |
tool registration, beginner flows, account command behavior |
test/beginner-ui.test.ts |
checklist, doctor findings, next-action output |
test/storage.test.ts / test/storage-async.test.ts |
account persistence, backup paths, import/export safety |
test/recovery*.test.ts |
recovery storage and resume behavior |
test/rotation*.test.ts / test/refresh-queue.test.ts |
multi-account rotation, refresh serialization, retry flow |
test/auth*.test.ts / test/oauth-server.integration.test.ts |
OAuth flow and auth edge cases |
test/ui-*.test.ts |
TUI formatting, runtime, theme behavior |
The repository also includes test/property/ and test/chaos/ directories for higher-variance regression coverage.
When documentation changes touch setup or config guidance, verify the docs against the live repo surface:
- Confirm commands exist in
index.ts. - Confirm config examples match
config/opencode-modern.json,config/opencode-legacy.json, andconfig/minimal-opencode.json. - Confirm install/update guidance matches
scripts/install-oc-codex-multi-auth.js. - Confirm repo scripts listed in docs still exist in
package.json.
Useful commands:
rg -n "codex-setup|codex-doctor|codex-next|codex-help" index.ts
rg -n "\"build\"|\"typecheck\"|\"lint\"|\"test\"" package.jsonUse these when a change affects setup, auth flow, or account operations.
npx -y oc-codex-multi-auth@latest --dry-run
opencode debug configVerify:
- the global config path is
~/.config/opencode/opencode.json - the plugin entry resolves to
oc-codex-multi-auth - the selected template contributes the expected
provider.openaiblock
opencode debug config
opencode models openaiImportant note:
opencode debug configshows merged custom/template model entriesopencode models openaicurrently shows only OpenCode's built-in provider catalog
ENABLE_PLUGIN_REQUEST_LOGGING=1 opencode run "ping" --model=openai/gpt-5.4Verify:
- log files appear under
~/.opencode/logs/codex-plugin/ - transformed requests keep
store: false reasoning.encrypted_contentis included
Run these in an interactive session:
codex-setup
codex-setup --wizard
codex-doctor
codex-doctor --fix
codex-next
codex-list
Verify:
- checklist and wizard output render cleanly
- doctor findings and next-action output remain coherent
- commands that omit
indexdegrade gracefully outside interactive TTYs
If validation fails, sort the failure first:
| Surface | Typical command |
|---|---|
| lint/style | npm run lint |
| type drift | npm run typecheck |
| runtime or transform behavior | npm test -- request-transformer |
| account storage / migration | npm test -- storage |
| UI command output | npm test -- index or npm test -- beginner-ui |
For request-path debugging:
DEBUG_CODEX_PLUGIN=1 ENABLE_PLUGIN_REQUEST_LOGGING=1 CODEX_PLUGIN_LOG_BODIES=1 opencode run "ping" --model=openai/gpt-5.4Use that only when you need payload-level detail because it can log sensitive request and response bodies.
npm run lintnpm run typechecknpm testnpm run build- Manual doc/config spot-check if the PR changes docs, setup, or config templates