Skip to content

Escape TOML strings and reject unparsable widget names - #5

Merged
GG-O-BP merged 1 commit into
mainfrom
fix/toml-string-escaping
Sep 3, 2026
Merged

Escape TOML strings and reject unparsable widget names#5
GG-O-BP merged 1 commit into
mainfrom
fix/toml-string-escaping

Conversation

@GG-O-BP

@GG-O-BP GG-O-BP commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • mendraw#8 reported unescaped TOML string writing in the old generator. The successor writers in mxpak (config/toml_writer, lockfile) had the same flaw: raw interpolation of version/hash/S3 strings into quoted TOML.
  • A shared mxpak/toml_syntax module now emits TOML basic-string escapes (\", \\, \b, \t, \n, \f, \r, control \uXXXX) and correctly quotes bare/quoted keys; both writers use it.
  • Round-trip tests write hostile versions/S3 IDs and read them back through the real tom parser.
  • Investigation also showed the tom parser cannot round-trip quoted keys containing escaped quotes, so widget.validate_name now rejects quotes (alongside separators/NUL) to keep mxpak.lock readable.

Fixes glendix-labs/mendraw#8

Verification

  • gleam test — 114 passed.
  • ./scripts/verify.sh inner mxpak — passed.
  • ./scripts/check-all.sh — passed.
  • pre-push verify.sh final — passed (family checks, widget build, Lustre E2E, Mendix full E2E).

@GG-O-BP
GG-O-BP merged commit 2a41d07 into main Sep 3, 2026
@GG-O-BP
GG-O-BP deleted the fix/toml-string-escaping branch September 3, 2026 01:16
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.

[codegen] formatTomlValue가 문자열 특수문자를 이스케이프하지 않음

1 participant