Consolidate RunSummary and DownloadResult analysis fields - #52957
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Consolidates duplicated run-analysis fields into an embedded RunAnalysis model while preserving flat summary JSON.
Changes:
- Embeds
RunAnalysisinRunSummaryandDownloadResult. - Updates construction and cache-conversion paths.
- Adds embedding, promotion, serialization, and regression coverage.
Show a summary per file
| File | Description |
|---|---|
pkg/cli/logs_models.go |
Defines and embeds RunAnalysis. |
pkg/cli/logs_run_processor.go |
Updates result and summary construction. |
pkg/cli/audit.go |
Builds audit summaries with shared analysis. |
pkg/cli/audit_diff.go |
Updates partial diff summaries. |
pkg/cli/logs_summary_test.go |
Tests embedding and flat JSON. |
pkg/cli/logs_summary_integration_test.go |
Updates cache integration fixtures. |
pkg/cli/logs_usage_activity_test.go |
Updates usage fixtures. |
pkg/cli/logs_run_processor_test.go |
Updates processor fixtures. |
pkg/cli/logs_parallel_test.go |
Updates result fixtures. |
pkg/cli/logs_orchestrator_filters_test.go |
Updates filter fixtures. |
pkg/cli/logs_cache_test.go |
Updates cache fixtures. |
pkg/cli/forecast_compliance_fixtures_formal_test.go |
Updates formal round-trip fixture. |
pkg/cli/audit_test.go |
Updates audit fixtures. |
pkg/cli/audit_evals_fallback_test.go |
Updates eval fallback fixture. |
pkg/cli/audit_diff_test.go |
Updates audit-diff fixtures. |
Review details
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 15/15 changed files
- Comments generated: 1
- Review effort level: Balanced
| CLIVersion string `json:"cli_version"` // CLI version used to process this run | ||
| RunID int64 `json:"run_id"` // Workflow run database ID | ||
| ProcessedAt time.Time `json:"processed_at"` // When this summary was created | ||
| type RunAnalysis struct { |
|
@copilot Quick triage for maintainer-ready follow-up: Please refresh the branch if GitHub allows it and run the Current signal:
Run context: https://github.com/github/gh-aw/actions/runs/31907553336
|
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Ran the pr-finisher pass:
Latest change is doc-comment only, no behavior change. CI needs a maintainer re-trigger before merge. |
|
🎉 This pull request is included in a new release. Release: |
RunSummaryandDownloadResultcarried the same run-analysis field set independently, creating drift risk whenever artifact/log analysis metadata changed. This refactor moves the shared surface into one embedded type while preserving promoted field access and flatRunSummaryJSON.RunAnalysisfor the common run metadata, metrics, analysis reports, usage summaries, and job details.RunAnalysisin bothRunSummaryandDownloadResult.PolicyAnalysisandArtifactsListonRunSummary, where they remain summary-specific.Construction sites
RunAnalysis.summary.RunAnalysisdirectly when converting a cached summary into aDownloadResult.Regression coverage
RunAnalysis, do not redeclare shared fields, and continue promoting those fields.RunSummarymarshals embedded analysis fields as flat JSON keys rather than nesting underRunAnalysis.