Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 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. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: db0b5bb931
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // Resolve through the provider's canonical-first compatibility rule. Passing | ||
| // only the newly normalized name would hide a pre-#4442 Windows manifest from | ||
| // the Worker and make an upgrade look like an empty backup. | ||
| canonicalBackupPath: resolveExistingHistoryBackupPath(stateDb), |
There was a problem hiding this comment.
Resolve the manifest only after acquiring the history lock
On affected Windows homes, this existence-based choice is made before the Worker acquires withHistoryWriteSerialization; if another history job removes the legacy manifest or publishes the canonical one while this job waits, the frozen target becomes stale. A restore or migration can then read an empty/stale legacy path and report zero-row convergence even though the canonical manifest still owns pending entries. Resolve or revalidate the canonical/legacy choice inside the locked Worker callback, while still passing enough explicit path context to avoid ambient-environment drift.
Useful? React with 👍 / 👎.
|
✅ Deterministic PR hygiene checks passed. |
⏳ DRAFT
What to do
Its title has been prefixed with |
Motivation
Description
resolveExistingHistoryBackupPath(stateDb)when resolving a history job target insrc/codex/history-job.tsinstead of emitting the canonical-onlyhistoryBackupPathForvalue.CODEX_SQLITE_HOMEand asserts the job target preserves a pre-normalization legacy manifest intests/codex-integration/codex-sqlite-home.test.ts.resolveExistingHistoryBackupPath.structure/*to record that Worker job targets preserve the canonical-first legacy-manifest fallback across the Worker boundary.Testing
node_modules/.bin/bun test tests/codex-integration/codex-sqlite-home.test.tswhich passed (6 tests) with one Windows-only test skipped on Linux.node_modules/.bin/bun test tests/codex-integration/codex-history-provider.test.tswhich passed (92 tests).node_modules/.bin/bun run structure:checkandnode_modules/.bin/bun run typecheck, both of which succeeded.node_modules/.bin/bun run test:changedcould not run in this checkout because a comparisondevref was unavailable, and an initialbunbinary mismatch in the environment required using the repository-installed Bun to run the tests successfully.Codex Task