Skip to content

fix: strip sqlcommenter tags from formattedQuery#105

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

fix: strip sqlcommenter tags from formattedQuery#105
veksen wants to merge 1 commit into
mainfrom
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

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

2 queries analyzed

2 pre-existing issues

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

@Xetera Xetera force-pushed the main branch 2 times, most recently from 3aac4a7 to 7b0a1b9 Compare April 16, 2026 22:50
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@veksen veksen force-pushed the veksen/strip-sqlcommenter-formatted branch from c7d4202 to 4159841 Compare May 13, 2026 10:44
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