Skip to content

fix(console): preserve literal SQL in GitHub plan diffs - #6150

Open
Vamsi-klu wants to merge 1 commit into
SQLMesh:mainfrom
Vamsi-klu:codex/fix-5287-literal-plan-diffs
Open

Vamsi-klu wants to merge 1 commit into
SQLMesh:mainfrom
Vamsi-klu:codex/fix-5287-literal-plan-diffs

Conversation

@Vamsi-klu

@Vamsi-klu Vamsi-klu commented Oct 17, 2026 •

Copy link
Copy Markdown

Description

Fixes #5287.

Preserve literal SQL in GitHub plan-summary diffs, including T-SQL bracketed identifiers that Rich currently interprets as markup. A shared Markdown diff emitter captures the original text, prints it literally, and selects a fence longer than any embedded backtick sequence. It covers both model-diff emitters and environment SQL statements.

Regression coverage includes actual T-SQL models, tabs, long lines, markup-like literals, embedded fences, capture ordering, and the mocked final GitHub summary boundary.

Suggested reviewers: erindru, treysp.

Test Plan

  • python -m pytest tests/core/test_console.py tests/integrations/github/cicd/test_github_controller.py -q -n 0 -p no:rerunfailures: 63 passed.
  • python -m pytest tests/integrations/github/cicd/test_integration.py -k test_merge_pr_has_non_breaking_change -q -n 0 -p no:rerunfailures: 3 passed.
  • Reverting the production fix reproduces the regression failures; restoring it passes.
  • make style and make fast-test passed on this branch.

Checklist

  • I have run make style and fixed any issues
  • I have added tests for my changes (if applicable)
  • All existing tests pass (make fast-test)
  • My commits are signed off (git commit -s) per the DCO

Signed-off-by: Vamsi-klu <nrvamsi13@gmail.com>
@Vamsi-klu
Vamsi-klu marked this pull request as ready for review October 17, 2026 11:11
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.

[CI/CD bot] Some plan diff output incompatible with GitHub markdown

1 participant