You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Two leaf-helper families are copy-pasted across packages:
Label sanitization/truncation — 3 copies.truncateLabel, sanitizeLabel, hasControlRunes have byte-identical bodies in core/cost/usage/usage.go:1569-1662 and core/cost/ledger/row.go:210-304 (~45 lines each; only the comments differ). cmd/agentop/tui/usage_render.go:687 has a third, weaker variant (C0/DEL only). The rune predicate was already extracted (pipeline.IsControlRune, imported by both cost packages) — row.go:256 explicitly says the rule was extracted but the loops were not.
SanitizeLabel/TruncateLabel beside pipeline.IsControlRune (or a tiny leaf), with each package keeping its policy comments and thin wrappers; one hostmatch helper in core/plugins/internal. ~130 lines deleted and the stored-vs-rendered control-rune handling stops differing.
Found in the 2026-10-29 structural audit of code organization.
Activity