Repository navigation
Description
Split from #5555.
Problem: The issue asks for live proof that a status/ready label starts a stage round within one minute when the stage lane is idle, as shown by the time-to-round metric. Why deferred: This check needs the deployed release and live GitHub webhook deliveries, so it cannot run offline in the implementation pull request. Acceptance criteria: After the release, on a managed repository with an idle stage lane, add status/ready to an issue. Within 60 seconds, devops_cli_service_trigger_latency_seconds{event=issues, lane=stage} shows a new observation and devops_cli_service_triggers_total{event=issues, lane=stage} increments. Record the observed value in the issue.
Proposed design
Problem statement
A person must show on a live release that a status/ready label starts a stage round within 60 seconds on an idle stage lane. The named latency series devops_cli_service_trigger_latency_seconds{event=issues, lane=stage} does not exist. The check uses the existing stage start gauge and trigger counter. A person runs the check after the release of #5555 and records the values on issue #6279.
Acceptance criteria
Requirement: Stage start gauge is present
The live check MUST read the existing devops_cli_service_job_start_timestamp_seconds{repo, lane} gauge for the stage lane.
Scenario: The stage start gauge is present
- WHEN A person runs
uv run devops prometheus query 'devops_cli_service_job_start_timestamp_seconds{repo="dan-petty/devops-cli",lane="stage"}'after the release. - THEN The command prints at least one row with a numeric value.
Requirement: Trigger counter is present
The live check MUST read the existing devops_cli_service_triggers_total{repo, source} counter for the webhook and poll sources.
Scenario: Both trigger sources are present
- WHEN A person runs
uv run devops prometheus query 'devops_cli_service_triggers_total{repo="dan-petty/devops-cli"}'after the release. - THEN The command prints a row for
source="webhook"and a row forsource="poll".
Requirement: Stage lane is idle before the label
The stage lane MUST have started no round in the 60 seconds before the label event.
Scenario: Idle stage lane
- WHEN A person runs
uv run devops prometheus query 'time() - devops_cli_service_job_start_timestamp_seconds{repo="dan-petty/devops-cli",lane="stage"}'just before adding the label. - THEN The command prints a value greater than 60.
Requirement: Ready label starts the stage round
The Service SHALL start a stage round within 60 seconds of a status/ready label event on an idle stage lane.
Scenario: Ready label on an idle stage lane
- WHEN A person records the UTC label time and runs
uv run devops prometheus query 'devops_cli_service_job_start_timestamp_seconds{repo="dan-petty/devops-cli",lane="stage"}'after the stage round starts. - THEN The printed value minus the label time is no greater than 60 seconds.
Requirement: Webhook counted and poll unchanged
The Service SHALL count the label delivery in devops_cli_service_triggers_total{source="webhook"} and leave the poll count unchanged in the 60-second window.
Scenario: Webhook counted and poll unchanged
- WHEN A person runs
uv run devops prometheus query 'devops_cli_service_triggers_total{repo="dan-petty/devops-cli"}'just after a poll tick, adds the label, and runs the query again after the stage round starts. - THEN The
source="webhook"value is greater than the first read, and thesource="poll"value equals the first read.
Requirement: Pending a person after the merge
The person who runs the live check MUST record the observed values in a comment on issue #6279.
Scenario: The live check is recorded
- WHEN A person runs
uv run devops gh issue view 6279 --commentsafter the check. - THEN The output holds a comment with the UTC label time, the stage round start time, the latency in seconds, and the webhook and poll counter values before and after.
Existing Tool Considered
No alternatives check has run. Prometheus, the open and maintained metrics backend, covers the live read through its instant query API. The project already wraps it as uv run devops prometheus query '<promql>' in src/devops_cli/commands/prometheus.py. The client in src/devops_cli/prometheus/client.py adds the egress check and the retry. Prometheus lacks the devops_cli_service_trigger_latency_seconds series and the event and lane labels on the trigger counter. The check takes the round start from devops_cli_service_job_start_timestamp_seconds. It reads both sources of devops_cli_service_triggers_total. The person records the label event time, which no series holds.
Key questions
- Does the Service expose
devops_cli_service_trigger_latency_secondswitheventandlanelabels?: No. The Service exposes the gaugedevops_cli_service_job_start_timestamp_seconds{repo, lane}and the counterdevops_cli_service_triggers_total{repo, source}. The named latency series does not exist. The counter has noeventorlanelabel. [sources: src/devops_cli/config/constants.py, k8s/devops/monitoring/prometheus-rules-values.yaml, tests/fixtures/prometheus_rules/roadmap_service_tests.yaml] - Which command does the live check use?: The check uses the maintained
uv run devops prometheus query '<promql>'command. The command sends a Prometheus instant query and prints each series with its value. It readsprometheus.urlthrough the egress-checked client. The client retries a transient failure. The check needs no new code. (best practice) [sources: src/devops_cli/commands/prometheus.py, src/devops_cli/prometheus/client.py, docs/CLUSTER.md]- Chosen: The existing
devops prometheus queryinstant query. The project keeps this command and its client. It returns the exact series and value that the criteria assert. - Rejected: A raw
curlto the Prometheus HTTP API. It duplicates the maintained client and skips its egress check and retry policy. - Rejected: Read a Grafana panel by eye. The panel shows a time window, not the exact sample, so it gives no value that a criterion can assert.
- Rejected: Add a new devops command that queries the metrics. The command already exists, so this adds code that the project must keep and fix for nothing.
- Chosen: The existing
- Which bound separates a webhook wake from the poll?: Use 60 seconds. The poll interval is longer than 60 seconds. A stage round inside 60 seconds of the label is no poll round. The check reads both sources of the trigger counter. It starts just after a poll tick. A poll that changes the counter then shows. (best practice) [sources: docs/adr/0017-each-subscribed-webhook-event-runs-the-update-scoped-to-it.md, docs/CLUSTER.md, CONTEXT.md]
- Chosen: 60 seconds. It is below the poll interval. The poll counter read holds a poll wake apart from the webhook wake.
- Rejected: The 5-minute sweep interval. A round that the sweep starts also passes, so the check proves nothing about the webhook.
- Rejected: One scrape interval. The scrape interval is a property of the metrics backend, not of the wake. It varies with the deployment.
- Does the item add a metric or use the existing series?: The item uses the existing series and adds no code. It records one live observation. The gauge
devops_cli_service_job_start_timestamp_secondsgives the round start. The counterdevops_cli_service_triggers_totalgives both sources. A new latency metric would add an instrument, its priming and its tests to build, keep and fix for one observation. (best practice) [sources: AGENTS.md, src/devops_cli/config/constants.py, k8s/devops/monitoring/prometheus-rules-values.yaml]- Chosen: Record the observation only. The check needs the deployed release and live webhook deliveries. The existing gauge already records the round start. No offline test produces the value.
- Rejected: Add a
devops_cli_service_trigger_latency_secondsmetric. It adds an instrument, its priming and its tests to build, keep and fix for one observation. The existing gauge and counter give the number. - Rejected: Add a live check command to devops.
devops prometheus queryalready sends the instant query. A new command adds code that the project must keep and fix.
- Which repository runs the live check?: Run the check on devops-cli itself. It is a managed project. Its stage row has a lane that the webhook wakes. (best practice) [sources: CONTEXT.md, docs/CLUSTER.md]
- Chosen: devops-cli. It is a managed project. The stage row and its lane exist there.
- Rejected: Another managed repository. It needs a person to choose it and to grant the check access. It proves no more than devops-cli.
Fit
Fits in one pull request.
Suspected block
None.
Activity
devops-cli-service commentedon Nov 18, 2026
Both concern webhook events waking stage lanes, but #5555 delivers the routing feature and the candidate delivers a post-release latency verification step.devops-cli-service commentedon Nov 19, 2026
Refine cannot set this item to Ready at 29e3a03 while the items below stay open. The next refine round looks at the item again when they close, or when a person replies in a comment or edits the body.
The next refine round also looks at the item again when a commit on the default branch changes one of these files:
src/devops_cli/server/routes/webhooks.py,src/devops_cli/server/service.py,src/devops_cli/config/constants.py,src/devops_cli/roadmap/run.py.devops-cli-service commentedon Nov 19, 2026
Refine cannot set this item to Ready at 3ecd647 while the items below stay open. The next refine round looks at the item again when they close, or when a person replies in a comment or edits the body.
devops-cli-service commentedon Nov 27, 2026
Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies and Watched files in the section Proposed design of the body.
devops-cli-service commentedon Nov 28, 2026
Owner question: See Suspected block and Watched files in the section Proposed design of the body.
Options
Recommendation: Decide the question: only a person can answer it.
Evidence
devops-cli-service commentedon Nov 29, 2026
Next step: the alternatives check records a verdict. See the section Proposed design of the body.