Skip to content

feat(telemetry): the roadmap Service counts its GitHub writes, budget holds, Firecrawl searches and own deliveries, and caps refine's comments on one item - #2556

Merged
dan-petty merged 6 commits into
mainfrom
feat/2475-roadmap-service-write-telemetry
Oct 28, 2026
Merged

dan-petty merged 6 commits into
mainfrom
feat/2475-roadmap-service-write-telemetry

Conversation

@dan-petty

@dan-petty dan-petty commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

The roadmap Service now counts its riskiest behavior, and caps refine's comments on one item.

  • devops_cli_github_requests_total gets the labels method, repo and row. A Service worker runs its rounds in the request scope of its repository, one of service.repos, and a round runs each job row (metrics, intake, refine) in the scope of its name. A request outside a worker or a row counts as other. The label is row, not job, which is the scrape label of Prometheus. A context variable carries the scope, and anyio copies it into the thread of the session's portal, so a session request counts as a gh command does. method is the HTTP method: GraphQL is a POST, and a gh command other than gh api is a POST when it writes and a GET when it reads.
  • The Service's /metrics shows devops_cli_service_budget_limit_requests, devops_cli_service_budget_spent_requests, devops_cli_service_budget_holds_total and devops_cli_service_job_suspended (by repo and row). They are on the Service's registry, not OTLP, because an OTLP gauge with delta temporality has a sample only in an interval in which it was set.
  • A delivery of the App bot's own write counts as outcome self in devops_cli_service_webhook_deliveries_total. Its answer stays HTTP 200 with status ignored_own_write.
  • firecrawl_search counts each search in devops_cli_firecrawl_searches_total by result: ok, the HTTP status of a refused search, or error. A failed search logs one warning that names the status or the error class, never the key or the query.
  • A refine round leaves an item alone when refine wrote 2 comments on it in the last 24 hours (CONST_ROADMAP_REFINE_MAX_COMMENTS_PER_ITEM, CONST_ROADMAP_REFINE_COMMENT_CAP_WINDOW_HOURS): no model call and no comment. The selection applies the cap, so the item waits on a person and takes no place under --limit, and items at the cap do not stop refine from the other items. The cap stops the comment that would answer the item's newest comment. For each such comment that no earlier round recorded, --confirm records the comment's time in the job record (refine.capped_after), logs one warning and adds 1 to devops_cli_roadmap_refine_comments_capped_total. A later round that finds no newer comment writes, logs and counts nothing, so the counter follows the stopped comments and not the rounds. --item refines an item at the cap, since a person asked for it.
  • The new rule group roadmap-service-activity, apart from the groups of feat(monitoring): the roadmap Service's identity refusals, failing and stalled jobs, restarts, and GitHub and model request volume raise alerts #2472 and fix(service): the webhook route refuses an unsigned or oversized delivery before it reads the body, and a rate limit guards it #2476, holds RoadmapServiceGitHubWritesHigh (more than 300 REST writes in 1 hour), RoadmapServiceSelfDeliveriesHigh (more than 150 deliveries of the Service's own writes in 1 hour) and RoadmapServiceFirecrawlRefused (any Firecrawl 402 or 429 in 1 hour), with promtool unit tests. k8s/README.md says what to do for each alert and where the new series are.

The OpenSpec change 2475-roadmap-service-write-telemetry is archived in the last commit, with its proposal, design and spec deltas.

Closes #2475

… holds, Firecrawl searches and own deliveries, and caps refine's comments on one item

devops_cli_github_requests_total gets method, repo and row labels: a Service
worker runs its rounds in the scope of its repository, and a round runs each
job row in the scope of its name. The Service's /metrics shows the budget
limit, the requests of the window, each hold and each suspended job. A
delivery of the App bot's own write counts as outcome self. Each Firecrawl
search counts by result, and a failed search logs one warning with no key or
query. Refine leaves an item alone after 2 of its comments on it in 24 hours.
The rule group roadmap-service-activity warns on more than 300 writes or 150
own deliveries in an hour, and on a Firecrawl 402 or 429.

Refs #2475
…eview fix

The fix of the comment cap changes the change's spec, design and tasks, so
the change is open again until it is archived in the last commit.

Refs #2475
…ound, and each stopped comment counts once

The cap ran in refine_one_item, after the selection. With another bot's
reply after each refine comment, the wait of an item at the cap ended at
each round, so the item took one of the --limit places in every round.
Three such items stopped refine from every other item for up to 24 hours,
and each round counted and logged the same stopped comment again.

The selection now applies the cap: an item at the cap waits on a person
and takes no place. The cap stops the comment that would answer the
item's newest comment. --confirm records that comment's time in the job
record (refine.capped_after), logs one warning and counts once. A later
round that finds no newer comment writes, logs and counts nothing.
--item refines an item at the cap, since a person asked for it.

Refs #2475
@dan-petty
dan-petty marked this pull request as ready for review October 28, 2026 23:04
@dan-petty
dan-petty merged commit 9819877 into main Oct 28, 2026
17 checks passed
@dan-petty
dan-petty deleted the feat/2475-roadmap-service-write-telemetry branch October 28, 2026 23:46
dan-petty pushed a commit that referenced this pull request Oct 29, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.12.0](v0.11.3...v0.12.0)
(2026-10-29)


### Features

* **ai:** constrain structured replies on the openai and claude
providers ([#2550](#2550))
([4f7390a](4f7390a))
* **argo:** retire the Helm release records of the charts that Argo CD
renders ([#2568](#2568))
([cabfcd4](cabfcd4))
* **k8s:** devops k8s tunnel keeps the cloudflared forward to
k8s.<domain> running
([#2567](#2567))
([f9493fa](f9493fa)),
closes [#1641](#1641)
* **monitoring:** alert when the otel collector fails to export spans,
metric points or log records
([#2565](#2565))
([4fc8ff7](4fc8ff7))
* **telemetry:** the roadmap Service counts its GitHub writes, budget
holds, Firecrawl searches and own deliveries, and caps refine's comments
on one item
([#2556](#2556))
([9819877](9819877)),
closes [#2475](#2475)


### Bug Fixes

* **git:** report a worktree that a run in parallel removed as removed,
not a failed reclaim
([#2557](#2557))
([a556984](a556984)),
closes [#2408](#2408)
* **k8s:** the devops perimeter opens only the collector's OTLP/HTTP
port, 4318
([#2549](#2549))
([d156ce7](d156ce7))
* **sandbox:** devops sandbox logs reads each line with its stream from
a real engine
([#2546](#2546))
([e7216d5](e7216d5)),
closes [#2520](#2520)
* **service:** the webhook route refuses an unsigned or oversized
delivery before it reads the body, and a rate limit guards it
([#2553](#2553))
([40efcd4](40efcd4)),
closes [#2476](#2476)


### Performance Improvements

* **ai:** price a request with one load of the settings
([#2555](#2555))
([5d86538](5d86538)),
closes [#1420](#1420)


### Code Refactoring

* **config:** a default that backs a settings field is read only through
the settings
([#2561](#2561))
([0702d13](0702d13))
* **exceptions:** each exception class declares its error_code and
exit_code ([#2558](#2558))
([410dece](410dece))
* **review:** render the review report from one input, outside the
orchestrator
([#2563](#2563))
([9e73e6d](9e73e6d)),
closes [#1008](#1008)
* **security:** src has no unreviewed Bandit findings, and the gate
scans src at low severity
([#2560](#2560))
([45261dd](45261dd)),
closes [#1538](#1538)
* **security:** the scanners stop looking for mocks, and their tests run
on the scanner fake
([#2551](#2551))
([2b7f37a](2b7f37a))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant