Skip to content

Deterministic xml: emit element attributes in sorted key order - #10337

Open
rasmuskl wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
rasmuskl:ninja/stable-xml-attrib-order
Open

Deterministic xml: emit element attributes in sorted key order#10337
rasmuskl wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
rasmuskl:ninja/stable-xml-attrib-order

Conversation

@rasmuskl

@rasmuskl rasmuskl commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Description of the problem being solved:

composeNode() walked node.attrib with pairs(), so attributes came out in string-hash order and the same tree could serialise differently between processes. Collect the keys, sort them, then emit.

Steps taken to verify a working solution:

Has been running headless in poe.ninja for about a month.

composeNode() walked node.attrib with pairs(), so attributes came out in string-hash order and the same tree could serialise differently between processes. Collect the keys, sort them, then emit. The non-string-key check moves into the collecting loop because table.sort cannot compare a string key against a non-string one; both error messages are unchanged.
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