Skip to content

Reject array OID collisions in with_codec#174

Merged
SeanTAllen merged 1 commit intomainfrom
with-codec-reject-array-oids
Mar 16, 2026
Merged

Reject array OID collisions in with_codec#174
SeanTAllen merged 1 commit intomainfrom
with-codec-reject-array-oids

Conversation

@SeanTAllen
Copy link
Copy Markdown
Member

with_array_type rejects array_oid values that collide with registered scalar codecs, but with_codec didn't perform the reverse check against array OIDs. This allowed registering a scalar codec for a built-in or custom array OID, producing a silently unreachable dead codec since decode() always takes the array path first.

with_codec now checks _ArrayOidMap.is_array_oid(oid) and _custom_array_element_oids.contains(oid) and errors on collision.

Closes #173

with_array_type rejects array_oid values that collide with registered
scalar codecs, but with_codec didn't perform the reverse check against
array OIDs. This allowed registering a scalar codec for a built-in or
custom array OID, producing a silently unreachable dead codec since
decode() always takes the array path first.

Closes #173
@ponylang-main ponylang-main added the discuss during sync Should be discussed during an upcoming sync label Mar 16, 2026
@SeanTAllen SeanTAllen merged commit 609cabd into main Mar 16, 2026
10 checks passed
@SeanTAllen SeanTAllen deleted the with-codec-reject-array-oids branch March 16, 2026 02:54
@ponylang-main ponylang-main removed the discuss during sync Should be discussed during an upcoming sync label Mar 16, 2026
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.

with_codec should reject array OID collisions

2 participants