Skip to content

refactor(ai): remove the Jev helpers that nothing calls #5276

Closed

Description

@dan-petty

Problem or Motivation

Six functions in src/devops_cli/ai/jev.py have no caller in src (git grep -w on origin/main 5645b63). Only the tests call them:

Function Line Planned caller
route_with_jev 231 #4284 (stage.tier_route, status/ready) plans to call it and to add extra_questions.
select_skill_with_jev 297 None found.
gate_tool_call_with_jev 371 None. #5206 rejects it: "guessed thresholds, and no code calls it".
judge_with_jev 436 None found.
create_jev_judge_evaluators 504 None found.
filter_rag_passages_with_jev 543 None found.

"None found" means that a search of open issues on 2026-11-12 found no issue that names the function.

  • Their thresholds are guesses (route 0.75, boolean 0.50, high risk 0.90). ADR 0019 rule 4 says that cuts are fitted and stored as data.
  • ADR 0020 says that a new decision goes through a DecisionPoint on the registry, with a mode, a record and fitted cuts. These helpers have none of them.

Proposed Solution & Architectural Design

  1. Remove select_skill_with_jev, gate_tool_call_with_jev, judge_with_jev, create_jev_judge_evaluators and filter_rag_passages_with_jev, their constants when no other code uses them, and their tests.
  2. Keep route_with_jev while feat(roadmap): log a Jev tier choice beside each stage run #4284 is open. feat(roadmap): log a Jev tier choice beside each stage run #4284 then calls it, or moves its questions into the point stage.tier_route and removes it.
  3. Fix each document that names a removed function: ADR 0019 (the table row 5) and ADR 0020 (Context), and the knowledge base if it names one.

The auto mode (build_auto_tool_model) also has no configured user. It is not in this item.

Files: src/devops_cli/ai/jev.py, src/devops_cli/config/constants.py, tests/ai/test_jev.py, tests/ai/test_jev_one_model_many_requests.py, ADR 0019, ADR 0020.

Target Subsystem

AI & Agentic Review Pipeline (src/devops_cli/ai/jev.py).

Existing Tool Considered

Not applicable: this item removes code. Cost: about 0.2M tokens and 1 hour.

Acceptance Criteria

  1. git grep -w for each removed name finds no match in src, tests or docs, except CHANGELOG.md.
  2. uv run pytest tests/ai/test_jev.py tests/ai/test_jev_one_model_many_requests.py passes.
  3. decide_with_jev and route_with_jev keep their tests.

Dependencies

None.

Related

Source: https://github.com/dan-petty/devops-cli/blob/main/docs/adr/0020-a-decision-point-is-a-unit-of-a-workflow-with-a-resolver-chain-and-a-rule-goes-before-a-decision-model.md

Activity

  1. added
    source/agent
    type/refactor
    scope/ai
    status/new
    value/low
    effort/low
    on Nov 12, 2026
  2. dan-petty commented on Nov 12, 2026

    @dan-petty
    OwnerAuthor
  3. added
    priority/p3-low
    on Nov 12, 2026
  4. dan-petty commented on Nov 12, 2026

    @dan-petty
    OwnerAuthor

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

    The documents say:

    Add to this item:

    1. Delete the inert global bars that create_jev_model writes into the model settings (decision_route_threshold 0.75 and decision_boolean_threshold 0.50). SystemOneModel.decide() does not read them, so they do nothing on the direct paths. On an Agent path (refactor(ai): ask Jev through Agent output types #5282), they become a guessed global bar. The one live use of the 0.50 cut, in ask-jev, moves to the 0.3/0.7 band in fix(ai): ask-jev refuses no context and reports unsure #5284.
    2. Delete CONST_AI_JEV_HIGH_RISK_THRESHOLD (0.90). Only route_with_jev and gate_tool_call_with_jev read it. Delete it with the last of these two helpers (route_with_jev stays while feat(roadmap): log a Jev tier choice beside each stage run #4284 is open).
    3. Delete auto mode (build_auto_tool_model, the model value auto or auto:<model>), or set fallback_on=DecisionHandOff. Today it uses FallbackModel(fallback_on=(DecisionHandOff, ModelAPIError, UserError)), so a Jev outage goes to the language model with no signal. Nothing in the configuration or the documents sets auto mode (src/devops_cli/ai/pydantic_ai_bridge.py:258-274,324-363).

    Also a fact for step 1 of the body: create_jev_judge_evaluators cannot work as written. It wraps the pydantic_evals LLMJudge, whose GradingOutput has a reason: str field and an unbounded score: float. A decision model cannot fill a str field.

  5. added
    status/in-review
    and removed
    status/new
    on Nov 15, 2026
  6. removed
    status/in-review
    on Nov 15, 2026
  7. devops-cli-service commented on Nov 15, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-15 15:09 UTC

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/lowpriority/p3-lowscope/aisource/agenttype/refactorvalue/low

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions