You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Tidy up: make generated definition identifiers collision-free (EsmRenderer.java) #202
Sub-issue 23 of 26 from the 2026-11-21 bot-review-comment audit. Parent issue: #179 (Bot review comment tidy up).
Audited origin/main HEAD: 2e5cf37. Audit date: 2026-11-21.
== Finding 23 (verbatim from the audit findings file) ==
PR Port jtd-esm-codegen onto the incubator main #169 — Definition identifiers can collide in generated ES modules.
Author: chatgpt-codex-connector[bot], 2026-08-31. Comment: Port jtd-esm-codegen onto the incubator main #169 (comment)
Source: jtd-esm-codegen/src/main/java/io/github/simbo1905/json/jtd/codegen/EsmRenderer.java:102. Current: jtd-esm-codegen/src/main/java/io/github/simbo1905/json/jtd/codegen/EsmRenderer.java:102 + 442-443 (toSafeName = replaceAll("[^a-zA-Z0-9_]", "_") only).
Flagged: "When two valid definition names sanitize to the same value, such as a-b and a_b, both are emitted as validate_a_b. This produces duplicate top-level declarations... assign unique generated identifiers rather than relying only on character replacement".
Still applies: toSafeName is still a pure char replacement with no uniqueness pass, so a-b/a_b definitions still emit the same function name.
Activity