Skip to content

refactor(roadmap): the implement Job ends at its draft #5029

Open

Description

@dan-petty

Update 2026-11-26 (infra move): #6562 already removed the in-Job check watch.

The implement Job ends at its draft, and _repair_after_push and _ready are gone. The _watch in implement_deadline.py is the deadline watch: keep it. What is left is the stall default: it is still 4200 s, and the design below lowers it to 2400 s.


Problem or Motivation

The runner Job holds 1 or 4 CPU for up to 3600 s while it only watches checks (before #6562 removed the watch). 40 Jobs ran from 2026-11-05 to 11-11: p50 23 min, p90 55 min, max 187 min. The stall of 4200 s (DEFAULT_ROADMAP_IMPLEMENT_DEADLINE_STALL_SECONDS, defaults.py:1221) exists only for that watch.

Proposed Solution & Architectural Design

#6562 deleted the check watch, _repair_after_push and _ready from the Job, and _checks of implement_run.py now runs only the scoped checks. The watch row, fix-checks and fix-conflict took the rest over. Lower the stall default from 4200 s to 2400 s, and change the values in docs/CLUSTER.md, the generated docs/CONFIGURATION.md and the tests (STALL in tests/roadmap/implement/test_roadmap_implement_deadline.py and tests/roadmap/implement/test_roadmap_implement_deadline_settings.py) in the same pull request (AGENTS.md rule 8).

Gate: the fix Jobs give a good outcome in at least 80 % of at least 20 runs. The watch skips a pull request with a live Job, so a Job of an older image and the row do not act on one pull request.

Cost: about 1M tokens and 1 agent-day.

Target Subsystem

The implement runner Job (src/devops_cli/roadmap/implement/implement_run.py) and its deadline settings.

Existing Tool Considered

No new tool. The change deletes code from the implement Job.

Acceptance Criteria

  • Tests: the implement Job ends after its final push and open; a structural test finds no watch or ready call in the Job; the deadline settings validate (stall < extension < ceiling); the test of the deadline values in docs/CLUSTER.md passes with the new values.
  • Live: Loki shows the Job end within 120 s of the draft.

Dependencies

Source: #5014

Owner decision 2026-11-13

The approved pipeline split (tracker #5482, Phase 3): the implement Job ends at its checked branch and calls the open module (#5020). It opens no PR by its own code and runs no watch. Watch, the ready step and the fix Jobs take over.

  • Live proof: after the merge and the release, the implement Job runs as the App on the next Planned item. A comment gives its result line and the open line, and shows that the Job ran no watch step.

Alternatives check of 2026-11-27: not-applicable.
Class: refactor, no model call.
Tool: none found.

Proposed design

Problem statement

The implement Job no longer watches checks: #6562 removed that watch. The stall default is still 4200 seconds and covered the removed watch. The remaining change lowers the stall default to 2400 seconds and updates its tests and documents.

Acceptance criteria

Requirement: Default stall of 2400 seconds

The deadline defaults SHALL set the stall to 2400 seconds.

Scenario: The deadline settings test runs

  • WHEN tests/roadmap/implement/test_roadmap_implement_deadline_settings.py runs with no override
  • THEN it passes with the default stall equal to 2400 seconds

Requirement: Stall constant in the deadline test

The deadline test SHALL set its STALL constant to 2400 seconds.

Scenario: The deadline module test runs

  • WHEN tests/roadmap/implement/test_roadmap_implement_deadline.py runs
  • THEN it passes with STALL equal to 2400

Requirement: Order of the deadline settings

The deadline settings MUST keep the order stall < extension < ceiling.

Scenario: The deadline settings validate

  • WHEN the deadline settings load with no override
  • THEN the stall is less than the extension and the extension is less than the ceiling

Requirement: Cluster document deadline values

docs/CLUSTER.md SHALL state the stall default 2400 seconds, the stall time 40 minutes, and the unchanged extension and ceiling values.

Scenario: The deadline document test runs

  • WHEN the deadline document test in tests/roadmap/implement/test_roadmap_implement_deadline.py runs
  • THEN it passes with the new stall value and the unchanged extension and ceiling values in docs/CLUSTER.md

Requirement: Generated configuration document

docs/CONFIGURATION.md MUST show the new stall default and MUST be the output of its generator.

Scenario: The docs check runs

  • WHEN uv run devops ci --check --only docs runs after the change
  • THEN it passes and the RoadmapImplementConfig row shows deadline_stall_seconds=2400

Requirement: No watch or ready code in the implement Job

The implement Job module MUST hold no call of _watch, _repair_after_push or _ready.

Scenario: The structural test reads the implement Job module

  • WHEN the structural test reads src/devops_cli/roadmap/implement/implement_run.py
  • THEN it finds no call of _watch, _repair_after_push or _ready

Requirement: Implement Job ends after the open module

The implement Job SHALL end after its final push and its call to the open module, and it SHALL run no watch step.

Scenario: The job-end test runs

  • WHEN the job-end test runs the implement Job with a fake open module
  • THEN the job records the push, calls the open module and records no watch step

Requirement: Pending a person after the merge

After the release, a person SHALL confirm that the next Planned item ends within 120 seconds of its draft with no watch step.

Scenario: The post-release live proof

  • WHEN the next Planned item runs after the release
  • THEN a Loki query shows the implement Job ends within 120 seconds of the draft, and its result line and open line show no watch step

Existing Tool Considered

The alternatives check of 2026-11-27 in the issue body records not-applicable for a refactor and names no tool. The change lowers one default and updates its tests and documents. It adds no code to keep.

Key questions

  • What does the owner decision of 2026-11-13 require for the implement Job, the open and the watch?: The implement Job ends at its checked branch and calls the open module. It opens no PR by its own code and runs no watch. The watch row, the ready step and the fix Jobs take over. (best practice) [sources: CONTEXT.md, docs/ROADMAP_WORKFLOW.md, src/devops_cli/roadmap/implement/implement_run.py]
    • Chosen: End the Job at its checked branch and call the open module. The owner decision of 2026-11-13 records this split.
    • Rejected: Keep the PR open and the watch in the Job. The owner decision rejects it. The watch is the reason that the Job held CPU.
    • Rejected: Let each fix Job open the pull request. The owner decision gives the open to the open module.
  • Is the watch or the ready step still in the implement Job module?: No. feat(roadmap): end the implement Job at the draft pull request #6562 removed the in-Job check watch. The implement Job module holds no watch step. [sources: src/devops_cli/roadmap/implement/implement_run.py, CONTEXT.md]
  • Which value does the stall default take, and which order do the deadline settings keep?: The stall default goes from 4200 seconds to 2400 seconds. The extension and ceiling stay above the stall, so stall < extension < ceiling holds. (best practice) [sources: src/devops_cli/config/defaults.py, src/devops_cli/config/settings.py, docs/CLUSTER.md, tests/roadmap/implement/test_roadmap_implement_deadline.py]
    • Chosen: Lower the stall default to 2400 seconds. The issue keeps the stall and sets 2400 seconds. The watch is gone.
    • Rejected: Keep the stall default at 4200 seconds. It covers the 3600-second watch, which the Job no longer runs.
    • Rejected: Delete the stall setting. The issue keeps the stall and lowers it to 2400 seconds.
  • Which documents and tests change in the same pull request?: docs/CLUSTER.md, docs/CONFIGURATION.md, tests/roadmap/implement/test_roadmap_implement_deadline.py and tests/roadmap/implement/test_roadmap_implement_deadline_settings.py. AGENTS.md rule 8 asks for the same pull request. [sources: docs/CLUSTER.md, docs/CONFIGURATION.md, tests/roadmap/implement/test_roadmap_implement_deadline.py, tests/roadmap/implement/test_roadmap_implement_deadline_settings.py, AGENTS.md]
  • Does the fix-Jobs gate still block this item?: No. The gate covered the removal of the watch. The remaining change lowers one default and updates its documents. A fix-Job outcome cannot change it. (best practice) [sources: docs/ROADMAP_WORKFLOW.md, CONTEXT.md, src/devops_cli/roadmap/implement/implement_run.py]
  • Where does the live proof of the Job end run?: As a Pending a person after the merge acceptance criterion and as a comment on this issue after the release. (best practice) [sources: docs/adr/0010-openspec-is-the-spec-and-change-proposal-layer.md, docs/guidelines/agentic-jobs.md]
    • Chosen: An acceptance criterion named Pending a person after the merge, with the result as a comment on this issue. ADR 0010 keeps a check that only a person can run in the change folder.
    • Rejected: A separate issue. It adds a second tracking item for a check that ADR 0010 keeps in the change folder.
    • Rejected: An acceptance criterion that an offline test checks. No offline test can check the live Loki result.
  • Does this item repeat the deletion of the watch code that feat(roadmap): end the implement Job at the draft pull request #6562 delivered?: No. feat(roadmap): end the implement Job at the draft pull request #6562 removed the in-Job check watch. This item lowers the stall default, updates its documents and adds a structural guard. [sources: src/devops_cli/roadmap/implement/implement_run.py, CONTEXT.md]
  • Does CONTEXT.md still describe the watch or gh pr ready in the implement Job?: No. The term Implementing says the job ends at the draft. The watch row marks the draft ready and the fix-checks Job repairs a failed check. The glossary needs no change. [sources: CONTEXT.md]

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    source/agent
    on Nov 12, 2026
  2. added
    type/refactor
    scope/roadmap
    status/new
    value/high
    effort/medium
    on Nov 12, 2026
  3. dan-petty commented on Nov 12, 2026

    @dan-petty
    OwnerAuthor
  4. added
    priority/p2-medium
    on Nov 12, 2026
  5. devops-cli-service commented on Nov 15, 2026

    @devops-cli-service
    Contributor

    Alternatives check: not-applicable

    Class: refactor. The check makes no search and no model call for an item of this class.

    Tool: none found

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

  6. dan-petty commented on Nov 16, 2026

    @dan-petty
    OwnerAuthor

    A fact for this item, from the work on #5974 (PR #5981).

    PR #5981 makes the open step check each pull request attribute with the rules of CI. For example, a diff of runtime code under a hidden type gets feat or fix. But the implement job writes the final title and body of a delivery pull request in _delivery_metadata (src/devops_cli/roadmap/implement/implement_run.py) with client.update_pull, not with the open step. For a Staged item the job never calls the open step, because it takes over the plan pull request. So until this item moves the open of the implement job to the open step, a delivery title can still get a hidden type: #5940 is such a case.

    When this item removes the own PR code of the job, send the final title and body through open_or_update (or end the job at the push and let the row open open the pull request), so that checked_request holds each write.

  7. devops-cli-service commented on Nov 16, 2026

    @devops-cli-service
    Contributor

    Refine cannot set this item to Ready at 9f40f15 while the items below stay open. The next refine round looks at the item again when they close, or when a person replies in a comment or edits the body.

  8. 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.

  9. dan-petty commented on Nov 20, 2026

    @dan-petty
    OwnerAuthor

    Part A of #3702 is #6559 (PR #6562). It deletes _checks, _watch, _repair_after_push, _ready and _publish_evidence from the implement Job: the Job ends when the draft holds the final title and body, records implement.result as drafted and sets In Review. The ready path of fix-checks, which the watch row runs, takes such a draft, and fix-checks Jobs repair a failed check.

    That PR keeps the default stall at 4200 s and changes only its text: the longest silent wait is now one command (1800 s). The lower stall of this item (2400 s) and its README values stay open here. A person decides whether this item closes when #6559 merges.

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

    @devops-cli-service
    Contributor

    Owner question: See the first point of Open questions in the section Proposed design of the body.

    Options

    1. Decide the question: The job refines the item with your answer.
    2. Leave it to the job: The job records the best-practice answer and goes on.

    Recommendation: Decide the question: only a person can answer it.

    Evidence

  11. devops-cli-service commented on Nov 21, 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.

  12. devops-cli-service commented on Nov 22, 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.

  13. added
    status/ready
    and removed
    status/new
    on Dec 1, 2026
  14. devops-cli-service commented on Dec 1, 2026

    @devops-cli-service
    Contributor

    Next step: the stage job writes the plan of the item. See the section Proposed design of the body.

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/agentstatus/readytype/refactorvalue/high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions