FAILURE MAP
← Case archive

FA-25366 / Filter interfaces / Open access

Escaped or quoted delimiters remain token content · case 01

Escaped or quoted delimiters remain token content is violated by the widget projection.

Verified by executionVariant 1 · 10 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The delimiter-active decision uses `d['delimiter']` instead of the stipulated token-filter-composer projection.

VERIFIED REPAIR

Implement the declared delimiter-active projection: `d['delimiter'] and not d['quote_open'] and not d['escaped']`.

Unsuccessful approach: The attempted correction `d['delimiter'] and not d['quote_open']` still violates the explicit contract fixtures.

Case contract

A token composer recognizes leading minus as exclusion unless escaped, keeps quoted phrases intact, and commits only complete nonblank tokens. This example checks: Escaped or quoted delimiters remain token content.

Why this case matters

Filter-widget state and serialization must preserve user constraints while the view changes.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(d):
    return {'polarity-prefix':(d['text'].startswith('-') and not d['escaped']), 'operand-strip':(d['text'][1:] if d['text'].startswith('-') and not d['escaped'] else d['text']), 'commit-gate':(bool(d['text'].strip()) and not d['quote_open'] and not d['composing']), 'delimiter-active':(d['delimiter']), 'quote-feedback':('unfinished phrase' if d['quote_open'] else ''), 'empty-exclusion':(d['text']=='-' and not d['escaped'])}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'text': '', 'escaped': False, 'quote_open': True, 'composing': False, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': '', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False}), ({'text': '-', 'escaped': True, 'quote_open': False, 'composing': True, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': '-', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': '', 'escaped': False, 'quote_open': True, 'composing': True, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': '', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False}), ({'text': '', 'escaped': True, 'quote_open': True, 'composing': True, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': '', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False}), ({'text': '-', 'escaped': False, 'quote_open': True, 'composing': False, 'delimiter': True}, {'polarity-prefix': True, 'operand-strip': '', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': True}), ({'text': '-', 'escaped': True, 'quote_open': True, 'composing': False, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': '-', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False}), ({'text': '--x', 'escaped': False, 'quote_open': False, 'composing': True, 'delimiter': True}, {'polarity-prefix': True, 'operand-strip': '-x', 'commit-gate': False, 'delimiter-active': True, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': '--x', 'escaped': True, 'quote_open': False, 'composing': True, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': '--x', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': 'a-b', 'escaped': False, 'quote_open': False, 'composing': False, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': 'a-b', 'commit-gate': True, 'delimiter-active': True, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': 'a-b', 'escaped': True, 'quote_open': False, 'composing': False, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': 'a-b', 'commit-gate': True, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': False})], 2: [({'text': '', 'escaped': False, 'quote_open': True, 'composing': True, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': '', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False}), ({'text': 'a-b', 'escaped': True, 'quote_open': False, 'composing': False, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': 'a-b', 'commit-gate': True, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': '', 'escaped': True, 'quote_open': True, 'composing': True, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': '', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False}), ({'text': '-', 'escaped': False, 'quote_open': True, 'composing': False, 'delimiter': True}, {'polarity-prefix': True, 'operand-strip': '', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': True}), ({'text': '-', 'escaped': True, 'quote_open': True, 'composing': False, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': '-', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False}), ({'text': '--x', 'escaped': False, 'quote_open': False, 'composing': True, 'delimiter': True}, {'polarity-prefix': True, 'operand-strip': '-x', 'commit-gate': False, 'delimiter-active': True, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': '--x', 'escaped': True, 'quote_open': False, 'composing': True, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': '--x', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': 'a-b', 'escaped': False, 'quote_open': False, 'composing': False, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': 'a-b', 'commit-gate': True, 'delimiter-active': True, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': 'a-b', 'escaped': True, 'quote_open': False, 'composing': False, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': 'a-b', 'commit-gate': True, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': 'a-b', 'escaped': True, 'quote_open': True, 'composing': True, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': 'a-b', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False})], 3: [({'text': '', 'escaped': True, 'quote_open': False, 'composing': False, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': '', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': 'two words', 'escaped': True, 'quote_open': False, 'composing': True, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': 'two words', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': '-', 'escaped': False, 'quote_open': True, 'composing': False, 'delimiter': True}, {'polarity-prefix': True, 'operand-strip': '', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': True}), ({'text': '-', 'escaped': True, 'quote_open': True, 'composing': False, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': '-', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False}), ({'text': '--x', 'escaped': False, 'quote_open': False, 'composing': True, 'delimiter': True}, {'polarity-prefix': True, 'operand-strip': '-x', 'commit-gate': False, 'delimiter-active': True, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': '--x', 'escaped': True, 'quote_open': False, 'composing': True, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': '--x', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': 'a-b', 'escaped': False, 'quote_open': False, 'composing': False, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': 'a-b', 'commit-gate': True, 'delimiter-active': True, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': 'a-b', 'escaped': True, 'quote_open': False, 'composing': False, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': 'a-b', 'commit-gate': True, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': 'a-b', 'escaped': True, 'quote_open': True, 'composing': True, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': 'a-b', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False}), ({'text': 'two words', 'escaped': False, 'quote_open': True, 'composing': True, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': 'two words', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False})], 4: [({'text': '', 'escaped': True, 'quote_open': False, 'composing': True, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': '', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': '-', 'escaped': True, 'quote_open': False, 'composing': False, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': '-', 'commit-gate': True, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': '-', 'escaped': True, 'quote_open': True, 'composing': False, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': '-', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False}), ({'text': '--x', 'escaped': False, 'quote_open': False, 'composing': True, 'delimiter': True}, {'polarity-prefix': True, 'operand-strip': '-x', 'commit-gate': False, 'delimiter-active': True, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': '--x', 'escaped': True, 'quote_open': False, 'composing': True, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': '--x', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': 'a-b', 'escaped': False, 'quote_open': False, 'composing': False, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': 'a-b', 'commit-gate': True, 'delimiter-active': True, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': 'a-b', 'escaped': True, 'quote_open': False, 'composing': False, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': 'a-b', 'commit-gate': True, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': 'a-b', 'escaped': True, 'quote_open': True, 'composing': True, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': 'a-b', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False}), ({'text': 'two words', 'escaped': False, 'quote_open': True, 'composing': True, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': 'two words', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False}), ({'text': 'two words', 'escaped': True, 'quote_open': True, 'composing': False, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': 'two words', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False})], 5: [({'text': '', 'escaped': True, 'quote_open': True, 'composing': False, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': '', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False}), ({'text': '--x', 'escaped': True, 'quote_open': False, 'composing': True, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': '--x', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': '--x', 'escaped': False, 'quote_open': False, 'composing': True, 'delimiter': True}, {'polarity-prefix': True, 'operand-strip': '-x', 'commit-gate': False, 'delimiter-active': True, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': '--x', 'escaped': True, 'quote_open': False, 'composing': True, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': '--x', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': 'a-b', 'escaped': False, 'quote_open': False, 'composing': False, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': 'a-b', 'commit-gate': True, 'delimiter-active': True, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': 'a-b', 'escaped': True, 'quote_open': False, 'composing': False, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': 'a-b', 'commit-gate': True, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': 'a-b', 'escaped': True, 'quote_open': True, 'composing': True, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': 'a-b', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False}), ({'text': 'two words', 'escaped': False, 'quote_open': True, 'composing': True, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': 'two words', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False}), ({'text': 'two words', 'escaped': True, 'quote_open': True, 'composing': False, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': 'two words', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False}), ({'text': '', 'escaped': False, 'quote_open': True, 'composing': False, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': '', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False})]}
for index, (data, expected) in enumerate(fixtures[N]):
    check("contract fixture " + str(index), solve(data), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
contract fixture 0{'commit-gate': False, 'delimiter-active': True, 'empty-exclusion': False, 'operand-strip': '', 'polarity-prefix': False, 'quote-feedback': 'unfinished phrase'}{'commit-gate': False, 'delimiter-active': False, 'empty-exclusion': False, 'operand-strip': '', 'polarity-prefix': False, 'quote-feedback': 'unfinished phrase'}Failed
contract fixture 1{'commit-gate': False, 'delimiter-active': True, 'empty-exclusion': False, 'operand-strip': '-', 'polarity-prefix': False, 'quote-feedback': ''}{'commit-gate': False, 'delimiter-active': False, 'empty-exclusion': False, 'operand-strip': '-', 'polarity-prefix': False, 'quote-feedback': ''}Failed
contract fixture 2{'commit-gate': False, 'delimiter-active': True, 'empty-exclusion': False, 'operand-strip': '', 'polarity-prefix': False, 'quote-feedback': 'unfinished phrase'}{'commit-gate': False, 'delimiter-active': False, 'empty-exclusion': False, 'operand-strip': '', 'polarity-prefix': False, 'quote-feedback': 'unfinished phrase'}Failed
contract fixture 3{'commit-gate': False, 'delimiter-active': False, 'empty-exclusion': False, 'operand-strip': '', 'polarity-prefix': False, 'quote-feedback': 'unfinished phrase'}{'commit-gate': False, 'delimiter-active': False, 'empty-exclusion': False, 'operand-strip': '', 'polarity-prefix': False, 'quote-feedback': 'unfinished phrase'}Passed
contract fixture 4{'commit-gate': False, 'delimiter-active': True, 'empty-exclusion': True, 'operand-strip': '', 'polarity-prefix': True, 'quote-feedback': 'unfinished phrase'}{'commit-gate': False, 'delimiter-active': False, 'empty-exclusion': True, 'operand-strip': '', 'polarity-prefix': True, 'quote-feedback': 'unfinished phrase'}Failed
contract fixture 5{'commit-gate': False, 'delimiter-active': False, 'empty-exclusion': False, 'operand-strip': '-', 'polarity-prefix': False, 'quote-feedback': 'unfinished phrase'}{'commit-gate': False, 'delimiter-active': False, 'empty-exclusion': False, 'operand-strip': '-', 'polarity-prefix': False, 'quote-feedback': 'unfinished phrase'}Passed
contract fixture 6{'commit-gate': False, 'delimiter-active': True, 'empty-exclusion': False, 'operand-strip': '-x', 'polarity-prefix': True, 'quote-feedback': ''}{'commit-gate': False, 'delimiter-active': True, 'empty-exclusion': False, 'operand-strip': '-x', 'polarity-prefix': True, 'quote-feedback': ''}Passed
contract fixture 7{'commit-gate': False, 'delimiter-active': False, 'empty-exclusion': False, 'operand-strip': '--x', 'polarity-prefix': False, 'quote-feedback': ''}{'commit-gate': False, 'delimiter-active': False, 'empty-exclusion': False, 'operand-strip': '--x', 'polarity-prefix': False, 'quote-feedback': ''}Passed
contract fixture 8{'commit-gate': True, 'delimiter-active': True, 'empty-exclusion': False, 'operand-strip': 'a-b', 'polarity-prefix': False, 'quote-feedback': ''}{'commit-gate': True, 'delimiter-active': True, 'empty-exclusion': False, 'operand-strip': 'a-b', 'polarity-prefix': False, 'quote-feedback': ''}Passed
contract fixture 9{'commit-gate': True, 'delimiter-active': False, 'empty-exclusion': False, 'operand-strip': 'a-b', 'polarity-prefix': False, 'quote-feedback': ''}{'commit-gate': True, 'delimiter-active': False, 'empty-exclusion': False, 'operand-strip': 'a-b', 'polarity-prefix': False, 'quote-feedback': ''}Passed

SHA-256 / dfbb13271a4c7f813896b3d0d4181f10cc44aca34bbe68e013f367071575fbad

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(d):
    return {'polarity-prefix':(d['text'].startswith('-') and not d['escaped']), 'operand-strip':(d['text'][1:] if d['text'].startswith('-') and not d['escaped'] else d['text']), 'commit-gate':(bool(d['text'].strip()) and not d['quote_open'] and not d['composing']), 'delimiter-active':(d['delimiter'] and not d['quote_open']), 'quote-feedback':('unfinished phrase' if d['quote_open'] else ''), 'empty-exclusion':(d['text']=='-' and not d['escaped'])}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'text': '', 'escaped': False, 'quote_open': True, 'composing': False, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': '', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False}), ({'text': '-', 'escaped': True, 'quote_open': False, 'composing': True, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': '-', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': '', 'escaped': False, 'quote_open': True, 'composing': True, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': '', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False}), ({'text': '', 'escaped': True, 'quote_open': True, 'composing': True, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': '', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False}), ({'text': '-', 'escaped': False, 'quote_open': True, 'composing': False, 'delimiter': True}, {'polarity-prefix': True, 'operand-strip': '', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': True}), ({'text': '-', 'escaped': True, 'quote_open': True, 'composing': False, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': '-', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False}), ({'text': '--x', 'escaped': False, 'quote_open': False, 'composing': True, 'delimiter': True}, {'polarity-prefix': True, 'operand-strip': '-x', 'commit-gate': False, 'delimiter-active': True, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': '--x', 'escaped': True, 'quote_open': False, 'composing': True, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': '--x', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': 'a-b', 'escaped': False, 'quote_open': False, 'composing': False, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': 'a-b', 'commit-gate': True, 'delimiter-active': True, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': 'a-b', 'escaped': True, 'quote_open': False, 'composing': False, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': 'a-b', 'commit-gate': True, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': False})], 2: [({'text': '', 'escaped': False, 'quote_open': True, 'composing': True, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': '', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False}), ({'text': 'a-b', 'escaped': True, 'quote_open': False, 'composing': False, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': 'a-b', 'commit-gate': True, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': '', 'escaped': True, 'quote_open': True, 'composing': True, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': '', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False}), ({'text': '-', 'escaped': False, 'quote_open': True, 'composing': False, 'delimiter': True}, {'polarity-prefix': True, 'operand-strip': '', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': True}), ({'text': '-', 'escaped': True, 'quote_open': True, 'composing': False, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': '-', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False}), ({'text': '--x', 'escaped': False, 'quote_open': False, 'composing': True, 'delimiter': True}, {'polarity-prefix': True, 'operand-strip': '-x', 'commit-gate': False, 'delimiter-active': True, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': '--x', 'escaped': True, 'quote_open': False, 'composing': True, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': '--x', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': 'a-b', 'escaped': False, 'quote_open': False, 'composing': False, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': 'a-b', 'commit-gate': True, 'delimiter-active': True, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': 'a-b', 'escaped': True, 'quote_open': False, 'composing': False, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': 'a-b', 'commit-gate': True, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': 'a-b', 'escaped': True, 'quote_open': True, 'composing': True, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': 'a-b', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False})], 3: [({'text': '', 'escaped': True, 'quote_open': False, 'composing': False, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': '', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': 'two words', 'escaped': True, 'quote_open': False, 'composing': True, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': 'two words', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': '-', 'escaped': False, 'quote_open': True, 'composing': False, 'delimiter': True}, {'polarity-prefix': True, 'operand-strip': '', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': True}), ({'text': '-', 'escaped': True, 'quote_open': True, 'composing': False, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': '-', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False}), ({'text': '--x', 'escaped': False, 'quote_open': False, 'composing': True, 'delimiter': True}, {'polarity-prefix': True, 'operand-strip': '-x', 'commit-gate': False, 'delimiter-active': True, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': '--x', 'escaped': True, 'quote_open': False, 'composing': True, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': '--x', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': 'a-b', 'escaped': False, 'quote_open': False, 'composing': False, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': 'a-b', 'commit-gate': True, 'delimiter-active': True, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': 'a-b', 'escaped': True, 'quote_open': False, 'composing': False, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': 'a-b', 'commit-gate': True, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': 'a-b', 'escaped': True, 'quote_open': True, 'composing': True, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': 'a-b', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False}), ({'text': 'two words', 'escaped': False, 'quote_open': True, 'composing': True, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': 'two words', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False})], 4: [({'text': '', 'escaped': True, 'quote_open': False, 'composing': True, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': '', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': '-', 'escaped': True, 'quote_open': False, 'composing': False, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': '-', 'commit-gate': True, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': '-', 'escaped': True, 'quote_open': True, 'composing': False, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': '-', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False}), ({'text': '--x', 'escaped': False, 'quote_open': False, 'composing': True, 'delimiter': True}, {'polarity-prefix': True, 'operand-strip': '-x', 'commit-gate': False, 'delimiter-active': True, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': '--x', 'escaped': True, 'quote_open': False, 'composing': True, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': '--x', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': 'a-b', 'escaped': False, 'quote_open': False, 'composing': False, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': 'a-b', 'commit-gate': True, 'delimiter-active': True, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': 'a-b', 'escaped': True, 'quote_open': False, 'composing': False, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': 'a-b', 'commit-gate': True, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': 'a-b', 'escaped': True, 'quote_open': True, 'composing': True, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': 'a-b', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False}), ({'text': 'two words', 'escaped': False, 'quote_open': True, 'composing': True, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': 'two words', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False}), ({'text': 'two words', 'escaped': True, 'quote_open': True, 'composing': False, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': 'two words', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False})], 5: [({'text': '', 'escaped': True, 'quote_open': True, 'composing': False, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': '', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False}), ({'text': '--x', 'escaped': True, 'quote_open': False, 'composing': True, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': '--x', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': '--x', 'escaped': False, 'quote_open': False, 'composing': True, 'delimiter': True}, {'polarity-prefix': True, 'operand-strip': '-x', 'commit-gate': False, 'delimiter-active': True, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': '--x', 'escaped': True, 'quote_open': False, 'composing': True, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': '--x', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': 'a-b', 'escaped': False, 'quote_open': False, 'composing': False, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': 'a-b', 'commit-gate': True, 'delimiter-active': True, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': 'a-b', 'escaped': True, 'quote_open': False, 'composing': False, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': 'a-b', 'commit-gate': True, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': 'a-b', 'escaped': True, 'quote_open': True, 'composing': True, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': 'a-b', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False}), ({'text': 'two words', 'escaped': False, 'quote_open': True, 'composing': True, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': 'two words', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False}), ({'text': 'two words', 'escaped': True, 'quote_open': True, 'composing': False, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': 'two words', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False}), ({'text': '', 'escaped': False, 'quote_open': True, 'composing': False, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': '', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False})]}
for index, (data, expected) in enumerate(fixtures[N]):
    check("contract fixture " + str(index), solve(data), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
contract fixture 0{'commit-gate': False, 'delimiter-active': False, 'empty-exclusion': False, 'operand-strip': '', 'polarity-prefix': False, 'quote-feedback': 'unfinished phrase'}{'commit-gate': False, 'delimiter-active': False, 'empty-exclusion': False, 'operand-strip': '', 'polarity-prefix': False, 'quote-feedback': 'unfinished phrase'}Passed
contract fixture 1{'commit-gate': False, 'delimiter-active': True, 'empty-exclusion': False, 'operand-strip': '-', 'polarity-prefix': False, 'quote-feedback': ''}{'commit-gate': False, 'delimiter-active': False, 'empty-exclusion': False, 'operand-strip': '-', 'polarity-prefix': False, 'quote-feedback': ''}Failed
contract fixture 2{'commit-gate': False, 'delimiter-active': False, 'empty-exclusion': False, 'operand-strip': '', 'polarity-prefix': False, 'quote-feedback': 'unfinished phrase'}{'commit-gate': False, 'delimiter-active': False, 'empty-exclusion': False, 'operand-strip': '', 'polarity-prefix': False, 'quote-feedback': 'unfinished phrase'}Passed
contract fixture 3{'commit-gate': False, 'delimiter-active': False, 'empty-exclusion': False, 'operand-strip': '', 'polarity-prefix': False, 'quote-feedback': 'unfinished phrase'}{'commit-gate': False, 'delimiter-active': False, 'empty-exclusion': False, 'operand-strip': '', 'polarity-prefix': False, 'quote-feedback': 'unfinished phrase'}Passed
contract fixture 4{'commit-gate': False, 'delimiter-active': False, 'empty-exclusion': True, 'operand-strip': '', 'polarity-prefix': True, 'quote-feedback': 'unfinished phrase'}{'commit-gate': False, 'delimiter-active': False, 'empty-exclusion': True, 'operand-strip': '', 'polarity-prefix': True, 'quote-feedback': 'unfinished phrase'}Passed
contract fixture 5{'commit-gate': False, 'delimiter-active': False, 'empty-exclusion': False, 'operand-strip': '-', 'polarity-prefix': False, 'quote-feedback': 'unfinished phrase'}{'commit-gate': False, 'delimiter-active': False, 'empty-exclusion': False, 'operand-strip': '-', 'polarity-prefix': False, 'quote-feedback': 'unfinished phrase'}Passed
contract fixture 6{'commit-gate': False, 'delimiter-active': True, 'empty-exclusion': False, 'operand-strip': '-x', 'polarity-prefix': True, 'quote-feedback': ''}{'commit-gate': False, 'delimiter-active': True, 'empty-exclusion': False, 'operand-strip': '-x', 'polarity-prefix': True, 'quote-feedback': ''}Passed
contract fixture 7{'commit-gate': False, 'delimiter-active': False, 'empty-exclusion': False, 'operand-strip': '--x', 'polarity-prefix': False, 'quote-feedback': ''}{'commit-gate': False, 'delimiter-active': False, 'empty-exclusion': False, 'operand-strip': '--x', 'polarity-prefix': False, 'quote-feedback': ''}Passed
contract fixture 8{'commit-gate': True, 'delimiter-active': True, 'empty-exclusion': False, 'operand-strip': 'a-b', 'polarity-prefix': False, 'quote-feedback': ''}{'commit-gate': True, 'delimiter-active': True, 'empty-exclusion': False, 'operand-strip': 'a-b', 'polarity-prefix': False, 'quote-feedback': ''}Passed
contract fixture 9{'commit-gate': True, 'delimiter-active': False, 'empty-exclusion': False, 'operand-strip': 'a-b', 'polarity-prefix': False, 'quote-feedback': ''}{'commit-gate': True, 'delimiter-active': False, 'empty-exclusion': False, 'operand-strip': 'a-b', 'polarity-prefix': False, 'quote-feedback': ''}Passed

SHA-256 / 16b09d645293955154e742775d92b1da0a63a3848aa5276f255e5984c62e581e

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(d):
    return {'polarity-prefix':(d['text'].startswith('-') and not d['escaped']), 'operand-strip':(d['text'][1:] if d['text'].startswith('-') and not d['escaped'] else d['text']), 'commit-gate':(bool(d['text'].strip()) and not d['quote_open'] and not d['composing']), 'delimiter-active':(d['delimiter'] and not d['quote_open'] and not d['escaped']), 'quote-feedback':('unfinished phrase' if d['quote_open'] else ''), 'empty-exclusion':(d['text']=='-' and not d['escaped'])}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'text': '', 'escaped': False, 'quote_open': True, 'composing': False, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': '', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False}), ({'text': '-', 'escaped': True, 'quote_open': False, 'composing': True, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': '-', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': '', 'escaped': False, 'quote_open': True, 'composing': True, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': '', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False}), ({'text': '', 'escaped': True, 'quote_open': True, 'composing': True, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': '', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False}), ({'text': '-', 'escaped': False, 'quote_open': True, 'composing': False, 'delimiter': True}, {'polarity-prefix': True, 'operand-strip': '', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': True}), ({'text': '-', 'escaped': True, 'quote_open': True, 'composing': False, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': '-', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False}), ({'text': '--x', 'escaped': False, 'quote_open': False, 'composing': True, 'delimiter': True}, {'polarity-prefix': True, 'operand-strip': '-x', 'commit-gate': False, 'delimiter-active': True, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': '--x', 'escaped': True, 'quote_open': False, 'composing': True, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': '--x', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': 'a-b', 'escaped': False, 'quote_open': False, 'composing': False, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': 'a-b', 'commit-gate': True, 'delimiter-active': True, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': 'a-b', 'escaped': True, 'quote_open': False, 'composing': False, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': 'a-b', 'commit-gate': True, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': False})], 2: [({'text': '', 'escaped': False, 'quote_open': True, 'composing': True, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': '', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False}), ({'text': 'a-b', 'escaped': True, 'quote_open': False, 'composing': False, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': 'a-b', 'commit-gate': True, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': '', 'escaped': True, 'quote_open': True, 'composing': True, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': '', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False}), ({'text': '-', 'escaped': False, 'quote_open': True, 'composing': False, 'delimiter': True}, {'polarity-prefix': True, 'operand-strip': '', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': True}), ({'text': '-', 'escaped': True, 'quote_open': True, 'composing': False, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': '-', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False}), ({'text': '--x', 'escaped': False, 'quote_open': False, 'composing': True, 'delimiter': True}, {'polarity-prefix': True, 'operand-strip': '-x', 'commit-gate': False, 'delimiter-active': True, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': '--x', 'escaped': True, 'quote_open': False, 'composing': True, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': '--x', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': 'a-b', 'escaped': False, 'quote_open': False, 'composing': False, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': 'a-b', 'commit-gate': True, 'delimiter-active': True, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': 'a-b', 'escaped': True, 'quote_open': False, 'composing': False, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': 'a-b', 'commit-gate': True, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': 'a-b', 'escaped': True, 'quote_open': True, 'composing': True, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': 'a-b', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False})], 3: [({'text': '', 'escaped': True, 'quote_open': False, 'composing': False, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': '', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': 'two words', 'escaped': True, 'quote_open': False, 'composing': True, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': 'two words', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': '-', 'escaped': False, 'quote_open': True, 'composing': False, 'delimiter': True}, {'polarity-prefix': True, 'operand-strip': '', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': True}), ({'text': '-', 'escaped': True, 'quote_open': True, 'composing': False, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': '-', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False}), ({'text': '--x', 'escaped': False, 'quote_open': False, 'composing': True, 'delimiter': True}, {'polarity-prefix': True, 'operand-strip': '-x', 'commit-gate': False, 'delimiter-active': True, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': '--x', 'escaped': True, 'quote_open': False, 'composing': True, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': '--x', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': 'a-b', 'escaped': False, 'quote_open': False, 'composing': False, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': 'a-b', 'commit-gate': True, 'delimiter-active': True, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': 'a-b', 'escaped': True, 'quote_open': False, 'composing': False, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': 'a-b', 'commit-gate': True, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': 'a-b', 'escaped': True, 'quote_open': True, 'composing': True, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': 'a-b', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False}), ({'text': 'two words', 'escaped': False, 'quote_open': True, 'composing': True, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': 'two words', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False})], 4: [({'text': '', 'escaped': True, 'quote_open': False, 'composing': True, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': '', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': '-', 'escaped': True, 'quote_open': False, 'composing': False, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': '-', 'commit-gate': True, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': '-', 'escaped': True, 'quote_open': True, 'composing': False, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': '-', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False}), ({'text': '--x', 'escaped': False, 'quote_open': False, 'composing': True, 'delimiter': True}, {'polarity-prefix': True, 'operand-strip': '-x', 'commit-gate': False, 'delimiter-active': True, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': '--x', 'escaped': True, 'quote_open': False, 'composing': True, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': '--x', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': 'a-b', 'escaped': False, 'quote_open': False, 'composing': False, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': 'a-b', 'commit-gate': True, 'delimiter-active': True, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': 'a-b', 'escaped': True, 'quote_open': False, 'composing': False, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': 'a-b', 'commit-gate': True, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': 'a-b', 'escaped': True, 'quote_open': True, 'composing': True, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': 'a-b', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False}), ({'text': 'two words', 'escaped': False, 'quote_open': True, 'composing': True, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': 'two words', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False}), ({'text': 'two words', 'escaped': True, 'quote_open': True, 'composing': False, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': 'two words', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False})], 5: [({'text': '', 'escaped': True, 'quote_open': True, 'composing': False, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': '', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False}), ({'text': '--x', 'escaped': True, 'quote_open': False, 'composing': True, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': '--x', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': '--x', 'escaped': False, 'quote_open': False, 'composing': True, 'delimiter': True}, {'polarity-prefix': True, 'operand-strip': '-x', 'commit-gate': False, 'delimiter-active': True, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': '--x', 'escaped': True, 'quote_open': False, 'composing': True, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': '--x', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': 'a-b', 'escaped': False, 'quote_open': False, 'composing': False, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': 'a-b', 'commit-gate': True, 'delimiter-active': True, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': 'a-b', 'escaped': True, 'quote_open': False, 'composing': False, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': 'a-b', 'commit-gate': True, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': False}), ({'text': 'a-b', 'escaped': True, 'quote_open': True, 'composing': True, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': 'a-b', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False}), ({'text': 'two words', 'escaped': False, 'quote_open': True, 'composing': True, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': 'two words', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False}), ({'text': 'two words', 'escaped': True, 'quote_open': True, 'composing': False, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': 'two words', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False}), ({'text': '', 'escaped': False, 'quote_open': True, 'composing': False, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': '', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': False})]}
for index, (data, expected) in enumerate(fixtures[N]):
    check("contract fixture " + str(index), solve(data), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
contract fixture 0{'commit-gate': False, 'delimiter-active': False, 'empty-exclusion': False, 'operand-strip': '', 'polarity-prefix': False, 'quote-feedback': 'unfinished phrase'}{'commit-gate': False, 'delimiter-active': False, 'empty-exclusion': False, 'operand-strip': '', 'polarity-prefix': False, 'quote-feedback': 'unfinished phrase'}Passed
contract fixture 1{'commit-gate': False, 'delimiter-active': False, 'empty-exclusion': False, 'operand-strip': '-', 'polarity-prefix': False, 'quote-feedback': ''}{'commit-gate': False, 'delimiter-active': False, 'empty-exclusion': False, 'operand-strip': '-', 'polarity-prefix': False, 'quote-feedback': ''}Passed
contract fixture 2{'commit-gate': False, 'delimiter-active': False, 'empty-exclusion': False, 'operand-strip': '', 'polarity-prefix': False, 'quote-feedback': 'unfinished phrase'}{'commit-gate': False, 'delimiter-active': False, 'empty-exclusion': False, 'operand-strip': '', 'polarity-prefix': False, 'quote-feedback': 'unfinished phrase'}Passed
contract fixture 3{'commit-gate': False, 'delimiter-active': False, 'empty-exclusion': False, 'operand-strip': '', 'polarity-prefix': False, 'quote-feedback': 'unfinished phrase'}{'commit-gate': False, 'delimiter-active': False, 'empty-exclusion': False, 'operand-strip': '', 'polarity-prefix': False, 'quote-feedback': 'unfinished phrase'}Passed
contract fixture 4{'commit-gate': False, 'delimiter-active': False, 'empty-exclusion': True, 'operand-strip': '', 'polarity-prefix': True, 'quote-feedback': 'unfinished phrase'}{'commit-gate': False, 'delimiter-active': False, 'empty-exclusion': True, 'operand-strip': '', 'polarity-prefix': True, 'quote-feedback': 'unfinished phrase'}Passed
contract fixture 5{'commit-gate': False, 'delimiter-active': False, 'empty-exclusion': False, 'operand-strip': '-', 'polarity-prefix': False, 'quote-feedback': 'unfinished phrase'}{'commit-gate': False, 'delimiter-active': False, 'empty-exclusion': False, 'operand-strip': '-', 'polarity-prefix': False, 'quote-feedback': 'unfinished phrase'}Passed
contract fixture 6{'commit-gate': False, 'delimiter-active': True, 'empty-exclusion': False, 'operand-strip': '-x', 'polarity-prefix': True, 'quote-feedback': ''}{'commit-gate': False, 'delimiter-active': True, 'empty-exclusion': False, 'operand-strip': '-x', 'polarity-prefix': True, 'quote-feedback': ''}Passed
contract fixture 7{'commit-gate': False, 'delimiter-active': False, 'empty-exclusion': False, 'operand-strip': '--x', 'polarity-prefix': False, 'quote-feedback': ''}{'commit-gate': False, 'delimiter-active': False, 'empty-exclusion': False, 'operand-strip': '--x', 'polarity-prefix': False, 'quote-feedback': ''}Passed
contract fixture 8{'commit-gate': True, 'delimiter-active': True, 'empty-exclusion': False, 'operand-strip': 'a-b', 'polarity-prefix': False, 'quote-feedback': ''}{'commit-gate': True, 'delimiter-active': True, 'empty-exclusion': False, 'operand-strip': 'a-b', 'polarity-prefix': False, 'quote-feedback': ''}Passed
contract fixture 9{'commit-gate': True, 'delimiter-active': False, 'empty-exclusion': False, 'operand-strip': 'a-b', 'polarity-prefix': False, 'quote-feedback': ''}{'commit-gate': True, 'delimiter-active': False, 'empty-exclusion': False, 'operand-strip': 'a-b', 'polarity-prefix': False, 'quote-feedback': ''}Passed

SHA-256 / 4e44d8dfb1a3203e7a99d0622a7eb035bd2aea9bd7625a3c0b3cfb527589bbd6

Verification & scope

Deterministic bounded UI-state model only; no browser, query engine, network, or production-standard conformance is claimed. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.

Observations recorded using Python 3.12.14 at 2026-09-29T14:41:05.999534+00:00.

Case digest / 4959493be5c71f445e1d1219c44cbf3a9670377c50642488c378ae05d79ec896