Skip to content

calibration: backfill phase 2 — GitHub-truth reversed labels (retro successor scan) + raw-context re-fetch #8170

Description

@JSONbored

Problem

#8157's phase 1 (merged via its PR) backfilled 460 confidence-labeled cases from the historical ledger — but all confirmed: the D1 ledger provably contains zero derivable reversed labels (0 reversal events, 0 closes-later-merged), and no historical raw context. Two bounded GitHub-truth passes remain, deliberately split from phase 1 because both need the API:

  1. Historical reversed labels via successor detection — run calibration: detect one-shot-culture reversals — bot-closed PR superseded by a merged successor (reversal_superseded) #8166's successor heuristics RETROSPECTIVELY: for each historical bot-closed PR, scan for a merged successor (same linked issue, or same author + file overlap). Each confirmed match retro-labels the original decision reversed (same provenance tagging as phase 1).
  2. Raw-context re-fetch — for public-repo rows, re-fetch issue text / PR title/body / diff from GitHub to populate the corpus raw-context fields (bounded, resumable, rate-limit-aware). modelResponseText remains permanently out of scope.

Requirements

⚠️ Required pattern. Same pure-core/thin-IO split and idempotency discipline as phase 1 (scripts/backfill-calibration-corpus-core.ts): deterministic ids, INSERT OR IGNORE/targeted updates, backfilled + distinct provenance tags per pass, dry-run default with a report pasted here before any --apply.

Deliverables

Links & Resources

#8082 (epic), #8157 (phase 1), #8166 (the heuristics this reuses), scripts/backfill-calibration-corpus-core.ts (the pattern)

Boundaries

No modelResponseText synthesis, ever. Nothing for private repos in the re-fetch pass. Applies remain maintainer-triggered.

maintainer-only — production-ledger data passes.

Metadata

Metadata

Assignees

Labels

maintainer-onlyOwner-only work — yields no Gittensor points.roadmapOn the Wave-2 agent-layer roadmap board (project 9)

Projects

Status
Done
Status
Done

Relationships

None yet

Development

No branches or pull requests

Issue actions