davsclaus commented on PR #26920: URL: https://github.com/apache/camel/pull/26920#issuecomment-5872437847
Thanks for this. I've moved the PR back to draft because we need more time to think about the approach. The check makes validating one source file depend on the other route files in the directory. That's often not what you want. You may be validating a single file on its own, while other sources sit alongside it that belong to a different application, are still being written, or will be run separately (`camel run a.camel.yaml`). In those cases a `direct:` endpoint with no consumer in the directory isn't necessarily a mistake, but the check reports it as an error and sets `valid: false`. Some points to consider: - Should this be opt-in, or reported as a warning that doesn't set `valid: false`? Right now every existing `SourceValidator.validate(...)` overload defaults to `checkConsumers=true`, and only `camel_write_file` / `camel_edit_file` opt out. A future caller that passes a directory would pick up the check without meaning to. - An AI agent that calls `camel_validate_source` partway through building an integration gets `valid: false`. It may then "fix" the error by inventing a stub consumer route or renaming the endpoint, rather than carrying on with its plan. - Is the directory the right scope for which routes belong together, or should the caller name the set of files, as `camel run` does? Let's continue the discussion here before going further. _Claude Code on behalf of davsclaus_ -- 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]
