luigidemasi opened a new issue, #174: URL: https://github.com/apache/camel-kit/issues/174
## Description Track the two optional consistency improvements identified in the [latest review of #173](https://github.com/apache/camel-kit/pull/173#pullrequestreview-5865154581), reproduced at commit `73abcc1b91b1100b00e3dc44ca7af0430dbf99f6`. These are nonblocking follow-ups. They do not reopen the four safety findings resolved in #173; the original Codex TOML and project-owned wrapper files are preserved in the reproduced cases. ## Codex validation during preview In a disposable existing project, create `.codex/config.toml` containing malformed TOML, for example: ```toml model = [ ``` Run `camel-kit init --here --ai codex --dry-run`, then the same command without `--dry-run`. **Actual:** preview produces a plan, but initialization rejects the malformed configuration. The original TOML remains unchanged. This is pre-existing late validation in the Codex merge path; preview calls the generator's pure `validate` hook, which Codex does not currently implement. **Expected:** preview rejects malformed Codex TOML with a useful diagnostic and no filesystem changes. Reuse the relevant non-mutating validation in actual initialization so both paths agree, without duplicating the parser or invoking a mutating preflight from preview. Source: [preview validation](https://github.com/apache/camel-kit/blob/73abcc1b91b1100b00e3dc44ca7af0430dbf99f6/kit/camel-kit-core/src/main/java/org/apache/camel/kit/service/InitService.java#L49-L84), [Codex merge validation](https://github.com/apache/camel-kit/blob/73abcc1b91b1100b00e3dc44ca7af0430dbf99f6/kit/camel-kit-core/src/main/java/org/apache/camel/kit/generator/CodexConfigMerger.java#L41). ## Preserved wrapper conflict proposals In another disposable existing project, create a project-owned `mvnw` with custom content and no Camel Kit ownership ledger, then run `camel-kit init --here --ai claude`. **Actual:** `mvnw` is preserved and reported as a conflict, but its conflict record has no proposal path and `.camel-kit/conflicts/mvnw` is not created. The general documentation says preserved shared files receive a proposed copy under `.camel-kit/conflicts/`. **Expected:** make reporting and documentation agree with the wrapper policy. Either produce safe proposal copies for preserved wrapper files, or explicitly document and report that wrappers are an exception. This need not change the policy that avoids assembling a partial wrapper from project-owned and generated files. Source: [wrapper preservation](https://github.com/apache/camel-kit/blob/73abcc1b91b1100b00e3dc44ca7af0430dbf99f6/kit/camel-kit-core/src/main/java/org/apache/camel/kit/service/InitService.java#L334-L373), [shared-file proposal documentation](https://github.com/apache/camel-kit/blob/73abcc1b91b1100b00e3dc44ca7af0430dbf99f6/docs/modules/ROOT/pages/getting-started.adoc#L217-L225). ## Acceptance criteria - [ ] Malformed Codex TOML is rejected by preview without changing project files; regression coverage also checks initialization rejection, preservation of the original TOML and acceptance of valid configuration. - [ ] Wrapper conflict output, proposal paths and documentation consistently reflect the chosen behavior; regression coverage verifies preservation and whether a proposal is expected. If copies are added, retain the existing confinement protections. - [ ] Update the relevant Antora guidance under `docs/modules/ROOT/` for preview validation and wrapper conflict handling. **Website impact: required.** This changes or clarifies user-visible preview and conflict-reporting behavior. Related existing-project work: #168; broader acceptance and documentation remain under #164 and #167. _AI-generated by Codex on behalf of @luigidemasi._ -- 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]
