fix(indexer): write checkpoint on 404 ack in code-indexing handler

What

The code-indexing task handler acks a Rails 404 without writing a checkpoint. The empty-repository path already writes one via the indexing pipeline. This change brings the 404 path in line with that.

Why

Without a checkpoint, the dispatcher's checkpoint filter in namespace_backfill_dispatcher keeps treating the project as pending and republishes it every backfill cycle. Writing a checkpoint lets the filter exclude it on the next cycle, the same dedupe path the empty-repo case relies on.

Implementation notes
  • Mirrors the empty-repo checkpoint shape: last_task_id = request.task_id, last_commit = None.
  • Uses the request's branch when known, falls back to a HEAD sentinel otherwise. The dispatcher filter keys on (traversal_path, project_id) and ignores branch, so the sentinel does not affect dedupe correctness.
  • A failed checkpoint write is logged and the message is still acked; the next dispatch cycle will retry.

Test plan

  • New test project_info_404_acks_and_writes_checkpoint covers the 404 path
  • Existing handler tests still pass (cargo nextest run --package indexer)
  • cargo clippy --package indexer --all-features --all-targets -- -D warnings clean
  • cargo fmt --package indexer clean
Edited by Michael Angelo Rivera

Merge request reports

Loading