|
| 1 | +## Runtime Rotation |
| 2 | + |
| 3 | +### Bugfixes |
| 4 | + |
| 5 | +- Fixed stream forwarding stalling indefinitely for slow clients. `forwardStreamingResponse` now checks the return value of `res.write()` and awaits `drain` before reading the next upstream chunk, preventing unbounded in-process buffering when the client socket falls behind. |
| 6 | + |
| 7 | +### Improvements |
| 8 | + |
| 9 | +- Converted the two startup guards in `startRuntimeRotationProxy` from bare `Error` throws to `CodexValidationError` with machine-readable `field`/`expected`/`context` metadata. Error messages are byte-identical; callers can now branch on `instanceof CodexValidationError` and stable field names instead of message text (audit §4.3, #586). |
| 10 | + |
| 11 | +## Storage |
| 12 | + |
| 13 | +### Bugfixes |
| 14 | + |
| 15 | +- Fixed multi-tier account deduplication. `deduplicateAccountsByIdentity` now runs fixpoint iteration: a single pass was not enough when a newest-wins merge could install an account that itself duplicated an earlier survivor through a different identity tier (e.g. an email-tier merge installs an account whose `accountId + refreshToken` already matches an earlier entry). The wrapper now loops until the array is stable; every pass strictly shrinks it by at least one entry, so it terminates in at most `accounts.length` passes. |
| 16 | +- Added `vi.restoreAllMocks()` to `storage.test.ts` `afterEach` to prevent a failing test's leaked `fs` spy from cascading into every subsequent storage test in the same worker. |
| 17 | + |
| 18 | +### Improvements |
| 19 | + |
| 20 | +- Migrated the last two hand-rolled retry loops to the shared `withRetry` helper in `lib/fs-retry.ts`: the temp→final account-save rename (`storage.ts`) and the config env-path CAS loop (`config.ts`). Inter-attempt delay schedules are unchanged; only the wasted trailing sleep after a final failure is removed. |
| 21 | +- Converted `savePluginConfig`'s "unreadable config file" abort from a bare `Error` to a typed `StorageError` with `code: "UNREADABLE"` and the file path. Callers can now branch on `instanceof StorageError` instead of message text (#588, audit §4.3). |
| 22 | + |
| 23 | +## Security |
| 24 | + |
| 25 | +### Improvements |
| 26 | + |
| 27 | +- All atomic write helpers now use `crypto.randomBytes` instead of `Math.random()` for staging-path nonces, preventing a local attacker from predicting the next staging path (#517). |
| 28 | + |
| 29 | +## Code Quality |
| 30 | + |
| 31 | +### Improvements |
| 32 | + |
| 33 | +- Removed 852 lines of dead code: seven orphaned modules with no live importers deleted (#554, #558). |
| 34 | +- Pruned unused exports and types flagged by knip; added `knip.jsonc` config for ongoing dead-code analysis (#555, #556, #557). |
| 35 | +- `isRetryableStorageWriteError`, `copyDashboardSettingValue`, `mergeDashboardSettingsForKeys`, and `DEFAULT_STATUSLINE_FIELDS` exported from their respective modules for direct test access. |
| 36 | +- Synced plugin manifest and `AGENTS.md` package-version claim to `v2.3.0-beta.3`. |
| 37 | + |
| 38 | +## Testing |
| 39 | + |
| 40 | +### Improvements |
| 41 | + |
| 42 | +- 20 new direct test suites covering: login-oauth, login-menu actions/flow/data, persist-selected, health-check, forecast-report-shared, settings write-queue, rotation selection/state/token-refresh, auth-menu builder, model-fallback property, write-queue property, rate-limit helpers, usage-ledger redaction, settings preview builders, and settings-hub shared helpers. |
| 43 | +- Property-based test suite for `deduplicateAccountsByIdentity`: covers order-independence and convergence across all permutations using fast-check. |
| 44 | +- `shouldRetryFileOperation`, `fs-retry`, and `temp-path` covered with new unit suites. |
| 45 | + |
| 46 | +## Notes |
| 47 | + |
| 48 | +- Prerelease published under the `beta` dist-tag (`npm i -g codex-multi-auth@beta`). |
| 49 | +- The #509 sequential drain-first feature and all fixes from `2.3.0-beta.2` are included. |
0 commit comments