Problem
src/api/backfill.ts leaves the job-completion callback unimplemented (// TODO: Send completion callback, around line 242) and returns fabricated output: a mock file URL and metadata (around line 214) and hardcoded mockCounts (around line 263). A backfill/export job that reports a fake file and never notifies completion cannot be relied on.
What needs to be done
- Implement the completion callback so callers/subscribers are notified when a backfill job finishes (or fails), reusing the webhook dispatcher if appropriate.
- Replace the mock file URL/metadata with the real output location (for example the S3/exports path the service already uses).
- Replace
mockCounts with real counts derived from the job.
- If any part cannot yet be real, gate it behind an explicit default-off flag rather than returning fabricated data.
Files
src/api/backfill.ts
- coordinate with
src/exports/ and src/webhooks/
Acceptance deliverables
- Completed backfill jobs emit a real completion notification.
- Job responses reference the real output and real counts, or are flag-gated.
- All CI checks pass; the change cannot be merged until CI is green.
Tests to pass
- Test: on job completion the callback/notification fires.
- Test: the response reports the real output location and counts (dependencies mocked).
Problem
src/api/backfill.tsleaves the job-completion callback unimplemented (// TODO: Send completion callback, around line 242) and returns fabricated output: a mock file URL and metadata (around line 214) and hardcodedmockCounts(around line 263). A backfill/export job that reports a fake file and never notifies completion cannot be relied on.What needs to be done
mockCountswith real counts derived from the job.Files
src/api/backfill.tssrc/exports/andsrc/webhooks/Acceptance deliverables
Tests to pass