Repository navigation
feat(github): name the rule on the cost-regression line - #205
Merged
Merged
Conversation
There was a problem hiding this comment.
6 successful checks
More details via MCP → get_ci_run({ runId: "019fb93c-df12-7421-9d14-d10a12d32b8f" }) · 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.
veksen
force-pushed
the
feat-gate-line-states-the-rule
branch
from
July 31, 2026 17:15
e395ed1 to
98630a4
Compare
The line said '9 queries got more expensive' while the run page said 25 regressed. Both were right: the page counts every increase, the gate counts what clears the repo's threshold and cost floor. Neither surface said so. The line now carries the rule it applied: '9 queries went up more than 10%, ignoring anything under a cost of 100', with both numbers read from the repo's config rather than written into the copy. Co-Authored-By: Claude <noreply@anthropic.com>
veksen
force-pushed
the
feat-gate-line-states-the-rule
branch
from
July 31, 2026 17:32
98630a4 to
c1a7c1f
Compare
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 line should say what the gate checked, not only what it counted. Follow-up to #201.
What
On run
019fb8fdthe comment saidCost regression — 9 queries got more expensiveand the run detail page said25 regressed. Both are correct and they look like a contradiction.Reproduced from the two run payloads:
After:
Cost regression — 9 queries went up more than 10%, where either cost is at least 100How
GateFactsgainsregressionThresholdandminimumCost, threaded from the repo config inmain.ts. The copy inevaluate.tsreads them, so a repo that sets 20% and a floor of 500 gets its own numbers rather than a hardcoded sentence.The floor is worded to match
compareRuns, which skips a regression only when both the previous and current cost sit under it. A query going 50 to 300 is counted, so "under a cost of 100 is ignored" would have described a simpler rule than the code applies.Tests
evaluate.test.tscovers the fired line naming both numbers, and the passing line naming the threshold. Full suite: 390 passing, 39 files, typecheck clean.