This runbook defines exactly how to validate the implementation after coding is complete.
- Prove correctness, safety, and reliability of multi-auth core behavior before main usage.
- Catch regressions in rotation, account lifecycle controls, force mode, and limits reporting.
- Ensure the weekly-limit inconsistency class is permanently prevented.
Unit: deterministic logic (rotation/store/limits parsing/force rules).Integration: API behavior and state transitions.Headless UI E2E: dashboard behavior without manual browser usage.Failure injection: forced 401/403/429/402/400 + probe failures.Reliability: stress + crash recovery + soak.
npm run lintnpm run buildnpm run test:unitnpm run test:integrationnpm run test:web:headlessnpm run test:failurenpm run test:stressnpm run test:sandboxnpm run test:soak:48h
If a script is missing, add it as part of implementation before declaring test-complete.
- Static + build gates.
- Unit suites.
- Integration suites.
- Headless UI suites.
- Failure injection suites.
- Stress and concurrency suites.
- Crash-recovery suites.
- 48h soak.
If any stage fails, fix and restart from the failed stage; if fix touches shared core paths (rotation, store, web, limits), rerun from stage 1.
- API:
PUT /api/accounts/:alias/enabledtoggles state with deterministic errors. - Rotation: disabled accounts are never selected.
- Persistence: enabled/disabled state survives restart.
- UI headless:
- iOS-style switch renders per account.
- switch states:
off,on,updating,error. - in-flight toggles are non-reentrant (double click safe).
- Legacy control removal:
- old disable button/control is absent.
- only source of disablement is the
Enabledswitch.
- Force toggle remains separate from account
Enabledswitches. - Enable force pins forced alias while eligible.
- Clear force restores prior strategy.
- Disable forced alias auto-clears force and restores prior strategy.
- TTL behavior: 24h anchor does not extend on repeated force toggles.
POST /api/accounts/:alias/reauthupdates only target alias credentials.- Active-alias re-auth keeps active auth pointer consistent.
- UI headless verifies
idle -> in-progress -> success/errortransitions.
- Probe compatibility:
- global
xhighconfig does not break limits probe. - fallback works on
unsupported_value/reasoning.efforterrors.
- global
- Failed-probe-safe behavior:
- failed/incomplete probes never overwrite stored
rateLimits. limitStatus=error,lastLimitErrorAtupdated, prior values preserved.
- failed/incomplete probes never overwrite stored
- No-data behavior:
- accounts with no successful snapshot report
unknown(not0%).
- accounts with no successful snapshot report
- Freshness behavior:
- API/UI provides confidence state (
fresh,stale,error,unknown).
- API/UI provides confidence state (
- Interrupt process during store write and restart.
- Verify store can be loaded or auto-restored from last-known-good snapshot.
- Verify no partial JSON corruption causes undefined runtime behavior.
- Dashboard rejects non-loopback host binding.
- Mutating actions reject unknown aliases and disabled aliases with deterministic errors.
- Log redaction covers tokens/credentials.
- Accounts table renders all aliases.
- Account
Enabledswitch toggles and persists across reload. - Force switch works independently of account
Enabledswitch. - Re-auth action starts and resolves with correct status state.
- Limits badge/text reflects
fresh/stale/error/unknowncorrectly. - Legacy disable control is not present.
- Repeat
test:integrationandtest:web:headless5 consecutive runs; all must pass. - Stress test must show no lost updates, deadlocks, or corrupted store state.
- Soak gate (48h): no crashes, no stuck rotation, no corruption, at least one force lifecycle.
npm ci
npm run lint
npm run build
npx tsc --noEmit
npm run test:unit
npm run test:integration
npm run test:web:headless
npm run test:failure
npm run test:stress
npm run test:sandbox
npm run test:soak:48h- All commands exit zero.
- All required feature checklists in section 5 are validated.
- No blocker/high severity defects open.
- SLO gates from
IMPLEMENTATION_PLAN.mdare met.
- Store results in
docs/QA.md:- command, timestamp, pass/fail
- failing output (if any) and remediation
- links/paths to logs, traces, and headless test reports
- Keep artifacts for the canary + 72h watch window.