diff --git a/docs/CLUSTER.md b/docs/CLUSTER.md index f15ffe55e2..84897755ba 100644 --- a/docs/CLUSTER.md +++ b/docs/CLUSTER.md @@ -49,13 +49,15 @@ The spans and the log records of devops-cli name the cluster in `k8s.cluster.nam 18. The row `watch` follows `plan_drift` in the table (#5024). It calls no model and needs no clone. It is due every 3 minutes and on a first run (`DEFAULT_ROADMAP_WATCH_INTERVAL_MINUTES`). It watches all open plan and delivery pull requests of a repository (bot and person), batches pull request state via GraphQL (`OpenRoadmapPulls`, falling back to REST with conditional ETags during a quota hold), maintains a ledger `watch.json` with 30-minute failed-head backoff (#3671), and routes lifecycle steps with `due_steps(state)`: marks green bot drafts ready, comments on person PR merge conflicts once per head, and synchronizes status and cleans up state for merged or closed pull requests. The row counts under `row="watch"` in `devops_cli_github_requests_total`. 19. The model of each job comes from the settings `ai.tasks..model` of the ConfigMap `devops-cli-config` (#3155). Each model role of a roadmap job has a task of its own, so a model trial moves exactly one job (#5903): `intake`, `retitle`, `refine`, `refine_review`, `alternatives`, `consolidate`, `stage`, `stage_review`, `fix_plan`, `fix_plan_review`, `implement` and `implement_split` ([the roadmap workflow](ROADMAP_WORKFLOW.md#the-model-of-the-stage-planner) lists the role of each). A task that sets no model uses `ai.model`, and no job reads the tasks `analysis`, `verification` and `triage`. The slot `implement` serves every step of the implement job, and `roadmap.implement.ladder` names the same group as the one tier of each step class (#3573). By the owner decisions of 2026-11-07 (#3874) and 2026-11-16, a job starts on DeepSeek V4.1 Flash (`deepseek-v4.1-flash` since 2026-11-16, while `deepseek-v4.1-flash-1017` stalls on OpenRouter, #5988), and a job moves to `local/qwen3.8:27b` only after its grade reaches 80%. The template names `local/qwen3.8:27b` for `intake` and `retitle` (owner decision of 2026-11-15), `local/qwen3.8:27b` with `context_window` 256,000 for `refine` and `alternatives` (owner trial of 2026-11-16), and DeepSeek with `context_window` 256,000 for each other job task. The planner named `claude-sonnet-5-5` from 2026-11-09 (#4204), because the stage job staged nothing with DeepSeek then. By the owner decision of 2026-11-10 (#4369) it names DeepSeek again, because Sonnet cost about 67 USD a week there. A later trial of Sonnet in one job task needs `context_window` 200,000. The ConfigMap of an image that is older than #5903 refuses the job tasks, so roll out the image first and then add the tasks to the live ConfigMap. The embedding slot stays `qwen3-embedding:0.6b`, because a chat model cannot embed. By the owner decision of 2026-11-09 (#4241), the ConfigMap also sets `ai.reference_model: qwen3.8:27b` and `ai.reference_embedding_model: qwen/qwen3-embedding-8b`, so the spend reports of the Service value local tokens at the hosted prices of those two models (0.035 USD input and 1.50 USD output, and 0.01 USD, per million tokens). genai-prices does not know both names, so the ConfigMap also holds their prices in `ai.price_overrides` (#4242), and a new volume needs no hand step. A price that `devops ai cost set-price` saved in the file `pricing_overrides.json` of the data volume wins over the price in the ConfigMap for the same model. `ai.price_overrides` is a declared key of the section `ai`, which refuses an unknown key, so an image that is older than #4242 does not start with this key in its ConfigMap: apply the key after the new image runs or at the same time. The prompts of chat and of the DeepSeek job tasks hold the titles and bodies of the issues of the repositories of the Service, and they leave the cluster to OpenRouter too (SECURITY.md rule 13). The prompts of intake, retitle, refine and the alternatives check stay in the cluster on the local model. The window of `implement` is 256,000 tokens: the smallest that an fp8 provider of the group offers, where the group allows 1,048,576. A step has one tier, so a failure that selects `change_tier` ends the step; the item stops and waits for a retry. The prompts of a step hold the code of the repository, so they leave the cluster to OpenRouter (SECURITY.md rule 13). No slot and no ladder tier of the template names `claude-sonnet-5-5`. By the owner decision of 2026-11-10 (#4371), the ladders of `edit` and `repair` use DeepSeek first, as the live ConfigMap does. The code supports more tiers for each class (#4274), and a Sonnet tier is a later trial after a Sonnet investigation. A prompt of that tier would leave the cluster to Anthropic (SECURITY.md rule 13). A live run of `devops roadmap eval implement --model deepseek-v4.1-flash-1017 -F 2152-numeric-host-doubles` on 2026-11-05 passed every property in 281 s, with 42 model requests, 2,126,241 input tokens (the sum over the 42 requests) and 11,590 output tokens. The evaluation of 2026-11-02 chose them: on 16 golden cases the local `qwen3.8:27b` passed the stage gates in 3, `claude-sonnet-5-5` in 7 and `deepseek-v4.1-flash-1017` in 11, at about 0.002 USD a call for DeepSeek; in the review of 12 golden plans with 82 known defects, Sonnet 5.5 found 56% (68% of the major ones), DeepSeek 38% and the local models 22 to 23%. The plans of every model still need fixes, because the planner cannot read code (#3037). A failed Sonnet call falls back to DeepSeek at the gateway (#3152). The ConfigMap is not under Argo CD: change it with `kubectl -n devops patch configmap devops-cli-config`, then `kubectl -n devops rollout restart deployment/roadmap-service`; the CronJobs read it at each run. Measure a change of model with `devops roadmap eval stage --model `. -20. The row `release_comments` follows `stage` in the table (#2917). It calls no model and needs no clone. It is due every 11 minutes and on a first run. A round reads the 30 newest releases and takes those that are published in the last 12 hours and are neither a draft nor a prerelease. For each one it takes the pull requests that the release body links as `([#N](url))`, reads the body of each pull request, and takes the closed issues that follow `Closes`, `Fixes` or `Resolves` at the start of a line. It posts `Released in ` on each such issue, and `Live since