Skip to content

Conversation

@emincb
Copy link

@emincb emincb commented Jul 26, 2025

This change addresses an issue where linter errors were treated as fatal, causing unnecessary retries and inefficient file writes. The getNewDiagnostics function has been updated to categorize diagnostics into problems (fatal errors) and warnings (linter errors). The DiffViewProvider has been updated to consume this new structure and present the information to the AI in a more structured way. Fixes #4622


Important

Differentiate linter warnings from fatal errors in diagnostics to improve efficiency and prevent unnecessary retries.

  • Behavior:
    • getNewDiagnostics in index.ts now categorizes diagnostics into problems (fatal errors) and warnings (linter errors).
    • DiffViewProvider in DiffViewProvider.ts updated to handle and display new problems and warnings messages.
  • Tests:
    • Added tests in index.test.ts to verify correct categorization of diagnostics into problems and warnings.
  • Mocks:
    • Added vscode.ts mock to simulate vscode environment for testing.

This description was created by Ellipsis for d04b46f. You can customize this summary. It will automatically update as commits are pushed.

emincb added 7 commits July 27, 2025 01:54
…This change addresses an issue where linter errors were treated as fatal, causing unnecessary retries and inefficient file writes. The getNewDiagnostics function has been updated to categorize diagnostics into problems (fatal errors) and warnings (linter errors). The DiffViewProvider has been updated to consume this new structure and present the information to the AI in a more structured way.\n\nFixes RooCodeInc#4622
…This change addresses an issue where linter errors were treated as fatal, causing unnecessary retries and inefficient file writes. The getNewDiagnostics function has been updated to categorize diagnostics into problems (fatal errors) and warnings (linter errors). The DiffViewProvider has been updated to consume this new structure and present the information to the AI in a more structured way.\n\nFixes RooCodeInc#4622
…This change addresses an issue where linter errors were treated as fatal, causing unnecessary retries and inefficient file writes. The getNewDiagnostics function has been updated to categorize diagnostics into problems (fatal errors) and warnings (linter errors). The DiffViewProvider has been updated to consume this new structure and present the information to the AI in a more structured way.\n\nFixes RooCodeInc#4622
…This change addresses an issue where linter errors were treated as fatal, causing unnecessary retries and inefficient file writes. The getNewDiagnostics function has been updated to categorize diagnostics into problems (fatal errors) and warnings (linter errors). The DiffViewProvider has been updated to consume this new structure and present the information to the AI in a more structured way.\n\nFixes RooCodeInc#4622
…This change addresses an issue where linter errors were treated as fatal, causing unnecessary retries and inefficient file writes. The getNewDiagnostics function has been updated to categorize diagnostics into problems (fatal errors) and warnings (linter errors). The DiffViewProvider has been updated to consume this new structure and present the information to the AI in a more structured way.\n\nFixes RooCodeInc#4622
…This change addresses an issue where linter errors were treated as fatal, causing unnecessary retries and inefficient file writes. The getNewDiagnostics function has been updated to categorize diagnostics into problems (fatal errors) and warnings (linter errors). The DiffViewProvider has been updated to consume this new structure and present the information to the AI in a more structured way.\n\nFixes RooCodeInc#4622
@daniel-lxs daniel-lxs moved this from Triage to PR [Needs Prelim Review] in Roo Code Roadmap Jul 26, 2025
@daniel-lxs daniel-lxs moved this from PR [Needs Prelim Review] to PR [Draft / In Progress] in Roo Code Roadmap Jul 26, 2025
if (typeof value === "string") {
// Only escape <, >, and & characters
return value.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;")
return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">")

Check warning

Code scanning / CodeQL

Replacement of a substring with itself Medium

This replaces '&' with itself.
if (typeof value === "string") {
// Only escape <, >, and & characters
return value.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;")
return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">")

Check warning

Code scanning / CodeQL

Replacement of a substring with itself Medium

This replaces '<' with itself.
if (typeof value === "string") {
// Only escape <, >, and & characters
return value.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;")
return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">")

Check warning

Code scanning / CodeQL

Replacement of a substring with itself Medium

This replaces '>' with itself.
if (typeof value === "string") {
// Only escape <, >, and & characters
return value.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;")
return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">")

Check warning

Code scanning / CodeQL

Replacement of a substring with itself Medium

This replaces '&' with itself.
if (typeof value === "string") {
// Only escape <, >, and & characters
return value.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;")
return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">")

Check warning

Code scanning / CodeQL

Replacement of a substring with itself Medium

This replaces '<' with itself.
if (typeof value === "string") {
// Only escape <, >, and & characters
return value.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;")
return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">")

Check warning

Code scanning / CodeQL

Replacement of a substring with itself Medium

This replaces '>' with itself.
@emincb emincb marked this pull request as ready for review July 27, 2025 13:00
@emincb emincb requested review from cte, jr and mrubens as code owners July 27, 2025 13:00
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. bug Something isn't working labels Jul 27, 2025
indentBy: "",
suppressEmptyNode: true,
processEntities: false,
tagValueProcessor: (name, value) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

The XMLBuilder processors now simply return the original characters (e.g. replacing '&' with '&'). This does not perform proper XML escaping. It should replace '&' with '&', '<' with '<', and '>' with '>' to prevent XML injection issues.

@daniel-lxs daniel-lxs moved this from PR [Draft / In Progress] to PR [Needs Prelim Review] in Roo Code Roadmap Jul 27, 2025
@daniel-lxs
Copy link
Member

Hey @emincb Thank you for the time you put into this, we really appreciate it.

However I don't think this is a problem anymore, the issue was with Gemini 2.5 Flash but I haven't heard about this issue again, have you experienced it? do you have any examples of it?

The main issue is that I'm unable to replicate the issue so I don't know if this will fix it or not.

I'll close it for now but please let me know if you have more information about it.

@daniel-lxs daniel-lxs closed this Jul 29, 2025
@github-project-automation github-project-automation bot moved this from PR [Needs Prelim Review] to Done in Roo Code Roadmap Jul 29, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jul 29, 2025
@emincb
Copy link
Author

emincb commented Jul 30, 2025

image I’ve been encountering the errors mentioned in the issue above almost daily. The model used here is Gemini 2.5 Pro. There’s definitely something wrong with the combination of Pylance, Roo Code, and the model, because for me the reproducibility rate is close to 100%.

This started happening after the updates over the past two weeks, as far as I know. The model has been costing almost five times more on similar tasks, only to get stuck on linter errors.

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

Labels

bug Something isn't working PR - Needs Preliminary Review size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Roo and Pylance conflicts

3 participants