Skip to content

fix(roadmap): fix-plan ends at the Job deadline with no result line #5363

Description

@dan-petty

Problem

devops roadmap step fix-plan has no time budget of its own and writes no line until it ends. When the Job deadline comes first, Kubernetes stops the pod, and the attempt leaves nothing: no result line, no comment on the plan pull request, no count of model calls and no reason.

Seen on 2026-11-13: a fix-plan Job on plan pull request #5350 (item #5118) ran from 03:47Z to its activeDeadlineSeconds of 5400. Loki has no line of its fix-plan container in that time, and the job controller stopped the pod with DeadlineExceeded. The earlier fix-plan Job on #4917 wrote its 3 lines only at the end, after 1 h 20 min (7 plan calls, about 19.8M tokens). Thus a run that needs a little more time than the Job allows ends with no diagnostic, and its tokens are lost.

git grep on origin/main finds no time limit in the fix-plan step. The rule of nested timeouts (an inner limit fires before the outer one, with a margin, and exits with a diagnostic) is not met.

Proposed fix

  • Give the fix-plan step a time budget from a setting (seconds), with a default below the Job deadline that the Job spec sets and a margin for the push and the result line.
  • When the budget ends, stop at the next safe point (between model calls or rounds), keep the plan branch as it is, write the result line with class timeout, and comment on the plan pull request with the open findings and the counts.
  • Write one progress line for each round (round number, open findings, tokens, seconds), so a stopped pod still leaves a trace in Loki.
  • A test sets a short budget and finds the timeout result line, the comment and no push of a half revision.

Acceptance criteria

  • The new test fails on main (devops ci fail-to-pass).
  • A fix-plan Job whose budget ends writes the result line with class=timeout before the Job deadline.
  • Loki shows one progress line for each round of a fix-plan run.

Existing tool considered

asyncio.timeout from the standard library covers the budget. No new tool. Cost: about 150,000 tokens, 2 hours elapsed.

Activity

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

    @dan-petty
    OwnerAuthor
  3. added
    priority/p2-medium
    on Nov 13, 2026
  4. dan-petty commented on Nov 13, 2026

    @dan-petty
    OwnerAuthor

    One more effect: the stopped attempt still counts for the 6-hour wait between attempts. A second Job at 05:16Z ended at once with "#5118: Its last fix-plan attempt was at 2026-11-13T03:45:42Z, less than 6 hours ago." So a run that the Job deadline stops costs the tokens and also blocks the item for 6 hours with no result. With the time budget of this item, the attempt ends with a result line and a comment, so the wait then follows a real result.

  5. added
    owner/agent
    status/in-review
    and removed
    status/new
    on Nov 13, 2026
  6. removed
    status/in-review
    owner/agent
    on Nov 13, 2026
  7. added a commit that references this issue on Nov 13, 2026
  8. devops-cli-service commented on Nov 13, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-13 12:38 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/mediumpriority/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