Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs/CLUSTER.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/CONFIGURATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ roadmap configuration settings.
| `fix_plan` | `RoadmapFixPlanConfig` | `interval_minutes=53 backlog_interval_minutes=None backlog_threshold=None mode='plan' time_budget_seconds=3600 head_attempts=2 revisions=3` | - | - |
| `fix_conflict` | `RoadmapFixConflictConfig` | `interval_minutes=37 backlog_interval_minutes=None backlog_threshold=None tier1_mode='on' tier2_mode='plan' soft_cap_rounds=2 hard_cap_rounds=4` | - | - |
| `fix_checks` | `RoadmapFixChecksConfig` | `token_budget=16000000` | - | - |
| `open` | `RoadmapOpenConfig` | `interval_minutes=7 backlog_interval_minutes=None backlog_threshold=None mode='plan'` | - | - |
| `refine` | `RoadmapRefineConfig` | `interval_minutes=7 backlog_interval_minutes=None backlog_threshold=None` | - | - |
| `mcp` | `RoadmapMcpConfig` | `url=None timeout_seconds=30.0` | - | - |
| `stall` | `RoadmapStallConfig` | `hours=24` | - | - |
Expand Down
4 changes: 4 additions & 0 deletions docs/ENV_VARS.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,10 @@ All configuration options for `devops-cli` can be overridden via environment var
| `DEVOPS_CLI_ROADMAP_INTAKE_JEV` | `roadmap.intake.jev` | No | What TypeSafe Jev (typesafe/jev-1.14) does in intake (ADR 0019). `off` makes no Jev request. `shadow` keeps the triage model for every label and every flag, asks Jev the same fields (one request for each candidate), and records each Jev answer, its probability and the triage answer in the job record of the issue. `on` lets Jev decide the type, the priority, the Value, the Effort and the duplicate flags, and a Jev error, a timeout or a low confidence leaves the proposal to the triage model. Read the shadow records with `devops roadmap eval jev --from-shadow` before you set `on` |
| `DEVOPS_CLI_ROADMAP_MCP_TIMEOUT_SECONDS` | `roadmap.mcp.timeout_seconds` | No | The timeout in seconds for a remote MCP tool call |
| `DEVOPS_CLI_ROADMAP_MCP_URL` | `roadmap.mcp.url` | No | The base URL of the remote role-scoped MCP server |
| `DEVOPS_CLI_ROADMAP_OPEN_BACKLOG_INTERVAL_MINUTES` | `roadmap.open.backlog_interval_minutes` | No | The minutes from the start of a round of this row to the start of its next round, while the queue that its last round counted holds `backlog_threshold` or more items. Empty by default, which turns the backlog rule off. It must not be above `interval_minutes` |
| `DEVOPS_CLI_ROADMAP_OPEN_BACKLOG_THRESHOLD` | `roadmap.open.backlog_threshold` | No | The count of items in the queue of this row from which the row runs at `backlog_interval_minutes`. The row counts its queue from the listing that its round reads. Empty by default, which turns the backlog rule off |
| `DEVOPS_CLI_ROADMAP_OPEN_INTERVAL_MINUTES` | `roadmap.open.interval_minutes` | No | The minutes from the start of a round of this row of the Service to the start of its next round, while its queue holds fewer items than `backlog_threshold`. Each round reads it again, so a change needs no restart |
| `DEVOPS_CLI_ROADMAP_OPEN_MODE` | `roadmap.open.mode` | No | What the row open of the Service does with a pushed branch that the job record of an open item names and that has no pull request (#5974). `off` sends no request. `plan` logs each branch that the row would open, and writes nothing. `on` runs the open step for each branch: the step checks the title, the body and the labels with the rules of CI, and opens the draft pull request. The command `devops roadmap step open` acts in every mode |
| `DEVOPS_CLI_ROADMAP_REFINE_BACKLOG_INTERVAL_MINUTES` | `roadmap.refine.backlog_interval_minutes` | No | The minutes from the start of a round of this row to the start of its next round, while the queue that its last round counted holds `backlog_threshold` or more items. Empty by default, which turns the backlog rule off. It must not be above `interval_minutes` |
| `DEVOPS_CLI_ROADMAP_REFINE_BACKLOG_THRESHOLD` | `roadmap.refine.backlog_threshold` | No | The count of items in the queue of this row from which the row runs at `backlog_interval_minutes`. The row counts its queue from the listing that its round reads. Empty by default, which turns the backlog rule off |
| `DEVOPS_CLI_ROADMAP_REFINE_INTERVAL_MINUTES` | `roadmap.refine.interval_minutes` | No | The minutes from the start of a round of this row of the Service to the start of its next round, while its queue holds fewer items than `backlog_threshold`. Each round reads it again, so a change needs no restart |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -328,3 +328,5 @@ The naming record of #4533 owns the object names, the labels, the Valkey key for

2026-11-13: Fact out of date: section 8, row `fix-plan`, Bounds. The attempts on a head and the revisions are settings with these defaults (#5440).
2026-11-16: Fact out of date: section 8, Spend. The model fix of a `fix-checks` unit stops at `roadmap.fix_checks.token_budget`, 16,000,000 new tokens by default (#5971).

2026-11-16: Amended by the owner decision in #5974, section 8.
6 changes: 6 additions & 0 deletions k8s/devops/configmap.example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,12 @@ data:
time_budget_seconds: 7200
head_attempts: 4
revisions: 6
# The row open opens the pull request of a pushed delivery branch that the job record of an
# open item names and that has no pull request (#5974). `off` sends no request, `plan` logs
# each branch and writes nothing, and `on` runs the open step, which checks the title, the
# body and the labels with the rules of CI. It starts in `plan`, and a person sets `on`.
open:
mode: plan
# The mode of each decision point (ADR 0020): `off`, `shadow` or `on`. The verify screen
# (`stage.verify_screen`) asks the decision model before the model review of a plan. In
# `shadow` the review always runs and the log records the band and the result of the review.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
schema: spec-driven
created: 2026-11-16
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Design

## Decisions

- **The rules of CI are called, not copied.** The type rule is `hidden_type_problem` of `release_title.py`, which the `Semantic PR title` workflow runs. The form rules are `title_problems` and `plan_body_problems` of `pull_form.py`. The action inputs of the workflow (the summary pattern and the scopes) are static, and a test holds them equal to `SUMMARY_MAX_CHARS` and to the labels file. So no rule lives only in a workflow file, and the change moves none.
- **A deterministic type.** For a hidden type with runtime code, the step writes `feat` when the diff adds a runtime file, else `fix` (`release_type`). The two person decisions of 2026-11-16 agree with this rule: #5920 added a module and got `feat`, #5940 changed messages only and got `fix`. When the config hides that type too, the first shown type stands in. No model is necessary.
- **The step fixes what a rule decides, and refuses the rest.** It joins the title on one line, removes an undeclared scope and changes a hidden type. A long summary or a wrong body has no fix that keeps the meaning, so the step raises `RoadmapOpenRefusedError` with every problem and writes nothing.
- **A delivery body needs no `Change:` line at open.** The first push of the implement job opens a draft with the body `Closes #<issue>` and a note, and replaces it after the archive. `body_problems` holds the whole form at ready (`merge_readiness`). The open step holds the keyword rule and the length.
- **A missing file is no rule.** A repository with no `release-please-config.json` hides no type, and a repository with no labels file gets no scope check. Another failed read raises, so the step never writes an unchecked attribute.
- **The diff is read once.** A caller that read the diff passes its files in `OpenRequest.changed`. Else the step reads the compare endpoint only when the type is hidden.
- **The row takes only recorded delivery branches.** A candidate is the branch that `implement.branch` of an open item names, so the row never opens a branch of a person. The row leaves an item that a Job holds, a stage orphan (`stage.pending`) and a stopped item. A head that GitHub associates with a pull request, open or closed, is not opened again: a person who closed it decided.
- **Plan branches stay with stage.** The stage job records `stage.branch` after it opens the plan pull request, and it removes its orphan branches (#4051). A later change can move the orphan of stage to this row.
- **Mode.** `roadmap.open.mode` starts in `plan`, as ADR 0021 section 8 rule 5 asks for each new row. Of the code defaults of the step rows, `fix_plan` and the model tier of `fix_conflict` are `plan`.

## Rejected alternatives

- **An action of the watch row.** The watch row reads open pull requests only, and a branch with no pull request is not in its read. A list of the branches through the REST API every 3 minutes costs quota. A row with a clone reads the heads with git.
- **A model task to choose the type.** A new task key needs the image first (`AITasksConfig` is `extra="forbid"`), and the rule above decides each known case.
- **Edit `_delivery_metadata` of the implement job.** It sets the final delivery title with `update_pull`, outside the open step. The item asks to leave the two jobs to #5029 and #4719.
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Proposal: The open step checks each pull request attribute, and a row opens a pushed branch

## Why

Closes #5974. The stage job and the implement job write the title, the body and the labels of a pull request at the end of a long model run, and nothing checks these attributes against the rules of CI before the pull request exists. On 2026-11-16 the bot pull requests #5940 and #5920 had the type `test`, which `release-please-config.json` hides, while they change runtime code. The check `Semantic PR title` failed, and a person changed each title (`fix` for #5940, `feat` for #5920). The owner decided on 2026-11-16 that the creation of a pull request becomes a separate job that owns its attributes (#5014).

## What Changes

- The open step (`src/devops_cli/roadmap/steps/open.py`) checks each attribute before it creates or updates a pull request:
- **Type.** When the type is hidden and the diff changes runtime code, the step writes `feat` for a diff that adds a runtime file, else `fix`. It calls `hidden_type_problem` of `src/devops_cli/github/release_title.py`, which the `Semantic PR title` workflow runs. The step reads the diff only for a hidden type.
- **Scope.** The step removes a scope that `.github/labels.yml` does not declare, as `delivery_title` does (#2800).
- **Summary and form.** `title_problems` of `pull_form.py`, which a test holds equal to the summary pattern and the scopes of the workflow.
- **Body.** A plan body has the whole form of `plan_body_problems`. A delivery body closes only the delivered issue, in one line `Closes #<issue>`, and has at most `BODY_MAX_CHARS` characters before its trailers.
- **Labels and Status.** The labels come from the checked title, so the type label follows the type that the step wrote. The step keeps the Status write of #5020.
- A problem that no rule can fix, such as a long summary, refuses the write and names every problem.
- A new row `open` of the status lane of the Service, after `stage` (`src/devops_cli/roadmap/open_row.py`). It finds the pushed branch that the job record of an open item names in `implement.branch` and that has no pull request, and runs the open step for it. The setting `roadmap.open.mode` is `off`, `plan` or `on`, and it starts in `plan`. The row is due every `roadmap.open.interval_minutes` (7 by default) and on a first run.
- Stage and implement keep their call of the open step. #5029 and #4719 remove it.

## Capabilities

- Modified: `roadmap-stage/open` (new requirements).

## Impact

- The open step sends one more read for each call (the release-please config), one read of the labels file for a call with no store, and one compare read for a hidden type.
- The Service gets one more lane and its clone. A round reads the heads of `origin` with git and sends a GitHub request only for a candidate branch.
- The change fits one pull request.

## Feasibility

- `src/devops_cli/roadmap/steps/open.py` on `origin/main` ef1a280bc writes `request.title` and `request.body` as given. It reads the labels file only to add the title labels.
- `devops gh api repos/dan-petty/devops-cli/issues/5940/timeline` shows the rename `test(roadmap): ...` to `fix(roadmap): ...`, and #5920 shows `test(k8s): ...` to `feat(k8s): ...`. The files of #5920 add `src/devops_cli/k8s/volume_move_measure.py`. The files of #5940 change `src/devops_cli/lang/en/help.py` and `messages.py` and add no runtime file.
- `.github/workflows/pr-title.yml` runs `python -m devops_cli.github.release_title`, and `tests/invariants/test_workflow_contracts.py` holds the action inputs equal to `SUMMARY_MAX_CHARS` and the labels file. So each CI rule is already in a project module, and this change moves no rule.
- The implement job records `implement.branch` in `_start`, before its first push. The stage job records `stage.branch` only after it opens the plan pull request, and removes its orphans itself (#4051).

## Existing Tool Considered

`amannn/action-semantic-pull-request` checks a title after the pull request exists, and it cannot run before the write. No open tool knows the hidden types of a release-please config or the issue of a roadmap item. The change reuses `release_title`, `pull_form`, `title_labels`, `delivery_title`, `build_body` and the compare read of the GitHub client. Cost to build: about 0.4M agent tokens and 3 agent-hours.
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# roadmap-stage/open Specification

## ADDED Requirements

### Requirement: A type that ships runtime code
The open step SHALL write a type that release-please shows when the diff of the head changes runtime code under a type that `release-please-config.json` hides: `feat` when the diff adds a runtime file, else `fix`. It SHALL use the rule of the `Semantic PR title` check.

#### Scenario: A test item changes runtime code
- **WHEN** the title has the type `test` and the diff of the head changes a file under `src/devops_cli/`
- **THEN** the step writes the title with the type `fix`, and the CI title rules accept the title

#### Scenario: A test item adds a runtime module
- **WHEN** the title has the type `test` and the diff of the head adds a file under `src/devops_cli/`
- **THEN** the step writes the title with the type `feat`

#### Scenario: A shown type
- **WHEN** release-please shows the type of the title
- **THEN** the step keeps the type and reads no diff

### Requirement: Check the title and the body before the write
The open step SHALL remove a scope that `.github/labels.yml` does not declare, and SHALL refuse a title that `title_problems` refuses. It SHALL refuse a plan body that `plan_body_problems` refuses, and a delivery body that closes no issue, another issue, or more than one issue. A refusal SHALL name every problem, and the step SHALL write nothing.

#### Scenario: An undeclared scope
- **WHEN** the title has a scope with no label in `.github/labels.yml`
- **THEN** the step writes the title with no scope

#### Scenario: A long summary
- **WHEN** the summary of the title has more than 60 characters
- **THEN** the step refuses the request and creates no pull request

#### Scenario: A plan body that closes an issue
- **WHEN** a plan body holds a closing keyword
- **THEN** the step refuses the request and creates no pull request

### Requirement: The open row
The Service SHALL have a row `open` with the modes `off`, `plan` and `on` in `roadmap.open.mode`, which starts in `plan`. The row SHALL take the pushed branch that `implement.branch` of an open item names when no open pull request holds the item, no Job, orphan mark or stop holds it, and GitHub associates no pull request with its head. Mode `on` SHALL run the open step for it.

#### Scenario: Mode plan
- **WHEN** the mode is `plan` and a candidate branch exists
- **THEN** the row logs the branch and writes nothing to GitHub

#### Scenario: Mode on
- **WHEN** the mode is `on` and a candidate branch changes runtime code for an item of the type `test`
- **THEN** the row opens a draft pull request whose type ships a release and whose body closes the item

#### Scenario: A closed head
- **WHEN** GitHub associates a closed pull request with the head of the branch
- **THEN** the row does not open the branch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Tasks

## 1. Behavior

- [x] 1.1 Write a failing test: a pushed branch whose diff changes runtime code, for an item of the type `test`, gets a title whose type ships a release and that the CI title rules accept
- Verification: `$ uv run devops ci test tests/roadmap/steps/test_roadmap_step_open.py`
- [x] 1.2 Check the type, the scope, the summary and the body in the open step with `release_title` and `pull_form`
- Verification: `$ uv run devops ci test tests/roadmap/steps/test_roadmap_step_open.py tests/github/test_release_title.py tests/roadmap/test_roadmap_pull_form.py`
- [x] 1.3 Add the row `open` and the setting `roadmap.open` with the modes `off`, `plan` and `on`
- Verification: `$ uv run devops ci test tests/roadmap/test_roadmap_open_row.py tests/roadmap/test_roadmap_run_due_table.py`

## 2. Documents

- [x] 2.1 Describe the row in `docs/CLUSTER.md`, add the Status History line of ADR 0021, and add the setting to the ConfigMap template
- Verification: `$ uv run devops ci docs`
Loading