Skip to content

Implement the backfill completion callback and replace mock job output #48

Description

@priscaenoch

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).

Metadata

Metadata

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardThird CampaignCampaign: Third CampaignenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions