Thanks to visit codestin.com
Credit goes to github.com

Skip to content

docs: rewrite product docs for current 2.6.1 architecture - #632

Merged
ndycode merged 3 commits into
mainfrom
docs/rewrite-current-architecture
Jul 17, 2026
Merged

ndycode merged 3 commits into
mainfrom
docs/rewrite-current-architecture

Conversation

@ndycode

@ndycode ndycode commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Summary

  • Rewrites user, reference, and maintainer docs to match the shipped 2.6.1 architecture (manager-first, optional wrapper, mcodex, runtime rotation default-on).
  • Documents four published bins, local governance (usage/budget/policies), bridge tokens, enforced pause/drain, and shipped first-run setup (first-run-setup.json).
  • Keeps historical docs/releases/* and audit snapshots as archives; updates architecture maps in AGENTS.md / lib/AGENTS.md.

Key accuracy fixes

  • README and architecture: four bins including mcodex (not three)
  • First-run setup marked as shipped (not "Unreleased")
  • Account pause/drain documented as runtime-enforced via evaluateRuntimePolicy
  • Settings / CONFIG_FIELDS parity for anti-abuse, force-account, routing mutex, pid offset
  • Probe/default model examples use gpt-5.6-sol / gpt-5.5

Test plan

  • npx vitest run --maxWorkers=1 test/documentation.test.ts (26/26 passed)
  • Spot-check docs portal links from docs/README.md
  • Spot-check codex-multi-auth / mcodex / rotation sections against lib/codex-manager/help.ts and package.json bins

note: greptile review for oc-chatgpt-multi-auth. cite files like lib/foo.ts:123. confirm regression tests + windows concurrency/token redaction coverage.

Greptile Summary

this pr rewrites the full user, reference, and maintainer docs to match the shipped 2.6.1 architecture: four published bins, default-on runtime rotation, local governance (usage/budget/policies), bridge tokens, account pause/drain runtime enforcement, and first-run setup. source changes are narrow — expanding IMPLEMENTED_FEATURES to 54 entries, updating help.ts flag signatures, and updating the test suite to match.

  • docs/reference/commands.md and docs/development/ARCHITECTURE.md are the heaviest changes; both are accurate against lib/AGENTS.md and lib/codex-manager/help.ts.
  • test/documentation.test.ts adds two new integrity tests and updates stable release pins to v2.6.0/v2.5.0.
  • test/cli-output-contracts.test.ts drops budget check|list [--json] and usage rotate from the contract anchor list.
  • docs/getting-started.md uses where codex-multi-auth (Windows-only) in the first-run troubleshooting block; macOS/Linux users need which.

Confidence Score: 4/5

safe to merge after fixing the where / which cross-platform issue in getting-started.md

the docs are accurate against the shipped architecture and the source changes are narrow and well-tested. the one actionable problem is where codex-multi-auth in the first-run troubleshooting block — it is a Windows-only built-in and will silently fail for every macOS and Linux user who hits that path, giving them a confusing second error on top of an already-broken install.

docs/getting-started.md line 229 (where → add which for macOS/Linux); test/cli-output-contracts.test.ts (budget check|list and usage rotate missing from contract anchors)

Important Files Changed

Filename Overview
docs/getting-started.md adds mcodex/binary table, first-run note, --org login, rotation examples; where codex-multi-auth on line 229 is Windows-only — breaks macOS/Linux users
test/cli-output-contracts.test.ts updates DOCUMENTED_COMMAND_LINES to match new flag signatures; drops budget check
docs/reference/commands.md comprehensive expansion covering all four bins, new flags, mcodex modes, pause/drain enforcement, bridge start docs, uninstall section, and rotation subcommands
docs/development/ARCHITECTURE.md adds account selection order, local bridge flow, first-run setup, security boundaries, and expanded subsystem table; accurately reflects lib/ structure
docs/development/CONFIG_FIELDS.md adds tokenInvalidationCooldownMs, minRotationIntervalMs, routingMutex, pidOffsetEnabled, FORCE_ACCOUNT env vars, and full env-override matrix
lib/codex-manager/help.ts expands all command lines to match the 2.6.1 flag matrix and adds DEFAULT_LIVE_PROBE_MODEL to notes footer
lib/codex-manager.ts extends IMPLEMENTED_FEATURES from 41 to 54 entries; matched by the updated codex-manager-cli test
test/documentation.test.ts adds two new integrity tests and updates stable release pins to v2.6.0/v2.5.0
test/codex-manager-cli.test.ts updates feature-count expectation from 41 to 54 and adds assertion for entry 54 (mcodex)

Comments Outside Diff (3)

  1. docs/getting-started.md, line 229-231 (link)

    P1 where is windows-only

    where codex-multi-auth is a Windows shell built-in; it will return "not recognized" on macOS and Linux. the companion upgrade guide already uses the correct dual form: where codex-multi-auth (Windows) or which codex-multi-auth (macOS/Linux). users hitting install problems on unix will get a confusing second failure when following this step.

    bash
    where codex-multi-auth # Windows
    which codex-multi-auth # macOS / Linux

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: docs/getting-started.md
    Line: 229-231
    
    Comment:
    **`where` is windows-only**
    
    `where codex-multi-auth` is a Windows shell built-in; it will return "not recognized" on macOS and Linux. the companion upgrade guide already uses the correct dual form: `where codex-multi-auth` (Windows) or `which codex-multi-auth` (macOS/Linux). users hitting install problems on unix will get a confusing second failure when following this step.
    
    bash
    where codex-multi-auth    # Windows
    which codex-multi-auth    # macOS / Linux
    ```
    ```
    
    How can I resolve this? If you propose a fix, please make it concise.

    Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

    Fix in Codex

  2. docs/development/TESTING.md, line 14-16 (link)

    P2 missing vitest coverage for newly documented surfaces

    the PR test plan reports 26/26 passes in test/documentation.test.ts, which exercises structural integrity (links, field lists). however, the newly documented command paths — workspace, bridge token create/rotate/revoke, mcodex --tmux --live-accounts, and the governance commands (account pause/drain, budget limit) — don't appear to have new runtime behavior tests added. given the windows filesystem token-safety notes in the architecture docs (retry on EBUSY/EPERM), any new file-backed governance write paths especially warrant dedicated vitest coverage.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: docs/development/TESTING.md
    Line: 14-16
    
    Comment:
    **missing vitest coverage for newly documented surfaces**
    
    the PR test plan reports `26/26` passes in `test/documentation.test.ts`, which exercises structural integrity (links, field lists). however, the newly documented command paths — `workspace`, `bridge token create/rotate/revoke`, `mcodex --tmux --live-accounts`, and the governance commands (`account pause/drain`, `budget limit`) — don't appear to have new runtime behavior tests added. given the windows filesystem token-safety notes in the architecture docs (retry on `EBUSY`/`EPERM`), any new file-backed governance write paths especially warrant dedicated vitest coverage.
    
    How can I resolve this? If you propose a fix, please make it concise.

    Fix in Codex

  3. docs/getting-started.md, line 226-230 (link)

    P1 where is a Windows-only built-in — it prints "not recognized" on macOS and Linux. the upgrade guide already uses the dual form; apply it here too.

    bash
    where codex-multi-auth # Windows
    which codex-multi-auth # macOS / Linux

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: docs/getting-started.md
    Line: 226-230
    
    Comment:
    `where` is a Windows-only built-in — it prints "not recognized" on macOS and Linux. the upgrade guide already uses the dual form; apply it here too.
    
    bash
    where codex-multi-auth    # Windows
    which codex-multi-auth    # macOS / Linux
    ```
    ```
    
    How can I resolve this? If you propose a fix, please make it concise.

    Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

    Fix in Codex

Fix All in Codex

Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
docs/getting-started.md:226-230
`where` is a Windows-only built-in — it prints "not recognized" on macOS and Linux. the upgrade guide already uses the dual form; apply it here too.

```suggestion
If `codex-multi-auth` is not recognized:

```bash
where codex-multi-auth    # Windows
which codex-multi-auth    # macOS / Linux
```
```

Reviews (2): Last reviewed commit: "docs: close remaining architecture cover..." | Re-trigger Greptile

Align README, user guides, reference pages, and maintainer maps with
the shipped manager/wrapper/mcodex surfaces, default-on runtime rotation,
local governance, bridge tokens, and first-run setup.
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: aabfdb83-dda3-4842-bcb6-a3311f3cbb5b

📥 Commits

Reviewing files that changed from the base of the PR and between 1d8420a and 1d4d430.

📒 Files selected for processing (29)
  • AGENTS.md
  • README.md
  • docs/DOCUMENTATION.md
  • docs/README.md
  • docs/architecture.md
  • docs/configuration.md
  • docs/development/ARCHITECTURE.md
  • docs/development/CONFIG_FIELDS.md
  • docs/development/CONFIG_FLOW.md
  • docs/development/REPOSITORY_SCOPE.md
  • docs/development/TESTING.md
  • docs/faq.md
  • docs/features.md
  • docs/getting-started.md
  • docs/index.md
  • docs/privacy.md
  • docs/reference/commands.md
  • docs/reference/error-contracts.md
  • docs/reference/public-api.md
  • docs/reference/settings.md
  • docs/reference/storage-paths.md
  • docs/troubleshooting.md
  • docs/upgrade.md
  • lib/AGENTS.md
  • lib/codex-manager.ts
  • lib/codex-manager/help.ts
  • test/cli-output-contracts.test.ts
  • test/codex-manager-cli.test.ts
  • test/documentation.test.ts

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting


📝 Walkthrough

Minor-risk, documentation-focused rewrite aligning the repository with the shipped 2.6.1 manager-first architecture; no production behavior or data-storage logic is changed. Reviewers should focus on the default-on runtime rotation proxy, optional wrapper/mcodex roles, local governance and bridge-token security boundaries, configuration precedence, and first-run setup semantics. Documentation tests pass 26/26, but runtime regression tests were not added for several newly documented CLI and bridge surfaces; remaining risks are documentation/CLI parity and security-contract drift rather than known data-loss issues.

Highlights

  • Reworked README, guides, architecture, FAQ, reference, upgrade, privacy, and maintainer documentation.
  • Documented four published binaries, mcodex, wrapper forwarding, runtime rotation, pause/drain enforcement, local governance, bridge APIs/tokens, Storage V3, and first-run setup.
  • Aligned configuration precedence, environment overrides, model defaults, CLI flags, storage paths, release links, ownership maps, and feature reporting with the implementation.
  • Added feature registry entries 42–54, including the mcodex launcher.
  • Updated CLI help and contract tests for expanded commands and flags.
  • Added documentation integrity checks for release-note coverage and CLI/documentation parity.
  • Follow-up considerations include pairing where codex-multi-auth with which codex-multi-auth on macOS/Linux, labeling CODEX_MULTI_AUTH_BYPASS as advanced/internal, and adding runtime coverage for newly documented command surfaces.

Walkthrough

the pull request updates architecture, configuration, storage, onboarding, command references, cli help, release-history documentation, and matching integrity tests for the expanded codex-multi-auth surface.

Changes

documentation and cli alignment

Layer / File(s) Summary
architecture and runtime behavior
AGENTS.md, docs/architecture.md, docs/development/ARCHITECTURE.md, lib/AGENTS.md, docs/development/REPOSITORY_SCOPE.md
documents wrapper forwarding, mcodex, runtime rotation, account selection, local governance, bridges, first-run setup, storage boundaries, and plugin-host behavior.
configuration and local state references
docs/configuration.md, docs/development/CONFIG_FIELDS.md, docs/development/CONFIG_FLOW.md, docs/privacy.md, docs/reference/storage-paths.md, docs/troubleshooting.md
updates configuration precedence, environment matrices, runtime controls, storage paths, cleanup procedures, and troubleshooting guidance.
cli, onboarding, and user-facing references
README.md, docs/README.md, docs/faq.md, docs/features.md, docs/getting-started.md, docs/reference/commands.md, docs/reference/settings.md, docs/reference/public-api.md, docs/upgrade.md, docs/reference/error-contracts.md
describes new binaries, commands, flags, runtime workflows, governance, bridge APIs, release history, upgrade behavior, and public contracts.
cli implementation and contract validation
lib/codex-manager.ts, lib/codex-manager/help.ts, test/cli-output-contracts.test.ts, test/codex-manager-cli.test.ts, test/documentation.test.ts
adds implemented features through 54, refreshes cli help, and synchronizes help, feature, release-link, and documentation assertions. regression coverage is documentation-focused; no new runtime, windows, or concurrent first-run tests are described in the change summary.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/rewrite-current-architecture
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch docs/rewrite-current-architecture

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

test/cli-output-contracts.test.ts

Oops! Something went wrong! :(

ESLint: 10.0.0

Error: The 'jiti' library is required for loading TypeScript configuration files. Make sure to install it.
at /node_modules/eslint/lib/config/config-loader.js:145:10
at async loadTypeScriptConfigFileWithJiti (/node_modules/eslint/lib/config/config-loader.js:144:3)
at async loadConfigFile (/node_modules/eslint/lib/config/config-loader.js:265:11)
at async ConfigLoader.calculateConfigArray (/node_modules/eslint/lib/config/config-loader.js:588:23)
at async #calculateConfigArray (/node_modules/eslint/lib/config/config-loader.js:369:19)
at async Promise.all (index 0)
at async findFiles (/node_modules/eslint/lib/eslint/eslint-helpers.js:635:25)
at async ESLint.lintFiles (/node_modules/eslint/lib/eslint/eslint.js:1014:21)
at async Object.execute (/node_modules/eslint/lib/cli.js:386:14)
at async main (/node_modules/eslint/bin/eslint.js:175:19)

test/codex-manager-cli.test.ts

Oops! Something went wrong! :(

ESLint: 10.0.0

Error: The 'jiti' library is required for loading TypeScript configuration files. Make sure to install it.
at /node_modules/eslint/lib/config/config-loader.js:145:10
at async loadTypeScriptConfigFileWithJiti (/node_modules/eslint/lib/config/config-loader.js:144:3)
at async loadConfigFile (/node_modules/eslint/lib/config/config-loader.js:265:11)
at async ConfigLoader.calculateConfigArray (/node_modules/eslint/lib/config/config-loader.js:588:23)
at async #calculateConfigArray (/node_modules/eslint/lib/config/config-loader.js:369:19)
at async Promise.all (index 0)
at async findFiles (/node_modules/eslint/lib/eslint/eslint-helpers.js:635:25)
at async ESLint.lintFiles (/node_modules/eslint/lib/eslint/eslint.js:1014:21)
at async Object.execute (/node_modules/eslint/lib/cli.js:386:14)
at async main (/node_modules/eslint/bin/eslint.js:175:19)

test/documentation.test.ts

Oops! Something went wrong! :(

ESLint: 10.0.0

Error: The 'jiti' library is required for loading TypeScript configuration files. Make sure to install it.
at /node_modules/eslint/lib/config/config-loader.js:145:10
at async loadTypeScriptConfigFileWithJiti (/node_modules/eslint/lib/config/config-loader.js:144:3)
at async loadConfigFile (/node_modules/eslint/lib/config/config-loader.js:265:11)
at async ConfigLoader.calculateConfigArray (/node_modules/eslint/lib/config/config-loader.js:588:23)
at async #calculateConfigArray (/node_modules/eslint/lib/config/config-loader.js:369:19)
at async Promise.all (index 0)
at async findFiles (/node_modules/eslint/lib/eslint/eslint-helpers.js:635:25)
at async ESLint.lintFiles (/node_modules/eslint/lib/eslint/eslint.js:1014:21)
at async Object.execute (/node_modules/eslint/lib/cli.js:386:14)
at async main (/node_modules/eslint/bin/eslint.js:175:19)


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

ndycode added 2 commits July 18, 2026 06:06
Correct budget flags, config source precedence, list/status identity,
login --org, report/forecast flags, app-launcher platforms, storage
paths, and anti-abuse field inventory after a code-vs-docs deep audit.
Expand CLI help and feature checklist, document bridge host start API,
complete release portal links, full advanced env matrix, ownership map
modules, and harden documentation tests so residual P2 gaps stay closed.
@ndycode
ndycode merged commit 522baa2 into main Jul 17, 2026
1 of 2 checks passed
@ndycode
ndycode deleted the docs/rewrite-current-architecture branch July 17, 2026 22:13
ndycode added a commit that referenced this pull request Jul 23, 2026
Minor release adding quota reset timestamps to `codex-multi-auth check`
(#633), plus the product-docs rewrite that landed after 2.6.1 was cut
(#632).

- `check` now prints when each quota window resets alongside the percentage
  left: `live session OK (5h 100%, resets 18:10 | 7d 93%, resets 13:50 on
  Jul 29)`. Local timezone, 24-hour clock; the date is appended once the
  reset is past midnight
- reset display is opt-in at the formatter level and scoped to `check`, so
  the dashboard rows, account menu, and `forecast` are byte-identical to
  2.6.1
- quota percentages keep their red/yellow/green tone when a reset time is
  shown; the anchored `styleQuotaSummary` pattern would otherwise have
  dropped every segment to muted
- a missing, zero, negative, non-finite, or unparseable reset timestamp
  drops only the reset clause, never the percentage or the account check

Also restores the v2.6.1 row in the docs portal release table: the 2.6.1
release replaced the v2.6.0 row instead of adding one, which the docs
integrity test now catches.

Routing, rotation, storage, quota math, and the token flow are unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01Xetj6c94ZqD7a5n7G9M5Ro
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant