Skip to content

fix: include user-configured targets in unknown target validation#58

Merged
runkids merged 2 commits intorunkids:mainfrom
masonc15:fix-unknown-custom-targets
Feb 28, 2026
Merged

fix: include user-configured targets in unknown target validation#58
runkids merged 2 commits intorunkids:mainfrom
masonc15:fix-unknown-custom-targets

Conversation

@masonc15
Copy link
Contributor

Fixes #57

findUnknownSkillTargets() only checked the hardcoded targets.yaml list when validating skill-level targets fields. Custom targets defined in the user's config.yaml were not consulted, causing false "unknown target" warnings in doctor and check.

Changes:

  • findUnknownSkillTargets now accepts an extraTargetNames parameter with user-configured target names
  • targetNamesFromConfig helper extracts names from a global config's Targets map
  • Both doctor and check (global and project) pass their configured targets through
  • Unit test covering the fix

findUnknownSkillTargets only checked the built-in targets.yaml list,
causing false warnings for custom targets defined in config.yaml.

Pass configured target names from global/project config into the
validation so user-defined targets are recognized.
@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses an issue where custom targets defined in a user's configuration were not being recognized during skill-level target validation, leading to incorrect warnings in the doctor and check commands. The changes ensure that user-configured targets are properly considered as known targets, thereby eliminating these false positives and improving the accuracy of the validation process.

Highlights

  • Enhanced Target Validation: The findUnknownSkillTargets function now accepts an extraTargetNames parameter, allowing user-configured targets to be included in the validation process.
  • New Helper Function: A new helper function, targetNamesFromConfig, was introduced to extract target names from a global configuration's Targets map for use in validation.
  • Integration with Commands: Both the doctor and check commands (for global and project configurations) have been updated to pass their configured targets to the validation logic, preventing false 'unknown target' warnings.
  • Unit Test Coverage: A new unit test was added to specifically cover the scenario of validating custom targets, ensuring the fix works as intended.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • cmd/skillshare/check.go
    • Modified runCheck function signature to accept extraTargetNames for target validation.
    • Updated warnUnknownSkillTargets function signature to accept extraTargetNames.
    • Passed user-configured target names from cfg.Targets to runCheck and warnUnknownSkillTargets.
  • cmd/skillshare/check_project.go
    • Imported the skillshare/internal/config package.
    • Added logic to load project configuration and extract custom target names.
    • Passed extracted custom target names to the runCheck function for validation.
  • cmd/skillshare/doctor.go
    • Modified checkSkillTargetsField function signature to accept extraTargetNames.
    • Passed user-configured target names from cfg.Targets to checkSkillTargetsField.
  • cmd/skillshare/target_helpers.go
    • Added a new helper function targetNamesFromConfig to extract target names from a configuration map.
    • Updated findUnknownSkillTargets function signature to accept extraTargetNames.
    • Modified findUnknownSkillTargets to include extraTargetNames in the set of known targets.
  • cmd/skillshare/target_helpers_test.go
    • Imported ssync "skillshare/internal/sync".
    • Added TestFindUnknownSkillTargets_CustomTargets to test the validation logic with custom targets.
Activity
  • No specific activity (comments, reviews, or progress updates) has been recorded for this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request correctly addresses the issue of false "unknown target" warnings by including user-configured targets during validation. The changes are well-implemented across the check and doctor commands, and the new unit test provides good coverage for the fix. I have one suggestion to improve code consistency by extracting a piece of logic into a new helper function, similar to what has been done for the global configuration.

@runkids runkids marked this pull request as ready for review February 28, 2026 10:21
@runkids
Copy link
Owner

runkids commented Feb 28, 2026

Thanks for the contribution, @masonc15! Great fix. Will follow up with integration tests and minor refinements.

@runkids runkids self-requested a review February 28, 2026 10:34
@runkids runkids merged commit ae500e8 into runkids:main Feb 28, 2026
7 of 8 checks passed
runkids added a commit that referenced this pull request Feb 28, 2026
…ct mode

Follow-up to PR #58: check_project.go now extracts custom target names
from project config and passes them to findUnknownSkillTargets, matching
the global-mode fix. Also surfaces config load errors as warnings instead
of silently ignoring them. Adds integration tests for check and doctor
(global + project mode) verifying no false "unknown target" warnings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

skillshare doctor keeps flagging my custom omp target as unknown

2 participants