Repository navigation
Description
Update 2026-11-26 (infra move): the cluster alert rules go to dan-petty/homelab.
This issue keeps pint for the product rules in k8s/devops/monitoring/prometheus-rules-values.yaml. tools.lock is gone: pint must come from the devtools image, which does not have it today. The rules of k8s/monitoring/prometheus-values.yaml are homelab work. The live series run is dan-petty/homelab#363 and pint watch is dan-petty/homelab#364.
Follow-up: dan-petty/homelab#289.
Problem or Motivation
promtool tests prove that a rule fires on fixtures, not that the live Prometheus has the series that the rule reads. ResearchCriticalFindings is silent today because the research sweep has not run in 7 d (#3908). Other gaps are known (PersistentVolumeSpaceLow on local-path) or planned (the #4566 RAG alert). This item is rank 21 of the cluster integration plan #4989.
Proposed Solution & Architectural Design
- Add the offline
pint cichecks (cloudflare/pint, Apache-2.0, v0.90.0) to CI fork8s/devops/monitoring/prometheus-rules-values.yaml. - Run the live series checks from a workstation through the Prometheus ingress.
- Add a
pint watchDeployment only if the live run finds gaps that come back. - A rule that reads an event-only series gets a pint disable comment with the reason.
Target Subsystem
SDLC, Git & PR Governance (CI checks of k8s/monitoring/).
Existing Tool Considered
pint (Apache-2.0). Nothing is built.
Acceptance Criteria
- The CI pint check passes on main and fails on a rule with a syntax or label error.
- A comment on this issue lists the live run result: each rule that reads a missing series, and its fix or its disable reason.
Dependencies
None.
Source: #4989
Alternatives check of 2026-11-26: not-applicable.
Class: test, no model call.
Tool: none found.
Proposed design
Problem statement
The product alert rules in k8s/devops/monitoring/prometheus-rules-values.yaml have no offline lint gate for PromQL, labels and annotations. A broken rule reaches main and the live Prometheus only. This change adds a pint row to the devops ci gate, which the Static Analysis check runs, over the product rule groups. The live series run and pint watch are homelab work in dan-petty/homelab#363 and dan-petty/homelab#364.
Acceptance criteria
Requirement: The pint row runs over the product rules
The devops ci gate SHALL hold a pint row that runs pint ci in offline mode over the groups of serverFiles.devops_cli_alerting_rules.yml in k8s/devops/monitoring/prometheus-rules-values.yaml.
Scenario: The pint row runs offline
- WHEN
uv run devops ci --only pintruns with no Prometheus server - THEN The row exits 0, writes the product rule groups to a temporary rule file, and its output names the pint version and the rule file.
Requirement: An invalid expression fails the row
The pint row SHALL fail when a product rule holds an expression that is not valid PromQL or a label or annotation template that pint refuses.
Scenario: A broken expression fails the row
- WHEN a rule under
serverFiles.devops_cli_alerting_rules.ymlholds anexprthat is not valid PromQL - THEN
uv run devops ci --only pintexits non-zero and its output names the file, the line and the pint check.
Requirement: The row uses the devtools pint
The pint row SHALL run the pint binary from the devtools image.
Scenario: The row uses the image pint
- WHEN the
Static Analysischeck runsuv run devops ci --only pint - THEN The row runs
pintfrom PATH and its output names the version thatpint --versionprints.
Requirement: A missing pint fails the row
The pint row MUST fail with a message that names the missing pint binary when the devtools image does not provide it.
Scenario: The image has no pint
- WHEN
uv run devops ci --only pintruns on an image withoutpint - THEN The row exits non-zero and its output names
pintand the devtools image.
Existing Tool Considered
The alternatives check of 2026-11-26 in the issue body gave not-applicable for class test and named no tool. The item names pint (Apache-2.0, v0.90.0), an open, maintained rule checker, and the change builds no checker. pint covers offline PromQL, label and annotation checks. It lacks a live Prometheus, so it cannot show that a rule reads a series that the server exports; that live run is dan-petty/homelab#363. The devtools image does not have pint today, so the row waits on that image.
Key questions
- Which tool checks the product Prometheus rule file?: pint (Apache-2.0, v0.90.0) checks the product rule file offline. The alternatives check gave not-applicable and named no tool. The item names pint. The change builds no checker. (best practice) [sources: k8s/devops/monitoring/prometheus-rules-values.yaml]
- Chosen: pint offline. The item names it. It is open and maintained. It checks PromQL, label names and annotation templates with no server.
- Rejected: promtool check rules. It checks the expression only. It does not check label names or annotation templates.
- Rejected: a linter that the repository builds. It costs build, keep and fix work for a check that pint already runs.
- Where does the pint row run?: Add a pint row to the devops ci table. The row runs inside the existing Static Analysis check, because that job runs the gate. The required check names do not change. (best practice) [sources: openspec/specs/ci-gate-rows/spec.md, docs/TESTING.md, .github/workflows/ci.yml, src/devops_cli/commands/ci.py]
- Chosen: a row of the devops ci gate. The gate spec and docs/TESTING.md require a check of committed files to be a row. The Static Analysis job runs the gate.
- Rejected: a raw step in the Static Analysis job. A raw step runs in CI only. A local devops ci run and the runner Job would skip it.
- Rejected: a new workflow job. A new check name needs a ruleset change, which only a person makes.
- How does the row feed pint the product rules?: The row extracts the groups of serverFiles.devops_cli_alerting_rules.yml to a temporary Prometheus rule file. It runs pint over that file. (best practice) [sources: k8s/devops/monitoring/prometheus-rules-values.yaml]
- Chosen: extract the groups to a rule file. The product file is a Helm values file. pint reads a Prometheus rule file, whose top level is groups.
- Rejected: point pint at the values file. The values file nests the rules under serverFiles. It is not a Prometheus rule file.
- Rejected: copy the rules to a second file. A second copy drifts from the product file.
- How is pint available to the row?: Use the pint binary from the devtools image. The container-image spec says the Dockerfile takes its tools from the devtools image. The image lacks pint today, so the row waits on the image. (best practice) [sources: openspec/specs/container-image-layers/spec.md, docs/DEVCONTAINER_USAGE.md]
- Chosen: the devtools image. The container-image spec says the Dockerfile takes its tools from the devtools image.
- Rejected: a tools.lock entry. The issue says tools.lock is gone.
- Rejected: a curl download in the row. It adds a network step and skips the image pin.
Fit
Fits in one pull request.
Suspected block
The devtools image must include pint v0.90.0 before the pint row can pass.
Dependencies
None.
Moved to new items
#6025, #6026
Activity
dan-petty commentedon Nov 12, 2026
Both add test coverage under test(monitoring) for k8s/monitoring/, but dan-petty/devops-cli#4680 evaluates panel queries on fixtures while this item validates alert rules with pint.devops-cli-service commentedon Nov 15, 2026
Alternatives check: not-applicable
Class: test. The check makes no search and no model call for an item of this class.
Tool: none found
Checked on 2026-11-15. A person decides what this means for the item. The check changes no label and closes no issue.
devops-cli-service commentedon Nov 16, 2026
Status set to Ready at 9f40f15 (see proposed design in issue body).
Moved to new items: dan-petty/homelab#363, dan-petty/homelab#364.
devops-cli-service commentedon Nov 27, 2026
Owner question: See Suspected block in the section Proposed design of the body.
Options
Recommendation: Decide the question: only a person can answer it.
Evidence