Repository navigation
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Unresolved annotations can be excluded from both counts, inflating the reported resolution percentage.
Review effort: Balanced
Findings: 1
What changed in this PR
Adds Rust type-mention quality statistics to support the DCA resolvability summary.
Changes:
- Defines counts and a percentage for resolvable type mentions.
- Exposes these metrics through extractor telemetry.
| File | Description |
|---|---|
| rust/ql/src/queries/telemetry/ExtractorInformation.ql | Emits type-mention metrics. |
| rust/ql/src/queries/telemetry/DatabaseQuality.qll | Defines type-mention classification and statistics. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| } | ||
|
|
||
| module TypeMentionStats implements StatsSig { | ||
| additional class Candidate extends TypeMention { |
There was a problem hiding this comment.
@hvitved how would you prefer this metric be constructed? My only real interest in this is making the DCA report clean of errors and thus easier to read.
There was a problem hiding this comment.
I was gonna point out exactly this issue. I wasn't aware adding the report to all languages would result en errors for languages that do not supply the data, so perhaps we should just move the report so it only applies to Unified.
There was a problem hiding this comment.
So I think we should close this PR and make an internal DCA fix instead.
There was a problem hiding this comment.
I wasn't aware adding the report to all languages would result en errors for languages that do not supply the data
It's not exactly explicit errors, but you get a table with 53 or so rows with no data that are marked as "interesting". We can either restrict the new table to unified, or change the conclusion so that empty data is not "interesting" (thus the table won't be displayed in the summary-of-summaries).
So I think we should close this PR and make an internal DCA fix instead.
OK, if you're doing that could you link to it here please (or I can probably fit it in tomorrow).
There was a problem hiding this comment.
I have merged an internal fix.
There was a problem hiding this comment.
Thanks, I see it. Closing this.

Add type mentions to the database quality stats for Rust. It looks like this metric was added for unified, while the corresponding DCA summary table "Percentage of resolvable type mentions, per source" was added for all languages - resulting in a table of errors for other languages. This pull request should fix that issue for Rust.
In all the projects I tried this on, the metric is > 99%.