Is a project's history a better training corpus than its source?

Phase 4 feasibility report, 2026-12-01. No model has been trained, and no paid inference was used (Phase 4 ledger: $0). Phase 3 found that historical evidence did not improve model judgments. Phase 4 asks a different question: can a small model learn to write better Transformers code from the project's history (tasks, first attempts, maintainer corrections) than from a snapshot of its source? The first milestone only measures whether that supervision exists. It does, for two families. About 2,400 task→patch examples and about 3,300 review→correction examples can be recovered from one year of history. A functional benchmark can be built: 17 of 40 candidate tasks validated by executing their tests. All quality figures come from two AI audit passes, provisional until checked by humans.

What was mined

Transformers' first-parent main from 2025-07-01 to 2026-11-30: 5,644 squash-merged PRs, split by merge date into training (3,775, up to 2026-06-30), validation (390) and evaluation (1,479, from 2026-08-16). A seeded 400-PR sample was enriched with one GitHub GraphQL query each: the PR text as first written, recovered from its edit history; linked issues; review threads anchored to the commit the reviewer saw; and the PR's commits. Everything is deterministic: no language model indexes, filters or labels the corpus.

RelationshipAvailableMechanically linkedAudit (provisional)
Task → implementation3,410 non-doc training PRsall merged20/20 genuine; task text written before the solution and not leaking it in 8/20
Review feedback → code correction1,121 maintainer threads in 158 of 397 PRs747 change the reviewed lines after the comment; 50 apply a suggestion verbatimcorrection does what was asked in 21/30; usable 9/15 of the linked, but only 2/10 of the applied suggestions (mostly cosmetic)
Regression → fix + test658 small fix-like PRs changing code and tests17/40 executed tasks fail before and pass aftertitle heuristic alone: 3/10
Helper → adoption772 new shared helpers73 adopted later in model codeinconclusive (pilot selection bug)
Deprecation → removal245 deprecations, 148 removals191 identifier-matched linksnot validated
Revert → re-land40 reverts25 linked, 3 re-landedtoo rare to matter

How much of it is project-specific, and how much is unique

Contamination controls

Functional benchmark prototype

Each candidate is a small evaluation-window PR that changes both code and tests. Its tests run twice in a network-denied macOS sandbox on CPU: on the pre-change code with the new tests added, and on the merged code. 17 of 40 have a test that fails before the fix and passes after it; each run takes seconds to minutes. That projects to about 170 tasks from the window. Benchmark tasks stay private.

Update: full mining and the floor check (2026-12-01)

Update 2: second floor check, frozen harness and datasets (2026-12-01)

Update 3: a viable baseline (gate 0c, 2026-12-01)

Update 4: smoke test passed, pilot running (2026-12-02)

Update 5: pilot result, not shown (2026-12-03)

Phase 4.1: why adaptation hurt (2026-12-03)

An audit of the existing artifacts only (training logs, adapters, datasets, predictions); nothing was run or spent. Full report: DIAGNOSIS-4.1.md.

Status

Phase 4 closed: the hypothesis was not supported, and adaptation degraded the model. Phase 4 spent $26.86 of $30. A bounded Phase 4.1 diagnostic (E0 + E1) is proposed and awaits approval; no further compute has been spent. The held-out tasks stay private.