# Adversarial ambiguity suite (FR-27, round 5)

Generated by `code/tests/eval/run_ambiguity.py` on 2026-10-16 01:52 CST.

| field | value |
| --- | --- |
| cases | 24 (10 ambiguous, 14 control) |
| frozen fingerprint | `c75989b123c438c3e12e70c2efb5b35bf5f9b821042f41c63e64a8856f031afe` |
| ambiguous cases flagged by JSONMend | 10 / 10 |
| ambiguous cases refused by `--for-execution` | 10 / 10 |
| ambiguous cases answered silently by `jsonrepair` | 8 / 10 |
| ambiguous cases answered silently by `json_repair` | 10 / 10 |
| expectation failures | 0 |

## Case by case

| case | input | expected reading | flagged | gate | why it reads two ways |
| --- | --- | --- | --- | --- | --- |
| `amb-001` | `["a" "b"]` | adjacent_strings | yes | E011 | two elements, or the single concatenated string "ab" |
| `amb-002` | `['a' 'b']` | adjacent_strings | yes | E011 | same reading with single quotes |
| `amb-003` | `["a" "b" "c"]` | adjacent_strings | yes | E011 | three elements, or one string of length three |
| `amb-004` | `{"x":"a" "y":"b"}` | unique | no | OK | control: a missing comma before a key has one reading |
| `amb-005` | `[1 2]` | unique | no | OK | control: numbers cannot be concatenated |
| `amb-006` | `["a" 2]` | unique | no | OK | control: number follows the string |
| `amb-007` | `["a"+"b"]` | concat_operator | yes | E011 | one concatenated string, or the operator "+" as text |
| `amb-008` | `["a" + "b"]` | concat_operator | yes | E011 | same with spaces |
| `amb-009` | `{"a": "x" + "y"}` | concat_operator | yes | E011 | a member value built with a plus sign |
| `amb-010` | `[fast]` | bare_word | yes | E011 | a string, or a host-language value named `fast` |
| `amb-011` | `{"mode": fast}` | bare_word | yes | E011 | same inside an object |
| `amb-012` | `{fast: 1}` | unique | no | OK | control: a bare word as a key is a notation fix |
| `amb-013` | `{"a":1} {"b":2}` | trailing_content | yes | E011 | a second document, or a mistake |
| `amb-014` | `[1] 2` | trailing_content | yes | E011 | an extra element, or a second document |
| `amb-015` | `{"a":1}   ` | unique | no | OK | control: trailing whitespace is not content |
| `amb-016` | `{"a": undefined}` | unique | no | E010 | null, or the string "undefined" |
| `amb-017` | `[None]` | unique | no | E010 | null, or the string "None" |
| `amb-018` | `{"n": nan}` | unique | no | E010 | a null, or the string "NaN" |
| `amb-019` | `{"a":"x}` | unique | no | E010 | the `}` may close the object (closing quote invented) or be string content |
| `amb-020` | `{"a":1` | unique | no | E010 | an unclosed object: the closer was invented |
| `amb-021` | `{'a':1}` | unique | no | OK | control: a normalised quote invents nothing |
| `amb-022` | `[1,2,3,]` | unique | no | OK | control: a trailing comma invents nothing |
| `amb-023` | `{"a":1, // c\n}` | unique | no | OK | control: a comment invents nothing |
| `amb-024` | `{"a":1}` | unique | no | OK | control: valid JSON |

## What the two reference libraries do with the ambiguous cases

| case | input | jsonrepair | json_repair |
| --- | --- | --- | --- |
| `amb-001` | `["a" "b"]` | silent value ["a", "b"] | silent value ["a", "b"] |
| `amb-002` | `['a' 'b']` | silent value ["a", "b"] | silent value ["a", "b"] |
| `amb-003` | `["a" "b" "c"]` | silent value ["a", "b", "c"] | silent value ["a", "b", "c"] |
| `amb-007` | `["a"+"b"]` | silent value ["ab"] | silent value ["a\"+\"b"] |
| `amb-008` | `["a" + "b"]` | silent value ["ab"] | silent value ["a\" + \"b"] |
| `amb-009` | `{"a": "x" + "y"}` | silent value {"a": "xy"} | silent value {"a": "x\" + \"y"} |
| `amb-010` | `[fast]` | silent value ["fast"] | silent value ["fast"] |
| `amb-011` | `{"mode": fast}` | silent value {"mode": "fast"} | silent value {"mode": "fast"} |
| `amb-013` | `{"a":1} {"b":2}` | raised / non-JSON | silent value [{"a": 1}, {"b": 2}] |
| `amb-014` | `[1] 2` | raised / non-JSON | silent value [1] |

Every expectation holds: the ambiguous inputs are flagged, the execution gate refuses them, the controls pass, and both reference libraries answer the ambiguous cases without any signal.
