Skip to content

fix: int32→int64 BSON property values + CREATE OR REPLACE PAGE UUID reuse#31

Open
engalar wants to merge 2 commits intomainfrom
fix/int64-bson-roundtrip
Open

fix: int32→int64 BSON property values + CREATE OR REPLACE PAGE UUID reuse#31
engalar wants to merge 2 commits intomainfrom
fix/int64-bson-roundtrip

Conversation

@engalar
Copy link
Copy Markdown
Owner

@engalar engalar commented Apr 1, 2026

Summary

  • All BSON property values changed from int32 to int64 to match Studio Pro type cache
  • Array version markers (int32(2), int32(3)) preserved as int32
  • CREATE OR REPLACE PAGE now reuses existing UUID
  • BSON roundtrip test golden files added

Root Cause

Studio Pro crashes with Sequence contains no matching element when BSON int32 doesn't match expected int64.

Test plan

  • go build passes
  • go test ./sdk/mpr/ passes
  • Studio Pro opens project without crash

engalar and others added 2 commits April 1, 2026 09:58
…D reuse

BSON int32→int64:
- All property values in writer serialization changed from int32 to int64
  to match Studio Pro's expected BSON types
- Array version markers (int32(2), int32(3)) preserved as int32
- Fixes Studio Pro crash: "Sequence contains no matching element" in
  MprProperty..ctor when type cache expects int64 but finds int32

CREATE OR REPLACE PAGE:
- Reuses existing page UUID and calls UpdatePage instead of DeletePage+
  CreatePage, producing git "Modified" diff instead of "Deleted+Added"
- Prevents RevStatusCache crash when parsing deleted mxunit base files

BSON roundtrip test baseline:
- Add golden mxunit files for roundtrip testing (pages, microflows, enums)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Revert array markers from int64 back to int32 (verified against Studio Pro BSON)
- Remove 26-line debug log block in writer_widgets_custom.go
- Fix 4 comments that said int64 but code correctly uses int32

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

1 participant