Repository navigation
Description
Split from #3916.
Problem: The issue asks for a review eval run before and after on the same cases, and for the scores in the pull request comment. The gold set is not in this repository. The run also needs model calls and is not an offline test. Why deferred: The manual lookup change can use recorded Qdrant data and needs no gold set. Acceptance criteria: - The gold set is available. - The same cases run before and after the change. - The pull request comment gives both scores. - The run records the commit, the model and the case set.
Proposed design
Problem statement
The manual index lookup change in #3916 needs a review eval run before and after on the same cases. The pull request comment must give both scores. The gold set is not in this repository, and the run needs model calls, so the live eval cannot be an offline test. This change adds the offline comparison logic. It rejects mismatched case sets, renders both scores in a pull request comment, and records the commit, model and case set. A person runs the live eval separately.
Acceptance criteria
Requirement: Case-set mismatch rejected
The comparison function SHALL reject two review score records whose case-set identifiers differ.
Scenario: Different case sets
- WHEN the comparison function receives a before record and an after record with different
case_set_idvalues - THEN it raises a
ValueErrorthat names both identifiers and returns no score pair
Requirement: Both scores rendered
The comment renderer SHALL include the score before the change, the score after the change, and their difference.
Scenario: Two records with the same case set
- WHEN the renderer receives two records with the same
case_set_id, a before score of 0.5 and an after score of 0.7 - THEN the rendered text contains
before: 0.5,after: 0.7anddifference: +0.2
Requirement: Run record fields
Each eval run record MUST hold the commit hash, the model name and the case-set identifier.
Scenario: Run record written
- WHEN a run record is created from a commit hash, a model name and a case-set identifier
- THEN the record has non-empty
commit,modelandcase_set_idfields
Requirement: Missing case-set identifier
The comparison function SHALL stop with an error when a record has no case-set identifier.
Scenario: Missing identifier
- WHEN a record has an empty
case_set_id - THEN the function raises a
ValueErrorthat names the missing field
Existing Tool Considered
No alternatives check has run. The project already has devops review score to score saved review sessions and devops ai runs compare to compare two arms. The change adds a small comparison function and comment renderer on top of their JSON records. It builds no new eval harness. Building a separate harness would cost about 20k tokens and one working day.
Key questions
- How does the comparison enforce the same case set before and after the change?: Each record carries a
case_set_idthat is the content hash of the label file and recall set. The comparison function rejects records whose identifiers differ. (best practice) [sources: src/devops_cli/review/score.py, tests/fixtures/review_labels/labels.json]- Chosen: Record a case-set identifier in each run. It detects a mismatch with no person in the loop.
- Rejected: Trust the operator to use the same cases. Nothing detects an operator error.
- How does the change render both scores in the pull request comment?: A pure function renders a Markdown table with the before score, the after score and the difference from two score records. (best practice) [sources: src/devops_cli/review/score.py, docs/commands/review.md]
- Chosen: Add a small renderer for two review score records. It reuses the existing score JSON and keeps the comment format stable.
- Rejected: Reuse the
devops ai runs compareoutput. That output compares arms, not review score records, so it lacks the review score fields.
- What fields does a run record hold?: A JSON object with
commit,modelandcase_set_id. (best practice) [sources: docs/SELF_IMPROVEMENT.md]- Chosen: Commit, model and case-set identifier. These three fields let a reader reproduce the run and compare the case sets.
- Rejected: Add the full prompt and tool versions. The issue asks for the commit, the model and the case set only.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
devops-cli-service commentedon Nov 8, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
testprefix of the title gives the type.(ai)scope of the title gives the scope.The work is deferred and blocked until the gold set is available.The comparison gives evidence that a review prompt change does not regress the scores.The work needs a gold set, model calls and two runs on the same cases.Both items score review prompts with model calls, but #413 builds the model-in-the-loop benchmark tool and this candidate defers one before-and-after run that needs a gold set.devops-cli-service commentedon Nov 9, 2026
Refine cannot set this item to Ready at 6121d09 until a person answers the questions below. Reply in a comment or edit the body, and the next refine round looks at the item again.
devops-cli-service commentedon Nov 23, 2026
Next step: the alternatives check records a verdict. See the section Proposed design of the body.