Description
Two small, verified duplication clusters in pkg/cli/logs_models.go:
- Shared provenance trailer —
MissingToolReport (line 110), MissingDataReport (line 120), NoopReport (line 128), and MCPFailureReport (line 139) all repeat the same Timestamp, WorkflowName, RunID int64 fields. Extract a shared RunProvenance struct and embed it in all four.
- Near-identical summaries —
MissingToolSummary (line 148) and MissingDataSummary (line 168) share 6 of 7 fields (only Tool vs DataType differs), with duplicated aggregation/display logic. Extract a missingItemAggregation base struct and embed in both.
Fix
Introduce RunProvenance and missingItemAggregation base structs; embed them. No behavior change.
Expected Impact
Removes repeated field declarations and duplicated aggregation logic; one place to evolve report provenance.
Suggested Agent
Typist / refactor agent.
Estimated Effort
Fast-Medium (~1-2 h).
Data Source
DeepReport 2026-06-12; Typist analysis #38833 (Clusters 3 & 4).
Generated by 🔬 DeepReport - Intelligence Gathering Agent · 314.1 AIC · ⌖ 19.5 AIC · ⊞ 10.6K · ◷
Description
Two small, verified duplication clusters in
pkg/cli/logs_models.go:MissingToolReport(line 110),MissingDataReport(line 120),NoopReport(line 128), andMCPFailureReport(line 139) all repeat the sameTimestamp,WorkflowName,RunID int64fields. Extract a sharedRunProvenancestruct and embed it in all four.MissingToolSummary(line 148) andMissingDataSummary(line 168) share 6 of 7 fields (onlyToolvsDataTypediffers), with duplicated aggregation/display logic. Extract amissingItemAggregationbase struct and embed in both.Fix
Introduce
RunProvenanceandmissingItemAggregationbase structs; embed them. No behavior change.Expected Impact
Removes repeated field declarations and duplicated aggregation logic; one place to evolve report provenance.
Suggested Agent
Typist / refactor agent.
Estimated Effort
Fast-Medium (~1-2 h).
Data Source
DeepReport 2026-06-12; Typist analysis #38833 (Clusters 3 & 4).