Repository navigation
Bound Codex SQLite recovery sweeps - #509
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. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 45 minutes. View limit details
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: 🔵 Low · up to
|
[High impact] The PR appears safe to merge; no new blocking issue was found.
|
5b61acd to
dac085c
Compare
dac085c to
fde1954
Compare
|
Addressed CodeRabbit’s outside-diff scoped-watch finding in f595d7d: a persisted Codex SQLite cursor now makes every scoped tick continue the next bounded page, even when the event only names history.jsonl. Added an integration regression proving the pending SQLite thread is captured on that scoped tick. |
Summary
SyncOptionsandAI_HIST_CODEX_SQLITE_MAX_AGE_DAYSoverridesCaptureProgress, and run uncatalogued sources before established onesFixes #508
Validation
cargo fmt --all -- --checkcargo clippy --workspace --all-targets --all-features -- -D warningsRUST_TEST_THREADS=4 cargo test --workspace --all-featuresRUST_TEST_THREADS=4 cargo test -p ai-hist --no-default-featurescargo build -p ai-hist --no-default-featurescargo publish --dry-run -p ai-hist --allow-dirtyenv -u XDG_DATA_HOME npm testinsdk-ts(281 passed)node --test scripts/*.test.mjs(174 passed)node scripts/check-public-api.mjsnode scripts/smoke-history-packages.mjsnode scripts/benchmark-sync.mjs --gaterust-oleumquality gateNeed help on this PR? Tag
@codesmith-botwith what you need.Note
Medium Risk
Changes core ingest/sync ordering, catalog ownership during Codex SQLite batches, and fingerprint fast-path behavior; mis-tuned cutoffs or cursor bugs could delay or skip thread recovery, though behavior is heavily tested.
Overview
Codex SQLite recovery is now bounded and resumable instead of walking every incomplete thread in one sync. Each sweep processes at most 50 eligible threads (newest first), persists a
codex_sqlite_sweep_cursor_v1cursor for the backlog, and marks coverage incomplete until the cursor clears or retries finish—so other providers can run between batches and scoped ticks still advance a pending backlog.Policy knobs:
SyncOptions::codex_sqlite_max_age_days(builder + field) andAI_HIST_CODEX_SQLITE_MAX_AGE_DAYSdefault to a 30-dayupdated_atwindow (0disables). The source fingerprint includes the Codex SQLite cap/cutoff so policy changes cannot be skipped by the fast path.Supporting behavior: sweep logic moves into
providers/codex/sqlite/sweep, batches projection andraw_pathcatalog lookups viawith_raw_path_cache, emitsCaptureProgressascodex-sqlite, and runs sources with no catalog rows before established ones in registry order. Docs and changelog describe the recovery policy.Reviewed by Cursor Bugbot for commit 305b68a. Bugbot is set up for automated code reviews on this repo. Configure here.
Agent Relay sessions
codexsession01a14571· opened viagh pr create· last active 2026-10-16