Description
internal/attr classifies every field into DestMetric, DestRecord or DestContent and the tests pin the classification. What is missing is the enforcement at the point a dimension value is built: the cap, the overflow bucket and the cwd-to-repo mapping.
Repo is the dimension that makes the whole dashboard useful and cwd is the field most likely to blow up the series count, so the mapping is the control that lets both be true.
Acceptance Criteria
- #1 A bounded dimension value past metrics.dimension_cap becomes attr.Overflow and increments attribute_rejections
- #2 cwd is mapped to codingagent.repo through metrics.repo_allowlist; an unmatched cwd becomes other
- #3 cwd itself never reaches a metric attribute; the existing attr test is extended to cover the mapping helper
- #4 A metric attribute built from an undeclared key is an error at construction, not a silent pass
Definition of Done
- #1 just check passes: fmt-check, lint, build, test-short, probe-ci, dashboard-check and docs-links all clean
Implementation Plan
Wave 1 lane 2: implement bounded dimensions and structural content bounds within owned attr/redact files; run focused tests; root integrates and runs the final gate.
Final Summary
Metric dimensions are declared, capped, overflow-counted, and cwd maps only through the repository allowlist; focused and full gates passed.