Change '_handler' from public to package access #225
All Vouch review confidence checks passed
Residual risk 0.28 = Change Risk (0.51) × (1 − Review Confidence (0.44)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.51 · 240 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 10%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.328
No Reviewer Assigned
no_reviewer_assigned
0.120
Real PR Conversation Timeline
1 comments
"Review active on #225"
general
weight: 0.35
adityasingh2400
Lower the
_handlerproperties frompublictopackageaccess, matching_factory.Motivation:
The
_handler(and_factory) properties onCounter,FloatingPointCounter,Meter,Recorder, andTimerare not part of the public API. Their doc comments already state "Do not consider them part of the public API" and they are hidden from documentation via@_documentation(visibility: internal). They are only exposed so thatMetricsTestKitcan reach into them.These properties were declared
publicbecause they predate thepackageaccess level. As requested in issue #173 (and the earlier review discussion on #172, where the maintainers asked forpackageto be used),_factorywas already migrated topackage. This change finishes the job for the matching_handlerproperties so the testing-only surface is no longer part of the public API.Modifications:
_handleronCounter,FloatingPointCounter,Meter,Recorder, andTimerfrompublic letto@usableFromInline package let.@usableFromInlinebecause_handleris referenced from existing@inlinablemembers (increment,reset,record,destroy, ...); this mirrors the existing@usableFromInline package let _factorydeclaration.package(instead of "only public") to allow access fromMetricsTestKit.Result:
The
_handlerand_factorytesting-only properties are nowpackagerather thanpublic, consistent with their documented "not public API" intent and with the maintainers' request.MetricsTestKitcontinues to access them within the same package, and the full test suite passes (103 tests in 8 suites). Note this lowers the access level of underscore-prefixed, documentation-hidden symbols, so it is technically source-breaking for any code that reached into them directly.Fixes #173