feat(index): log resume progress when continuing an interrupted build#118
Merged
Conversation
When a resumable build picks up after an interruption, print how many files were already committed and how many remain. The already-committed files are excluded from the `todo` set, so they are never re-parsed or re-embedded — this just surfaces that to the user (previously a resume looked identical to a fresh build from the outside). Verified end-to-end by hard-killing (SIGKILL) and gracefully interrupting (SIGINT) a ~12k-unit build mid-way: in both cases the resume re-encoded only the not-yet-committed files and produced an index identical to a clean full build (same file and document counts), with the already-committed chunks left byte-identical.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When a resumable build resumes after an interruption (timeout, Ctrl-C, crash), it now prints a one-line summary of how much work is being skipped:
The already-committed files are excluded from the
todoset inbuild_resumable, so they are never re-parsed or re-embedded. Previously a resume looked identical to a fresh build from the outside, which made it hard to tell that prior work was being reused. This just surfaces the existing behavior.Why
Came out of verifying the resumable-build guarantee end-to-end. I generated a ~12,000-unit synthetic repo (300 files) and interrupted indexing mid-build, both ways:
In both cases:
So the build correctly resumes from the last checkpoint and never recomputes committed work.
Testing
cargo build -p colgrep,cargo fmt/clippy -D warningsclean (pre-commit CI passed)