Task · OPN-0132

Infer const histogram types in the generated metric catalogue

Description

The flow delta-ratio and Unbound recursion histogram declarations are classified as Gauge in generated documentation. Owner approved source-based type inference correction.

Acceptance Criteria

Definition of Done

Implementation Plan

Reproduce emitted const histograms being inferred as Gauge; fix emission-based inference and type totals; exercise focused tests and root-run docgen.

Implementation Notes

Observed regression assertions fail for both real families and both constructor forms before implementation. go test ./scripts/docgen -count=1 -timeout=120s passed. Actual generator now reports 1048 metrics: 695 gauges, 350 counters, 3 histograms, and both affected families are Histogram.

Final Summary

Added emission-based const histogram inference and separate histogram totals. Regression first failed for real families and both constructors, then package tests and actual generator passed. Integrated just check passed; CodeRabbit completed with zero issues.

View the source file on GitHub