fix(health): steer agents to the weakest dimension - #3066
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
The tracedecay_health description told agents to maximize the composite quality signal, which hides which dimension failed. Point them at details=true and the lowest-scoring dimension instead, and correct the compute_composite_health doc comment: the coverage-discipline penalty is 2%, not 10%. Fixes #3010 Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
|
Contributor
Author
There was a problem hiding this comment.
🔍 Devin Review: 1 flag
Not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)
This branch has not been deployed
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
tracedecay_healthdescription no longer says "maximize this ONE number". It now says that one weak dimension drags the whole signal down (a zero zeroes it), and tells agents to passdetails=trueand fix the lowest-scoring dimension.compute_composite_healthdoc comment now says the coverage-discipline penalty is up to 2%, which is what the code applies (0.98 + 0.02 * coverage_discipline). The penalty itself is unchanged.Motivation
Fixes #3010. Agents treat tool descriptions as instructions, so telling them to maximize a geometric-mean composite encourages gaming the score instead of fixing the dimension that failed. The doc comment also claimed 10% while the code applied 2%. I kept the code's 2% and fixed the doc, because changing the penalty would shift every reported score.
Changes
crates/tracedecay-mcp-catalog/src/definitions/analysis.rs: rewrote the health description. It also states the 2% penalty.crates/tracedecay-graph-query/src/health.rs: corrected the doc comment and removed the duplicate inline comment.definitions::tests::health_description_points_agents_at_the_weakest_dimensionchecks the advertised description: no "maximize", it points atdetails=trueand the lowest-scoring dimension, thedetailsflag is in the schema, and it states the 2% penalty. Fails on master, passes with this change.health::tests::skip_test_coverage_overuse_costs_at_most_two_percent_of_the_signalpins the penalty with literal values: 10000 / 9900 / 9800 for coverage_discipline 1.0 / 0.5 / 0.0.Test plan
bash scripts/require-exact-test.sh cargo test -p tracedecay-mcp-catalog --lib definitions::tests::health_description_points_agents_at_the_weakest_dimension -- --exact: fails on master ("must not tell agents to maximize the composite"), passes with this changebash scripts/require-exact-test.sh cargo test -p tracedecay-graph-query --lib health::tests::skip_test_coverage_overuse_costs_at_most_two_percent_of_the_signal -- --exact: passescargo fmt --all -- --checkandcargo clippy -p tracedecay-mcp-catalog -p tracedecay-graph-query --all-targets -- -D warningsare cleannode scripts/lint-commit-range.mjs --repository . origin/master HEADpassescargo nextest run --workspacenot run locally (left to CI)Checklist
CHANGELOG.mdnot updated (release-please manages it).envfiles includedLink to Devin session: https://app.devin.ai/sessions/210d4ba651a14aaf9ce8211bff728081
Open in Devin Desktop: https://app.devin.ai/desktop/session/210d4ba651a14aaf9ce8211bff728081?variant=devin
Requested by: @ScriptedAlchemy