teleo-infrastructure/scripts
m3taversal 762fd4233e feat(backfill): synthetic PR rows for pre-mirror GitHub PRs #68 (Alex) + #88 (Cameron)
Two historical GitHub PRs merged before our sync-mirror.sh tracked github_pr:
  - GitHub PR #68: alexastrum, 6 claims, merged Mar 9 2026 via squash merge
  - GitHub PR #88: Cameron-S1, 1 claim, merged early April

Their claim files were lost during a Forgejo→GitHub mirror overwrite and later
recovered via direct-to-main commits (dba00a79, da64f805). Because the
recovery commits bypassed the pipeline, our 'prs' table has no row to attach
originator events to — all 4 backfill-events.py strategies returned None,
leaving Alex + Cameron at 0 originator credits despite real historical work.

This reconstructs synthetic 'prs' rows so the existing github_pr strategy in
backfill-events.py attaches 7 originator events on re-run:
  - Numbers 900068 / 900088 live in a clearly-synthetic range that cannot
    collide with real Forgejo PRs (current max: 3941)
  - github_pr=68/88 wires up the existing lookup strategy
  - submitted_by=alexastrum / cameron-s1 establishes author attribution
  - merged_at from the recovery commit messages (not recovery-commit time)
  - last_error tags the rows as synthetic for future audits

Idempotent: INSERT OR IGNORE via check on number OR github_pr. Safe to replay.
Reversible: DELETE FROM prs WHERE number IN (900068, 900088).

After applying this script:
  python3 ops/backfill-events.py
will credit Alex with 6 author + 6 originator events (author=1.80, originator=0.90)
and Cameron with 1 author + 1 originator (0.30 + 0.15), all dated to the
historical merge dates — so 7d/30d leaderboard windows show them correctly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 16:33:37 +01:00
..
audit-wiki-links.py feat: add wiki-link audit script for codex graph integrity 2026-04-21 10:46:55 +01:00
backfill-ci.py feat: reorganize repo with clear directory boundaries and agent ownership 2026-04-14 18:20:13 +01:00
backfill-descriptions.py feat: reorganize repo with clear directory boundaries and agent ownership 2026-04-14 18:20:13 +01:00
backfill-domains.py feat: reorganize repo with clear directory boundaries and agent ownership 2026-04-14 18:20:13 +01:00
backfill-events.py fix(backfill): normalize commit_date via datetime() in time-proximity query 2026-04-24 16:16:03 +01:00
backfill-reviewer-count.py fix: sync all code from VPS — repo is now authoritative source of truth 2026-04-15 13:18:01 +01:00
backfill-source-authors.py feat: reorganize repo with clear directory boundaries and agent ownership 2026-04-14 18:20:13 +01:00
backfill-sourcer-attribution.py fix(attribution): credit sourcer/extractor from claim frontmatter 2026-04-24 12:48:41 +01:00
backfill-sources.py fix(backfill): don't regress terminal source statuses to unprocessed 2026-04-22 21:29:33 +01:00
backfill-synthetic-recovery-prs.py feat(backfill): synthetic PR rows for pre-mirror GitHub PRs #68 (Alex) + #88 (Cameron) 2026-04-24 16:33:37 +01:00
bootstrap-contributors.py feat: reorganize repo with clear directory boundaries and agent ownership 2026-04-14 18:20:13 +01:00
contributor-graph.py feat: contributor graph PNG generator + API endpoint 2026-04-21 11:01:02 +01:00
cumulative-growth.py feat: add /api/contributor-growth endpoint + cumulative growth script 2026-04-20 22:19:42 +01:00
embed-claims.py feat: reorganize repo with clear directory boundaries and agent ownership 2026-04-14 18:20:13 +01:00
extract-decisions.py feat: reorganize repo with clear directory boundaries and agent ownership 2026-04-14 18:20:13 +01:00
extract-graph-data.py feat: reorganize repo with clear directory boundaries and agent ownership 2026-04-14 18:20:13 +01:00
migrate-entity-schema.py feat: reorganize repo with clear directory boundaries and agent ownership 2026-04-14 18:20:13 +01:00
migrate-source-archive.py feat: reorganize repo with clear directory boundaries and agent ownership 2026-04-14 18:20:13 +01:00
nightly-reweave.sh fix: lower reweave threshold 0.70→0.55, increase batch 50→200 2026-04-16 14:18:50 +01:00
openrouter-extract-v2.py feat: reorganize repo with clear directory boundaries and agent ownership 2026-04-14 18:20:13 +01:00
reconcile-source-status.sh feat: reorganize repo with clear directory boundaries and agent ownership 2026-04-14 18:20:13 +01:00
reconcile-sources.py feat: reorganize repo with clear directory boundaries and agent ownership 2026-04-14 18:20:13 +01:00
scoring_digest.py feat: wire action-type CI into contributor profiles 2026-04-21 11:29:01 +01:00
tier0-gate.py feat: reorganize repo with clear directory boundaries and agent ownership 2026-04-14 18:20:13 +01:00
vector-gc.py feat: reorganize repo with clear directory boundaries and agent ownership 2026-04-14 18:20:13 +01:00