Summary
backfill_fold does not support resume-after-interrupt. If the process is killed mid-flight (SIGKILL, OOM, MCP transport drop), the next invocation restarts the backfill from the first row. There is no checkpoint, no --resume flag, and the response carries no progress metadata a client could use to drive its own retry logic.
Evidence
src/CodeIndex/Mcp/McpToolHandlers.cs:1813 — BackfillFoldedColumns(...) is called as a single unbroken loop.
- Reproducer:
- Start
backfill_fold against a 1M-row table.
- Kill the process after 5 seconds.
- Observe that the next
backfill_fold invocation restarts from row 1, throwing away the work that already completed.
Impact
- Long-running backfills on large monorepos cannot tolerate any interruption; users either succeed end-to-end or fully restart.
- Response payload has no
rows_done / rows_total, so a client cannot estimate when it might finish.
Proposed direction
- Persist a checkpoint row id (or a
last_processed_at column) after every N rows so the next invocation can resume from there.
- Add a
progress field to the streaming/MCP response: { rows_done, rows_total, fraction }.
- Optional: a
--resume / --restart CLI flag to make resume vs full restart explicit.
Repro env
- Branch:
main @ 2ee912d (release v1.21.0)
Summary
backfill_folddoes not support resume-after-interrupt. If the process is killed mid-flight (SIGKILL, OOM, MCP transport drop), the next invocation restarts the backfill from the first row. There is no checkpoint, no--resumeflag, and the response carries no progress metadata a client could use to drive its own retry logic.Evidence
src/CodeIndex/Mcp/McpToolHandlers.cs:1813—BackfillFoldedColumns(...)is called as a single unbroken loop.backfill_foldagainst a 1M-row table.backfill_foldinvocation restarts from row 1, throwing away the work that already completed.Impact
rows_done/rows_total, so a client cannot estimate when it might finish.Proposed direction
last_processed_atcolumn) after every N rows so the next invocation can resume from there.progressfield to the streaming/MCP response:{ rows_done, rows_total, fraction }.--resume/--restartCLI flag to make resume vs full restart explicit.Repro env
main@ 2ee912d (release v1.21.0)