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
20 changes: 17 additions & 3 deletions docs/CLUSTER.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/CONFIGURATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ roadmap configuration settings.
| Option | Type | Default | Environment Variable | Description |
|---|---|---|---|---|
| `alternatives` | `AlternativesConfig` | `interval_minutes=719 backlog_interval_minutes=None backlog_threshold=None limit=5 first_pass_limit=20 recheck_days=30 retry_days=3 inventory_paths=['k8s', 'tf', '.devcontainer', 'src/devops_cli/tools_lock/tools.lock']` | - | - |
| `stage` | `RoadmapStageConfig` | `interval_minutes=37 backlog_interval_minutes=None backlog_threshold=None filter=['status=ready'] limit=3 planned_limit=20 gate_returns=3 gate_return_extensions=1 verify_repair_rounds=2 verify_repair_rounds_ceiling=4 plan_defect_limit=3 max_requests=250 max_tool_calls=200 plan_calls_advised=30 plan_calls_notice=40 review_calls_advised=40 review_calls_notice=60 step_tokens=64000 toolset='extended' mcp=False jev_completeness=False` | - | - |
| `stage` | `RoadmapStageConfig` | `interval_minutes=37 backlog_interval_minutes=None backlog_threshold=None filter=['status=ready'] limit=3 planned_limit=20 gate_returns=3 gate_return_extensions=1 verify_repair_rounds=2 verify_repair_rounds_ceiling=4 plan_defect_limit=3 max_requests=250 max_tool_calls=200 plan_calls_advised=30 plan_calls_notice=40 review_calls_advised=40 review_calls_notice=60 step_tokens=64000 toolset='extended' mcp=False jev_completeness=False time_budget_seconds=9000 github_requests_per_hour=1000 job=None job_deadline=None` | - | - |
| `implement` | `RoadmapImplementConfig` | `effort=['low', 'medium'] in_runner=False repair_rounds=3 max_requests=500 max_tool_calls=1500 tool_retries=5 max_refusals=30 max_consecutive_refusals=3 model_resends=1 extension_calls=20 extension_max_refused=3 step_token_budget=8000000 step_token_ceiling=None item_token_budget=20000000 step_time_limit_seconds=5400 item_time_limit_seconds=12600 digest_clears_per_class=1 digest_clears_per_item=3 continuations_per_item=2 ladder={'edit': ['devops-coder'], 'repair': ['devops-coder']} request_timeout_seconds=1200 command_timeout_seconds=1800 monitor_timeout_seconds=3600 deadline_stall_seconds=4200 deadline_extension_seconds=5400 deadline_ceiling_seconds=14400 max_memory_limit='8Gi' mcp=False` | - | - |
| `inbox` | `RoadmapInboxConfig` | `draft_days=7 wait_days=7` | - | - |
| `intake` | `RoadmapIntakeConfig` | `interval_minutes=29 backlog_interval_minutes=None backlog_threshold=None jev='off'` | - | - |
Expand Down
4 changes: 4 additions & 0 deletions docs/ENV_VARS.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,11 @@ All configuration options for `devops-cli` can be overridden via environment var
| `DEVOPS_CLI_ROADMAP_STAGE_FILTER` | `roadmap.stage.filter` | No | The labels of the items that the stage job takes, as entries `family=value` over the families status, priority, type, value and effort: the values of one family are alternatives, and the families all apply; the job also takes Ready items only |
| `DEVOPS_CLI_ROADMAP_STAGE_GATE_RETURNS` | `roadmap.stage.gate_returns` | No | How many times a plan run sends a reply that the stage checks refuse back to the planner with its problem, for the first reply and for the revision of each repair round. A reply that the checks refuse at the last return gets one more return when no finding of the reply before stays and no finding has a code that no saved return fixed, at most `gate_return_extensions` times for each item; a reply that is refused after that ends the item with the class plan_defect. Each return is one more plan run, so the settings load refuses a value above 4 times the default. After the Service stops, no return starts |
| `DEVOPS_CLI_ROADMAP_STAGE_GATE_RETURN_EXTENSIONS` | `roadmap.stage.gate_return_extensions` | No | The most extra returns past `gate_returns` that one item gets, each for a reply that the checks refuse at the last return while its findings go down. Each extra return is one more plan run. 0 gives no extra return. The settings load refuses a value above 4 times the default |
| `DEVOPS_CLI_ROADMAP_STAGE_GITHUB_REQUESTS_PER_HOUR` | `roadmap.stage.github_requests_per_hour` | No | The most GitHub requests that one stage Job sends in any one hour. A request that the hour has no room for waits. The Job counts its own requests, apart from the budget of the Service (`service.github_requests_per_hour`) |
| `DEVOPS_CLI_ROADMAP_STAGE_INTERVAL_MINUTES` | `roadmap.stage.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_STAGE_JEV_COMPLETENESS` | `roadmap.stage.jev_completeness` | No | Whether the stage_ready row asks TypeSafe Jev if a green plan draft delivers each acceptance criterion of its issue, before it marks the draft ready. A criterion in doubt, a weak test score or an error of Jev keeps the draft a draft and posts one note; the check never marks a draft ready, merges or closes |
| `DEVOPS_CLI_ROADMAP_STAGE_JOB` | `roadmap.stage.job` | No | The name of the stage Job that this process is the pod of. The Service sets it on each stage Job, and no other process sets it. At its end the Job writes its result to the job record of its item, and clears the check-out of the Service, only when the check-out names this Job. A pod that runs again in the same Job removes the branch that its own intent mark names at once |
| `DEVOPS_CLI_ROADMAP_STAGE_JOB_DEADLINE` | `roadmap.stage.job_deadline` | No | The time at which the deadline of the stage Job of this pod ends, as an ISO 8601 time with its offset. The Service sets it on each stage Job. The Job cuts `time_budget_seconds` to this time less 1800 seconds |
| `DEVOPS_CLI_ROADMAP_STAGE_LIMIT` | `roadmap.stage.limit` | No | The most items that one run of the stage job takes |
| `DEVOPS_CLI_ROADMAP_STAGE_MAX_REQUESTS` | `roadmap.stage.max_requests` | No | The most model requests of one plan run or review run of the stage job with the tools: the loop guard of the run. A run that reaches it fails the item. The settings load refuses a value above 4 times the default |
| `DEVOPS_CLI_ROADMAP_STAGE_MAX_TOOL_CALLS` | `roadmap.stage.max_tool_calls` | No | The most tool calls of one plan run or review run of the stage job: the loop guard of the run. A run that passes it fails the item. It must not be below `plan_calls_notice` and `review_calls_notice`. The settings load refuses a value above 4 times the default |
Expand All @@ -182,6 +185,7 @@ All configuration options for `devops-cli` can be overridden via environment var
| `DEVOPS_CLI_ROADMAP_STAGE_REVIEW_CALLS_ADVISED` | `roadmap.stage.review_calls_advised` | No | The tool calls that the prompt of a review run says a review needs. It must not be above `review_calls_notice`. The settings load refuses a value above 4 times the default |
| `DEVOPS_CLI_ROADMAP_STAGE_REVIEW_CALLS_NOTICE` | `roadmap.stage.review_calls_notice` | No | The tool call of a review run from which each tool answer ends with a notice to give the findings, with the tools still on. It must not be above `max_tool_calls`. The settings load refuses a value above 4 times the default |
| `DEVOPS_CLI_ROADMAP_STAGE_STEP_TOKENS` | `roadmap.stage.step_tokens` | No | The most tokens that the inputs of one implementation step may hold: the step's instructions, the AGENTS.md of the repository and the documents it routes the group to, the item, the change folder and the packed files of one task group; `devops roadmap stage` splits a task group over it |
| `DEVOPS_CLI_ROADMAP_STAGE_TIME_BUDGET_SECONDS` | `roadmap.stage.time_budget_seconds` | No | The most seconds that a stage Job (`devops roadmap stage --job-item`) may plan its item, counted from its start. The planner compares the time with the budget before each model run, so a run that started before the end goes on. The Job cuts the budget to the deadline of the Job less 1800 seconds, for one more model run and the publish. SIGTERM after the end of the budget is the deadline of the Job: the Job records the class and checks in. The value must be above `roadmap.mcp.timeout_seconds` and at most 9000, the deadline of CronJob roadmap-stage less the margin |
| `DEVOPS_CLI_ROADMAP_STAGE_TOOLSET` | `roadmap.stage.toolset` | No | The tools of a plan run of the stage job: `base` is the nine read-only tools that read the staged commit, `extended` adds `references`, `read_issue` and `find_issues`, and `research` adds `search_web`. The GitHub tools read issues and pull requests of the repository on GitHub, with the token of the Service and no other permission |
| `DEVOPS_CLI_ROADMAP_STAGE_VERIFY_REPAIR_ROUNDS` | `roadmap.stage.verify_repair_rounds` | No | How many times the model review of a stage plan sends the plan back to the planner while the review has an open finding. After the last of these rounds, one more round follows while the last review marks more earlier findings `gone` than it opens new findings. No item gets more repair rounds than `verify_repair_rounds_ceiling`, so the value must not be above it. After the Service stops, no round starts |
| `DEVOPS_CLI_ROADMAP_STAGE_VERIFY_REPAIR_ROUNDS_CEILING` | `roadmap.stage.verify_repair_rounds_ceiling` | No | The most repair rounds of the model review of one stage plan: the rounds of `verify_repair_rounds` and the rounds that follow them while a review fixes more earlier findings than it adds. Each round is one more plan run and one more review run. The settings load refuses a value above 4 times the default |
Expand Down
6 changes: 5 additions & 1 deletion docs/ROADMAP_WORKFLOW.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,11 @@ These are all the keys of the job record, by the job that writes them:
| Stage | `stage.ready` | The plan pull request that the Service has seen leave the draft state |
| Stage | `stage.needs_fix` | The plan pull request that the Service told about the label `plan/needs-fix` |
| Stage | `stage.jev` | The head commit that the Jev completeness check held a draft on, as `<sha>:held` or `<sha>:error`. A held head is not asked again; an error is asked again in the next round and its note is posted once. A new head commit is checked again. The check runs only when the setting `roadmap.stage.jev_completeness` is true |
| Stage | `stage.pending` | The intent mark of the stage job, as JSON with the branch name and the time. The job writes it before the push and clears it with the record after the draft. An open Item with the mark, a pushed branch and no `stage.pr` is an orphan: a round at least 1 hour later closes its draft, deletes its branch and clears the record, unless another author wrote to the branch |
| Stage | `stage.pending` | The intent mark of the stage job, as JSON with the branch name and the time. The job writes it before the push and clears it with the record after the draft. An open Item with the mark, a pushed branch and no `stage.pr` is an orphan: a round at least 1 hour later closes its draft, deletes its branch and clears the record, unless another author wrote to the branch. The pod of a stage Job that runs again judges the mark of its own Job at once |
| Stage | `stage.job` | The check-out of a stage Job (#5483): the name of the Job that plans the Item. The Service writes it before it creates the Job, and the Job clears it when it checks in. A removal or a rejection of a plan keeps it |
| Stage | `stage.job_at` | The time of the check-out of a stage Job. The Job clears it when it checks in |
| Stage | `stage.job_deadline` | The time at which the deadline of the stage Job of the check-out ends. The Job clears it when it checks in |
| Stage | `stage.job_result` | The check-in of a stage Job, as JSON with the Job, its result (a result of a round, or `deadline`) and the time. The Job writes it at its end only when `stage.job` names the Job |
| Stage | `stage.text_hash` | The hash of the text of the Item that the plan came from |
| Stage | `stage.rejected` | A plan that a person rejected, as JSON. It holds the pull request, the time of the close, the files that the reason names, and the text hash. The job leaves the Item out until the text or one of those files changes. A staged plan clears it |
| Fix-plan | `fix_plan.key`, `fix_plan.attempts` | The plan pull request and the head of the last attempt of the step `fix-plan`, as `<pull>:<head>`, and the attempts on that head. The step reads the plan of the head first, and writes both before its first model call, so a deadline kill counts the attempt. An evicted attempt gets the count before it back, for 3 evicted attempts on a head (#5413). A plan that the plan reader refuses changes neither key. After a push, the key names the new head with 0 attempts. An Item with `roadmap.fix_plan.head_attempts` attempts on the head of its plan (default 2) is left out (#5061, #5440), except for one more attempt of a named run with `--skip-wait` when the attempts ran on an older release |
Expand Down
5 changes: 3 additions & 2 deletions docs/commands/k8s.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions docs/commands/roadmap.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions docs/roadmap/stage.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ In each run the job judges an open item that holds the mark and no `stage.pr`. A

A pushed branch with no mark is never an orphan, because a person or another agent can own it. A retitle between the failure and the next round does not matter, because the job uses the branch of the mark and not the slug of the title. A closed item that holds the mark is not judged. A bad value of the mark counts as no mark.

A stage Job judges the mark of its own item at any age when the check-out of the item (`stage.job`) names the Job: no other run publishes that item. So the pod that the Job controller runs again after an eviction removes the branch of the pod before it, and plans and stages the item in the same run ([The stage Job](#the-stage-job)).

### The verify screen

The verify screen is the decision point `stage.verify_screen` of [ADR 0020](../adr/0020-a-decision-point-is-a-unit-of-a-workflow-with-a-resolver-chain-and-a-rule-goes-before-a-decision-model.md), before the model review of the stage job. It is pilot 1 of the decision steps of [ADR 0019](../adr/0019-a-decision-step-asks-jev-short-closed-questions-about-evidence-that-tools-extract.md). Code builds a digest of the plan: the criteria of the issue, the groups, the paths that the repository does not hold, and whether the verify command of a group names a test file. One request asks the decision model nine yes/no questions about it, one for each defect type. The cuts of the questions are data, in `src/devops_cli/roadmap/stage/jev_screen_cuts.json`, with the model, the day and the numbers of their fit. The point has no rule, because no rule is proven on the golden set.
Expand Down Expand Up @@ -168,6 +170,10 @@ Refine reads the comment as `stage_return`, because it is a comment of the stage
| `--confirm` | Plans as `--plan` does (it reads a kept plan file when the key matches), and makes the writes in git and on GitHub for each item as soon as the item is planned. |
| `--dry-run` | Makes no request. It prints the requests and the git commands that a run makes, with placeholders. |

## The stage Job

`--job-item <n>` runs the stage job of item `n` as a stage Job, the pod of a Job from CronJob `roadmap-stage` ([Stage Jobs](../CLUSTER.md#stage-jobs), #5483). It needs `--confirm` and no `--item`. Unlike `--item`, it keeps every rule of a round: a rejected plan, the wait of a failure class, a recorded split and the queue limit leave the item out with the reason of a round. The run reads and writes item `n` alone: its rejection, its orphan and its result. It holds one model call slot, a GitHub request budget of `roadmap.stage.github_requests_per_hour`, and the time budget `roadmap.stage.time_budget_seconds`, cut to the deadline of the Job (`roadmap.stage.job_deadline`) less 1800 s. The exit code is the end of the Job: 0 for a result, 1 for a failure of the item, 75 for a SIGTERM before the time budget ends (`evicted`: the Job controller runs the pod again), and 143 for a SIGTERM after it or a budget that ends before a model call (`deadline`). At its end the Job checks in: when `stage.job` names the Job (`roadmap.stage.job`), it writes `stage.job_result` and clears `stage.job`, `stage.job_at` and `stage.job_deadline` in one write. A `deadline` end also records the failure with the class `timeout`. An `evicted` end keeps the check-out. The command prints the GitHub requests of the pod at its end.

## The kept plan

The job keeps the plan of an item that passes the checks as the file `roadmap/stage/<owner>/<repo>/<number>.json` in the data directory. On the Service, that directory is on the volume `roadmap-service-home`. A runner pod without that volume finds no file, so each of its runs asks the planner.
Expand Down
Loading