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
{{ message }}
Repository navigation
[deep-report] Replace loose any typing in pkg/typeutil/lookup.go and pkg/cli/token_usage_parse.go with concrete types #66973
pkg/typeutil/lookup.go (e.g. LookupMap/LookupString, lines 20-41) and pkg/cli/token_usage_parse.go (e.g. extractUsageRecord/usageNumericValue/usageStringValue, lines 146-190) both center their logic on map[string]any lookups with repeated ad-hoc type assertions. These sit on the hot path for frontmatter parsing and token-usage-log parsing — two frequently-touched, easy-to-regress areas, per the 2026-10-08 Typist (Go Type Consistency Analysis) report.
Expected Impact
Fewer silent type-assertion failures (value.(map[string]any) returning ok=false is easy to miss downstream), and better compile-time safety on two parsing paths that are touched often.
Suggested Fix
Introduce small generic helpers in pkg/typeutil (e.g. LookupTyped[T any](m map[string]any, key string) (T, bool)) to replace the repeated per-type Lookup* functions, and introduce a concrete struct for usage records in token_usage_parse.go instead of threading any/map[string]any through multiple helper functions.
DeepReport Intelligence Briefing, 2026-10-08 (cycle 3). Source discussion #66860 (Typist). Live-verified today: both files still use the any/map[string]any patterns described.
Generated by 🔬 Deep Report · claude · agent · 343.4 AIC · ⌖ 9.25 AIC · ⊞ 7.1K · ◷
Activity
github-actions commentedon Oct 10, 2026
This issue was automatically closed because it expired on 2026-10-10T18:48:00.948Z.