Skip to content

cjson: skip nested-intersection-union.schema (invalid-type inputs are not checked)#2

Merged
Ankur Goyal (ankrgyl) merged 1 commit into
braintrustdata:intersection-fixfrom
glideapps:cjson-skip-2914
Jul 13, 2026
Merged

cjson: skip nested-intersection-union.schema (invalid-type inputs are not checked)#2
Ankur Goyal (ankrgyl) merged 1 commit into
braintrustdata:intersection-fixfrom
glideapps:cjson-skip-2914

Conversation

@schani

Copy link
Copy Markdown

What

Adds nested-intersection-union.schema to cjson's skipSchema list — one line in test/languages.ts.

Why

The only genuine CI failure on the current intersection-fix head is cjson,schema-cjson (the other red jobs are fail-fast cancellations). The new fixture's expected-failure instance (nested-intersection-union.1.fail.union.json, an array where an object is required) is silently coerced to {} by cjson's generated parser instead of being rejected, so the harness's "this input must fail" assertion trips.

This is cjson's documented limitation, quoted from the comment above its skip list:

Union, Map and Arrays with invalid types are not checked (for the current implementation, can be added later, should abord parsing and return NULL)

Every other schema with a .fail.union.json negative (class-with-additional.schema, go-schema-pattern-properties.schema, multi-type-enum.schema) is already skip-listed for cjson for exactly this reason; this fixture gets the same treatment.

Merging this into intersection-fix updates glideapps#2914. Note the fail-fast cancellations mean several languages haven't run the new fixture yet — the next full CI run is the real arbiter.

🤖 Generated with Claude Code

…e not checked (known limitation)

cjson's generated parser does not validate invalid types in unions, maps,
and arrays (documented above this skip list), so it silently coerces the
fixture's expected-failure instance (array where an object is required)
into an empty object instead of rejecting it. Skip the schema for cjson,
exactly like the existing class-with-additional, go-schema-pattern-properties,
and multi-type-enum skips.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

2 participants