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
16 changes: 9 additions & 7 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 time_budget_seconds=9000 github_requests_per_hour=1000 job=None job_deadline=None` | - | - |
| `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 jobs=1 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
5 changes: 3 additions & 2 deletions docs/ENV_VARS.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,15 +173,16 @@ All configuration options for `devops-cli` can be overridden via environment var
| `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_JOBS` | `roadmap.stage.jobs` | No | The most stage Jobs that run at once in the cluster, for every repository together: each Job holds a model call slot of the one model tier and a GitHub request budget of its own. The stage row of the Service lists the stage Jobs by their component label, and creates a Job for each Ready item that the selection takes, up to this count less the Jobs that run. Every stage pod sends the one telemetry instance `roadmap-stage`, which holds while one pod runs at a time |
| `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_LIMIT` | `roadmap.stage.limit` | No | The most items that one run of `devops roadmap stage` by a person takes. The stage row of the Service takes the free slots of `roadmap.stage.jobs` and plans each item in a stage Job of its own |
| `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 |
| `DEVOPS_CLI_ROADMAP_STAGE_MCP` | `roadmap.stage.mcp` | No | Whether the stage job adds the remote tools of its role from the MCP server |
| `DEVOPS_CLI_ROADMAP_STAGE_PLANNED_LIMIT` | `roadmap.stage.planned_limit` | No | The count of open Planned items at which the stage job plans only items with the priority P0-Critical or P1-High. The item that `--item` names also passes the limit. `devops roadmap explain` names the limit for an item that it holds, and `devops roadmap inbox` states when it holds |
| `DEVOPS_CLI_ROADMAP_STAGE_PLAN_CALLS_ADVISED` | `roadmap.stage.plan_calls_advised` | No | The tool calls that the prompt of a plan run says a plan needs. It must not be above `plan_calls_notice`. The settings load refuses a value above 4 times the default |
| `DEVOPS_CLI_ROADMAP_STAGE_PLAN_CALLS_NOTICE` | `roadmap.stage.plan_calls_notice` | No | The tool call of a plan run from which each tool answer ends with a notice to give the plan, 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_PLAN_DEFECT_LIMIT` | `roadmap.stage.plan_defect_limit` | No | How many `plan_defect` failures of one item on the same body the stage job counts. The failure that reaches this count returns the item to New with one comment that lists the problems of the last plan. The settings load refuses a value above 4 times the default |
| `DEVOPS_CLI_ROADMAP_STAGE_PLAN_DEFECT_LIMIT` | `roadmap.stage.plan_defect_limit` | No | How many failures of one item on the same body the stage job counts before it asks for a split: the `plan_defect` failures of a plan, and the ends of a stage Job with the class `timeout` or `plan_defect`. An outage of the provider, of GitHub or of the cluster does not count. The failure that reaches this count returns the item to New with one comment that lists the problems of the last plan, or that asks refine to split the item after the last Job. The settings load refuses a value above 4 times the default |
| `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 |
Expand Down
1 change: 1 addition & 0 deletions docs/ERRORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Each exception class declares its `error_code` and `exit_code`. A command that a
| `CloudflareAuthError` | `CLOUDFLARE_AUTH_ERROR` | `1` | Cloudflare | Raised when Cloudflare authentication or token verification fails. |
| `CloudflareError` | `CLOUDFLARE_ERROR` | `1` | Cloudflare | Base exception for Cloudflare domain errors. |
| `ClusterJobError` | `K8S_CLUSTER_JOB_ERROR` | `1` | K8s | Raised when a devops-cli Job cannot be created or followed in the cluster. |
| `ClusterJobExistsError` | `K8S_CLUSTER_JOB_EXISTS` | `1` | K8s | Raised when the create of a Job gets 409: a Job of that name exists already. |
| `ClusterSecretPushError` | `K8S_SECRET_PUSH_ERROR` | `1` | K8s | Raised when cluster Secrets cannot be pushed from the keyring; nothing was written. |
| `ClusterSecretWriteError` | `K8S_SECRET_PUSH_ERROR` | `1` | K8s | Raised when writing a planned push fails part-way; `completed` names what was written. |
| `ConfigurationError` | `CONFIGURATION_ERROR` | `1` | Config | Base exception for configuration loading, validation, and serialization errors. |
Expand Down
5 changes: 3 additions & 2 deletions docs/ROADMAP_WORKFLOW.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,11 @@ These are all the keys of the job record, by the job that writes them:
| 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. 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` | The check-out of a stage Job (#5483): the name of the Job that plans the Item. The stage row of the Service writes it with the claim `owner/service` before it creates the Job (#4559), and the Job clears it and the claim when it checks in. The stage row checks in for a Job that ended with no check-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.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. For a Job that ended with no check-in, the stage row writes it with the result `evicted`, `deadline`, `failed` or `succeeded` (#4559) |
| Stage | `stage.evictions` | The evicted stage Jobs of the Item on one body, as JSON with the hash of the body and the count (#4559). The stage row frees the first 3 with no failure mark; a later one counts as a `ci_infra` failure |
| 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
2 changes: 2 additions & 0 deletions docs/TELEMETRY.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ first refusal. A pod loses a count that it makes before its first scrape, becaus
`devops_cli_service_implement_failures_total` are `class` and `repo`. The labels of
`devops_cli_service_jobs_total` are `repo`, `lane`, `row` and `result`.
The labels of `devops_cli_service_implement_jobs_total` are `repo`, `item_class` and `result`.
The labels of `devops_cli_service_stage_jobs_total` are `repo`, `result` and `class`
(#4559). A stage Job sends its own series with the job `roadmap-stage`.
The labels of `devops_cli_service_implement_repair_rounds_total` and
`devops_cli_service_implement_tokens_total` are `repo` and `item_class`.

Expand Down
2 changes: 1 addition & 1 deletion docs/roadmap/intake.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ The issue events report no opened issue, so the poll reads the newest issue from
- It leaves a title that someone changed after the last comment of a job. It reads the title changes on the timeline of the item. When that title has an unlisted type, it comments once with the type, because the stage job cannot take the item.
- When it leaves an item (a person's edit, no plan title, no usable reply of the model, or a type with no correction), it writes the mark `retitle.skipped` once. It also writes one warning log line with the reason key: `invalid-title-type` for an unlisted type, else `long-title`. The value of the mark is a hash of the title, the body and the `stage.pr` mark. The selection leaves the item out while the hash holds, so a later round reads nothing of it and makes no model request for it. A change to the title, the body or `stage.pr` selects it again. A comment does not.
- Without `--confirm` it prints the new titles and writes nothing. With `--confirm` it writes each title and one comment with the marker `<!-- devops roadmap retitle -->`. `--dry-run` makes no request.
- The Service runs the job as the row `retitle` of the model lane. The row is due on a first run and every 61 minutes. It runs just before `stage`, so the stage job reads the new titles in the same round. Each run takes at most 25 items and writes as `--confirm` does. The row needs no clone.
- The Service runs the job as the row `retitle` of the model lane. The row is due on a first run and every 61 minutes. The stage Jobs that the status lane submits read the new titles. Each run takes at most 25 items and writes as `--confirm` does. The row needs no clone.

## Where the rules are

Expand Down
7 changes: 4 additions & 3 deletions docs/roadmap/job-success.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ A `stage` item that is staged with an open finding of the review is `failed` wit

Some attempts write no line:

- A stop of the Service ends the round, and the attempt in progress writes no line.
- A stop of the Service ends the round, and the attempt in progress writes no line. A stage Job runs outside the Service, so a stop of the Service ends no stage attempt (#4559).
- A stage Job that ends with no check-in writes no line. The row `stage` of the Service writes the line `failed` for it, with the class `timeout` for a `deadline` end, the class of the exit code or the log for a `failed` end, and `ci_infra` for an eviction past the free count. A free eviction and a lost check-in of a Job that succeeded write no line.
- An alternatives check whose body a person changed since the read writes no line. The next round checks the item again.
- A refine item that a person or another job changed since the read writes no line. Refine does not write the item, the round does not fail, and the next round reads the item again.
- An intake candidate that another writer changed between the plan and the write writes no line, for example an issue that `devops roadmap intake` in an agent session placed itself. Intake writes nothing for the candidate, the round does not fail, and the next plan decides the candidate again. The candidate still adds 1 to `devops_cli_roadmap_intake_candidates_total` with `result=skipped` (#5166).
Expand All @@ -50,12 +51,12 @@ A change that adds a cap extension to a job adds the count `extensions` to the l
The dashboard `devops-cli Telemetry` has the row `Roadmap Job Success`. It shows the 7-day ratio of each job against the line at 0.80, the attempts of each job with `too few` under 30, the share of the infrastructure cuts, and the ratio at each daily check. Each panel reads the result lines with this base:

```logql
{namespace="devops", app_kubernetes_io_name="roadmap-service"} |= "roadmap job result:"
{namespace="devops", app_kubernetes_io_name=~"roadmap-service|devops-cli-job", container=~"service|stage"} |= "roadmap job result:"
| json message | line_format "{{.message}}"
| regexp `^roadmap job result: job=(?P<roadmap_job>\S+) repo=\S+ item=\S+ result=(?P<result>\S+) success=(?P<success>\S+) class=(?P<failure_class>\S+) infra=(?P<infra>\S+)`
```

The label is `roadmap_job`, because the stream already has the label `job`. The ratio of the last 7 days is:
The selector reads the stream of the Service and the stream of the pod of each stage Job, which logs the line of its item (#4559). A runner pod has the name label `devops-cli-job` too, and the matcher of the container leaves it out. The label is `roadmap_job`, because the stream already has the label `job`. The ratio of the last 7 days is:

```logql
(
Expand Down
Loading