fix(engine): weight local-scorer totalTokenScore with TEST_FILE_CONTRIBUTION_WEIGHT - #9072
Closed
andriypolanski wants to merge 3 commits into
Closed
Conversation
…IBUTION_WEIGHT (JSONbored#8875) Apply the same test-file discount preview.ts uses when deriving totalTokenScore so feeding localScorer totals back into buildScorePreview no longer bypasses the gate's contribution-bonus weighting on test-heavy diffs. Co-authored-by: Cursor <cursoragent@cursor.com>
…SONbored#8875) Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Contributor
|
This repository reviews pull requests one-shot: the PR must be correct as originally opened. Pushing an additional commit closes it automatically instead of restarting review — open a fresh pull request with every fix included. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9072 +/- ##
=======================================
Coverage ? 95.17%
=======================================
Files ? 714
Lines ? 58095
Branches ? 20563
=======================================
Hits ? 55293
Misses ? 1615
Partials ? 1187
Flags with carried forward coverage won't be shown. Click here to find out more.
|
14 tasks
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.
Summary
computeLocalScorerTokensnow derivestotalTokenScorewithTEST_FILE_CONTRIBUTION_WEIGHT(same formula aspreview.ts'sderivedTotalTokenScore) instead of a raw unweighted line sum.buildScorePreviewwhen the explicit total is fed back vs when preview derives it from components.mcp-cli-plan-scorer-tools,mcp-run-local-scorer) that previously expected the old raw sum — the gap that closed fix(engine): weight local-scorer totalTokenScore with TEST_FILE_CONTRIBUTION_WEIGHT #8970/fix(engine): weight local-scorer totalTokenScore with TEST_FILE_CONTRIBUTION_WEIGHT #8977.Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #123) — a linked open issue is required for every contributor PR.Validation
git diff --checknpx vitest run test/unit/local-scorer.test.ts— 7 passednpm run test --workspace @loopover/engine -- test/local-scorer.test.ts— passednpx vitest run test/unit/mcp-cli-plan-scorer-tools.test.ts -t "loopover_run_local_scorer computes"— passedpackages/loopover-engine/src/local-scorer.tsnpm run typechecknpm run actionlintnpm run test:coveragenpm audit --audit-level=moderateIf any required check was skipped, explain why:
Narrow engine scoring alignment fix; full
test:cileft for CI. Targeted local-scorer + MCP tool tests cover the weighted total and preview agreement path.Notes for reviewers / gate
site/,CNAME,**/lovable/**, orCHANGELOG.md.Made with Cursor