FAILURE MAP
← Case archive

FA-25361 / Filter interfaces / Open access

Token commitment waits for closed quotes and completed composition · case 01

Token commitment waits for closed quotes and completed composition is violated by the widget projection.

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

ROOT CAUSE

The commit-gate decision uses `bool(d['text'].strip())` instead of the stipulated token-filter-composer projection.

VERIFIED REPAIR

Implement the declared commit-gate projection: `bool(d['text'].strip()) and not d['quote_open'] and not d['composing']`.

Unsuccessful approach: The attempted correction `bool(d['text'].strip()) 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: Token commitment waits for closed quotes and completed composition.

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())), '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': False, 'composing': True, 'delimiter': False}, {'polarity-prefix': True, 'operand-strip': '', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': True}), ({'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': False, 'composing': True, 'delimiter': True}, {'polarity-prefix': True, 'operand-strip': '', 'commit-gate': False, 'delimiter-active': True, 'quote-feedback': '', 'empty-exclusion': True}), ({'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': '', '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': '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})], 3: [({'text': '-', 'escaped': False, 'quote_open': True, 'composing': False, 'delimiter': False}, {'polarity-prefix': True, 'operand-strip': '', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': True}), ({'text': 'a-b', 'escaped': False, 'quote_open': False, 'composing': True, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': 'a-b', 'commit-gate': False, 'delimiter-active': True, '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': 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': 'two words', 'escaped': False, 'quote_open': False, 'composing': True, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': 'two words', 'commit-gate': False, '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': False, 'quote_open': True, 'composing': True, 'delimiter': False}, {'polarity-prefix': True, 'operand-strip': '', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': True}), ({'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': '--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': True, 'delimiter-active': False, 'empty-exclusion': True, 'operand-strip': '', 'polarity-prefix': True, 'quote-feedback': ''}{'commit-gate': False, 'delimiter-active': False, 'empty-exclusion': True, 'operand-strip': '', 'polarity-prefix': True, 'quote-feedback': ''}Failed
contract fixture 1{'commit-gate': True, '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': ''}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': True, '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'}Failed
contract fixture 5{'commit-gate': True, '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'}Failed
contract fixture 6{'commit-gate': True, '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': ''}Failed
contract fixture 7{'commit-gate': True, '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': ''}Failed
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 / fb0937ebec7600422a748fe1a478314242cd0e06d964f85cd058b5760bc4948f

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']), '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': False, 'composing': True, 'delimiter': False}, {'polarity-prefix': True, 'operand-strip': '', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': True}), ({'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': False, 'composing': True, 'delimiter': True}, {'polarity-prefix': True, 'operand-strip': '', 'commit-gate': False, 'delimiter-active': True, 'quote-feedback': '', 'empty-exclusion': True}), ({'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': '', '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': '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})], 3: [({'text': '-', 'escaped': False, 'quote_open': True, 'composing': False, 'delimiter': False}, {'polarity-prefix': True, 'operand-strip': '', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': True}), ({'text': 'a-b', 'escaped': False, 'quote_open': False, 'composing': True, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': 'a-b', 'commit-gate': False, 'delimiter-active': True, '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': 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': 'two words', 'escaped': False, 'quote_open': False, 'composing': True, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': 'two words', 'commit-gate': False, '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': False, 'quote_open': True, 'composing': True, 'delimiter': False}, {'polarity-prefix': True, 'operand-strip': '', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': True}), ({'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': '--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': True, 'delimiter-active': False, 'empty-exclusion': True, 'operand-strip': '', 'polarity-prefix': True, 'quote-feedback': ''}{'commit-gate': False, 'delimiter-active': False, 'empty-exclusion': True, 'operand-strip': '', 'polarity-prefix': True, 'quote-feedback': ''}Failed
contract fixture 1{'commit-gate': True, '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': ''}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': True, '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': ''}Failed
contract fixture 7{'commit-gate': True, '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': ''}Failed
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 / a2c5797319dc06e8356d77ecc92604196162dea35d28958f73138bd231eeada4

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': False, 'composing': True, 'delimiter': False}, {'polarity-prefix': True, 'operand-strip': '', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': '', 'empty-exclusion': True}), ({'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': False, 'composing': True, 'delimiter': True}, {'polarity-prefix': True, 'operand-strip': '', 'commit-gate': False, 'delimiter-active': True, 'quote-feedback': '', 'empty-exclusion': True}), ({'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': '', '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': '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})], 3: [({'text': '-', 'escaped': False, 'quote_open': True, 'composing': False, 'delimiter': False}, {'polarity-prefix': True, 'operand-strip': '', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': True}), ({'text': 'a-b', 'escaped': False, 'quote_open': False, 'composing': True, 'delimiter': True}, {'polarity-prefix': False, 'operand-strip': 'a-b', 'commit-gate': False, 'delimiter-active': True, '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': 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': 'two words', 'escaped': False, 'quote_open': False, 'composing': True, 'delimiter': False}, {'polarity-prefix': False, 'operand-strip': 'two words', 'commit-gate': False, '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': False, 'quote_open': True, 'composing': True, 'delimiter': False}, {'polarity-prefix': True, 'operand-strip': '', 'commit-gate': False, 'delimiter-active': False, 'quote-feedback': 'unfinished phrase', 'empty-exclusion': True}), ({'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': '--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': True, 'operand-strip': '', 'polarity-prefix': True, 'quote-feedback': ''}{'commit-gate': False, 'delimiter-active': False, 'empty-exclusion': True, 'operand-strip': '', 'polarity-prefix': True, 'quote-feedback': ''}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 / 438449aefb7686cce0f2f74879bb98b8dd8c3a6d460e4d021eb4bad6af6e8565

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.902632+00:00.

Case digest / c01e0674ef9181b24509feae59ac68d0df4f37a12b99402cce37dba56d9798d0