Skip to content

fix(roadmap): type the stop of a foreign repair change #4390

Description

@dan-petty

Problem

A repair turn of the implement step can change a file that the step did not change. The step then stops with the text "The extra turn for the static check changed files that the step had not changed: ." The stop site _extra_turn in src/devops_cli/roadmap/implement/implement_step.py builds _Failure(foreign) with no class. The classifier then reads the text and the check name. The class depends on the words in the path list, not on the cause.

Evidence (comments of the implement job, 2026-11-05 and 2026-11-07):

Four stops in two repos for one cause have two different classes.

Proposal

Pass a class from the stop site: _Failure(foreign, klass=FailureClass.OUTSIDE_PLAN). The cause is the same as the cause of outside_plan: the step changed a path that the plan does not name. The default action of the class is wait, which is right: a retry gives the same stop.

No model is needed. This is a one-line change at the stop site, and a test that holds the class.

Feasibility

Checked on 2026-11-10 against the stop comments of the four repos of the Service since 2026-10-11 (271 comments) and the counter devops_cli_service_implement_failures_total (Prometheus). After the typed classes of #3534 and the earlier changes, this stop is the only pattern that still falls to the default ci_infra by the regex rules. It occurs about 2 times each week.

Related

Pilot 2 of the Jev decision steps (the failure-class tail) found no go: with 4 untyped stops in 8 days, a classifier has too few cases to fit. A typed class fixes these cases by rule, which beats a model call.

Proposed design

Problem statement

A repair turn of the implement step can change a file that the step did not change. The stop at _extra_turn builds _Failure(foreign) with no class, so the classifier reads the path text and the check name. The same cause can become lint or ci_infra, and a retry repeats the stop. The fix passes FailureClass.OUTSIDE_PLAN at the stop site.

Acceptance criteria

Requirement: Typed foreign-change stop

The foreign-change stop of an extra repair turn SHALL carry FailureClass.OUTSIDE_PLAN.

Scenario: Foreign path after an extra turn

  • WHEN an extra repair turn changes a path outside ask.may_change and outside the change tasks.md
  • THEN the _Failure returned by _extra_turn has klass set to FailureClass.OUTSIDE_PLAN.

Requirement: Class independent of path text

The class of the foreign-change stop MUST NOT depend on the path text or the failed check name.

Scenario: Path text holds classifier words

  • WHEN the foreign path list holds a word such as pre-commit or ci
  • THEN the stop class remains FailureClass.OUTSIDE_PLAN.

Requirement: Wait action for foreign-change stop

The foreign-change stop SHALL use the wait action of OUTSIDE_PLAN.

Scenario: Action of the typed stop

  • WHEN the stop carries FailureClass.OUTSIDE_PLAN
  • THEN ACTION_BY_CLASS[FailureClass.OUTSIDE_PLAN] is FailureAction.WAIT.

Requirement: Repair-turn test

The repair-turn test SHALL assert the class of the foreign-change stop.

Scenario: Test of a foreign change

  • WHEN the test simulates an extra turn that changes a file outside ask.may_change
  • THEN the test asserts FailureClass.OUTSIDE_PLAN.

Existing Tool Considered

No alternatives check has run. No open, maintained tool or library covers this need: the change types an existing internal stop in src/devops_cli/roadmap/implement/implement_step.py. The written cost is one line and one test; the project builds no new code to keep. The elapsed time is under one hour.

Key questions

  • Which failure class should the foreign-change stop carry?: FailureClass.OUTSIDE_PLAN. (best practice) [sources: src/devops_cli/roadmap/implement/implement_step.py:1713, docs/ROADMAP_WORKFLOW.md:176, src/devops_cli/roadmap/failure.py]
    • Chosen: OUTSIDE_PLAN. The extra turn changed a path that the plan does not name, the same cause as outside_plan.
    • Rejected: CI_INFRA. This is the default for an untyped stop. A retry runs the same turn and gives the same stop.
    • Rejected: LINT. The check name pre-commit misleads the classifier. The cause is not a lint defect.
    • Rejected: PLAN_DEFECT. The plan does not cause the foreign path. The extra turn changed it.
  • Where should the stop site get the class?: Pass it at the _extra_turn stop site. (best practice) [sources: src/devops_cli/roadmap/implement/implement_step.py:1713, docs/ROADMAP_WORKFLOW.md:176]
    • Chosen: Pass at stop site. The stop site knows the cause. The project records that a stop site that knows its cause passes the class itself.
    • Rejected: Extend the text classifier. The classifier depends on path words and check names, which gave two classes for one cause.
    • Rejected: Call a model classifier. Four stops in eight days are too few cases, and a rule fixes the stop.
  • Should the foreign-change stop get a repair turn?: No. The stop carries no repair_paths, so _extra_ask gives no turn. (best practice) [sources: src/devops_cli/roadmap/implement/implement_step.py, docs/ROADMAP_WORKFLOW.md:176]
    • Chosen: No repair turn. The step changed a path outside the plan. Another turn on the same paths gives the same stop.
    • Rejected: One repair turn. A repair turn is bounded to the paths of the failed check. The foreign path is outside that set.
  • Where does the test belong?: tests/roadmap/implement/test_roadmap_implement_step_repair.py. [sources: tests/roadmap/implement/test_roadmap_implement_step_repair.py, src/devops_cli/roadmap/implement/implement_step.py:1713]

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Alternatives check of 2026-11-11: none.
Tool: none found.

Activity

  1. added
    source/agent
    type/bug
    scope/roadmap
    status/new
    value/medium
    effort/low
    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/bug. The fix prefix of the title gives the type.
    • Scope: scope/roadmap. The (roadmap) scope of the title gives the scope.
    • Priority: P2-Medium. It misclassifies about two stops per week and triggers a wrong retry action, but it is a narrow single-site gap.
    • Value: Medium. Correct classification prevents a pointless retry and gives the operator the right action.
    • Effort: Low. The candidate states it is a one-line change at the stop site plus a test.
    • Related: fix(roadmap): a stop carries a typed class and the failed check #3476, which asks for a different change. Both use the typed failure-class mechanism; #3476 built the general system, this candidate types one remaining stop site it missed.
  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 013c1f4 (see proposed design in issue body).

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

    @devops-cli-service
    Contributor

    Alternatives check: none

    Reason: The searches for an open, maintained library or tool that classifies a CI/build failure cause from error text and picks a retry action returned nothing applicable to this need. The issue asks for a one-line change at the internal stop site _extra_turn to pass FailureClass.OUTSIDE_PLAN, plus a test, so it touches only the project's own src/devops_cli/roadmap/implement/implement_step.py failure-class code and no external tool covers it.

    Tool: none found

    Lacks:

    • No external tool or library types this internal foreign-change stop; the class is passed in project code at _extra_turn
    • The stop-site fix and its repair-turn test are specific to the project's _Failure / FailureClass types
    • An off-the-shelf classifier would not help: the issue's own feasibility check found too few cases (about 2 stops a week) to fit one, and a rule fixes the class

    Searches run:

    • open source tool classify build failure root cause retry action, results: 5
    • python library classify CI failure cause from error text taxonomy, results: 5
    • pytest failure classification library flaky test infrastructure lint categories, 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. added
    status/in-progress
    status/in-review
    and removed
    status/ready
    status/in-progress
    on Nov 14, 2026
  8. removed
    status/in-review
    on Nov 14, 2026
  9. added a commit that references this issue on Nov 14, 2026
  10. devops-cli-service commented on Nov 14, 2026

    @devops-cli-service
    Contributor
  11. devops-cli-service commented on Nov 14, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-14 15:02 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/p2-mediumscope/roadmapsource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions