Jinal-Sarvaiya commented on code in PR #149:
URL: https://github.com/apache/camel-kit/pull/149#discussion_r4511302453


##########
kit/camel-kit-core/src/main/java/org/apache/camel/kit/generator/OpenCodeGenerator.java:
##########
@@ -30,22 +48,195 @@ public void generate(InitContext ctx) throws Exception {
         Map<String, Object> data = new HashMap<>(
                 Map.of(
                         "COMMAND_PREFIX", ctx.commandPrefix()));
-        // AGENTS.md already generated by the shared generator flow.
+
+        List<String> mcpServers = readMcpServerNames(ctx);
+        Set<String> seen = new LinkedHashSet<>();
+        boolean collisionDetected = false;
+        boolean unresolvedSubstitution = false;
+        StringBuilder denials = new StringBuilder();
+        for (String server : mcpServers) {
+            if (SUBSTITUTION_PATTERN.matcher(server).find()) {

Review Comment:
   Fixed. Now scans the entire raw config content (files and inline) for 
{env:...}/{file:...} patterns before parsing, not just server names. A 
substitution anywhere in the raw text triggers fail-closed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to