Skip to content

🌱 Address Copilot feedback on mission deep-link matching#1762

Merged
clubanderson merged 1 commit intomainfrom
fix/mission-deeplink-copilot-feedback
Mar 6, 2026
Merged

🌱 Address Copilot feedback on mission deep-link matching#1762
clubanderson merged 1 commit intomainfrom
fix/mission-deeplink-copilot-feedback

Conversation

@clubanderson
Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #1760 — addresses all 3 Copilot review comments:

  1. Use Set for word-overlap — prevents duplicate words from inflating match scores
  2. Inclusive threshold (>= instead of >) — missions scoring exactly 0.6 are now accepted, matching the documented "≥ threshold" behavior
  3. Restrict cncfProject match to installers — solutions use slug/title matching only, preserving prior behavior

Test plan

  • /missions/install-open-policy-agent-opa → opens OPA installer
  • /missions/install-keylime → still works (exact match)
  • /missions/nonexistent → shows Mission Browser (no crash)

- Use Set instead of arrays for word-overlap scoring to prevent
  duplicate word inflation (Copilot #2)
- Use >= instead of > for threshold comparison so missions scoring
  exactly 0.6 are accepted (Copilot #1)
- Restrict cncfProject shortcut to installer missions only — solutions
  use slug/title matching as before (Copilot #3)

Signed-off-by: Andrew Anderson <[email protected]>
Copilot AI review requested due to automatic review settings March 6, 2026 13:43
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Mar 6, 2026
@kubestellar-prow
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign clubanderson for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@netlify
Copy link
Copy Markdown

netlify Bot commented Mar 6, 2026

Deploy Preview for kubestellarconsole ready!

Name Link
🔨 Latest commit 461012c
🔍 Latest deploy log https://app.netlify.com/projects/kubestellarconsole/deploys/69aad9ebaaa1cf0008c5f4ab
😎 Deploy Preview https://deploy-preview-1762.console-deploy-preview.kubestellar.io
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@clubanderson clubanderson merged commit 9b134a3 into main Mar 6, 2026
18 of 19 checks passed
@kubestellar-prow kubestellar-prow Bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Mar 6, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 6, 2026

👋 Hey @clubanderson — thanks for opening this PR!

🤖 This project is developed exclusively using AI coding assistants.

Please do not attempt to code anything for this project manually.
All contributions should be authored using an AI coding tool such as:

This ensures consistency in code style, architecture patterns, test coverage,
and commit quality across the entire codebase.


This is an automated message.

@kubestellar-prow kubestellar-prow Bot deleted the fix/mission-deeplink-copilot-feedback branch March 6, 2026 13:43
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 6, 2026

Welcome to KubeStellar! 🚀 Thank you for submitting this Pull Request.

Before your PR can be merged, please ensure:

DCO Sign-off - All commits must be signed off with git commit -s to certify the Developer Certificate of Origin

PR Title - Must start with an emoji: ✨ (feature), 🐛 (bug fix), 📖 (docs), 🌱 (infra/tests), ⚠️ (breaking change)

Getting Started with KubeStellar:

Contributor Resources:


🌟 Help KubeStellar Grow - We Need Adopters!

Our roadmap is driven entirely by adopter feedback. Whether you're using KubeStellar yourself or know someone who could benefit from multi-cluster Kubernetes:

📋 Take our Multi-Cluster Survey - Share your use cases and help shape our direction!


A maintainer will review your PR soon. Feel free to ask questions in the comments or on Slack!

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 6, 2026

🎉 Thank you for your contribution! Your PR has been successfully merged.


🌟 Help KubeStellar Grow - We Need Adopters!

Our roadmap is driven entirely by adopter feedback - nothing else. Whether you're using KubeStellar yourself or know organizations that could benefit from multi-cluster Kubernetes, we need your help:

📋 Take our Multi-Cluster Survey - Share your use cases and help shape our direction!

🗣️ Spread the word - Tell colleagues, write blog posts, present at meetups

💬 Share feedback on Slack #kubestellar-dev

Every adopter story helps us prioritize what matters most. Thank you for being part of the KubeStellar community!

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Follow-up to #1760 to refine fuzzy mission deep-link matching in MissionBrowser, aiming to make matching more accurate and align behavior with the documented threshold semantics.

Changes:

  • Switch fuzzy matching from arrays to Set-based word overlap to avoid duplicate-word inflation.
  • Make the acceptance threshold inclusive by using >= in best-match selection.
  • Restrict the high-confidence cncfProject exact-match shortcut to installer missions.

Comment on lines +746 to +748
// Fuzzy word-overlap (set intersection) on title + cncfProject
const missionWordSet = toWordSet(`${m.title || ''} ${m.cncfProject || ''}`)
if (slugWordSet.size === 0 || missionWordSet.size === 0) return 0
Copy link

Copilot AI Mar 6, 2026

Choose a reason for hiding this comment

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

The PR description says solutions should use slug/title matching only, but the fuzzy word-overlap still builds missionWordSet from title + cncfProject even when isInstaller is false. Either update the implementation to exclude cncfProject for solutions, or adjust the description/inline strategy comment so behavior matches what’s intended.

Copilot uses AI. Check for mistakes.
const score = scoreMission(m)
if (score > bestScore) { best = m; bestScore = score }
const score = scoreMission(m, isInstaller)
if (score >= bestScore) { best = m; bestScore = score }
Copy link

Copilot AI Mar 6, 2026

Choose a reason for hiding this comment

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

Using score >= bestScore changes tie-breaking: missions with the same score will overwrite the current best, so the selected deep-link target becomes dependent on list ordering (and may change if ordering changes). If the goal is only to make the threshold inclusive (accept exactly 0.6), consider keeping strict > for best selection and handling the == MIN_WORD_OVERLAP_RATIO case only when best is still undefined.

Suggested change
if (score >= bestScore) { best = m; bestScore = score }
if (score > bestScore || (!best && score === MIN_WORD_OVERLAP_RATIO)) {
best = m
bestScore = score
}

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates the PR's author has signed the DCO. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants