Skip to content

fix: align BSON properties with Mendix schema for mx diff compatibility#109

Merged
ako merged 1 commit intomendixlabs:mainfrom
engalar:fix/bson-compat
Apr 7, 2026
Merged

fix: align BSON properties with Mendix schema for mx diff compatibility#109
ako merged 1 commit intomendixlabs:mainfrom
engalar:fix/bson-compat

Conversation

@engalar
Copy link
Copy Markdown
Contributor

@engalar engalar commented Apr 7, 2026

Summary

  • Add missing CustomSettings and Tracing fields to ServerConfiguration BSON serialization
  • Remove invalid IsReusableComponent from module BSON (not in Mendix schema)
  • Prevent orphaned mxunit files when document insert fails in writer_units
  • Add mx diff diagnostics workflow to debug-bson skill

Split from #107 per code review — these are independent bug fixes unrelated to ALTER WORKFLOW.

Test plan

  • go build ./... passes
  • go test ./... passes
  • mx diff shows no unexpected changes after roundtrip write

🤖 Generated with Claude Code

- Add missing CustomSettings and Tracing fields to ServerConfiguration
- Remove invalid IsReusableComponent from module BSON serialization
- Prevent orphaned mxunit files on insert failure in writer_units
- Add mx diff diagnostics workflow to debug-bson skill

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 7, 2026

AI Code Review

Critical Issues
None

Moderate Issues
None

Minor Issues

  • The PR modifies multiple files across different areas (documentation, module writer, settings writer, units writer). While related to BSON serialization, these could be considered separate concerns. However, the PR author states they were split from feat: ALTER WORKFLOW command with full activity manipulation #107 per code review and are independent bug fixes, so this is acceptable.
  • No test files were added or modified. The changes should be covered by existing tests, but it would be good to see explicit test coverage for the BSON field additions/removals.

What Looks Good

  • The debug-bson.md update adds valuable diagnostic information about different tolerance levels of Mendix tools (mx check vs mx diff vs Studio Pro) and provides clear steps to reproduce and diagnose BSON issues.
  • Removing IsReusableComponent from module BSON aligns with the Mendix schema (as documented in the debug-bson skill).
  • Adding CustomSettings and Tracing to ServerConfiguration BSON with appropriate default values (empty array and nil) follows the patterns described in the debug-bson skill.
  • The fix in writer_units.go properly handles orphaned file cleanup on insert failure, improving robustness.

Recommendation
Approve. The changes are correct, well-documented, and address specific bugs that would cause mx diff crashes or orphaned files. The documentation update significantly improves the debugging workflow for BSON issues. Minor concerns about test coverage are outweighed by the correctness of the fixes and the existence of existing test suites.


Automated review via OpenRouter (Nemotron Super 120B) — workflow source

Copy link
Copy Markdown
Collaborator

@ako ako left a comment

Choose a reason for hiding this comment

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

Clean split from #107. All four changes are well-motivated independent bug fixes:

  • writer_settings.go: Missing CustomSettings/Tracing fields fix mx diff crash
  • writer_modules.go: IsReusableComponent removal fixes crash on Mendix 11.6.4
  • writer_units.go: Orphan mxunit cleanup on insert failure prevents project corruption
  • debug-bson.md: mx check vs mx diff tolerance documentation is valuable operational knowledge

LGTM.

@ako ako merged commit 4788684 into mendixlabs:main Apr 7, 2026
2 checks passed
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.

2 participants