Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,6 @@ codex auth doctor --fix
| `codex auth fix --live --model gpt-5-codex` | Run repairs with live probe model |
| `codex auth doctor --fix` | Diagnose and apply safe fixes |

Compatibility aliases are also supported:
- `codex multi auth ...`
- `codex multi-auth ...`
- `codex multiauth ...`

---

## Dashboard Hotkeys
Expand Down Expand Up @@ -226,7 +221,7 @@ codex auth login
<details>
<summary><b>Common symptoms</b></summary>

- `codex auth` unrecognized: run `where codex`, then try `codex multi auth status`
- `codex auth` unrecognized: run `where codex`, then follow `docs/troubleshooting.md` for routing fallback commands
- Switch succeeds but wrong account appears active: run `codex auth switch <index>`, then restart session
- OAuth callback on port `1455` fails: free the port and re-run `codex auth login`
- `missing field id_token` / `token_expired` / `refresh_token_reused`: re-login affected account
Expand Down
6 changes: 4 additions & 2 deletions docs/DOCUMENTATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Canonical governance for repository documentation quality and consistency.
| Docs style contract | `docs/STYLE_GUIDE.md` |
| Docs governance (this file) | `docs/DOCUMENTATION.md` |
| Architecture internals | `docs/development/ARCHITECTURE.md` |
| IA/findability audit (2026-03-01) | `docs/development/IA_FINDABILITY_AUDIT_2026-03-01.md` |
| Config fields internals | `docs/development/CONFIG_FIELDS.md` |
| Config flow internals | `docs/development/CONFIG_FLOW.md` |
| Repository ownership map | `docs/development/REPOSITORY_SCOPE.md` |
Expand All @@ -48,8 +49,9 @@ Canonical governance for repository documentation quality and consistency.
1. Canonical package name: `codex-multi-auth`.
2. Canonical account command family: `codex auth ...`.
3. Canonical storage root: `~/.codex/multi-auth` unless explicitly overridden.
4. Legacy paths/flows belong only in migration and compatibility sections.
5. Public release line is `0.x`; historical pre-`0.1.0` entries are archived separately.
4. Compatibility aliases (`codex multi auth`, `codex multi-auth`, `codex multiauth`) belong only in command reference, troubleshooting, or migration sections.
5. Legacy paths/flows and scoped package references belong only in migration and compatibility sections.
6. Public release line is `0.x`; historical pre-`0.1.0` entries are archived separately.

---

Expand Down
4 changes: 3 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ Canonical documentation map for `codex-multi-auth`.
| [reference/commands.md](reference/commands.md) | Commands, flags, and hotkeys |
| [reference/settings.md](reference/settings.md) | Dashboard/backend settings and defaults |
| [reference/storage-paths.md](reference/storage-paths.md) | Canonical and compatibility storage paths |
| [releases/v0.1.0.md](releases/v0.1.0.md) | Current stable release notes |
| [releases/v0.1.1.md](releases/v0.1.1.md) | Current stable release notes |
| [releases/v0.1.0.md](releases/v0.1.0.md) | Previous stable release notes |
| [releases/v0.1.0-beta.0.md](releases/v0.1.0-beta.0.md) | Archived prerelease reference |
| [releases/legacy-pre-0.1-history.md](releases/legacy-pre-0.1-history.md) | Archived pre-0.1 changelog history |

Expand All @@ -49,6 +50,7 @@ Canonical documentation map for `codex-multi-auth`.
| --- | --- |
| [DOCUMENTATION.md](DOCUMENTATION.md) | Documentation governance contract |
| [development/ARCHITECTURE.md](development/ARCHITECTURE.md) | Runtime architecture and invariants |
| [development/IA_FINDABILITY_AUDIT_2026-03-01.md](development/IA_FINDABILITY_AUDIT_2026-03-01.md) | IA/findability baseline, mismatches, and migration plan |
| [development/CONFIG_FIELDS.md](development/CONFIG_FIELDS.md) | Complete field and env inventory |
| [development/CONFIG_FLOW.md](development/CONFIG_FLOW.md) | Configuration resolution flow |
| [development/REPOSITORY_SCOPE.md](development/REPOSITORY_SCOPE.md) | Ownership map by repository path |
Expand Down
3 changes: 2 additions & 1 deletion docs/STYLE_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ Use short sections and scan-friendly tables where they improve clarity.
1. Canonical command family is `codex auth ...`.
2. Canonical runtime root is `~/.codex/multi-auth`.
3. Legacy command/path references belong only in migration contexts.
4. Keep command flags aligned with runtime usage text.
4. Compatibility aliases (`codex multi auth`, `codex multi-auth`, `codex multiauth`) belong only in command reference, troubleshooting, or migration contexts.
5. Keep command flags aligned with runtime usage text.

---

Expand Down
144 changes: 144 additions & 0 deletions docs/development/IA_FINDABILITY_AUDIT_2026-03-01.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
# Information Architecture: CLI + Docs Findability Audit (2026-03-01)

Scope: user-facing command taxonomy, runtime help labels, docs navigation hierarchy, and naming consistency.

Evidence sources:
- Runtime command/help surfaces: `lib/codex-manager.ts`, `scripts/codex-routing.js`
- Docs navigation/reference surfaces: `README.md`, `docs/README.md`, `docs/reference/commands.md`, `docs/troubleshooting.md`, `docs/getting-started.md`, `docs/releases/v0.1.1.md`
- Governance/test contracts: `docs/DOCUMENTATION.md`, `docs/STYLE_GUIDE.md`, `test/documentation.test.ts`

---

## Current Structure

### Runtime command taxonomy (current)

- `codex auth <subcommand>` (canonical)
- Primary: `login`, `list`, `status`, `switch`, `check`, `features`
- Advanced: `verify-flagged`, `forecast`, `report`, `fix`, `doctor`
- Compatibility aliases:
- `codex multi auth ...`
- `codex multi-auth ...`
- `codex multiauth ...`
- Runtime usage labels before this audit mixed canonical and package-prefixed forms in help/error paths.
- Prior `printUsage()` output in `lib/codex-manager.ts` used package-prefixed forms such as `codex-multi-auth auth fix [--dry-run] [--json] [--live] [--model <model>]`.
- Prior `runSwitch()` error text in `lib/codex-manager.ts` used `Missing index. Usage: codex-multi-auth auth switch <index>`.
- Post-fix regression baseline is now asserted in `test/documentation.test.ts` by checking canonical `codex auth ...` usage and switch-error strings.
Comment on lines +24 to +26
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

show current canonical strings alongside prior examples.

lines 24-25 describe "prior" mixed-label forms but don't show the post-fix canonical strings. for a verification baseline, the audit should state both before and after, e.g., "prior: codex-multi-auth auth fix [...] → current: codex auth fix [...]" so maintainers can quickly confirm the expected runtime output without diving into lib/codex-manager.ts or test/documentation.test.ts.

📝 suggested addition
 - Runtime usage labels before this audit mixed canonical and package-prefixed forms in help/error paths.
   - Prior `printUsage()` output in `lib/codex-manager.ts` used package-prefixed forms such as `codex-multi-auth auth fix [--dry-run] [--json] [--live] [--model <model>]`.
+    Current canonical form: `codex auth fix [--dry-run] [--json] [--live] [--model <model>]`.
   - Prior `runSwitch()` error text in `lib/codex-manager.ts` used `Missing index. Usage: codex-multi-auth auth switch <index>`.
+    Current canonical form: `Missing index. Usage: codex auth switch <index>`.
   - Post-fix regression baseline is now asserted in `test/documentation.test.ts` by checking canonical `codex auth ...` usage and switch-error strings.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/development/IA_FINDABILITY_AUDIT_2026-03-01.md` around lines 24 - 26,
Update the audit lines that list prior outputs to include the post-fix canonical
strings so reviewers can compare before/after without opening source: for the
entries referencing printUsage() and runSwitch(), add the corresponding
current/canonical outputs (e.g., show prior: `codex-multi-auth auth fix
[--dry-run] [--json] [--live] [--model <model>]` → current: `codex auth fix
[--dry-run] [--json] [--live] [--model <model>]`, and prior: `Missing index.
Usage: codex-multi-auth auth switch <index>` → current: `Missing index. Usage:
codex auth switch <index>`), and mention that these same canonical strings are
asserted in test/documentation.test.ts to form the regression baseline;
reference printUsage() and runSwitch() so it's easy to locate the related code
if needed.


Comment thread
coderabbitai[bot] marked this conversation as resolved.
### Docs hierarchy (current)

- Product entry
- `README.md`
- Docs portal
- `docs/README.md`
- User operations
- `docs/index.md`
- `docs/getting-started.md`
- `docs/troubleshooting.md`
- `docs/configuration.md`
- `docs/features.md`
- `docs/privacy.md`
- `docs/upgrade.md`
- Reference
- `docs/reference/commands.md`
- `docs/reference/settings.md`
- `docs/reference/storage-paths.md`
- Releases
- `docs/releases/v0.1.1.md`
- `docs/releases/v0.1.0.md`
- `docs/releases/v0.1.0-beta.0.md`
- `docs/releases/legacy-pre-0.1-history.md`

Hierarchy depth is 3 or fewer levels.

---

## Task-to-Location Mapping (Current)

Scoring rubric:
- `Match`: task is discoverable in the expected location within one navigation hop.
- `Near-miss`: task is discoverable but appears in unexpected locations or requires extra context-switch hops.
- `Lost`: task is not discoverable through expected navigation.

| User Task | Expected Location | Actual Location | Findability |
| --- | --- | --- | --- |
| Log in first account | `README.md` quick start / `docs/getting-started.md` | Match | Match |
| Find all auth commands and flags | `docs/reference/commands.md` | Match | Match |
Comment on lines +65 to +66
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

"match" claims and target score lack concrete verification evidence.

lines 65-66 claim two tasks achieve "match" findability in the current state, and line 136 claims a target score of "6/6 first-attempt match" after remediation. the audit doesn't provide concrete verification criteria or test evidence for these claims:

  • how do we verify "log in first account" is discoverable in one hop from README.md or docs/getting-started.md? manual inspection? user testing? automated doc link/anchor checks?
  • how do we verify "find all auth commands and flags" is a match in docs/reference/commands.md? does the test check that all subcommands are documented there?
  • what acceptance criteria confirm the proposed structure achieves 6/6? the migration path (lines 114-122) lists actions but doesn't map them to measurable findability outcomes.

without verification criteria, the baseline and target scores are subjective.

consider adding a "verification evidence" subsection under each mapping table that cites test assertions, doc link checks, or user-testing notes confirming the findability status. for example:

  • "match for 'log in first account': verified by test/documentation.test.ts asserting README.md and docs/getting-started.md contain login command examples."
  • "target 6/6 verified by: (1) test/documentation.test.ts:160 canonical usage check, (2) test/documentation.test.ts:127 alias scoping check, (3) manual link audit confirming stable release pointer."

Also applies to: 136-136

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/development/IA_FINDABILITY_AUDIT_2026-03-01.md` around lines 65 - 66,
Add concrete verification evidence for the "match" claims by adding a
"Verification evidence" subsection under each mapping table (e.g., the table
rows "Log in first account" and "Find all auth commands and flags") that lists
specific, measurable checks: reference the exact tests/assertions (for example
test/documentation.test.ts and specific test case names or line numbers),
automated doc link/anchor checks (scripted checks that README.md and
docs/getting-started.md contain the login example and that
docs/reference/commands.md lists every auth subcommand/flag), and any manual
user-testing notes; update the migration path mapping (lines discussing target
6/6) to map each remediation step to a measurable outcome (e.g., "add canonical
usage example -> canonical usage test passes in documentation.test.ts") so the
baseline and target scores have explicit acceptance criteria.

| Understand alias availability | `docs/reference/commands.md` (or troubleshooting fallback) | Also shown in `README.md` and `docs/getting-started.md` | Near-miss |
| Interpret CLI usage output | Canonical `codex auth ...` labels | Mixed with `codex-multi-auth auth ...` in runtime usage strings | Near-miss |
| Check current stable release notes | `docs/releases/v0.1.1.md` via docs portal reference | `docs/README.md` reference table labeled `v0.1.0` as current stable | Near-miss |
| Find scoped legacy package guidance | Migration docs only (`docs/upgrade.md`, selected troubleshooting) | Also surfaced in stable release notes `docs/releases/v0.1.1.md` | Near-miss |

Findability score (core tasks): 2/6 clear first-attempt match.

Comment thread
coderabbitai[bot] marked this conversation as resolved.
Near-miss to remediation traceability:
- `Understand alias availability` -> resolved by scoping aliases to reference/troubleshooting/migration surfaces and removing alias examples from primary onboarding flows.
- `Interpret CLI usage output` -> resolved by canonicalizing runtime help and error usage strings to `codex auth ...` in `lib/codex-manager.ts`.
- `Check current stable release notes` -> resolved by updating docs portal stable pointer to `docs/releases/v0.1.1.md`.
- `Find scoped legacy package guidance` -> resolved by keeping scoped-package references in migration contexts and removing them from stable release notes.

---

## Naming Inconsistencies Found

| Concept | Variant A | Variant B | Recommended |
| --- | --- | --- | --- |
| Canonical command label | `codex auth ...` | `codex-multi-auth auth ...` | `codex auth ...` for all primary user-facing help text |
| Alias placement policy | Reference/troubleshooting intent | Also in primary README/getting-started command flows | Keep aliases in reference/troubleshooting/migration contexts only |
| Stable release pointer | `v0.1.1` in user guides | `v0.1.0` labeled current stable in docs reference table | Use `v0.1.1` as current stable consistently |
| Scoped legacy package mention | Migration-only contexts | Stable release notes mention | Keep scoped package guidance migration-only |

---

## Proposed Structure

### Navigation model

- Keep existing shallow hierarchy and layer model.
- Enforce one canonical location per task category:
- "How to run commands": `docs/reference/commands.md`
- "Fallback routing or alias recovery": `docs/troubleshooting.md`
- "Migration from legacy package/path": `docs/upgrade.md`
- "Current stable release": `docs/releases/v0.1.1.md`

### Labeling model

- Canonical command wording in runtime help/error text: `codex auth ...`
- Compatibility alias wording restricted to reference/troubleshooting/migration sections.
- Scoped legacy package guidance restricted to migration contexts.

---

## Migration Path

1. Canonicalize runtime usage/error strings to `codex auth ...`.
2. Remove alias examples from primary README/onboarding flows; keep fallback routing guidance in troubleshooting/reference.
3. Correct docs portal reference table to current stable release (`v0.1.1`).
4. Remove scoped package mention from stable release notes and point to upgrade guide for migration details.
5. Maintain deterministic regression checks in `test/documentation.test.ts`:
- `uses scoped package only in explicit legacy migration notes` (`test/documentation.test.ts:104`) enforces scoped package boundaries.
- `keeps compatibility command aliases scoped to reference, troubleshooting, or migration docs` (`test/documentation.test.ts:127`) enforces alias-visibility boundaries with explicit allowlist files.
- `keeps canonical auth usage labels aligned across README, reference, and CLI usage text` (`test/documentation.test.ts:160`) enforces canonical runtime help/error wording.
- Keep cross-platform verification requirements explicit: Windows-oriented validation patterns (for example HOME/USERPROFILE handling and Windows path guidance checks in `test/documentation.test.ts:244-245`) must be extended whenever new shell-sensitive command rendering is introduced, including explicit `codex auth` output-escaping checks for `cmd.exe` and `PowerShell`.

Comment thread
coderabbitai[bot] marked this conversation as resolved.
---

## Task-to-Location Mapping (Proposed)

| User Task | Location | Findability Improvement |
| --- | --- | --- |
| Run login/switch/check commands | `README.md` and `docs/getting-started.md` with canonical labels | Removes mixed labels in first-run paths |
| Discover full command/flag matrix | `docs/reference/commands.md` | Retains single authoritative command catalog |
| Recover from command routing problems | `docs/troubleshooting.md` | Alias fallback remains discoverable but contextual |
| Verify current stable release | `docs/README.md` -> `docs/releases/v0.1.1.md` | Eliminates stale stable-pointer ambiguity |
| Migrate from scoped legacy package | `docs/upgrade.md` | Prevents legacy naming bleed into stable operational docs |

Target findability score for core tasks after remediation: 6/6 first-attempt match.

---

## Out of Scope

- Visual design or formatting redesign.
- Runtime behavior changes to command routing/alias support.
- Internal module naming unrelated to user-facing findability.
5 changes: 3 additions & 2 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,10 @@ If `codex auth` is not recognized:

```bash
where codex
codex multi auth status
```

Then continue with [troubleshooting.md](troubleshooting.md#verify-install-and-routing) for routing fallback commands.

If OAuth callback on `1455` fails:

- Stop the process using port `1455`.
Expand All @@ -111,4 +112,4 @@ codex auth check
- [features.md](features.md)
- [configuration.md](configuration.md)
- [troubleshooting.md](troubleshooting.md)
- [reference/commands.md](reference/commands.md)
- [reference/commands.md](reference/commands.md)
2 changes: 1 addition & 1 deletion docs/releases/v0.1.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ All six PRs were audited, fixed, and unified into PR #14 before merge.

## Notes

- Legacy scoped package `@ndycode/codex-multi-auth` is migration-only.
- Legacy scoped prerelease package is migration-only (see `docs/upgrade.md`).
- Canonical runtime paths are under `~/.codex/multi-auth`.
- Per-project accounts shared across linked worktrees via repo identity root.
- Settings writes use queued retry with EBUSY/EPERM/EAGAIN backoff (max 4 retries, exponential).
Expand Down
24 changes: 12 additions & 12 deletions lib/codex-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,17 +281,17 @@ function printUsage(): void {
"Codex Multi-Auth CLI",
"",
"Usage:",
" codex-multi-auth auth login",
" codex-multi-auth auth list",
" codex-multi-auth auth status",
" codex-multi-auth auth switch <index>",
" codex-multi-auth auth check",
" codex-multi-auth auth features",
" codex-multi-auth auth verify-flagged [--dry-run] [--json] [--no-restore]",
" codex-multi-auth auth forecast [--live] [--json] [--model <model>]",
" codex-multi-auth auth report [--live] [--json] [--model <model>] [--out <path>]",
" codex-multi-auth auth fix [--dry-run] [--json] [--live] [--model <model>]",
" codex-multi-auth auth doctor [--json] [--fix] [--dry-run]",
" codex auth login",
" codex auth list",
" codex auth status",
" codex auth switch <index>",
" codex auth check",
" codex auth features",
" codex auth verify-flagged [--dry-run] [--json] [--no-restore]",
" codex auth forecast [--live] [--json] [--model <model>]",
" codex auth report [--live] [--json] [--model <model>] [--out <path>]",
" codex auth fix [--dry-run] [--json] [--live] [--model <model>]",
" codex auth doctor [--json] [--fix] [--dry-run]",
"",
"Notes:",
" - Uses ~/.codex/multi-auth/openai-codex-accounts.json",
Expand Down Expand Up @@ -3652,7 +3652,7 @@ async function runSwitch(args: string[]): Promise<number> {
setStoragePath(null);
const indexArg = args[0];
if (!indexArg) {
console.error("Missing index. Usage: codex-multi-auth auth switch <index>");
console.error("Missing index. Usage: codex auth switch <index>");
return 1;
}
const parsed = Number.parseInt(indexArg, 10);
Expand Down
30 changes: 28 additions & 2 deletions test/documentation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ const scopedLegacyAllowedFiles = new Set([
'docs/releases/v0.1.0-beta.0.md',
]);

const compatibilityAliasAllowedFiles = new Set([
'docs/reference/commands.md',
'docs/troubleshooting.md',
'docs/upgrade.md',
]);

function read(filePath: string): string {
return readFileSync(join(projectRoot, filePath), 'utf-8');
}
Expand Down Expand Up @@ -71,6 +77,7 @@ describe('Documentation Integrity', () => {
expect(portal).toContain('releases/v0.1.0.md');
expect(portal).toContain('releases/v0.1.0-beta.0.md');
expect(portal).toContain('releases/legacy-pre-0.1-history.md');
expect(portal).toContain('| [releases/v0.1.1.md](releases/v0.1.1.md) | Current stable release notes |');

const beta = read('docs/releases/v0.1.0-beta.0.md');
expect(beta).toContain('Archived');
Expand Down Expand Up @@ -117,6 +124,22 @@ describe('Documentation Integrity', () => {
}
});

it('keeps compatibility command aliases scoped to reference, troubleshooting, or migration docs', () => {
const files = ['README.md', ...userDocs];
const aliasPattern = /\bcodex (multi auth|multi-auth|multiauth)\b/;

for (const filePath of files) {
const content = read(filePath);
const hasAlias = aliasPattern.test(content);
if (hasAlias) {
expect(
compatibilityAliasAllowedFiles.has(filePath),
`${filePath} should not include compatibility alias commands`,
).toBe(true);
}
}
});
Comment on lines +127 to +141
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

verify case-insensitivity for alias pattern.

the regex at test/documentation.test.ts:129 is case-sensitive, while the similar test at :121-124 uses .toLowerCase() for opencode checks. if docs could contain "Codex Multi-Auth" or other casing variants, this test would miss them.

if lowercase is the enforced convention for command examples, this is fine. otherwise, consider:

♻️ optional: add case-insensitive flag
-    const aliasPattern = /\bcodex (multi auth|multi-auth|multiauth)\b/;
+    const aliasPattern = /\bcodex (multi auth|multi-auth|multiauth)\b/i;
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
it('keeps compatibility command aliases scoped to reference, troubleshooting, or migration docs', () => {
const files = ['README.md', ...userDocs];
const aliasPattern = /\bcodex (multi auth|multi-auth|multiauth)\b/;
for (const filePath of files) {
const content = read(filePath);
const hasAlias = aliasPattern.test(content);
if (hasAlias) {
expect(
compatibilityAliasAllowedFiles.has(filePath),
`${filePath} should not include compatibility alias commands`,
).toBe(true);
}
}
});
it('keeps compatibility command aliases scoped to reference, troubleshooting, or migration docs', () => {
const files = ['README.md', ...userDocs];
const aliasPattern = /\bcodex (multi auth|multi-auth|multiauth)\b/i;
for (const filePath of files) {
const content = read(filePath);
const hasAlias = aliasPattern.test(content);
if (hasAlias) {
expect(
compatibilityAliasAllowedFiles.has(filePath),
`${filePath} should not include compatibility alias commands`,
).toBe(true);
}
}
});
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/documentation.test.ts` around lines 127 - 141, The alias regex in the
test "keeps compatibility command aliases scoped to reference, troubleshooting,
or migration docs" is currently case-sensitive (aliasPattern) and can miss
variants like "Codex Multi-Auth"; update the check to be case-insensitive by
either adding the i flag to aliasPattern (e.g., /\bcodex (multi
auth|multi-auth|multiauth)\b/i) or normalize the read(filePath) content to
lowercase before testing (use content.toLowerCase()) so the hasAlias detection
matches any casing; update the aliasPattern or the content normalization used in
the for loop and keep the existing compatibilityAliasAllowedFiles assertion
unchanged.


it('keeps codex auth as the command standard in key docs', () => {
const keyDocs = [
'README.md',
Expand All @@ -134,7 +157,7 @@ describe('Documentation Integrity', () => {
}
});

it('keeps fix command flag docs aligned across README, reference, and CLI usage text', () => {
it('keeps canonical auth usage labels aligned across README, reference, and CLI usage text', () => {
const readme = read('README.md');
const commandRef = read('docs/reference/commands.md');
const managerPath = 'lib/codex-manager.ts';
Expand All @@ -144,7 +167,10 @@ describe('Documentation Integrity', () => {
expect(readme).toContain('codex auth fix --live --model gpt-5-codex');
expect(commandRef).toContain('| `--live` | forecast, report, fix |');
expect(commandRef).toContain('| `--model <model>` | forecast, report, fix |');
expect(manager).toContain('codex-multi-auth auth fix [--dry-run] [--json] [--live] [--model <model>]');
expect(manager).toContain('codex auth login');
expect(manager).toContain('codex auth fix [--dry-run] [--json] [--live] [--model <model>]');
expect(manager).toContain('Missing index. Usage: codex auth switch <index>');
expect(manager).not.toContain('codex-multi-auth auth switch <index>');
});

it('documents stable overrides separately from advanced and internal overrides', () => {
Expand Down