Repository navigation
Description
Problem Description
A scoped intake update (an issues webhook delivery) sends its model requests outside a row scope. Thus the AI request, token, spend and answer series of that intake work get row="other", not row="intake". Issue #4475 (pull request #4484) expects each Service series to carry the row whose work sent the request.
run_scoped_update in src/devops_cli/roadmap/run.py calls update.runner(...) with no request_scope(row=update.job). The only row scope is with request_scope(row=row.name) in the round loop. ScopedRoadmap in src/devops_cli/server/service.py wraps the scoped function in request_scope(repo=self.repo) only. _intake_one builds build_intake_model(), and its spend goes through track_request_spend in src/devops_cli/ai/spend/ledger.py, which reads request_labels()["row"].
For the same work, _count_job(delivery.repo, update.lane, update.job, ...) counts the job under row intake. Thus the job counter and the AI series do not agree. The same gap applies to devops_cli_github_requests_total (#2475).
docs/TELEMETRY.md says: "In the Service, the rows intake, refine, retitle, stage and alternatives send model requests". This is not true for the scoped path.
Reproduction Steps
- On
mainat 9b14af0, send a scopedissues.openeddelivery throughrun_scoped_updatewith a model fake that answers the intake call, and record the OTLP points with theFakeCollectorof the otlp test fixture. - Read the
rowattribute of thedevops_cli_ai_tokens_totalpoints.
Expected vs Actual Behavior
Expected: the points carry row="intake", the same row as the job counter of the scoped update.
Actual: the points carry row="other", because no request_scope(row=...) encloses update.runner(...).
Proposed fix
In run_scoped_update, wrap the update.runner(...) call in request_scope(row=update.job) (from devops_cli.github.request_scope, which run.py already imports). Add a test that sends a scoped issues.opened delivery with a model fake and the otlp FakeCollector, and expects row intake on devops_cli_ai_tokens_total. No new library is needed.
Environment Diagnostics
- DevOps CLI Version:
mainat 9b14af0 (after fix(roadmap): stage and refine send no answer count or row #4484, merge commit d9c8ee8) - Execution Environment: the roadmap Service (webhook path) and the DevContainer
Logs, Traces, or Terminal Output
src/devops_cli/roadmap/run.py:920 outcome = update.runner( # no request_scope(row=...)
src/devops_cli/roadmap/run.py:1490 with request_scope(row=row.name): # round loop only
src/devops_cli/server/service.py:633 with request_scope(repo=self.repo): # repo only
src/devops_cli/ai/spend/ledger.py:1054 "row": request_labels()["row"],
Found in the review of #4484.
Activity
dan-petty commentedon Nov 11, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
fixprefix of the title gives the type.(roadmap)scope of the title gives the scope.Metrics show wrong row for scoped intake, affecting observability but not user-facing functionality.Correct row labels are needed for accurate cost attribution and debugging of scoped intake work.The fix is one request_scope wrapper plus one test case, no new library needed.Both fix missing row labels on AI metrics in the roadmap, but #4475 covers stage/refine/alternatives rows while the candidate covers the scoped intake path.devops-cli-service commentedon Nov 11, 2026
Released in v0.112.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.112.0
devops-cli-service commentedon Nov 11, 2026
Live since 2026-11-11 14:13 UTC