Skip to content

Strengthen codemod registry coverage by asserting all registered IDs#43008

Merged
pelikhan merged 2 commits into
mainfrom
copilot/deep-report-quick-win-assert-codemods
Jul 2, 2026
Merged

Strengthen codemod registry coverage by asserting all registered IDs#43008
pelikhan merged 2 commits into
mainfrom
copilot/deep-report-quick-win-assert-codemods

Conversation

Copilot AI commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

TestGetAllCodemods_ContainsExpectedCodemods covered only 42 IDs while the registry now contains 62 codemods, leaving silent-deletion risk for ~32% of entries. This update closes that gap by asserting the full expected ID set.

  • What changed

    • Expanded expectedIDs in pkg/cli/fix_codemods_test.go to include the 20 missing codemod IDs already present in the registry/order contract.
    • Kept scope strictly to the coverage assertion test (no production logic changes).
  • Coverage gap removed

    • Added IDs across recent migration families, including:
      • discussion/comment + MCP mode/type + install script URL migrations
      • roles/bots/engine step migrations
      • app/github-app and repo allowlist migrations
      • features CLI/DIFC proxy migrations
      • sandbox MCP/agent removals
      • run-install-scripts runtime migration
expectedIDs := []string{
    // existing IDs...
    "add-comment-discussion-removal",
    "mcp-mode-to-type-migration",
    "install-script-url-migration",
    "bash-anonymous-removal",
    "activation-outputs-to-sanitized-step",
    // ...
    "sandbox-agent-false-removal",
    "run-install-scripts-to-runtimes-node",
}

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Add missing codemod IDs to test assertions Strengthen codemod registry coverage by asserting all registered IDs Jul 2, 2026
Copilot AI requested a review from pelikhan July 2, 2026 16:22
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Great work closing the codemod registry coverage gap! Expanding expectedIDs in TestGetAllCodemods_ContainsExpectedCodemods from 42 to 62 entries is a clean, targeted improvement that directly prevents silent-deletion regressions across ~32% of the registered codemods.

The PR is tightly scoped to a single test file, carries a clear description of what changed and why, introduces no new dependencies, and the change is purely additive. This looks ready for review.

Generated by ✅ Contribution Check · 228.2 AIC · ⌖ 35.5 AIC · ⊞ 6.3K ·

@pelikhan pelikhan marked this pull request as ready for review July 2, 2026 18:31
Copilot AI review requested due to automatic review settings July 2, 2026 18:31
@pelikhan pelikhan merged commit 7902f49 into main Jul 2, 2026
@pelikhan pelikhan deleted the copilot/deep-report-quick-win-assert-codemods branch July 2, 2026 18:31

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

This pull request strengthens test coverage for the GetAllCodemods() registry by expanding the TestGetAllCodemods_ContainsExpectedCodemods assertion list so it enumerates all currently-registered codemod IDs, reducing the risk of silent deletions from the registry.

Changes:

  • Expanded the expectedIDs list to include 20 codemod IDs that were already present in the registry but previously unasserted by this test.
  • Kept changes scoped to test-only coverage assertions (no production registry or codemod logic changes).
Show a summary per file
File Description
pkg/cli/fix_codemods_test.go Expands the expected codemod ID assertion list to cover the full codemod registry.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Low

Comment on lines 83 to +87
"mcp-network-to-top-level-migration",
"add-comment-discussion-removal",
"discussion-trigger-categories-lowercase",
"mcp-mode-to-type-migration",
"install-script-url-migration",
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] [quick-win] Assert all 62 codemods in TestGetAllCodemods_ContainsExpectedCodemods

3 participants