Open
Conversation
commit: |
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Asymmetric normalization masks silent workflow selection failures
- Normalized requestedWorkflows before passing to selectWorkflowsForMcp to ensure consistent matching against workflow IDs across both selection and unknown workflow detection paths.
Or push these changes by commenting:
@cursor push fd7273dac7
Preview (fd7273dac7)
diff --git a/src/utils/tool-registry.ts b/src/utils/tool-registry.ts
--- a/src/utils/tool-registry.ts
+++ b/src/utils/tool-registry.ts
@@ -187,12 +187,17 @@
}
const allWorkflows = [...manifest.workflows.values(), ...customSelection.workflows];
+ // Normalize requested workflows for consistent matching
+ const normalizedRequestedWorkflows = requestedWorkflows
+ ?.map(normalizeName)
+ .filter((name) => name.length > 0);
+
// Select workflows using manifest-driven rules
- const selectedWorkflows = selectWorkflowsForMcp(allWorkflows, requestedWorkflows, ctx);
+ const selectedWorkflows = selectWorkflowsForMcp(allWorkflows, normalizedRequestedWorkflows, ctx);
const knownWorkflowIds = new Set(allWorkflows.map((workflow) => workflow.id));
- const unknownRequestedWorkflows = (requestedWorkflows ?? [])
- .map(normalizeName)
- .filter((workflowName) => workflowName.length > 0 && !knownWorkflowIds.has(workflowName));
+ const unknownRequestedWorkflows = (normalizedRequestedWorkflows ?? []).filter(
+ (workflowName) => !knownWorkflowIds.has(workflowName),
+ );
if (unknownRequestedWorkflows.length > 0) {
const uniqueUnknownRequestedWorkflows = [...new Set(unknownRequestedWorkflows)];
log(a96ef17 to
4e1971e
Compare
Allow users to define named workflow groups in config.yaml mapping to explicit tool lists, then reference them from enabledWorkflows like built-in workflows. - New customWorkflows config field (schema, parsing, normalization) - Tool registry resolves custom workflow tool names to manifest IDs - Conflict detection for built-in workflow name collisions - Unknown tool names logged as warnings and skipped
4e1971e to
fc00659
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Adds support for user-defined custom workflows in
.xcodebuildmcp/config.yaml. Users can define named workflow groups mapping to explicit tool lists, then reference them fromenabledWorkflowsjust like built-in workflows.Changes
customWorkflowsconfig field (schema, parsing, normalization, config-store resolution)Test plan
createCustomWorkflowsFromConfig(happy path, conflicts, unknown tools)normalizeCustomWorkflows(case normalization, empty names, string-as-array)