Skip to content

refactor(diagnostics): use structured action data - #156

Merged
9romise merged 1 commit into
mainfrom
codex/diagnostic-data
Aug 29, 2026
Merged

refactor(diagnostics): use structured action data#156
9romise merged 1 commit into
mainfrom
codex/diagnostic-data

Conversation

@9romise

@9romise 9romise commented Aug 29, 2026

Copy link
Copy Markdown
Member

No description provided.

@github-actions

Copy link
Copy Markdown

📦 Package Bundle Size

No bundle size changes.

@9romise
9romise added this pull request to the merge queue Aug 29, 2026
Merged via the queue into main with commit dee1eb4 Aug 29, 2026
19 checks passed
@9romise
9romise deleted the codex/diagnostic-data branch August 29, 2026 05:48
@coderabbitai

coderabbitai Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Diagnostic rules now attach structured package and version metadata to diagnostics. Diagnostic types define the supported metadata fields. Code-action generation validates this data and uses it to build fixes without parsing diagnostic messages with regular expressions. A new createCodeActions entry point owns diagnostic filtering, strategy selection, and action construction. The diagnostics plugin delegates code-action requests to this entry point. Tests now verify the structured diagnostic data.

Merge Risk: 🔵 Low · up to dfbc8

The refactor makes code actions use structured package and version data instead of parsing diagnostic text. It is mergeable with owner awareness because malformed metadata could produce incorrect edits or ignore-command arguments if diagnostics can come from outside the trusted producers; validating these values or documenting the trusted boundary is recommended.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive No pull request description was provided. The pull request title and changes are related, but the author-provided description contains no information to assess. Add a brief description that summarises the structured diagnostic action data refactor and the affected code-action and diagnostic rule changes.
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/diagnostic-data

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai 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.

🧹 Nitpick comments (1)
packages/language-service/src/plugins/diagnostics/types.ts (1)

13-17: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Reuse the exported diagnostic data contract in actions.ts.

packages/language-service/src/plugins/diagnostics/actions.ts still declares a second DiagnosticActionData at Lines 13-17. Import the type from ./types and remove the local declaration. This keeps the producer and consumer on one contract and prevents future field drift.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 4310280b-2ed5-409c-b7c7-68b44984c296

📥 Commits

Reviewing files that changed from the base of the PR and between 1b76f86 and dfbc8c3.

📒 Files selected for processing (11)
  • packages/language-service/src/plugins/diagnostics/actions.ts
  • packages/language-service/src/plugins/diagnostics/index.ts
  • packages/language-service/src/plugins/diagnostics/rules/deprecation.test.ts
  • packages/language-service/src/plugins/diagnostics/rules/deprecation.ts
  • packages/language-service/src/plugins/diagnostics/rules/replacement.test.ts
  • packages/language-service/src/plugins/diagnostics/rules/replacement.ts
  • packages/language-service/src/plugins/diagnostics/rules/upgrade.test.ts
  • packages/language-service/src/plugins/diagnostics/rules/upgrade.ts
  • packages/language-service/src/plugins/diagnostics/rules/vulnerability.test.ts
  • packages/language-service/src/plugins/diagnostics/rules/vulnerability.ts
  • packages/language-service/src/plugins/diagnostics/types.ts

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.

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.

1 participant