Repository navigation
Conversation
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: c898319d1e
ℹ️ 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".
| val state = trackerConfigurationBudget ?: return | ||
| store.withPersistedCheckpoint(state) { saved -> | ||
| val current = store.trackerConfigurationSnapshot() | ||
| if (saved.trackerRevision > current.revision) { |
There was a problem hiding this comment.
Refresh the revision after recovering the disk checkpoint
When replaceTrackers() is the first operation on a restored session and this branch adopts a disk checkpoint newer than TaskStore, actualRevision has already been captured from the stale in-memory checkpoint before recover() runs. The later store.replaceTrackerConfiguration(..., actualRevision) therefore throws TrackerRevisionConflict even when the caller supplied no expectedRevision, so an unconditional edit unexpectedly fails and requires a retry. Recover the checkpoint before determining the revision, or refresh the revision after recovery while preserving the caller's optional conflict check.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 34fce20. Before recovery is complete, edits no longer pre-check against the TaskStore revision. The final store commit checks the caller's optional expected revision against recovered state; an unconditional edit uses the current revision. The new regression covers first-operation edits with no expected revision, the recovered revision, and an explicitly stale revision. It failed before the fix (expected 0, actual 1) and the recovery/session focused suite passes afterward.
|
Superseded by #237 (Tracker lifecycle, editing and discovery privacy) in the consolidated eight-PR stack for #162. The replacement preserves this PR's code and subsequent fixes; its description links the original head and review discussions. The only additional consolidation fix is the CI-discovered listener cancellation regression, documented on the replacement. All eight replacements have passed their required CI checks. Closing without merging. This branch and its discussions remain available for reference. Review index: #162 (comment) |
A tracker edit may reach its on-disk checkpoint before TaskStore publishes new resume data. Session startup now reads the journal-owned checkpoint and adopts a newer tracker configuration before discovery starts. Received/uploaded counters keep the greater value, including same-revision checkpoints; payload progress still comes from rechecking bytes.
Recovery validates checkpoint identity, bounded size, task/hash/output/selection binding, and positive revision consistency. Decoding and retained tracker state require session-budget admission. Pause, save, and shutdown cannot overwrite the committed file with stale state if recovery fails. This complete-checkpoint reader can reject a decode when configured memory is insufficient; streaming recovery and large-profile performance evidence remain follow-up work.
Stacked on #222; advances #162. Public controls, idempotent commands, independent v2 interoperability, and remaining roadmap/release gates are still open.
Validation: 584 JVM and 563 executed iOS tests passed with zero failures/errors/skips; native-runtime guard and two pinned v1 conformance scenarios passed. New tests use the real engine with stale resume data and corrupted payloads, recover same-revision counters, reject replaced or wrongly bound checkpoints, and verify admission/cancellation cleanup. The failed-recovery shutdown regression overwrote the newer bytes before the write guard and passes with the guard.