Skip to content

feat(roadmap): the Jev completeness check sees a removed hunk #4317

Not planned

Description

@dan-petty

Problem or Motivation

The Jev completeness check of #4308 does not see a missing implementation. On the labelled set of #4308, a complete diff and the same diff with the implementing hunk removed get the same probability from Jev: in 10 of 11 pairs the probability of the removed criterion moves by 0.02 or less (one pair moved by 0.15 the wrong way). The recall of incomplete drafts is 43% and the false holds are 28%, so roadmap.stage.jev_completeness stays off. Cases of the stage golden set that drop a criterion show the same weak signal: 5 of 10 are held.

Jev seems to judge whether a criterion sounds delivered by the tests and the text in the diff, not whether the code is there.

Proposed Solution

Try, with the set of #4308 and devops roadmap eval completeness, one change at a time: (1) send the files that a criterion names or that the diff changes in src/ apart from the tests, one Noul question for each file and criterion; (2) a diff with the added lines only; (3) Noul criteria (true and false descriptions) that say what the missing implementation looks like. Keep the thresholds fixed while a design is tried, and report the paired probability change as well as the two rates. Also decide the wiring of the check in the implement job (implement_run.py), which marks its own draft ready in a runner Job. A hold there stops the item, so the wiring needs its own decision.

Existing Tool Considered

src/devops_cli/ai/jev.py and src/devops_cli/roadmap/jev_completeness.py are the client and the check. No second client is built. Cost: about 10K tokens for each design tried and 0.01 USD for each run of the set.

Acceptance Criteria

  • devops roadmap eval completeness gives a recall of incomplete drafts above 70% with false holds at or below 10% on a set of at least 30 cases, for one design.
  • Or the pull request states, with the numbers, that no design met the bar, and closes the Jev completeness check idea.
  • The wiring in the implement job is decided and recorded.

Related

#4308, #2867, #4282.

Dependencies

Alternatives check of 2026-11-25: in-use.
The repository already uses this tool.
Tool: pydantic/pydantic-ai (https://github.com/pydantic/pydantic-ai), MIT, last activity 2026-11-25, maintained.
Reason: Searches found only generic LLM-eval frameworks (promptfoo, DeepEval); none judges whether a diff implements a criterion. The check's existing pydantic-ai DecisionModel covers the structured closed-question part, while the diff designs and paired report stay project-specific.

Covers:

  • Typed structured outputs for closed model questions
  • Model-agnostic client that sends each question
  • Validation and retries on malformed model answers

Lacks:

  • No diff parsing or added-lines-only reduction
  • No per-file, per-criterion question builder
  • No paired recall and false-hold report

Proposed design

Problem statement

The Jev completeness check does not see a missing implementation. A complete diff and the same diff with the implementing hunk removed get nearly the same probability in 10 of 11 pairs. Recall of incomplete drafts is 43% and false holds are 28%, so the setting stays off. The check sends the whole diff as state. Rebuild the state as per-criterion hunk digests of added lines, bound it by the #5209 budget and a 10 second timeout, and measure the design on the labelled set of #4308.

Acceptance criteria

Requirement: Per-criterion hunk state

The request builder SHALL give each criterion one Noul question and one hunks entry with the hunks of the files that it names.

Scenario: Two criteria and a test file

  • WHEN build_request runs with two criteria that name two source files of a diff, and the diff also changes a file under tests/
  • THEN Each entry holds the hunks of its named file, and no entry holds a test-file hunk.

Requirement: Fallback hunks for an unnamed file

The request builder MUST give a criterion with no named file the hunks of every source file that fits the size budget.

Scenario: A criterion names no file

  • WHEN build_request runs with a criterion that names no file and a diff that changes two source files and one test file
  • THEN The criterion entry holds the hunks of the two source files and no hunk of the test file.

Requirement: Added lines only

The hunk digest SHALL hold the added lines of each hunk and SHALL drop the removed and the context lines.

Scenario: A hunk with removed and context lines

  • WHEN the hunk digest runs on a hunk that holds added, removed and context lines
  • THEN The digest holds the added lines only, and the removed and context lines are absent.

Requirement: State under the size budget

The check SHALL skip with a logged reason when the state of the request is larger than the size budget of #5209.

Scenario: State over the budget

  • WHEN assess runs on a diff whose per-criterion state is larger than the size budget
  • THEN assess returns skipped with a reason that names the budget, and sends no model request.

Requirement: Request timeout

The check SHALL send each Jev request with a timeout of 10 seconds.

Scenario: Timeout of the call

  • WHEN assess runs with a fake decide_with_jev that records the timeout of its call
  • THEN The recorded timeout is 10 seconds.

Requirement: Paired report

The eval SHALL report the paired probability change of each pair, the recall of incomplete drafts and the false-hold rate, with fixed thresholds.

Scenario: One design on a small labelled set

  • WHEN the eval runs the hunk-digest design on a labelled set with a fake decision model and fixed thresholds
  • THEN The report holds the paired change of each pair, the recall and the false-hold rate.

Requirement: Bar verdict

The verdict SHALL mark the bar met only with 30 cases, recall above 70% and false holds at or below 10%.

Scenario: Recall below the bar

  • WHEN the verdict gets 30 cases, a recall of 65% and false holds of 5%
  • THEN The verdict is not met and names the recall as the reason.

Requirement: Wiring record

The change SHALL record the advice-only use of the check in the implement job in docs/ROADMAP_WORKFLOW.md.

Scenario: The record passes the docs check

  • WHEN the change runs uv run devops ci --check --only docs
  • THEN The docs check passes.

Existing Tool Considered

pydantic-ai (https://github.com/pydantic/pydantic-ai), verdict in-use in the alternatives check of 2026-11-25 in the issue body. The alternatives check in the issue body lists what the tool covers and lacks. The project builds the hunk digest, added-lines reduction, size cap, 10 second timeout and paired report in src/devops_cli/roadmap/jev_completeness.py and src/devops_cli/roadmap/jev_completeness_eval.py. The issue body gives the cost as about 10K tokens for each design tried and 0.01 USD for each run of the set.

Key questions

  • Where does the check build its state and its questions?: build_request at src/devops_cli/roadmap/jev_completeness.py:103 builds the state and the questions. assess at line 143 sends them. The change replaces the diff state entry with one hunks entry for each criterion. [sources: src/devops_cli/roadmap/jev_completeness.py:103, src/devops_cli/roadmap/jev_completeness.py:143]
  • Which request design replaces the whole diff?: Give each criterion one Noul question and one hunks entry with the added lines of the hunks of the files that its text names. Leave test files out. When a criterion names no file, give it the hunks of every source file that fits the size budget. (best practice) [sources: src/devops_cli/roadmap/jev_completeness.py:103]
    • Chosen: Per-criterion hunk digest. ADR 0019 asks for short questions about evidence that tools extract. Unrelated state lowers model accuracy.
    • Rejected: Whole diff with added lines only. The weak signal came from the whole diff. The whole diff also breaks the size budget of fix(ai): set the Jev context window from the model data #5209.
    • Rejected: One Noul question for each file and criterion. It sends the same hunks to a question for each file, so the state grows with detail that the criterion does not name.
    • Rejected: Noul true and false descriptions for each criterion. It changes the question text and not the state. Keep it as a later design when the bar is not met.
  • How does the check bound the size and the time of a request?: Cap the state and the questions at the size budget of fix(ai): set the Jev context window from the model data #5209 and skip the check with a logged reason over it. Send each request with a timeout of 10 seconds. (best practice) [sources: src/devops_cli/ai/jev.py, src/devops_cli/roadmap/jev_completeness.py:143]
    • Chosen: Size budget of fix(ai): set the Jev context window from the model data #5209 and a 10 second timeout. max_diff_tokens already gives the budget. A hung call would hold a runner slot for the 3600 second default.
    • Rejected: Token cap on the diff only. It measures the diff and not the state, so the questions can pass the budget.
    • Rejected: No timeout. A hung call holds the runner for 3600 seconds.
  • How does the change measure the design against the bar?: Run devops roadmap eval completeness on the labelled set of feat(roadmap): a Jev completeness check for draft pull requests #4308 with fixed thresholds. Report the paired probability change, the recall of incomplete drafts and the false-hold rate. The verdict requires at least 30 cases, recall above 70% and false holds at or below 10%. (best practice) [sources: src/devops_cli/roadmap/jev_completeness_eval.py, docs/ROADMAP_WORKFLOW.md]
    • Chosen: One design on the set with fixed thresholds. It isolates the effect of the design. A threshold change cannot hide a weak signal.
    • Rejected: All designs at once. A gain cannot be traced to one design.
    • Rejected: Tune the thresholds for the design. It fits the thresholds to a small set and gives no honest comparison.
  • Does the labelled set of feat(roadmap): a Jev completeness check for draft pull requests #4308 hold at least 30 cases?: Yes. The fixture folder tests/fixtures/roadmap_eval/completeness holds 47 case folders: 26 complete drafts and 21 incomplete drafts. The eval counts the cases at run time. [sources: src/devops_cli/roadmap/jev_completeness_eval.py]
  • How does the implement job use the check?: As advice only. The job posts the note of completeness_note and never holds the draft or stops the item. The setting roadmap.stage.jev_completeness stays off until a design meets the bar. Record the decision in docs/ROADMAP_WORKFLOW.md. (best practice) [sources: src/devops_cli/roadmap/jev_completeness.py:207, src/devops_cli/roadmap/watch_row.py, CONTEXT.md]
    • Chosen: Advice only: post a note, never hold. A false hold stops the item and needs implement: retry. The false-hold rate is 28%.
    • Rejected: Hold the draft on a doubt. It stops 28% of the correct items.
    • Rejected: Do not wire the check in the implement job. The note costs little and gives a person the doubts.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

#6521

Activity

  1. added
    source/agent
    type/feature
    scope/roadmap
    status/new
    value/medium
    effort/medium
    on Nov 10, 2026
  2. dan-petty commented on Nov 10, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/feature. The feat prefix of the title gives the type.
    • Scope: scope/roadmap. The (roadmap) scope of the title gives the scope.
    • Priority: P2-Medium. The check is currently off and not blocking, but enabling it improves draft quality gates.
    • Value: Medium. It would allow the project to turn on a completeness gate that currently cannot meet its bar.
    • Effort: Medium. It requires trying multiple designs, running paired evaluations, and deciding the implement-job wiring.
    • Related: feat(roadmap): a Jev completeness check for draft pull requests #4308, which asks for a different change. Both work on the Jev completeness check; #4308 creates it, the candidate fixes its weak signal for removed hunks.
  3. added
    priority/p2-medium
    on Nov 10, 2026
  4. added
    status/ready
    and removed
    status/new
    on Nov 10, 2026
  5. devops-cli-service commented on Nov 10, 2026

    @devops-cli-service
    Contributor

    Status set to Ready at 699026e (see proposed design in issue body).

  6. devops-cli-service commented on Nov 11, 2026

    @devops-cli-service
    Contributor

    Alternatives check: none

    Reason: Searches for a tool that judges whether a diff implements each acceptance criterion (PR requirement/ticket-compliance reviewers, changed-line coverage, mutation testing, LLM patch judges) returned no relevant open, maintained project, only unrelated pages. The need is an in-repo change to the existing Jev client and check: three prompt/diff-input designs tried on a labelled set with a paired-probability report and a fixed bar, which no external tool provides.

    Tool: none found

    Lacks:

    • A check that scores each acceptance criterion against a diff and detects a removed implementing hunk
    • A paired evaluation report of complete/incomplete diffs with recall and false-hold rates at fixed thresholds
    • Wiring of the check into the project's implement job and its runner Job

    Searches run:

    • Qodo Merge PR-Agent ticket compliance check requirements implementation, results: 5
    • open source tool checks pull request diff against acceptance criteria completeness, results: 5
    • LLM judge whether a code diff implements an acceptance criterion, results: 5
    • Qodo Merge, results: 5
    • PR-Agent github qodo-ai, results: 5
    • CodeRabbit pull request review tool, results: 5
    • diff-cover coverage of changed lines tool, results: 5
    • mutation testing pull request changed lines detect missing implementation, results: 5
    • open source LLM judge code patch completeness benchmark harness, results: 5
    • verify that a pull request implements the linked issue requirements tool, results: 5

    Checked on 2026-11-11. A person decides what this means for the item. The check changes no label and closes no issue.

  7. dan-petty commented on Nov 12, 2026

    @dan-petty
    OwnerAuthor

    Scope note from the decision-model docs review of 2026-11-12. The owner approved it on 2026-11-12.

    The documents say:

    Now: the state is the whole diff and a criteria map (src/devops_cli/roadmap/jev_completeness.py:104-130,144-176). The check skips the diff only above 65,536 tokens (CONST_ROADMAP_JEV_MAX_DIFF_TOKENS, from the 262,144 hard window). No timeout is set, so the 3600 s default of the project HTTP client applies. ADR 0019 already lists a long text as state as not suited. This is consistent with the no-go result (43% recall, 28% false holds).

    Change to this item:

    1. Rebuild the check on a hunk digest for each criterion, not on a whole diff. Ask one Noul for each criterion. Give the hunks that bear on that criterion as a named state field.
    2. Keep the state and the questions under the byte budget of fix(ai): set the Jev context window from the model data #5209 (about 32,000 bytes). Do this item after fix(ai): set the Jev context window from the model data #5209.
    3. Set a short timeout (about 10 s).
  8. devops-cli-service commented on Nov 18, 2026

    @devops-cli-service
    Contributor

    The result in the alternatives block of the issue body changed. Before this check: none, no tool. A person decides what the new result means for the item.

    Searches (8)

    Tools considered:

    Searches run:

    • PR-Agent Qodo Merge compliance checklist open source license, results: 5
    • open source tool checks pull request implements issue acceptance criteria AI review, results: 5
    • qodo-ai pr-agent github repository PR compliance checklist, results: 5
    • LLM detect missing code change in diff completeness checker tool, results: 5
    • diff-cover changed lines coverage pypi, results: 5
    • pr-agent, results: 5
    • verify acceptance criteria implemented in code change tool open source spec traceability, results: 5
    • open source LLM PR review flags code missing from description possible issues tool github, results: 5

    Sources:

  9. dan-petty commented on Nov 20, 2026

    @dan-petty
    OwnerAuthor

    Frozen on 2026-11-20. The stage, implement and fix-checks jobs grade under 60%, so the owner rule asks for a re-architecture before more fixes inside the current design (tracker #6519). This item is incremental work on those jobs, so its Dependencies section now names #6521 first. Stage and implement leave this item while #6521 is open. When the experiments of #6519 decide, a person closes #6521 (this item can then continue) or closes this item as not planned.

  10. devops-cli-service commented on Nov 25, 2026

    @devops-cli-service
    Contributor

    The result in the alternatives block of the issue body changed. Before this check: partly, tool https://github.com/The-PR-Agent/pr-agent. A person decides what the new result means for the item.

    Searches (10)

    Tools considered:

    Searches run:

    • open source LLM eval framework paired comparison thresholds CI promptfoo deepeval, results: 5
    • open source tool LLM judge verify code diff implements requirement completeness, results: 5
    • promptfoo GitHub LLM evaluation, results: 5
    • deepeval GitHub LLM evaluation framework, results: 5
    • pydantic-ai github repository, results: 5
    • promptfoo, results: 5
    • promptfoo promptfoo github repository license, results: 5
    • detect incomplete code patch missing implementation LLM judge benchmark, results: 5
    • "patch" "completeness" LLM judge tool github requirement implementation diff, results: 5
    • LLM-as-judge for code review requirement coverage open source tool, results: 5

    Sources:

  11. added
    status/new
    and removed
    status/ready
    on Nov 26, 2026
  12. devops-cli-service commented on Nov 26, 2026

    @devops-cli-service
    Contributor

    Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies and Watched files in the section Proposed design of the body.

  13. devops-cli-service commented on Nov 27, 2026

    @devops-cli-service
    Contributor

    Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies in the section Proposed design of the body.

  14. dan-petty commented on Nov 30, 2026

    @dan-petty
    OwnerAuthor

    Triage under #6519 (owner instruction of 2026-11-30), before the hold #6521 closes. This item adds or extends a gate, refusal, screen, cap, limit, retry, result line, shell allowlist, tool catalog or plan-shape rule of the stage, implement or fix-checks job. #6519 found that 263 of about 900 issues in four weeks added such rules and none replaced the engine. Stage now runs on stock Coder (grade 60 on 30 graded attempts), where the agent reads the repository, runs the checks in its loop and has a real shell; implement follows (#6527). The code paths that this item names have also moved. If the failure class still shows in graded attempts, file a new item from that evidence. Closed as not planned; a person may reopen it.

  15. removed
    status/new
    on Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/mediumpriority/p2-mediumscope/roadmapsource/agenttype/featurevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions