Use this to manually test without touching your live OpenCode/Codex setup.
cd /Users/jorgitin/Documents/projects/open_multi_auth
git clone https://github.com/guard22/opencode-multi-auth-codex.git .
npm ci
npm run buildIf this folder is not empty, clone to a temporary location and copy the repo contents into /Users/jorgitin/Documents/projects/open_multi_auth before running tests.
export HOME=/tmp/oma-sandbox-home
export OPENCODE_MULTI_AUTH_STORE_DIR=/tmp/oma-sandbox-store
export OPENCODE_MULTI_AUTH_CODEX_AUTH_FILE=/tmp/oma-sandbox-home/.codex/auth.json
mkdir -p "$HOME/.codex" "$OPENCODE_MULTI_AUTH_STORE_DIR"Status:
node dist/cli.js statusRun dashboard locally:
node dist/cli.js web --host 127.0.0.1 --port 4343Open: http://127.0.0.1:4343
node dist/cli.js path
echo "$HOME"
echo "$OPENCODE_MULTI_AUTH_STORE_DIR"
echo "$OPENCODE_MULTI_AUTH_CODEX_AUTH_FILE"Expected:
- store path under
/tmp/oma-sandbox-store - auth path under
/tmp/oma-sandbox-home/.codex/auth.json
HOME=/tmp/oma-sandbox-home \
OPENCODE_MULTI_AUTH_STORE_DIR=/tmp/oma-sandbox-store \
OPENCODE_MULTI_AUTH_CODEX_AUTH_FILE=/tmp/oma-sandbox-home/.codex/auth.json \
node dist/cli.js web --host 127.0.0.1 --port 4343EADDRINUSE (port busy):
node dist/cli.js web --host 127.0.0.1 --port 4344Store looks wrong/corrupt:
ls -la /tmp/oma-sandbox-storeDelete only sandbox store:
rm -rf /tmp/oma-sandbox-store
mkdir -p /tmp/oma-sandbox-storeNeed clean sandbox reset:
rm -rf /tmp/oma-sandbox-home /tmp/oma-sandbox-store
mkdir -p /tmp/oma-sandbox-home/.codex /tmp/oma-sandbox-storespawn codex ENOENT during limits refresh:
codexbinary is missing from PATH in that shell.- Fix PATH or skip limits-refresh tests in that environment.
Probe run fails with usage-limit/model/config error:
- Expected hardened behavior: account
limitStatusbecomeserrorand priorrateLimitsremain unchanged. - Dashboard/API should expose the failure state instead of silently replacing limits with error-session values.
Limits confidence quick check (after feature is implemented):
- Trigger a successful limits refresh and verify account shows
freshconfidence. - Trigger a known failing probe and verify:
- confidence switches to
error - prior limits are preserved
lastLimitErrorAtupdates.
- confidence switches to
Force mode quick check (after feature is implemented):
- In dashboard, enable "Force this account for 24h" on one alias.
- Send multiple requests and confirm that alias is always selected while eligible.
- Clear force mode and confirm scheduler returns to previous strategy.
Account enable/disable quick check (after feature is implemented):
- Use the account
EnablediOS-style switch to turn one alias off and confirm it is never selected. - Turn the same alias back on and confirm it returns to eligibility.
- Turn off the currently forced alias and confirm force clears immediately and previous strategy is restored.
- Confirm legacy disable button/control is removed from the dashboard (switch is the only disable mechanism).
Re-auth quick check (after feature is implemented):
- Trigger re-auth for one alias from dashboard.
- Confirm only that alias credentials update.
- If that alias is active, confirm auth pointer remains consistent after re-auth.
Never point sandbox env vars to real ~/.codex or real store paths until all validation gates are green.
Dashboard policy for hardened build: localhost-only (no remote dashboard mode).
Use TEST_EXECUTION_PLAN.md as the full post-implementation runbook.