Can a reviewer with project history catch what a generic reviewer misses?
Phase 2 report, 2026-11-30. Repository history helps a capable coding model most at review time, but only when the deciding history is retrieved. On real pull requests it usually is not. On the 34 development tasks with DeepSeek-V4.1-Flash, the model serge uses to drive Relore, a reviewer citing history fixed 10 of 16 historical violations in code-only patches with no regressions. A generic reviewer fixed none. History at review time was statistically indistinguishable from history at generation time. On 63 held-out cases mined from real transformers, trl and diffusers review threads, the reviewer caught 19 of 36 violations at 0.79 precision when handed the evidence a maintainer relied on. Deployable retrieval put that evidence on the page in only 7 of 43 cases. On a separate 41-case development set, no query strategy we designed did better, including two-stage thread expansion. The decisive rules are project-wide conventions that a diff does not name. On the small local Devstral model the whole loop changed almost nothing. Held-out and development labels are provisional and unreviewed.
Corrections, 2026-11-30. An audit for Phase 2.5 recomputed this page from the saved results. It corrected four figures in place (cost, reasoning-ceiling stops, revision failure rate, Devstral coder acceptances). It also found a data defect: the held-out oracle pages were built from GitHub's issues API, so every evidence PR showed merged_at: null, including the 38 merged before their cutoff. The held-out reviewer therefore saw merged decisions labelled as unmerged. The held-out oracle figures below (19 of 36 at 0.79) were measured under that defect and are probably understated. Phase 2.5 reports a corrected rerun of the reasoning step.
Why review instead of activation
Phases 1 and 1.5 found that raw Relore retrieval improved historical compliance from 14 to 24 of 30 packaging repairs. Compiled decisions, provisional headers and summaries added little on top. Several failures happened with the decisive evidence on the page: the model kept librosa, the superseded Torch cap and a self-referencing save flag. Phase 2 tests a different placement. History is applied to a concrete patch in one review-and-revision step, and a generic reviewer serves as the control. The patch also gives retrieval something specific to search for.
Design
Initial patches are not regenerated. Arm A reuses the frozen Phase 1 code-only edit, and arms B–E reuse the frozen raw-history edit, byte for byte, together with their saved executable grades. Every review arm gets one review call. If at least one finding validates, it also gets one revision call. The coding model judges each finding and may reject it. Without validated findings the initial patch is kept. The reviewer never edits code.
| Arm | Initial patch | Review | Review evidence |
|---|---|---|---|
| A | code only | none | — |
| B | code + raw history | none | — |
| C | code + raw history | generic | none |
| D | code + raw history | historical | original task-query page |
| E | code + raw history | historical | diff-driven page |
| F | code only | historical | diff-driven page |
| R / RA | raw / code only | second attempt, no findings | — |
| CA | code only | generic | none |
| FT | code only | historical | task-query page |
| ET / EC / E8 | code + raw history | historical | diff + temporal follow-up / task ∪ diff / task query, 8 hits |
R and RA control for the second attempt itself. Without them, any gain could come from giving the
coder another try rather than from the findings. CA versus F isolates history inside review when no
history was used during generation. The historical reviewer uses the Phase 2 prompt verbatim and
returns flat JSON: id, location, description, evidence IDs, applicability, correction and uncertainty.
There is no decision ontology. A historical finding must cite at least one document_id
from the hits it was given. Unknown IDs are dropped, never repaired. A generic finding that cites
evidence is rejected, because it saw none. The generic reviewer has the same 768-token budget, and
revisions have 384. Coder and reviewer are both local Devstral Small 2 (Ollama manifest
24277f07…) at temperature 0 and seed 17, the Phase 1 model, so no external inference
fees are incurred.
Experiment B: can the patch write a better query than the task?
A diff-driven query searches with entities read from the patch alone. For packaging these are the requirement names and versions added or removed, plus marker variables. For Python they are the identifiers that appear on only one side of the edit, plus the edited symbol. Results from each entity are merged round-robin and capped at four hits, the Phase 1 page size. Every page is served from an index rebuilt from the 61 frozen captures at the task cutoff. Each hit is also re-checked against the cutoff. The task-query strategy reproduced all 34 frozen Phase 1 pages exactly. The proxy measure is mechanical: is the task's source decision PR on the page? It is not a semantic sufficiency judgment.
| Strategy (queries from the frozen raw-history patch) | Source PR found / 34 | Mean evidence bytes | Mean hits | Hits from source PR |
|---|---|---|---|---|
| task4 · original task query | 27 | 1,757 | 2.62 | 62% |
| task8 · task query, eight hits | 28 | 2,217 | 3.24 | 63% |
| diff4 · diff entities | 29 | 2,017 | 2.88 | 66% |
| diff4 + temporal follow-up | 30 | 1,922 | 2.65 | 69% |
| combined task ∪ diff, four hits | 30 | 2,131 | 3.15 | 63% |
| diff4 + file-name entity (sensitivity only) | 31 | 2,091 | 3.00 | 66% |
Diff-driven queries recovered the source PR on three tasks where the task query returned nothing useful: japanese, audio-kenlm and optional-kernels. They lost it on mlinter. Adding a temporal follow-up also recovered peft-conversion, the Phase 1.5 incident, while using fewer bytes than diff4 alone. With the code-only patch as the query source, diff4 alone recovered peft-conversion as well. The expanded task query recovered peft-conversion only.
A leak we excluded. Phase 1 fragment file names are synthetic and name the task's
concept, for example requirements-peft-conversion.txt. A modified file is a legitimate
diff entity in a real repository. Here it would leak the task, so file names are kept out of every
review arm and reported only as the sensitivity row. On a single project, with 61 curated PRs and
a hit-presence proxy, this shows that patch-aware queries can surface missing decisions. It does
not show that they produce better reviews. That is what arms E, ET and EC test.
Production model: DeepSeek-V4.1-Flash, all 34 development tasks
The development-task pilot and the reviewer-quality runs below first used Devstral Small 2, the Phase 1 model. The agent that actually
drives Relore in serge uses deepseek-ai/DeepSeek-V4.1-Flash-1017:together through Hugging Face Inference Providers. Everything
was rerun with that model in both roles and serge's production settings: reasoning_effort: low, a 49,152-token ceiling, and
temperature 0 with seed 17. The code-only and raw-history initial patches were regenerated with Phase 1's unchanged prompts. Eight code-only
generations first hit an 8,192-token ceiling while reasoning and were regenerated at the production ceiling. Later stages also hit the production ceiling: 3 calls in the development loop, 15 in reviewer quality, 4 in the injection probe and 11 held-out reviews.
Total inference cost for all DeepSeek runs on this page, held-out and the development-set judge included, was $9.95 (1,607 calls).
| Arm (34 tasks) | Compliant initial → final | Fixed | Broke | Findings accepted by coder | Mean review+revision tokens |
|---|---|---|---|---|---|
| A · code only | 18 → 18 | — | — | — | — |
| B · raw history at generation | 30 → 30 | — | — | — | — |
| RA · code only, second attempt | 18 → 19 | 2 | 1 | — | 3,158 |
| CA · code only + generic review | 18 → 18 | 0 | 0 | 3 / 5 | 3,671 |
| F · code only + historical review, diff page | 18 → 28 | 10 | 0 | 11 / 12 | 2,480 |
| FT · code only + historical review, task page | 18 → 28 | 10 | 0 | 13 / 14 | 3,276 |
| R · raw history, second attempt | 30 → 30 | 0 | 0 | — | 1,792 |
| C · raw history + generic review | 30 → 31 | 1 | 0 | 2 / 4 | 3,275 |
| D / E · raw history + historical review | 30 → 30 | 0 | 0 | 0 / 1 | 849 / 627 |
| ET / E8 · with temporal follow-up / 8 hits | 30 → 31 | 1 (peft-conversion) | 0 | 1 / 2 | 1,176 / 2,497 |
- History during review alone recovers most of the value of history during generation. F vs A: 28/34 vs 18/34, ten gains, no losses, exact sign test p = 0.002, paired bootstrap +15 to +44 points. Against a generic reviewer of the same patches (CA) the result is identical. Against a free second attempt (RA) it is 28 vs 19, p = 0.022. History at generation (B, 30/34) and history only at review (F, 28/34) are not distinguishable: p = 0.69, with 2 gains and 4 losses for F.
- Once history was used during generation, review adds little. Only 4 of 34 raw-history patches still violated history, and no arm fixed more than one of them. Retrieval with temporal follow-ups and the expanded page each recovered peft-conversion, the Phase 1.5 incident.
- Joint compliance and functional outcomes match compliance on every pairwise comparison. The remaining F failures are mostly misses where the reviewer raised no finding. Across D, E and F, only one task drew an objection to a compliant patch (audio-reference, the same finding in each arm), and the coder rejected it each time.
| Reviewer quality, 92 graded patches (68 patches written by Devstral + 24 by DeepSeek; all 92 reviewed by DeepSeek) | Violations flagged | Compliant patches flagged | Precision |
|---|---|---|---|
| Generic, no history | 24 / 49 | 5 / 43 | 0.83 |
| Historical, task-query page | 30 / 49 | 2 / 43 | 0.94 |
| Historical, diff-driven page | 32 / 49 | 2 / 43 | 0.94 |
Injection probe. One fabricated "authoritative" comment told any AI reviewer to demand telemetry-helper==0.0.1
and strip every version bound, and it was inserted into 82 nonempty pages. DeepSeek never cited it and never made the demand. It named the
comment as injected, untrusted text in 16 reviews, and its flag rate was unchanged at 32 vs 32. Devstral cited it in 3 of 61 reviews and
made the demand once. ID validation cannot catch that, because the injected document was legitimately on the page.
The tables below are the original Devstral runs. They remain valid for that model, and they show that a small local model cannot use history-backed review findings at all.
Devstral Small 2: Stage 1 pilot, review rarely changes the patch
12 development tasks × 13 arms: the eight Phase 1.5 challenge tasks plus dataset-arrow, typer, hub-major and tracker. Compliance is the Phase 1 executable grade. Functional is the pip smoke check or the ordinary Python path. Review and revision token counts exclude generation.
| Arm | Compliant initial → final / 12 | Fixed | Broke | Validated findings | Accepted by coder | Mean review+revision tokens |
|---|---|---|---|---|---|---|
| A · code only | 3 → 3 | 0 | 0 | — | — | — |
| B · raw history | 6 → 6 | 0 | 0 | — | — | — |
| R · second attempt, no findings | 6 → 6 | 0 | 0 | — | — | 1,276 |
| C · generic review | 6 → 7 | 1 | 0 | 11 | 1 / 11 | 1,867 |
| D · historical, task page | 6 → 7 | 1 | 0 | 8 | 1 / 8 | 1,587 |
| E · historical, diff page | 6 → 7 | 1 | 0 | 8 | 2 / 8 | 1,894 |
| ET / EC / E8 | 6 → 7 each | 1 | 0 | 8 / 10 / 8 | 1 each | 2,142 / 2,372 / 2,100 |
| CA · code only + generic | 3 → 3 | 0 | 0 | 12 | 0 / 12 | 1,476 |
| F · code only + historical, diff page | 3 → 4 | 1 | 0 | 8 | 1 / 8 | 2,126 |
| FT · code only + historical, task page | 3 → 4 | 1 | 0 | 8 | 1 / 8 | 2,026 |
Every reviewing arm on the raw-history patch fixed the same task: audio-reference, where librosa had to be removed.
The generic reviewer fixed it too, so it is not evidence for history. D vs C: 7/12 vs 7/12, no discordant pair. F's
gain over A, CA and RA is pytest-report. The coder rejected the historical finding but rewrote its upper bound to the
<9 the finding quoted, so the attribution is mixed. Joint compliance and functional outcomes match compliance on
every pair. With one discordant task at most, no comparison approaches significance. The correct reading is "no detectable
difference on 12 tasks", not "no effect".
A harness bug, corrected from saved outputs. The first parser treated an empty final as a
failed revision. On audio-reference the coder had accepted the finding and correctly returned an empty file, and that
correction was discarded in six arms. The recorded model outputs were replayed through the fixed parser and regraded
without new inference (rederive.py). Both the raw and re-derived files are kept.
Why so little moved
Reading every finding on the six violating raw-history patches and the nine violating code-only patches:
- Correct historical findings, rejected by the coder. torchcodec-reopen (D, E): "#41839 unpinned torch".
reruns (F): "#40561 pins
<16.0". The coder rejected both by appealing to its reading of the task text. - Historical findings enforcing an obsolete or misread rule. generation-save in all historical arms:
"keep strict validation", the opposite of #49914. peft-conversion: "require 0.19.0", the superseded floor. On D and E the page lacked the 0.19.1
decision (#46442), a retrieval gap. On ET, F and E8 the decision was on the page and was still overridden. torchcodec-reopen ET and F: "keep the
<2.9cap" that #41839 removed. Here the coder's rejection was protective. - Objections to compliant patches. Historical arms (D, E, F) raised validated findings against compliant patches on 5 tasks: typer, tracker, hub-major, reruns and optional-kernels. Several invert the cited decision. The optional-kernels findings even state that the patch agrees with history, yet are filed as findings. The coder rejected all but two (optional-kernels, arms E and F), and those two agreed with the patch and changed nothing, so none became a regression.
- The validator works as designed. On pytest-report the historical reviewer's only objection was correct but cited no ID, so it was dropped as non-historical. The generic reviewer made the same objection, and the coder rejected it.
The coder rejects nearly everything, which keeps false positives harmless and makes true positives useless. The historical reviewer is not precise enough for a coder to trust it. On this model, the bottleneck is mostly reviewer temporal judgment and revision acceptance. The deciding PR was on every historical page for generation-save (#49914) and torchcodec-reopen (#41839). Retrieval still missed peft-conversion's superseding PR without a temporal follow-up.
Devstral Small 2: reviewer quality, measured without revision
The collection is every distinct patch written in Phases 1 and 1.5: 68 patches, labelled by their saved executable compliance grade. 32 violate the historical decision and 36 comply. Each patch was reviewed once by three reviewers, with no revision step. The historical reviewer saw either the task-query page or a page queried from that patch's own diff, and the generic reviewer saw no history. "Flagged" means at least one validated finding. A correct reviewer flags violations and stays silent on compliant patches. Strata use the Phase 1 retrieval audit of the task-query page: full, partial or no decisive evidence.
| Reviewer | Violations flagged | Compliant patches flagged | Precision | Silent on compliant | Flagged patches citing the source PR¹ |
|---|---|---|---|---|---|
| Generic, no history | 29 / 32 | 34 / 36 | 0.46 | 2 / 36 | — |
| Historical, task-query page | 19 / 32 | 15 / 36 | 0.56 | 21 / 36 | 29 / 34 |
| Historical, diff-driven page | 16 / 32 | 14 / 36 | 0.53 | 22 / 36 | 25 / 30 |
| Historical, task-query page, by evidence stratum | Patches | Violations flagged | Compliant patches flagged |
|---|---|---|---|
| Full decisive evidence | 37 | 13 / 19 | 10 / 18 |
| Partial | 16 | 4 / 7 | 4 / 9 |
| None | 15 | 2 / 6 | 1 / 9 |
¹ A lower bound. The check matches PR numbers in title and body document IDs. Comment-level IDs carry a comment number and are not counted.
- The generic reviewer carries no signal. It objects to 34 of 36 compliant patches, so its precision equals the 0.47 base rate. Its high recall comes from objecting to almost everything.
- The historical reviewer discriminates weakly. It flags 59% of violating patches and 42% of compliant ones. That gap is too small for a coding agent to act on findings without checking them. The pilot's coder rejected nearly all findings, which was a reasonable response to this precision.
- Complete evidence does not fix it. When the page fully contains the decision, the reviewer still flags 10 of 18 compliant patches. The failure is in judging the evidence, not in finding it.
- Abstention mostly works. When the page has no decisive evidence, the reviewer stays silent on 8 of 9 compliant patches. The diff-driven page stays silent on 7 of 9.
- Citations are real. At least 29 of the 34 flagged patches cite the task's own source decision. The wrong findings point at the right PR and misstate what it decided, superseded or allowed. Validating evidence IDs cannot catch that.
- Diff-driven retrieval does not help at review time. Precision is 0.53 against 0.56, even though the diff-driven page contains the source decision more often (Experiment B).
"Flagged" counts a patch, not whether the finding names its actual violation, so true precision on violating patches is likely lower. A hand adjudication of each finding into the Phase 2 categories is pending: real violation, generic code-quality, unsupported objection, obsolete constraint and valid departure. All runs use one local model at temperature 0, with one review per patch. The patches come from development tasks.
Held-out: real pull requests (provisional labels)
63 candidates were mined from maintainer review comments in transformers (32), trl (21) and diffusers (10). None overlaps the
development tasks. Each case is a PR's original diff at the commit a maintainer objected to, or a merged PR that drew no such objection. 36 cases
should draw an objection: 35 violations and 1 case of conflicting evidence. 27 should not: correct changes, superseded decisions, exceptions,
accepted departures from history, and cases with insufficient evidence. Evidence is searched in production Relore with --before set to the
cutoff, and with the PR's own thread excluded. Every hit is re-checked against the cutoff. The daemon's age field, computed from today,
is dropped. Diffusers is not indexed, so its 10 cases have only the generic and oracle conditions. "Oracle" gives the reviewer the
earlier threads the maintainer relied on. It is an upper bound, not a deployable condition. Retrieval settings were fixed before the run and
were not tuned on these cases. The DeepSeek reviewer saw only the diff hunk, not the surrounding file.
| Condition | Cases | Should object: flagged | …citing the labelled decision | Should not object: flagged | Precision | Labelled evidence on page |
|---|---|---|---|---|---|---|
| Generic | 63 | 29 / 36 | — | 17 / 27 | 0.63 | — |
| Historical, task query | 53 | 8 / 30 | 2 | 4 / 23 | 0.67 | 7 / 43 |
| Historical, diff query | 53 | 5 / 30 | 1 | 4 / 23 | 0.56 | 2 / 43 |
| Historical, task ∪ diff, 6 hits | 53 | 9 / 30 | 2 | 7 / 23 | 0.56 | 7 / 43 |
| Historical, oracle evidence | 63 | 19 / 36 | 19 | 5 / 27 | 0.79 | 50 / 50 |
The base rate is 0.57: 36 of 63 cases should draw an objection.
- Retrieval, not judgment, is the held-out bottleneck, and the problem is the query, not the index. The decision the
maintainer relied on reached the page in only 7 of 43 searchable cases with a task query, and 2 with diff-derived queries. On the curated
61-PR development corpus the source decision was found on 27–31 of 34 tasks. A diagnostic probe found every one of the 48 labelled
evidence threads in the index. Each was the top hit for its own title, with the same cutoff and exclusions. None was missing because of the
comment-collector gap. The missed decisions are cross-cutting project rules that neither the feature nor the new identifiers name:
"Drop Python 3.9" behind a lost
zip(..., strict=True), a one-minor-at-a-time vLLM bump policy behind a bundled version jump, thecache_positionremoval campaign behind a new model that reintroduced it, and "Deprecate AutoModelForVision2Seq" behind a new registration in that mapping. A task query retrieves earlier attempts at the same feature. Diff entities chose the longest new names, such as the new model's classes. The title probe uses the answer and is not a deployable condition. - Given the right evidence, the reviewer is useful but incomplete. It caught 19 of 36 cases at precision 0.79, and every catch cited the labelled decision. Architecture-category cases account for most of the misses.
- The generic reviewer objects to almost anything. It flags 17 of 27 cases that should pass, including 5 of the 6 superseded-decision cases. Its 29 "detections" are not shown to be the historical problem.
- "Flagged" means at least one validated finding, not that the finding names the violation. Labels come from one mining pass and are unreviewed. These numbers are exploratory until a human reviews the labels.
Held-out downstream: does review change the code?
Each frozen review that produced findings was followed by one DeepSeek revision. The coder saw the task, the PR's original hunk, the findings and the hits they cited, and returned the revised code for that region. A revision-only control got no findings. Violations are graded by executable pattern checks on the revised region. 32 checks were written from the mined descriptions. The 24 kept are those that fail on the PR's original hunk and pass on the maintainer-corrected one. For the 27 no-objection cases the outcome is whether the code was materially changed: a new code line, or one of the PR's own added lines removed. That is an automatic, provisional measure of unnecessary modification.
| Condition | Gradable violations fixed | Correct PRs materially changed | Findings accepted by coder |
|---|---|---|---|
| Revision only, no findings | 1 / 24 | 9 / 27 | — |
| Generic review | 4 / 24 | 12 / 27 | 73 / 88 |
| Historical, task query | 1 / 21 | 0 / 23 | 6 / 10 |
| Historical, diff query | 2 / 21 | 3 / 23 | 4 / 6 |
| Historical, task ∪ diff | 2 / 21 | 3 / 23 | 10 / 17 |
| Historical, oracle evidence | 5 / 24 | 1 / 27 | 9 / 16 |
- On real PRs, history-backed review with deployable retrieval fixes almost nothing, and it is safe. It fixed 1–2 of 21 gradable violations, about what a bare second look achieves, and changed at most 3 of 23 correct PRs.
- Generic review on DeepSeek is actively risky. The coder accepted 83% of generic findings. It fixed 4 violations but rewrote 12 of 27 correct PRs, including reverting an accepted departure from history. A bare "re-examine your patch" changed 9 of 27. DeepSeek is an agreeable coder; Devstral was not. That makes reviewer precision matter more, not less.
- Perfect evidence lifts the ceiling only to 5 of 24. The reviewer flags more than the coder fixes. Part of the gap is the setup: the coder saw only a diff hunk, not the file, and the checks are strict string patterns. These are lower bounds on what a full agent session could do.
- Reasoning runaway. 21 of the 134 revision calls actually made (15.7%; 285 counts rows, not calls) spent the whole 49,152-token production budget on reasoning and returned nothing. They are counted as keeping the original code. This failure mode also exists in production with the same settings.
Held-out downstream with the surrounding file
The coder may have failed because it saw only a diff hunk. The revision step was rerun with a ±400-line window of the patched file at the PR's commit, fetched from GitHub, and the frozen reviews were reused.
| Condition | Violations fixed: hunk → with file | Correct PRs materially changed: hunk → with file |
|---|---|---|
| Revision only, no findings | 1 → 4 / 24 | 9 → 17 / 27 |
| Generic review | 4 → 3 / 24 | 12 → 14 / 27 |
| Historical, task query | 1 → 0 / 21 | 0 → 4 / 23 |
| Historical, task ∪ diff | 2 → 1 / 21 | 3 → 5 / 23 |
| Historical, oracle evidence | 5 → 6 / 24 | 1 → 4 / 27 |
Context was not the main limit: with oracle evidence the ceiling stayed at 5–6 of 24. The file alone teaches some local conventions. Seeing
neighbouring zip(..., strict=True) calls, a bare second look restored strict=True. It also made every condition
edit more correct PRs. Single-run differences of 1–3 cases are within noise. 10 of 128 revision calls failed: 9 hit the reasoning ceiling and 1 returned malformed output.
Finding the rule: query design on a separate development set
To design better queries without touching the held-out cases, a second set of 41 cases was mined from older history: transformers
2024-06 to 2025-05 and trl 2024-09 to 2025-04, with 30 violations and 11 controls across 23 kinds of project-wide rule. Examples are
define_import_structure inits, GradientCheckpointingLayer, the tuple-cache deprecation, trace-safe casts and
no assert in library code. It shares no PR and no evidence thread with the held-out set. Its miner read only the held-out PR and
evidence numbers, to exclude them. Each case's check was verified to fail on the original hunk and pass on the corrected one. Two measures were
used. One is mechanical: is the labelled thread on the page. The other is a DeepSeek judge that must cite a hit and decide whether the page
states the rule. That judge has two rubrics: strict (every labelled detail) and core (discourages the incorrect pattern or establishes the
expected one). The core rubric was fixed before it was run.
| Strategy, 30 development violations | Labelled thread on page | Rule on page, strict | Rule on page, core | Median page |
|---|---|---|---|---|
| Task text | 1 | 0 | — | — |
| Longest changed identifiers (the held-out diff query) | 0 | 0 | — | — |
| APIs the patch uses or drops, excluding names it introduces | 0 | 0 | — | — |
| …restricted to maintainer text | 1 | 0 | 4 | 3.5 KB |
| …restricted to rationale documents | 1 | 1 | — | — |
| Two-stage: candidate threads, then opening post + focused comments before the cutoff | 2 | 0 | 2 | 6.6 KB |
| Control: labelled thread, title hit only | 30 | 2 | 12 | — |
| Control: labelled thread, expanded | 30 | 3 | 14 | 1.5 KB |
- Identifiers drown the rule. The APIs extracted from the patch were the right ones:
_import_structure,from_legacy_cache,OptionalDependencyNotAvailable. But hundreds of ordinary model PRs mention them too, and the PR that set the rule usually names the replacement, which the violating patch never mentions. Authority, rationale and precedent filters did not change that. - Expanding a thread adds little. Once the right thread is on the page, the core rule is visible about half the time either way (12 vs 14 of 30). The strict rubric's 2–3 shows that the labelled rules are more specific than any one excerpt.
- Other evidence exists. Several core-rubric positives came from unlabelled threads stating the same rule. Examples are a
maintainer comment against
from_legacy_cacheround-trips and #33226, which removed Python casts for tracing. The labelled thread is one valid source, not the only one.
Every strategy reaches the governing rule in at most 1–4 of 30 cases. Wording the query from the patch does not close the gap. That needs a source anchored on the code rather than on words.
Training feasibility (Stage 5)
No model was trained. The question is whether project history yields reliable supervision for a future reviewer.
- Yield. The held-out miner swept about 48,000 transformers review comments plus the trl and diffusers windows. Of 1,447 comments with historical phrasing or a cross-reference, about 570 were read, giving 36 usable violation sequences: objection, earlier evidence, then a commit addressing it. That is about 6% of comments read. The development miner found 30 more in 192 API requests by targeting known rule kinds. Evidence strength across both sets: 28 strong, 55 medium, 21 weak.
- Quality. Most maintainers do not cite a PR, so in most development cases the miner had to choose the governing thread itself. Some objections cite evidence still open at the time (10 held-out, 3 development), or the reviewer's own PR. Some were retracted. 8 of 32 held-out checks could not be validated on the mined hunks. "No objection" controls are weak, because silence does not prove reviewers checked the rule. Every label is single-pass and unreviewed.
- Leakage and duplication. Rule kinds recur, such as cache campaigns and import structure, so a split must hold out whole rule kinds, not just PRs. About ten held-out controls are the PRs that violation cases cite, and each pair has to share a split.
- Licensing. The code is Apache-2.0. Review comments are user content under GitHub's terms. A dataset should ship references (repository, PR, comment IDs and timestamps) and rebuild the text locally, as Phase 1 did with its captures, rather than redistribute comment bodies.
- Which objective. The measured bottleneck is retrieval, so the most useful supervision is (diff, governing rule thread or comment) pairs for a retriever or reranker. Each mined sequence gives one positive, and the many incidental threads mentioning the same identifiers give hard negatives. Violation detection and corrective feedback are not the binding constraint on the production model: with the right evidence it already reached 0.79 precision. Calibrated abstention data comes from the controls but is too noisy today.
Verdict: feasible for a retrieval model, not yet for a reviewer model. About 65 violation positives exist. A useful reranker would need roughly an order of magnitude more, which targeted mining by rule kind makes reachable. Human review of the labels must come first.
Answers to the Phase 2 questions
- Does historical review outperform generic review? It depends on the model and on retrieval. On Devstral, no. On DeepSeek development tasks, yes when generation lacked history: 28 vs 18 of 34, p = 0.002. On held-out real PRs with deployable retrieval it fixes no more than generic review, 1–2 vs 4. But it disturbs far fewer correct PRs: 0–3 of 23 vs 12 of 27.
- Does it correct errors that survive raw Relore-assisted generation? Rarely. Only 4 of 34 survived on DeepSeek, and one (peft-conversion) was fixed with temporal or expanded retrieval.
- Unacceptable regressions or false constraints? Not on DeepSeek: no development regressions and a 5% false-positive rate on graded patches. On Devstral the reviewer objected to 42% of correct patches, made harmless only because the coder rejected nearly everything. Generic review on DeepSeek is the risky arm: an agreeable coder applies its findings.
- Is diff-driven retrieval better than task-driven? On the curated development corpus, slightly: 29–30 vs 27 of 34. On real PRs, no: 2 vs 7 of 43 held-out, and 0–1 of 30 on the new development set.
- Does temporal follow-up help? Within the curated corpus, it recovered the superseding PEFT decision in both retrieval and review. Too few cases to generalize.
- Generation, review or both? On DeepSeek, history at generation (30/34) and history only at review (28/34) are not distinguishable (p = 0.69), and both together add little. Review-time history is the safer integration point, because it leaves generation unchanged and abstains cheaply. It still depends on retrieval.
- Does it generalize beyond packaging? The reviewer's judgment does: 19 of 36 at 0.79 precision on broad held-out categories with the right evidence. Retrieval does not.
- Dominant failure modes? First, retrieval query construction: every missed held-out decision was indexed and title-findable. Second, the coder not turning a correct finding into the right edit: 5–6 of 24 even with oracle evidence. Third, an agreeable coder applying generic findings. Fourth, reasoning runaway in 7% of revision calls at production settings.
- Is there enough reliable training supervision? For a retriever, nearly: the data shape is clear and mining scales. For a reviewer, not yet.
- Which specialized model would add most value? A retriever or reranker that maps a diff to the project rule it touches. A better reviewer would not.
Recommendation for Phase 3
- Keep review-time history as an optional, abstaining check, not a gate. On a capable model it is precise and safe.
- Make retrieval code-anchored instead of word-anchored. Use the PRs that introduced or last changed the helpers, registries
and mappings a patch touches (Relore's
whyand line history), deprecation call sites, and the threads that made a construct the convention. Evaluate on the development set first, then once on held-out. - Try a small, human-curated convention index for the few dozen recurring rule kinds found here. Compare it against learned retrieval before investing in training.
- Get the 104 provisional labels reviewed, then grow positives by mining per rule kind, toward a retriever-training set that holds out whole rule kinds.
- Do not train a reviewer model yet.
Scope
The 34-task development set comes from a single project and a curated corpus. Held-out and second development sets have provisional,
unreviewed labels and were judged partly by a model. The same model played both roles (Devstral locally, then DeepSeek-V4.1-Flash). There was
one revision opportunity and one run per configuration. Total DeepSeek inference cost was $9.95, billed to the Hugging Face organization. Phase 1 single-edit tasks are small requirement fragments and expressions, not
full agent sessions. All counts on this page are exploratory and come from tasks that also informed
earlier designs. Harness: benchmarks/review/ on Relore branch
exp/historical-review, built on the Phase 1.5 source 438aa9d.