Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
chore(release): cut v2.1.13-beta.3 + bump vitest to ^4.1.8
- Bump vitest / @vitest/ui / @vitest/coverage-v8 to ^4.1.8 (dev-only), clearing
  GHSA-5xrq-8626-4rwp so `npm run audit:ci` exits 0. audit:prod was already
  clean (nothing test-related ships); this unblocks the CI release gate.
- Version → 2.1.13-beta.3.
- Add docs/releases/v2.1.13-beta.3.md covering the Phase 1 audit (#499), the
  mcodex launcher + statusline (#500), and the pre-release hardening (#503).
  Update the docs portal + root README prerelease pointers (documentation.test.ts
  parity).

typecheck + lint + audit:ci clean; full suite 4246 passed / 1 skipped on vitest
4.1.8; documentation parity 25/25.
  • Loading branch information
ndycode committed Jun 2, 2026
commit f7e19fe57a6be42df6eb39df211222e8425f2ccb
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ codex-multi-auth doctor --json

## Release Notes

- Current prerelease: [docs/releases/v2.1.13-beta.2.md](docs/releases/v2.1.13-beta.2.md) — install via `npm i -g codex-multi-auth@beta`
- Current prerelease: [docs/releases/v2.1.13-beta.3.md](docs/releases/v2.1.13-beta.3.md) — install via `npm i -g codex-multi-auth@beta`
- Current stable: [docs/releases/v2.1.12.md](docs/releases/v2.1.12.md)
- Previous stable: [docs/releases/v2.1.11.md](docs/releases/v2.1.11.md)
- Earlier stable: [docs/releases/v2.1.10.md](docs/releases/v2.1.10.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Public documentation for the `codex-multi-auth` Codex CLI multi-account OAuth ma

| Document | Focus |
| --- | --- |
| [releases/v2.1.13-beta.2.md](releases/v2.1.13-beta.2.md) | Current prerelease notes (install via `npm i -g codex-multi-auth@beta`) |
| [releases/v2.1.13-beta.3.md](releases/v2.1.13-beta.3.md) | Current prerelease notes (install via `npm i -g codex-multi-auth@beta`) |
| [releases/v2.1.12.md](releases/v2.1.12.md) | Current stable release notes |
| [releases/v2.1.11.md](releases/v2.1.11.md) | Prior stable release notes |
| [releases/v2.1.10.md](releases/v2.1.10.md) | Earlier stable release notes |
Expand Down
107 changes: 107 additions & 0 deletions docs/releases/v2.1.13-beta.3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# v2.1.13-beta.3

Beta prerelease that lands the Phase 1 correctness/security audit (#499), the new
`mcodex` launcher + cached statusline (#500), and a round of pre-release
hardening surfaced by a whole-tree stress test (#503). It carries forward the
cascade OAuth token-invalidation fix from v2.1.13-beta.2, the multi-workspace
support from v2.1.13-beta.1, and the pinned-account 503 diagnostic from
v2.1.13-beta.0.

This is a **prerelease**. Stable `v2.1.13` will land once the issue #486 root
cause is identified and patched.

## Install

```bash
npm i -g codex-multi-auth@beta
```

## mcodex launcher (#500)

A lightweight launcher and cached multi-auth status display for Codex sessions.

- `mcodex` — launch Codex with a cached status line printed before startup
(model, reasoning effort, cwd, active account, quota usage, plan, cache age).
- `mcodex --tmux` — launch inside a tmux session with mouse scrollback.
- `mcodex --tmux --live-accounts` — add a live `codex-multi-auth list` monitor pane.
- `mcodex --monitor` — monitor-only mode.

### Status line

- Reads local `quota-cache.json`, `runtime-observability.json`, and account
storage; never calls OpenAI on launch.
- Refreshes quota data in the background only when the cache is stale (default
10 min, `CODEX_MULTI_AUTH_STATUS_QUOTA_REFRESH_INTERVAL_MS`), behind a lock so
concurrent launches don't double-refresh. Stale refresh locks recover after
10 min.
- Resolves the **per-project** account pool when `perProjectAccounts` is enabled
and Codex CLI sync is off (mirrors the runtime's own account scoping), falling
back to the global pool otherwise. Quota/observability stay global.
- Toggle with `CODEX_MULTI_AUTH_STATUSLINE=0`.

### Hardening

- `MCODEX_MONITOR_INTERVAL` / `MCODEX_TMUX_HISTORY_LIMIT` are validated as numeric
before being interpolated into `watch` / tmux commands (no shell injection).
- `--monitor` / `--live-accounts` fail fast with a clear message when `watch`
isn't installed instead of spawning a broken pane.
- The status path resolves `~` correctly on Windows (`path.sep`, not a hardcoded
`/`), and reads the account pool without blocking the event loop.

## Phase 1 audit remediation (#499)

Security and correctness hardening across the runtime, storage, and prompt layers.

### Security

- **Prompt cache integrity.** Cached Codex instructions are SHA-256 verified; a
tampered cache is discarded, and a legacy entry with no recorded digest is
treated as unverified — it is never fast-path served and never drives a
conditional `304` revalidation (which could otherwise launder un-vetted bytes).
A full fetch mints the first digest; old bytes are kept only as an offline
fallback.
- **Path-traversal defense in recovery.** Stored message/part records are
validated before their ids are used to build filesystem paths; a
parseable-but-unsafe id (e.g. `../poison`) or a non-numeric `time.created` is
quarantined instead of escaping into a traversal read or a `NaN` sort.
- **Loopback-only egress.** The runtime rotation proxy and local bridge bind
loopback-only with no opt-out, and never forward inbound client credentials
(`authorization`, `x-api-key`, `cookie`, `proxy-authorization`) upstream
alongside the managed token. IPv6 loopback (`::1` / `[::1]`) is normalized
consistently for both the socket bind and the emitted base URL.
- **Token/email redaction.** Log, debug-bundle, and status sinks mask tokens and
emails; the debug bundle redacts the home prefix (case- and
separator-insensitive on Windows), strips credentials from config values, and
masks the account id.

### Correctness & resilience

- **No event-loop blocking.** Removed synchronous `Atomics.wait` sleeps from the
config load path and the logger's directory-creation retry; both now retry
without freezing the event loop.
- **Bounded network reads.** Prompt and release-metadata fetches are bounded by
connect+body timeouts that actually cancel a stalled body.
- **Windows filesystem resilience.** Account-store WAL/temp writes, temp cleanup,
backup copy/rename, quota-cache, flagged-store, and export operations retry the
shared transient-lock taxonomy (EBUSY/EPERM/ENOTEMPTY/EACCES/EAGAIN) so an
antivirus/indexer/concurrent-reader lock doesn't fail a valid operation or
strand a secret-bearing temp file.
- **Atomic, self-healing account store.** Writes go through a checksummed WAL +
temp-and-rename; a torn write self-heals on the next read.

### CLI

- `codex-multi-auth status` / `list` gained `--json` for machine-readable output,
with a stable shape whether or not accounts are configured.

## Pre-release hardening (#503)

- Strip inbound `cookie` / `proxy-authorization` on both egress paths.
- Bound the proxy's upstream error-body read (previously unbounded on 4xx/5xx).
- Persist `runtime-observability.json` owner-only (`0o600` / dir `0o700`) on POSIX.
- Bump `vitest` to `^4.1.8` (dev-only) to clear GHSA-5xrq-8626-4rwp.

## Verification

Full test suite (4,200+ tests) green; `npm run audit:ci` clean; typecheck and
lint pass.
Loading