[WRONG BRANCH] fix(codex): preserve external history on async restore - #10
[WRONG BRANCH] fix(codex): preserve external history on async restore#10luvs01 wants to merge 1 commit into
Conversation
|
Warning Review limit reached
Next review available in: 13 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Comment |
|
✅ Deterministic PR hygiene checks passed. |
⏳ DRAFT
What to do
Its title has been prefixed with |
|
Closing as already covered upstream. Current |
Motivation
restoreNativeCodexAsync()wrapper was scheduling a history restore job unconditionally after calling the synchronous restore path, which allowed the history worker to retag routed threads back to the native/OpenAI provider even when the synchronous restore preserved an external provider; this change prevents that unintended retagging.Description
restoreNativeCodexCore()that returns an additionalrestoreHistoryboolean indicating whether the async wrapper should run the history worker, and keep a thin publicrestoreNativeCodex()shim that preserves the original return shape.restoreNativeCodexAsync()to call the core and return early whenrestoreHistoryis false so the history worker is not scheduled for externally-preserved providers.restoreNativeCodexCore()symbol.Testing
bun run typecheck, which succeeded.bun run privacy:scan, which succeeded.git diff --checkand committed the patch asfix(codex): preserve external history on async restore.bun test tests/codex-history-job.test.ts tests/codex-inject-integration.test.ts, but the test run was blocked by the environment's Bun/runtime mismatch (installed Bun 1.2.14 fails due tonode:zlibnot exportingzstdDecompressSync), causing the integration subprocess-based tests to produce no usable output; the new regression test is present and should pass in CI or a local environment with a compatible Bun/runtime.