chore: more concise comments - #2790
Open
Tofel wants to merge 4 commits into
Open
Conversation
📊 API Diff Results
|
Tofel
force-pushed
the
dx-5122-alerts-assertion-p12
branch
from
September 1, 2026 11:25
f079183 to
b8c24f4
Compare
Tofel
force-pushed
the
dx-5122-alerts-assertion-p12
branch
2 times, most recently
from
September 1, 2026 14:46
7b1a505 to
69d5193
Compare
Tofel
force-pushed
the
dx-5122-alerts-assertion-p12
branch
from
September 1, 2026 15:25
69d5193 to
0da12c7
Compare
Tofel
force-pushed
the
dx-5122-alerts-assertion-p12
branch
2 times, most recently
from
September 2, 2026 09:57
b6c0dda to
641701b
Compare
Tofel
force-pushed
the
dx-5122-alerts-assertion-p12
branch
from
September 2, 2026 11:05
641701b to
03eb0f1
Compare
Tofel
force-pushed
the
dx-5122-alerts-assertion-p12
branch
from
September 2, 2026 11:23
03eb0f1 to
788c7ae
Compare
Tofel
force-pushed
the
dx-5122-alerts-assertion-p12
branch
2 times, most recently
from
September 4, 2026 15:15
6f766ca to
803f45f
Compare
Tofel
force-pushed
the
dx-5122-alerts-assertion-p12
branch
from
September 7, 2026 09:35
803f45f to
7a37ee3
Compare
Tofel
marked this pull request as ready for review
September 7, 2026 09:37
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
Changes are limited to comment and error-message text cleanup with corresponding test updates, and no behavioral logic changes were identified.
Pull request overview
This PR performs a comment and user-facing error-string cleanup in the grafana-alertcheck gate implementation, removing stale section-reference markers (e.g., §...) and condensing verbose explanatory prose while keeping behavior unchanged.
Changes:
- Condense and deduplicate in-code documentation across the gate’s record/watch, parse, schedule, coverage, and classification layers.
- Simplify several error message strings (notably removing
§/H*references) and update tests to assert on the new wording. - Clarify CLI help text and table-rendering comments to better describe operator-facing output without referencing external plan sections.
File summaries
| File | Description |
|---|---|
| grafana-alertcheck/internal/gate/watch.go | Comment condensation in watch/daemon lifecycle docs; minor wording adjustments. |
| grafana-alertcheck/internal/gate/watch_test.go | Test comment cleanup; updates to assertions that previously looked for section markers in error strings. |
| grafana-alertcheck/internal/gate/watch_process.go | Comment cleanup around detached child spawning and readiness pipe. |
| grafana-alertcheck/internal/gate/watch_daemon_test.go | Comment cleanup for daemon-child integration test harness. |
| grafana-alertcheck/internal/gate/testdata/README.md | Documentation cleanup for fixture provenance/coverage explanations. |
| grafana-alertcheck/internal/gate/source.go | Comment cleanup plus error-string text changes for Date header and skew hard-limit failures. |
| grafana-alertcheck/internal/gate/source_test.go | Test message updates to match revised error-string wording and commentary cleanup. |
| grafana-alertcheck/internal/gate/source_fake_test.go | Comment condensation for fake clock/source test doubles. |
| grafana-alertcheck/internal/gate/schedule.go | Comment cleanup for timing derivations and scheduler invariants. |
| grafana-alertcheck/internal/gate/schedule_test.go | Test comment cleanup; preserves behavioral assertions. |
| grafana-alertcheck/internal/gate/resolve.go | Comment cleanup for name-resolution rules/policy. |
| grafana-alertcheck/internal/gate/resolve_test.go | Test comment cleanup around resolution/collapse behavior. |
| grafana-alertcheck/internal/gate/parse_state.go | Comment cleanup around strict parsing requirements and invariants. |
| grafana-alertcheck/internal/gate/parse_state_test.go | Test comment cleanup and minor wording adjustments in messages. |
| grafana-alertcheck/internal/gate/parse_ruler.go | Comment cleanup clarifying rule-kind handling and parsing scope. |
| grafana-alertcheck/internal/gate/parse_ruler_test.go | Test comment cleanup; clarifies uid-based disambiguation rationale. |
| grafana-alertcheck/internal/gate/log.go | Comment cleanup for log schema semantics, marker logic, and invariants. |
| grafana-alertcheck/internal/gate/log_test.go | Test comment cleanup; updates assertions that previously required section markers in messages. |
| grafana-alertcheck/internal/gate/jsonreq.go | Comment cleanup for required-field decoding behavior. |
| grafana-alertcheck/internal/gate/flock.go | Comment cleanup for flock semantics in writer detection. |
| grafana-alertcheck/internal/gate/duration.go | Comment cleanup for Prometheus-style duration parsing. |
| grafana-alertcheck/internal/gate/coverage.go | Comment cleanup for coverage proof responsibilities and check descriptions; updates KeepLast note text. |
| grafana-alertcheck/internal/gate/coverage_test.go | Test comment/message cleanup to match updated coverage messaging. |
| grafana-alertcheck/internal/gate/classify.go | Comment cleanup around policy, outcomes, and decide() responsibilities. |
| grafana-alertcheck/internal/gate/classify_test.go | Test comment/message cleanup for classification and decide() behavior. |
| grafana-alertcheck/internal/gate/check_test.go | Test comment/message cleanup around validation, failure modes, and expectations. |
| grafana-alertcheck/internal/gate/check_process.go | Comment cleanup for recorder signaling. |
| grafana-alertcheck/cmd/grafana-alertcheck/watch.go | CLI-layer comment cleanup describing parent/child dispatch and daemon-child entrypoint. |
| grafana-alertcheck/cmd/grafana-alertcheck/watch_test.go | CLI watch tests: comment cleanup for validation/dispatch coverage. |
| grafana-alertcheck/cmd/grafana-alertcheck/table.go | Comment cleanup clarifying stderr/stdout contract and rendered table sections. |
| grafana-alertcheck/cmd/grafana-alertcheck/table_test.go | Golden-output test comment cleanup; keeps assertions intact. |
| grafana-alertcheck/cmd/grafana-alertcheck/main.go | Top-level CLI comment cleanup describing subcommands and exit-code responsibilities. |
| grafana-alertcheck/cmd/grafana-alertcheck/list.go | Comment cleanup clarifying list’s role as operator surface and validation path. |
| grafana-alertcheck/cmd/grafana-alertcheck/env.go | Comment cleanup reinforcing env-only secret handling. |
| grafana-alertcheck/cmd/grafana-alertcheck/common.go | Comment/help-text cleanup for shared flags and state parsing. |
| grafana-alertcheck/cmd/grafana-alertcheck/check.go | CLI check help-text and comment cleanup; removes section references from user messages. |
| grafana-alertcheck/cmd/grafana-alertcheck/check_test.go | CLI check tests: comment/message cleanup; keeps exit-code mapping assertions aligned. |
Review details
- Files reviewed: 38/38 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Tofel
force-pushed
the
dx-5122-alerts-assertion-p12
branch
from
September 7, 2026 09:46
7a37ee3 to
f4df0d5
Compare
Tofel
force-pushed
the
dx-5122-alerts-assertion-p12
branch
from
September 7, 2026 15:02
f4df0d5 to
34040df
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Comment-only cleanup across the package (40 files): removes stale §-section references from comments and error messages, condenses verbose prose, and deduplicates. No functional changes.
Review focus: error message strings that dropped their § refs — confirm none are asserted elsewhere.