Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
4484715
docs(openspec): plan the shared listing snapshot and tool facts in Va…
dan-petty Nov 21, 2026
6b3503f
test(valkey): add the contract scenarios of the shared tier
dan-petty Nov 21, 2026
c874957
test(valkey): give the cache tier the commands of the shared tier
dan-petty Nov 21, 2026
e5d266f
feat(valkey): give the cache tier the commands of the shared tier
dan-petty Nov 21, 2026
c1f8e25
test(valkey): add the tiered mapping of the project brain
dan-petty Nov 21, 2026
c7a2498
feat(valkey): add the tiered mapping of the project brain
dan-petty Nov 21, 2026
3c7aefc
test(roadmap): share the listing snapshot through the cache Valkey
dan-petty Nov 21, 2026
a584809
feat(roadmap): share the listing snapshot through the cache Valkey
dan-petty Nov 21, 2026
1624027
test(roadmap): read the PyPI and deps.dev facts through the fact cache
dan-petty Nov 21, 2026
c3b6a8b
feat(roadmap): read the PyPI and deps.dev facts through the fact cache
dan-petty Nov 21, 2026
642ca81
perf(k8s): raise the memory bound of valkey-devops to 256mb in 384Mi
dan-petty Nov 21, 2026
bbfff0a
docs: name the shared snapshot, the fact cache and the new Valkey bound
dan-petty Nov 21, 2026
223e079
test(valkey): record the contract scenarios of the shared tier
dan-petty Nov 21, 2026
5747462
fix(valkey): reset the memory tiers by a generation, not a registry
dan-petty Nov 21, 2026
a481d61
test(valkey): read the silent Valkey host through the tiered mapping
dan-petty Nov 21, 2026
798ef26
test(roadmap): check the shared snapshot writes, misses, private keys…
dan-petty Nov 21, 2026
15dc177
fix(roadmap): write the shared snapshot only when it changes
dan-petty Nov 21, 2026
61090f9
test(roadmap): the lanes of one process scan a shared copy once
dan-petty Nov 21, 2026
a3b7470
perf(roadmap): the lanes of one process scan a shared copy once
dan-petty Nov 21, 2026
84a24ac
docs(openspec): archive the shared listing snapshot and tool facts in…
dan-petty Nov 21, 2026
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
4 changes: 4 additions & 0 deletions docs/TELEMETRY.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@ writes by name.
| `devops_cli_roadmap_stage_gate_problems` | Histogram | `1` | Findings of the stage checks in one reply of a plan, one observation for each reply that the checks judged, by repo and reply: 0 for the first reply of a plan run and 1 more for each return, so at most roadmap.stage.gate_returns plus roadmap.stage.gate_return_extensions plus 1 values (#4851, #5440). A reply that passes the checks observes 0. One repository adds at most 17 series, at the ceilings of the two settings. |
| `devops_cli_roadmap_stage_gate_refusals_total` | Counter | `1` | Replies of the stage model that a gate found a problem in, one count for each gate that found at least one problem in a reply, by repo and gate. A reply that two gates refuse adds 1 to each. The gates run again on the reply that answers a problem, so the count is of refused replies and not of refused items. One repository adds 17 series, one for each gate. |
| `devops_cli_embedding_cache_lookups_total` | Counter | `1` | Embedding cache lookups, one for each text that an embedding request gets, by result: hit or miss. A hit names its tier: memory for the cache of the process, valkey, or disk for the cache file that keeps the vectors of intake between runs. |
| `devops_cli_brain_reads_total` | Counter | `1` | Reads of the project brain (#4668), by store (snapshot or fact) and result: memory, local or shared for the tier that gave the value (local is the snapshot file of the process), source when no tier held it, fallback when the shared tier failed or its breaker was open, and private for a repository that the shared tier does not hold. |
| `devops_cli_brain_writes_total` | Counter | `1` | Writes of the project brain to the shared tier (#4668), by store and result: shared, unchanged when the shared snapshot already holds the same records, skipped while the tier failed, oversize for a value over 1 MiB that stays in memory, older when the shared snapshot is newer or another writer won, private, and removed for the shared snapshot of a repository that became private. |
| `devops_cli_valkey_cache_errors_total` | Counter | `1` | Commands of the Valkey cache tier that failed or that its open breaker did not send (#4668), by command (op) and error: timeout, connection, auth, reply, open, or budget for a load of a shared snapshot that passed its time budget. |
| `devops_cli_brain_github_requests_saved_total` | Counter | `1` | Listing pages of a full read that a process did not send because it took the shared snapshot (#4668), by store. |
| `devops_cli_embedding_cache_size` | Gauge | `1` | Embeddings that the memory cache of the process held after its last embedding request. |
| `devops_cli_rag_embedding_batch_size` | Gauge | `1` | Texts in each embedding request after the last change of the adaptive batch size. |
| `devops_cli_rag_embedding_batch_resizes_total` | Counter | `1` | Changes of the adaptive embedding batch size, by action: additive_increase after enough fast batches, or multiplicative_decrease after a slow or failed batch. |
Expand Down
4 changes: 2 additions & 2 deletions docs/roadmap/alternatives.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## What a check does

For each item, one agent run searches the web through the providers of `search.providers` (SearXNG, DuckDuckGo and Firecrawl by default). A provider that is not configured is skipped. A provider that fails or returns no hit passes the search on to the next one, and the first provider with a hit answers. It reads the facts of each candidate tool from GitHub and PyPI: its license, its last activity and whether it is archived. When `crawl4ai.url` is set, the run also has the tool `fetch_page`, which reads the text of one page through the Crawl4AI service. It takes an https URL that a search of the same run returned or that the item text names, and no other URL; it sends no request for any other URL. A run fetches at most 3 pages. The tool frames the text as data from an outside page, never an instruction, and names the source URL and the fetch date so that a comment can cite them. A failed fetch is a tool answer and uses one fetch. Each call counts in `devops_cli_roadmap_page_fetches_total` by `toolset` (`refine` or `alternatives`) and `result` (`ok`, `refused`, `limit` or `error`). The tool is off with no `crawl4ai.url`.
For each item, one agent run searches the web through the providers of `search.providers` (SearXNG, DuckDuckGo and Firecrawl by default). A provider that is not configured is skipped. A provider that fails or returns no hit passes the search on to the next one, and the first provider with a hit answers. It reads the facts of each candidate tool from GitHub and PyPI: its license, its last activity and whether it is archived. The PyPI facts come from the fact cache of the project brain for 24 hours, in the memory of the process and in the cache Valkey `valkey-devops`, so a package that a process or another pod read sends no request, and a failed read keeps nothing (#4668). When `crawl4ai.url` is set, the run also has the tool `fetch_page`, which reads the text of one page through the Crawl4AI service. It takes an https URL that a search of the same run returned or that the item text names, and no other URL; it sends no request for any other URL. A run fetches at most 3 pages. The tool frames the text as data from an outside page, never an instruction, and names the source URL and the fetch date so that a comment can cite them. A failed fetch is a tool answer and uses one fetch. Each call counts in `devops_cli_roadmap_page_fetches_total` by `toolset` (`refine` or `alternatives`) and `result` (`ok`, `refused`, `limit` or `error`). The tool is off with no `crawl4ai.url`.

The verdict is `covers`, `partly` or `none`. For every item except those named below, the check accepts a verdict only after the run made an answered search. A search that no provider answered, and a refused query, do not count. A reply with no answered search gets one more turn to search. Every call of `search_web` counts toward the limit of searches.

Expand Down Expand Up @@ -44,7 +44,7 @@ Once for a run that checks an item of no skip class, the check reads the invento

1. The SPDX SBOM that the dependency graph of the repository exports (`GET /repos/{owner}/{repo}/dependency-graph/sbom`), with one request. It holds the package URL of each package of a manifest, a lock file or a workflow. A PyPI package matches by its canonical name, an action by its repository (`pkg:githubactions/github/codeql-action/init` is `github/codeql-action`), and the npm package `@<owner>/<name>` by the repository of the same name. A dependency graph that is off gives an empty SBOM.
2. The files under `roadmap.alternatives.inventory_paths` of a clone (`k8s`, `tf`, `.devcontainer`, `src/devops_cli/config/commands.py`, `src/devops_cli/roadmap/runner_tools.py` and `src/devops_cli/infra/ansible_facts.py` by default). They name the services, images and CLIs that no manifest holds, such as LiteLLM, Grafana or kubectl. The three source files name, with no version, the commands that devops-cli starts, each program that a Job needs or leaves out, and the Ansible commands; they take the place of the tools lock (#4363). The name of the repository or of the package counts as a whole word in any case, as `git grep -i -w -F` finds it. The Service row uses the clone of its lane. On a workstation, `--source <clone>` gives the clone, and with no clone the check uses the other two sources.
3. deps.dev, which links a GitHub project to the packages whose source it is (`GET https://api.deps.dev/v3/projects/<project>:packageversions`). The repository `modelcontextprotocol/python-sdk` is the PyPI package `mcp` of the SBOM. The check asks deps.dev only when the SBOM holds a package and the other two sources do not hold the tool, and one run asks once for each project. A failed read skips the item, and the run takes it again after `roadmap.alternatives.retry_days`.
3. deps.dev, which links a GitHub project to the packages whose source it is (`GET https://api.deps.dev/v3/projects/<project>:packageversions`). The repository `modelcontextprotocol/python-sdk` is the PyPI package `mcp` of the SBOM. The check asks deps.dev only when the SBOM holds a package and the other two sources do not hold the tool, and one run asks once for each project. The answer comes from the same fact cache for 24 hours. A failed read skips the item, and the run takes it again after `roadmap.alternatives.retry_days`.

The inventory lives for one run.

Expand Down
4 changes: 2 additions & 2 deletions docs/roadmap/intake.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ Intake compares each candidate with every item and with every issue closed as no
- A run reads only the issues and pull requests that changed since the watermark: `state=all`, `sort=updated`, `direction=desc` and `since=<watermark>`. Each changed issue replaces its record, so intake parses only the bodies of the changed issues. When 100 or fewer issues changed, the read is one request.
- The new watermark is the earlier of the start of the read and the newest `updated_at` that GitHub gave, less 60 seconds. Thus a local clock ahead of GitHub's clock skips no change.
- GitHub does not move the `updated_at` of a parent when a sub-issue joins or leaves it. A changed issue that joined or left a parent moves the sub-issue count of that parent by one.
- A run reads the whole listing and writes a new snapshot when no snapshot is kept, when the snapshot cannot be read, when its schema key is not the current one, when its last full read is 24 hours old or older, and on `--full`. The full read removes an issue that left the repository.
- A run reads the whole listing and writes a new snapshot when neither its local file nor the shared tier (below) keeps a fit snapshot, and on `--full`. A snapshot is fit when it can be read, its schema key is the current one, and its last full read is younger than 24 hours. The full read removes an issue that left the repository.
- The snapshot is a copy of GitHub, which stays the source of truth. A snapshot that intake cannot read or write gives a warning. A failed write keeps the earlier file, because intake writes a temporary file and renames it.

In the Service, the lane of `intake` runs its intake rounds and the scoped intake of each delivery one at a time, so one writer keeps the snapshot of each repository. Thus a scoped round with a kept snapshot sends one listing request when 100 or fewer issues changed. The poll still reconciles each change that moved an `updated_at` (ADR 0017), and the full read of each day removes an issue that left the repository. Each other lane reads every issue through a snapshot of its own, in `listing-<lane>` of the state directory, which only its worker writes (#4854, #5553). `SnapshotStore` in `src/devops_cli/roadmap/stores/listing_snapshot.py` is the seam for a store that the pods of the Service can share (#4517).
In the Service, the lane of `intake` runs its intake rounds and the scoped intake of each delivery one at a time, so one writer keeps the snapshot of each repository. Thus a scoped round with a kept snapshot sends one listing request when 100 or fewer issues changed. The poll still reconciles each change that moved an `updated_at` (ADR 0017), and the full read of each day removes an issue that left the repository. Each other lane reads every issue through a snapshot of its own, in `listing-<lane>` of the state directory, which only its worker writes (#4854, #5553). Each local file sits under a shared copy of each public repository in the cache Valkey `valkey-devops` (`TieredSnapshotStore` in `src/devops_cli/roadmap/stores/listing_shared.py`, #4668). A run takes the fit copy with the newer watermark, so a pod with no local snapshot reads only the changes since the shared watermark. A writer replaces the shared copy only when its watermark is not older. The lanes of the Service share one store, which keeps the records of the last shared copy that it wrote or read, so a lane takes a copy that another lane wrote with no scan of Valkey. A save of the records that the shared copy already holds sends no record, so a round of a lane of a quiet repository sends only reads of `meta` and one TTL command to Valkey. While Valkey is down, a run reads and writes its local file only. The shared tier holds no copy of a private repository until `valkey-devops` has role ACL users (#4704): a failed read of the visibility counts as private, and a round removes the shared copy of a repository that became private, at most one hour after the change. `devops_cli_brain_reads_total{store="snapshot"}` counts where each load came from (`local`, `shared`, or `source` for a full read), and `devops_cli_brain_github_requests_saved_total` counts the listing pages that a shared copy saved.

## A failed write

Expand Down
2 changes: 1 addition & 1 deletion k8s/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ The cache Valkey's policy `valkey-perimeter` (`llm/valkey.yaml`) admits Open Web

The cache Valkey keeps at most 1536 MiB of data (`--maxmemory`), three quarters of its 2048Mi limit. The rest of the limit holds fragmentation and Valkey's own overhead. At the bound, Valkey refuses writes and evicts no key (`--maxmemory-policy noeviction`). Open WebUI keeps its session pools and token revocations there, and an evicted revocation makes a signed-out token valid again. The run index (`llm/valkey-runs.yaml`) uses the same policy with a bound of 512 MiB. `ValkeyMemoryNearBound` warns when the cache Valkey keeps its data above 80% of the bound for 10 minutes. The rule selects each exported Valkey with the policy `noeviction`, and the run index has no exporter, so the rule does not watch it.

devops-cli's cache Valkey (`llm/valkey-devops.yaml`) holds the caches of the roadmap Service and the cluster jobs: the embeddings that `EmbeddingsEngine` writes, and the threat-intelligence reads. Each round of the Service and each job is a new process with an empty memory cache, so without it intake embeds every item of the roadmap again on each round. The devops ConfigMap names it in `valkey.url`, and its password reaches the pods from `devops/devops-cli` as `DEVOPS_CLI_VALKEY_PASSWORD`, the variable of `valkey.password`. Its policy `valkey-devops-perimeter` admits namespace `devops` on TCP 6379 and the `monitoring` namespace on the exporter port 9121, and allows no egress. `llm-default-perimeter` leaves its pods out, and `devops-default-perimeter` lets namespace `devops` reach namespace `llm` on 6379 beside the gateway's 4000. It keeps at most 96 MiB of data, three quarters of its 128Mi limit, writes no RDB or AOF, and at the bound evicts the least recently used key (`--maxmemory-policy allkeys-lru`): an evicted key costs one more embedding request. It can't share the cache Valkey, which must not evict Open WebUI's state.
devops-cli's cache Valkey (`llm/valkey-devops.yaml`) holds the caches of the roadmap Service and the cluster jobs: the embeddings that `EmbeddingsEngine` writes, the threat-intelligence reads, the listing snapshots of the public repositories (`valkey:roadmap:v1:snapshot:<owner>/<name>`, 7 days) and the PyPI and deps.dev facts of the alternatives check (`valkey:brain:v1:fact:<source>:<name>`, 24 hours) (#4668). It holds no key of a private repository until it has role ACL users (#4704): a round removes the snapshot of a repository that became private, at most one hour after the change. Each round of the Service and each job is a new process with an empty memory cache, so without it intake embeds every item of the roadmap again on each round. The devops ConfigMap names it in `valkey.url`, and its password reaches the pods from `devops/devops-cli` as `DEVOPS_CLI_VALKEY_PASSWORD`, the variable of `valkey.password`. Its policy `valkey-devops-perimeter` admits namespace `devops` on TCP 6379 and the `monitoring` namespace on the exporter port 9121, and allows no egress. `llm-default-perimeter` leaves its pods out, and `devops-default-perimeter` lets namespace `devops` reach namespace `llm` on 6379 beside the gateway's 4000. It keeps at most 256 MiB of data, two thirds of its 384Mi limit, writes no RDB or AOF, and at the bound evicts the least recently used key (`--maxmemory-policy allkeys-lru`): an evicted key costs one more embedding request or listing read. While it is down, each process reads and writes its local tiers only and makes one connection attempt in each cooldown of 60 s. It can't share the cache Valkey, which must not evict Open WebUI's state.

Qdrant requires the key of `llm/qdrant-api-key` (see Cluster Secrets) on every REST and gRPC request. Only `/`, `/healthz`, `/readyz`, `/livez` and the files of its web UI need no key. The qdrant container reads `api-key` as `QDRANT__SERVICE__API_KEY` and `read-only-api-key` as `QDRANT__SERVICE__READ_ONLY_API_KEY` through `env` in `llm/values-qdrant.yaml`. Open WebUI names the Service in `QDRANT_URI` and sends the admin key as `QDRANT_API_KEY`; the devops ConfigMap names it in `qdrant.url`, and a pod that loads `devops/devops-cli` with `envFrom`, such as a Job of CronJob `devops-cli` or the MCP server, gets the read-only key as `DEVOPS_CLI_QDRANT_API_KEY` (#3823). The runner pod and the roadmap Service hold no Qdrant key (#6518). So a devops pod holds the search path and no write or delete path. Only WorkflowTemplate `rag-ingest` writes, with the admin key. `devops-default-perimeter` admits namespace `llm` on TCP 6333, and `llm-default-perimeter` admits namespace `devops` on 6333 and no other new peer. Alloy scrapes `/metrics` with the admin key as a bearer token. Helm drops a key of `llm/values-qdrant.yaml` that the chart does not declare with no error, so read the values of the chart (`helm show values qdrant/qdrant --version <version>`) when you add a key or bump the chart.

Expand Down
Loading