Skip to content

Rust: Add type mentions to the database quality stats - #22775

Open
geoffw0 wants to merge 1 commit into
github:mainfrom
geoffw0:rustquality
Open

geoffw0 wants to merge 1 commit into
github:mainfrom
geoffw0:rustquality

Conversation

@geoffw0

@geoffw0 geoffw0 commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

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%.

Copilot AI balanced review requested due to automatic review settings October 7, 2026 10:58
@geoffw0
geoffw0 requested a review from a team as a code owner October 7, 2026 10:58
@geoffw0 geoffw0 added no-change-note-required This PR does not need a change note Rust Pull requests that update Rust code labels Oct 7, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Unresolved annotations can be excluded from both counts, inflating the reported resolution percentage.

Review effort: Balanced
Findings: 1 Medium severity

Open (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 {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I think we should close this PR and make an internal DCA fix instead.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-change-note-required This PR does not need a change note Rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants