← Back to Pull requests

search provider: Don't try to process if ID is invalid #202

Closed
unknown closed this pull request without merging on Jul 29, 2025 11:27 UTC
View on GitHub
unknown unknown commented on Jul 27, 2025 09:50 UTC
Author

It causes a panic if invalid ID is sent via D-Bus.

$ gdbus call -e -d com.github.finefindus.eyedropper.SearchProvider -o /com/github/finefindus/eyedropper/SearchProvider -m org.gnome.Shell.SearchProvider2.GetResultMetas '["invalid"]'

$ gdbus call -e -d com.github.finefindus.eyedropper.SearchProvider -o /com/github/finefindus/eyedropper/SearchProvider -m org.gnome.Shell.SearchProvider2.ActivateResult "invalid" "[]" 0

Which causes the following panic:
thread 'main' panicked at src/application.rs:266:58:
Failed to parse identifier color: BoolError { message: "Can't parse RGBA", filename: "/usr/src/debug/eyedropper/build/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/gdk4-0.9.6/src/rgba.rs", function: "gdk4::rgba::<impl gdk4::auto::rgba::RGBA>::parse::{{closure}}", line: 207 }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

thread 'zbus::Connection executor' panicked at /usr/src/debug/eyedropper/build/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/search-provider-0.11.0/src/search_provider.rs:157:39:
called `Result::unwrap()` on an `Err` value: Canceled

thread 'main' panicked at src/application.rs:247:55:
called `Result::unwrap()` on an `Err` value: BoolError { message: "Can't parse RGBA", filename: "/usr/src/debug/eyedropper/build/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/gdk4-0.9.6/src/rgba.rs", function: "gdk4::rgba::<impl gdk4::auto::rgba::RGBA>::parse::{{closure}}", line: 207 }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

This change fixes that.

Diff: 203 lines (+152 / -51) across 2 files Reviewer: City-busz Review duration: 2976m
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.36) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 203 lines diff across 2 files
0.36
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
60%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.318
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #202"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 60.5% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 36.3% (MEDIUM) · Higher = larger blast radius
36.3%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 60.5% · Lower = rushed or shallow review
60.5%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 14.3% · Safe to merge
14.3%