feat: show native probe capture and upload progress - #206
Conversation
|
Warning Review limit reachedNext included review available in 40 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (5)
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. |
Initial session capture could remain at “Preparing local session capture” without feedback, while trajectory discovery descended into generated directories and symlink cycles.
Report per-source file progress, captured sessions, uploaded/queued records and unknown backlog totals in the CLI and Cloud. Prune dependency/build trees, avoid repeating initial capture, and throttle background rescans. Capture failures display local capture progress instead of claiming an upload failure; legacy NULL discovery states count as captured sessions.
Progress callbacks support nested capture without holding a mutable borrow during the callback. Periodic heartbeats read cached credentials. Final upload heartbeats can renew idle tokens with a two-second request deadline and a nonblocking refresh lock. Background capture/upload/shutdown never waits for heartbeat I/O; setup and
--onceallow at most nine seconds for final progress and require a successful Cloud acknowledgment before reporting a connected probe. Successful capture does not send a delayed final scanning update.Validation
The companion History Cloud and Cloud PRs accept the new progress phases. Existing installations need the rebuilt probe; no package release, deployment or merge was performed.
Companion PRs
Agent session:
codex://threads/01a0bbe4-973f-7a81-928e-4ea6b005be98.Note
Medium Risk
Touches local ingest traversal, thread-local capture observers, and auth refresh locking; probe behavior changes (60s rescan throttle, setup requires Cloud heartbeat ack) but progress paths are best-effort and bounded.
Overview
Adds end-to-end capture and upload progress for the native Session Recorder probe: CLI status lines and Cloud heartbeats carrying phase, per-source file counts, captured sessions, and upload queue stats—without exposing paths or session content.
ai-histintroduces a thread-localCaptureProgressobserver viasync_local_at_with_progress, per-source milestones, andcapture_filesfor file-level scanning progress. Trajectory discovery skips dependency/build dirs (node_modules,.git,target, etc.), does not follow symlinks, and only indexes regular.jsonfiles to avoid cycles and junk trees.Probe splits
capturefromdeliver_captured; setup/--oncewaits up toCOMPLETION_TIMEOUTfor a final Cloud ack. Background loops rescan local history at most every 60s and otherwise only drain uploads.progress::Monitorprints human-readable lines and POSTsprogressto/v1/onboarding/heartbeat; capture failures surface as local capture paused, not upload errors.RelayHistory cloud auth adds
try_progress_access_token: bounded refresh with a non-blocking rotation lock so progress I/O never blocks capture or contends with full token refresh.Reviewed by Cursor Bugbot for commit dafe88d. Bugbot is set up for automated code reviews on this repo. Configure here.