Source: docs/followups/opportunistic.md row 13 (Next up).
The AST walker in components/receivers/dcgm/docs_parity_test.go (RUNBOOK ↔ IncError-kind parity, README ↔ example_config defaults) is the bar every new receiver should clear, but it's currently ~300 LOC inside dcgm. Moving it to internal/testhelpers/docsparity/ makes the bar invisible-to-explicit and saves the duplication on the second receiver author.
Trigger status (FIRED): kernelevents already maintains a parallel implementation at runbook_kinds_test.go — second caller exists today.
Files:
components/receivers/dcgm/docs_parity_test.go — source.
components/receivers/kernelevents/runbook_kinds_test.go — second caller (consolidate w/ source).
- New:
internal/testhelpers/docsparity/docsparity.go — exported API like docsparity.AssertParity(t, ReceiverPath, RunbookPath).
Coordinate with #137 (the AST walker resolveIncErrorCall CallExpr fix) — implement both in one refactor so the hoist captures the CallExpr handling.
Acceptance:
- Both dcgm and kernelevents tests call the hoisted helper.
- New receiver authors invoke it in a single line; no AST boilerplate to copy.
Source:
docs/followups/opportunistic.mdrow 13 (Next up).The AST walker in
components/receivers/dcgm/docs_parity_test.go(RUNBOOK ↔ IncError-kind parity, README ↔ example_config defaults) is the bar every new receiver should clear, but it's currently ~300 LOC inside dcgm. Moving it tointernal/testhelpers/docsparity/makes the bar invisible-to-explicit and saves the duplication on the second receiver author.Trigger status (FIRED): kernelevents already maintains a parallel implementation at
runbook_kinds_test.go— second caller exists today.Files:
components/receivers/dcgm/docs_parity_test.go— source.components/receivers/kernelevents/runbook_kinds_test.go— second caller (consolidate w/ source).internal/testhelpers/docsparity/docsparity.go— exported API likedocsparity.AssertParity(t, ReceiverPath, RunbookPath).Coordinate with #137 (the AST walker
resolveIncErrorCallCallExpr fix) — implement both in one refactor so the hoist captures the CallExpr handling.Acceptance: