Skip to content

fix: strip sqlcommenter tags from formattedQuery#105

Open
veksen wants to merge 1 commit intomainfrom
veksen/strip-sqlcommenter-formatted
Open

fix: strip sqlcommenter tags from formattedQuery#105
veksen wants to merge 1 commit intomainfrom
veksen/strip-sqlcommenter-formatted

Conversation

@veksen
Copy link
Copy Markdown
Member

@veksen veksen commented Apr 1, 2026

Summary

  • RecentQuery.analyze() was stripping sqlcommenter tags (e.g. /*traceparent=...*/) from query via analysis.queryWithoutTags, but formattedQuery was passed through with tags still intact.
  • Pass both data.query and formattedQuery to Analyzer.analyze() so the core library strips tags from both, and use analysis.formattedQueryWithoutTags for the formatted output.

Test plan

  • Added test asserting formattedQuery output matches expected string with no sqlcommenter tags
  • All 20 tests in recent-query.test.ts pass on Node 24

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Query Doctor Analysis

View full run details

82 queries analyzed

2 pre-existing issues

Using assumed statistics (10000 rows/table). For better results, sync production stats.

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