Repository navigation
feat(index): a full rebuild interrupted part-way resumes, against its own tree (PRJ-06 T12a) - #441
Merged
Merged
Conversation
… own tree (PRJ-06 T12a) Every full rebuild used to start over: the route created a fresh checkpoint whenever force_full was set, and CheckpointService.create deletes the old one. A restart at 63% of a ~12 000 s rebuild paid for all of it again — observed 2026-09-09 as three consecutive runs orphaned at 63%, 33%, 33%. - repos.resume_checkpoint: like continues like. Full continues full, an incremental checkpoint an incremental run; neither crosses (KNOW-08); an unknown (pre-column) checkpoint is never resumed. Tested as a matrix. - pipeline_runner.pin_to_tree (S-11): a resume is checked out at its checkpoint's head_sha, because clone_or_pull moved the clone to the branch's current head while the restored changed files, profile and cross-file analysis describe the checkpoint's; ast_parse re-runs on every resume and would otherwise parse a newer tree. A commit that is gone (force-push) resets the progress (CheckpointService.reset_progress) and the run starts from the top, logged at WARNING. Tested on a real repo. - The rebuild stays clean: ast_parse and graph_build are ungated, so a resumed full run re-parses the whole tree and saves the whole graph. - CLAUDE.md: the paragraph that said a full rebuild "has no checkpoint to resume from" now says what happens. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
sshlg
pushed a commit
that referenced
this pull request
Sep 26, 2026
B-21's changelog line said the harness cancels leftover work; the merged fix waits and never cancels (the cancelling version broke CI). T12a (#441) in CHANGELOG and loop-queue; retro S-14 (never cancel background work on a shared connection; a local pass of a timing-sensitive change is not evidence). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
First slice of PRJ-06 — the part with the production value: a full rebuild interrupted by a restart continues instead of starting over.
Before: the route created a fresh checkpoint whenever
force_fullwas set, andCheckpointService.createdeletes the old one. A restart at 63% of a ~12 000 s rebuild paid for all of it again (2026-09-09: three consecutive runs orphaned at 63%, 33%, 33%).Change:
repos.resume_checkpoint: like continues like — full↔full, incremental↔incremental; never across (KNOW-08); an unknown pre-column checkpoint is never resumed.pipeline_runner.pin_to_tree(S-11): a resume is checked out at the checkpoint'shead_sha—clone_or_pulljust moved the clone to the current head, while the restored changed files/profile/cross-file analysis describe the checkpoint's, andast_parsere-runs on every resume. A commit that is gone →CheckpointService.reset_progressand a restart from the top, WARNING logged. The nextclone_or_pullchecks the branch out again, so the detached head does not outlive the run.ast_parse/graph_buildare ungated, so a resumed full run re-parses the whole tree and saves the whole graph.Tests (
test_a_full_rebuild_resumes.py, 10): the resume matrix (red on the old rule); pin on a real two-commit repo; pin to current head is a no-op; an unknown commit refuses and leaves the clone untouched;reset_progressclears steps, docs and the legacy JSON while keeping the checkpoint.Not in this slice (PRJ-06 remainder):
Stepobjects replacing_run_steps, per-step sessions, the run-keyedsave()for stale-row deletion, the per-run doc/token cap,to_threadfor the four inline loops. Production acceptance (a deliberately interrupted rebuild ofesim-phpcompleting in < 0.5× cold time) is read when the next restart lands on a rebuild.Checks: backend unit 9 176 passed; ruff/mypy clean;
tests/unit/docs133 passed.🤖 Generated with Claude Code