Skip to content

Rename audit report finding type - #55801

Merged
pelikhan merged 2 commits into
mainfrom
copilot/deep-report-rename-finding
Aug 25, 2026
Merged

pelikhan merged 2 commits into
mainfrom
copilot/deep-report-rename-finding

Conversation

Copilot AI commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Audit-report insights and scanner findings used the same Finding name despite representing different data. This renames the audit-specific type to clarify package-local usage.

  • Type clarity
    • Rename cli.Finding to cli.AuditFinding.
    • Update audit generation, rendering, and test helpers.
type AuditFinding struct {
    Category    string
    Severity    scanfindings.SeverityLevel
    Title       string
    Description string
    Impact      string
}
  • Compatibility
    • Preserve the key_findings JSON shape and all existing fields.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Rename pkg/cli.Finding to AuditFinding to avoid naming collision Rename audit report finding type Aug 25, 2026
Copilot AI requested a review from pelikhan August 25, 2026 14:44
@pelikhan
pelikhan marked this pull request as ready for review August 25, 2026 16:06
Copilot AI balanced review requested due to automatic review settings August 25, 2026 16:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Renames the audit-specific finding type to avoid confusion with scanner findings while preserving behavior and JSON output.

Changes:

  • Renames Finding to AuditFinding across audit generation and rendering.
  • Updates test helpers and fixtures to use the renamed type.
Show a summary per file
File Description
pkg/cli/audit_report.go Defines and wires AuditFinding.
pkg/cli/audit_report_analysis.go Updates finding generation and recommendation inputs.
pkg/cli/audit_report_render.go Updates finding rendering and filtering.
pkg/cli/audit_agentic_analysis.go Updates agentic finding generation.
pkg/cli/audit_report_test.go Updates audit tests and helpers.
pkg/cli/audit_agent_output_test.go Updates agent-output test fixtures.

Review details

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 6/6 changed files
  • Comments generated: 0
  • Review effort level: Balanced

@github-actions

github-actions Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Code Quality Reviewer completed the code quality review.

🔎 Code quality review by PR Code Quality Reviewer

@github-actions

github-actions Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

✅ Design Decision Gate 🏗️ completed the design decision gate check.

No ADR enforcement needed: PR #55801 does not have the 'implementation' label and has 67 new lines of code in business logic directories (threshold: 100).

🏗️ ADR gate enforced by Design Decision Gate 🏗️

@github-actions

github-actions Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

✅ Test Quality Sentinel completed test quality analysis.

Test Quality Sentinel skipped: Pre-fetch PR data was unavailable — unable to fetch test file diff. Cannot perform behavioral test quality analysis without diff content.

🧪 Test quality analysis by Test Quality Sentinel

@github-actions

github-actions Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

✅ Ponytail Reviewer completed successfully!

Lean already. Ship.

Generated by Ponytail Reviewer for #55801

@github-actions

github-actions Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skills-Based Review 🧠

Applied /codebase-design and /grill-with-docs — this is a clean, well-scoped rename with no logic changes.

📋 Assessment

Positive Highlights

  • ✅ AuditFinding is a better name: it distinguishes the audit-report type from scanner Finding structs in the same package, reducing naming collision risk
  • ✅ Rename is complete and consistent across all 6 files (generation, rendering, analysis, tests)
  • ✅ JSON wire shape (key_findings) is preserved — no compatibility break
  • ✅ PR body references the motivating issue and explains the disambiguation

No actionable issues found.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · sonnet46 · 15.4 AIC · ⌖ 9.7 AIC · ⊞ 7.6K
Comment /matt to run again

@github-actions github-actions Bot mentioned this pull request Aug 25, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean, mechanical rename of Finding → AuditFinding across the audit package. The change is complete and consistent — no stray references to the old name remain. The new name is more specific and avoids ambiguity with other potential Finding types in the codebase. No issues found.

🧵 Reviewed using Impeccable skills by Impeccable Skills Reviewer · copilot · sonnet46 · 21.3 AIC · ⌖ 9.02 AIC · ⊞ 6.2K

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

reviewed_at: 2026-08-25T16:30:00Z
review_event: COMMENT
top_themes:
  - rename-only change
  - no actionable correctness regressions found
files_reviewed:
  - pkg/cli/audit_agent_output_test.go
  - pkg/cli/audit_agentic_analysis.go
  - pkg/cli/audit_report.go
  - pkg/cli/audit_report_analysis.go
  - pkg/cli/audit_report_render.go
  - pkg/cli/audit_report_test.go
comment_count: 0

Note

This comment is managed by comment memory.

It stores persistent context for this thread in the code block at the top of this comment.
Edit only the text inside the backtick fences; workflow metadata and the footer are regenerated automatically.

Learn more about comment memory

🔎 Code quality review by PR Code Quality Reviewer · pi · gpt54 · 12.5 AIC · ⌖ 6.87 AIC · ⊞ 7K · ◷
Comment /review to run again

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict

No blocking issues in the changed lines.

Review notes

This PR is a straight rename from Finding to AuditFinding across the audit-report codepath and its tests. The JSON field names stay unchanged, the constructors/call sites were updated consistently, and I did not find a changed-line regression worth blocking on.

I also checked for leftover ambiguous Finding usages in the touched package; the remaining references are to other domains (for example scanfindings.Finding) or unrelated prose/tests, not missed rename sites from this patch.

🔎 Code quality review by PR Code Quality Reviewer · pi · gpt54 · 12.5 AIC · ⌖ 6.87 AIC · ⊞ 7K
Comment /review to run again

@pelikhan
pelikhan merged commit 3432237 into main Aug 25, 2026
111 checks passed
@pelikhan
pelikhan deleted the copilot/deep-report-rename-finding branch August 25, 2026 17:15
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.87.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[deep-report] Rename pkg/cli.Finding to AuditFinding to avoid collision with pkg/scanfindings.Finding

3 participants