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 validator and interpreter agree on discriminator tag-only objects (Jtd.java) #181
Sub-issue 2 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 2 (verbatim from the audit findings file) ==
PR tidy up #101 — Interpreter/recursive validator paths disagree on discriminator variants.
Author: chatgpt-codex-connector[bot], 2025-09-28. Comment: tidy up #101 (comment)
Source: json-java21-jtd/src/main/java/json/java21/jtd/Jtd.java#L230-L239. Current: json-java21-jtd/src/main/java/json/java21/jtd/Jtd.java:259-272 (frame path always pushes variant Frame); counterpart special-case only in JtdSchema.java:482-488.
Flagged: "restore the guard before enqueuing the variant frame or remove the special-case in DiscriminatorSchema.validate so both paths agree".
Still applies: Jtd.validate() (main API) uses the stack path and always pushes the variant frame (tag-only objects fail for simple-type mappings), while the recursive JtdSchema.validate path short-circuits to success (tag-only objects pass) — the two shipped validation paths still disagree.
Activity