Repository navigation
fix(github): expand the cost-regression gate - #204
Merged
Merged
Conversation
veksen
force-pushed
the
fix-expand-cost-regression
branch
from
July 31, 2026 16:42
97c4184 to
4d26ba0
Compare
The gate roster expanded new-query-index and schema-drift but not regression-beyond-threshold, so a run blocked by regressions reported the count and none of the queries. The first live run hit exactly that: 9 queries got more expensive, nine rows missing. Regression rows also went through a preview builder that never attached the call site added in #202, so they would have named the SQL instead of the function. Co-Authored-By: Claude <noreply@anthropic.com>
veksen
force-pushed
the
fix-expand-cost-regression
branch
from
July 31, 2026 16:47
4d26ba0 to
5f16156
Compare
There was a problem hiding this comment.
6 successful checks
More details via MCP → get_ci_run({ runId: "019fb914-335d-7694-bba5-d77f22ecb4d1" }) · view run · docs
3 queries read against main on assumed statistics of 10,000,000 rows per table. Sync production stats for costs measured against your real data.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Goal
A gate that blocks the check should show what it blocked on. Follow-up to #201.
What
Before. The first live run of the new comment blocked on 9 regressions and listed none of them:
After. Each regressed query gets a row with its call site, both costs, and the percentage:
Those figures are the real ones from run
019fb8fd, not illustrations.How
Two changes.
success.md.j2gains aregression-beyond-thresholdblock, matching the shape the other two gates already use. It readsdisplayRegressed, which the view model has always built.addRegressionPreviewsingithub.tsnow attachessite. #202 added the call site to the recommendation previews and missed this builder, so regression rows would have renderedSELECT …instead of the function name. Rendering the template is what surfaced it; no test covered it.Tests
github.test.tsasserts a fired regression gate renders both costs, and that a row names the function rather than the SQL preview. Full suite: 387 passing, 39 files, typecheck clean.Not in this PR
The gate line says "9 queries got more expensive" without naming the rule. It is 9 because 25 queries rose, 13 rose past this repo's 10% threshold, and 9 of those are also above the 100 cost floor. The run page reports 25, so the two surfaces disagree without either being wrong. Naming the threshold in the copy is a separate change.