broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    r0 = x['name']
    r1 = '•' if x['dirty'] else ''
    r2 = 'pin' if x['pinned'] else ''
    r3 = x['path']
    r4 = x['name'] if len(x['name'])<=x['max_chars'] else x['name'][:max(0,x['max_chars']-1)]+'…'
    r5 = x['name']+' '+x['parent']
    return [r0,r1,r2,r3,r4,r5]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'name': 'main.py', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.py \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'main.py', 'main.py src']), ({'name': 'main.py', 'parent': 'src', 'duplicates': 1, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.py', '\u2022', 'pin', '/project/src/main.py', 'main.py', 'main.py src']), ({'name': 'main.py', 'parent': 'src', 'duplicates': 2, 'dirty': False, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.py \u2014 src', '', 'pin', '/project/src/main.py', 'main.py', 'main.py src']), ({'name': 'main.py', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': False, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.py \u2014 src', '\u2022', '', '/project/src/main.py', 'main.py', 'main.py src']), ({'name': 'x', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 1}, ['x \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'x', 'x src']), ({'name': 'main.py', 'parent': 'tests', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.py \u2014 tests', '\u2022', 'pin', '/project/src/main.py', 'main.py', 'main.py tests']), ({'name': 'main.py', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 4}, ['main.py \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'mai\u2026', 'main.py src'])], 2: [({'name': 'main.pyx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'main.pyx', 'main.pyx src']), ({'name': 'main.pyx', 'parent': 'src', 'duplicates': 1, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyx', '\u2022', 'pin', '/project/src/main.py', 'main.pyx', 'main.pyx src']), ({'name': 'main.pyx', 'parent': 'src', 'duplicates': 2, 'dirty': False, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyx \u2014 src', '', 'pin', '/project/src/main.py', 'main.pyx', 'main.pyx src']), ({'name': 'main.pyx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': False, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyx \u2014 src', '\u2022', '', '/project/src/main.py', 'main.pyx', 'main.pyx src']), ({'name': 'xx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 1}, ['xx \u2014 src', '\u2022', 'pin', '/project/src/main.py', '\u2026', 'xx src']), ({'name': 'main.pyx', 'parent': 'tests', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyx \u2014 tests', '\u2022', 'pin', '/project/src/main.py', 'main.pyx', 'main.pyx tests']), ({'name': 'main.pyx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 4}, ['main.pyx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'mai\u2026', 'main.pyx src'])], 3: [({'name': 'main.pyxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxx src']), ({'name': 'main.pyxx', 'parent': 'src', 'duplicates': 1, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxx', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxx src']), ({'name': 'main.pyxx', 'parent': 'src', 'duplicates': 2, 'dirty': False, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxx \u2014 src', '', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxx src']), ({'name': 'main.pyxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': False, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxx \u2014 src', '\u2022', '', '/project/src/main.py', 'main.py\u2026', 'main.pyxx src']), ({'name': 'xxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 1}, ['xxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', '\u2026', 'xxx src']), ({'name': 'main.pyxx', 'parent': 'tests', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxx \u2014 tests', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxx tests']), ({'name': 'main.pyxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 4}, ['main.pyxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'mai\u2026', 'main.pyxx src'])], 4: [({'name': 'main.pyxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxx src']), ({'name': 'main.pyxxx', 'parent': 'src', 'duplicates': 1, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxx', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxx src']), ({'name': 'main.pyxxx', 'parent': 'src', 'duplicates': 2, 'dirty': False, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxx \u2014 src', '', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxx src']), ({'name': 'main.pyxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': False, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxx \u2014 src', '\u2022', '', '/project/src/main.py', 'main.py\u2026', 'main.pyxxx src']), ({'name': 'xxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 1}, ['xxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', '\u2026', 'xxxx src']), ({'name': 'main.pyxxx', 'parent': 'tests', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxx \u2014 tests', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxx tests']), ({'name': 'main.pyxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 4}, ['main.pyxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'mai\u2026', 'main.pyxxx src'])], 5: [({'name': 'main.pyxxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxxx src']), ({'name': 'main.pyxxxx', 'parent': 'src', 'duplicates': 1, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxxx', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxxx src']), ({'name': 'main.pyxxxx', 'parent': 'src', 'duplicates': 2, 'dirty': False, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxxx \u2014 src', '', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxxx src']), ({'name': 'main.pyxxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': False, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxxx \u2014 src', '\u2022', '', '/project/src/main.py', 'main.py\u2026', 'main.pyxxxx src']), ({'name': 'xxxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 1}, ['xxxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', '\u2026', 'xxxxx src']), ({'name': 'main.pyxxxx', 'parent': 'tests', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxxx \u2014 tests', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxxx tests']), ({'name': 'main.pyxxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 4}, ['main.pyxxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'mai\u2026', 'main.pyxxxx src'])]}
for i, (inputs, expected) in enumerate(fixtures[N]):
    check("workspace regression "+str(i), solve(inputs), 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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    r0 = x['name']+' — '+x['parent']
    r1 = '•' if x['dirty'] else ''
    r2 = 'pin' if x['pinned'] else ''
    r3 = x['path']
    r4 = x['name'] if len(x['name'])<=x['max_chars'] else x['name'][:max(0,x['max_chars']-1)]+'…'
    r5 = x['name']+' '+x['parent']
    return [r0,r1,r2,r3,r4,r5]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'name': 'main.py', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.py \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'main.py', 'main.py src']), ({'name': 'main.py', 'parent': 'src', 'duplicates': 1, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.py', '\u2022', 'pin', '/project/src/main.py', 'main.py', 'main.py src']), ({'name': 'main.py', 'parent': 'src', 'duplicates': 2, 'dirty': False, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.py \u2014 src', '', 'pin', '/project/src/main.py', 'main.py', 'main.py src']), ({'name': 'main.py', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': False, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.py \u2014 src', '\u2022', '', '/project/src/main.py', 'main.py', 'main.py src']), ({'name': 'x', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 1}, ['x \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'x', 'x src']), ({'name': 'main.py', 'parent': 'tests', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.py \u2014 tests', '\u2022', 'pin', '/project/src/main.py', 'main.py', 'main.py tests']), ({'name': 'main.py', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 4}, ['main.py \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'mai\u2026', 'main.py src'])], 2: [({'name': 'main.pyx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'main.pyx', 'main.pyx src']), ({'name': 'main.pyx', 'parent': 'src', 'duplicates': 1, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyx', '\u2022', 'pin', '/project/src/main.py', 'main.pyx', 'main.pyx src']), ({'name': 'main.pyx', 'parent': 'src', 'duplicates': 2, 'dirty': False, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyx \u2014 src', '', 'pin', '/project/src/main.py', 'main.pyx', 'main.pyx src']), ({'name': 'main.pyx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': False, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyx \u2014 src', '\u2022', '', '/project/src/main.py', 'main.pyx', 'main.pyx src']), ({'name': 'xx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 1}, ['xx \u2014 src', '\u2022', 'pin', '/project/src/main.py', '\u2026', 'xx src']), ({'name': 'main.pyx', 'parent': 'tests', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyx \u2014 tests', '\u2022', 'pin', '/project/src/main.py', 'main.pyx', 'main.pyx tests']), ({'name': 'main.pyx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 4}, ['main.pyx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'mai\u2026', 'main.pyx src'])], 3: [({'name': 'main.pyxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxx src']), ({'name': 'main.pyxx', 'parent': 'src', 'duplicates': 1, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxx', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxx src']), ({'name': 'main.pyxx', 'parent': 'src', 'duplicates': 2, 'dirty': False, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxx \u2014 src', '', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxx src']), ({'name': 'main.pyxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': False, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxx \u2014 src', '\u2022', '', '/project/src/main.py', 'main.py\u2026', 'main.pyxx src']), ({'name': 'xxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 1}, ['xxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', '\u2026', 'xxx src']), ({'name': 'main.pyxx', 'parent': 'tests', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxx \u2014 tests', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxx tests']), ({'name': 'main.pyxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 4}, ['main.pyxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'mai\u2026', 'main.pyxx src'])], 4: [({'name': 'main.pyxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxx src']), ({'name': 'main.pyxxx', 'parent': 'src', 'duplicates': 1, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxx', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxx src']), ({'name': 'main.pyxxx', 'parent': 'src', 'duplicates': 2, 'dirty': False, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxx \u2014 src', '', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxx src']), ({'name': 'main.pyxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': False, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxx \u2014 src', '\u2022', '', '/project/src/main.py', 'main.py\u2026', 'main.pyxxx src']), ({'name': 'xxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 1}, ['xxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', '\u2026', 'xxxx src']), ({'name': 'main.pyxxx', 'parent': 'tests', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxx \u2014 tests', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxx tests']), ({'name': 'main.pyxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 4}, ['main.pyxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'mai\u2026', 'main.pyxxx src'])], 5: [({'name': 'main.pyxxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxxx src']), ({'name': 'main.pyxxxx', 'parent': 'src', 'duplicates': 1, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxxx', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxxx src']), ({'name': 'main.pyxxxx', 'parent': 'src', 'duplicates': 2, 'dirty': False, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxxx \u2014 src', '', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxxx src']), ({'name': 'main.pyxxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': False, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxxx \u2014 src', '\u2022', '', '/project/src/main.py', 'main.py\u2026', 'main.pyxxxx src']), ({'name': 'xxxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 1}, ['xxxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', '\u2026', 'xxxxx src']), ({'name': 'main.pyxxxx', 'parent': 'tests', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxxx \u2014 tests', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxxx tests']), ({'name': 'main.pyxxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 4}, ['main.pyxxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'mai\u2026', 'main.pyxxxx src'])]}
for i, (inputs, expected) in enumerate(fixtures[N]):
    check("workspace regression "+str(i), solve(inputs), 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)

prompt:
The tab workspace reports an incorrect duplicate suffix.

Duplicate basenames receive parent-directory suffixes; singleton basenames remain short. Dirty marker, pin marker and tooltip are independent label channels.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    r0 = x['name']+' — '+x['parent'] if x['duplicates']>1 else x['name']
    r1 = ''
    r2 = 'pin' if x['pinned'] else ''
    r3 = x['path']
    r4 = x['name'] if len(x['name'])<=x['max_chars'] else x['name'][:max(0,x['max_chars']-1)]+'…'
    r5 = x['name']+' '+x['parent']
    return [r0,r1,r2,r3,r4,r5]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'name': 'main.py', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.py \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'main.py', 'main.py src']), ({'name': 'main.py', 'parent': 'src', 'duplicates': 1, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.py', '\u2022', 'pin', '/project/src/main.py', 'main.py', 'main.py src']), ({'name': 'main.py', 'parent': 'src', 'duplicates': 2, 'dirty': False, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.py \u2014 src', '', 'pin', '/project/src/main.py', 'main.py', 'main.py src']), ({'name': 'main.py', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': False, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.py \u2014 src', '\u2022', '', '/project/src/main.py', 'main.py', 'main.py src']), ({'name': 'x', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 1}, ['x \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'x', 'x src']), ({'name': 'main.py', 'parent': 'tests', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.py \u2014 tests', '\u2022', 'pin', '/project/src/main.py', 'main.py', 'main.py tests']), ({'name': 'main.py', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 4}, ['main.py \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'mai\u2026', 'main.py src'])], 2: [({'name': 'main.pyx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'main.pyx', 'main.pyx src']), ({'name': 'main.pyx', 'parent': 'src', 'duplicates': 1, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyx', '\u2022', 'pin', '/project/src/main.py', 'main.pyx', 'main.pyx src']), ({'name': 'main.pyx', 'parent': 'src', 'duplicates': 2, 'dirty': False, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyx \u2014 src', '', 'pin', '/project/src/main.py', 'main.pyx', 'main.pyx src']), ({'name': 'main.pyx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': False, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyx \u2014 src', '\u2022', '', '/project/src/main.py', 'main.pyx', 'main.pyx src']), ({'name': 'xx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 1}, ['xx \u2014 src', '\u2022', 'pin', '/project/src/main.py', '\u2026', 'xx src']), ({'name': 'main.pyx', 'parent': 'tests', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyx \u2014 tests', '\u2022', 'pin', '/project/src/main.py', 'main.pyx', 'main.pyx tests']), ({'name': 'main.pyx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 4}, ['main.pyx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'mai\u2026', 'main.pyx src'])], 3: [({'name': 'main.pyxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxx src']), ({'name': 'main.pyxx', 'parent': 'src', 'duplicates': 1, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxx', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxx src']), ({'name': 'main.pyxx', 'parent': 'src', 'duplicates': 2, 'dirty': False, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxx \u2014 src', '', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxx src']), ({'name': 'main.pyxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': False, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxx \u2014 src', '\u2022', '', '/project/src/main.py', 'main.py\u2026', 'main.pyxx src']), ({'name': 'xxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 1}, ['xxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', '\u2026', 'xxx src']), ({'name': 'main.pyxx', 'parent': 'tests', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxx \u2014 tests', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxx tests']), ({'name': 'main.pyxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 4}, ['main.pyxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'mai\u2026', 'main.pyxx src'])], 4: [({'name': 'main.pyxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxx src']), ({'name': 'main.pyxxx', 'parent': 'src', 'duplicates': 1, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxx', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxx src']), ({'name': 'main.pyxxx', 'parent': 'src', 'duplicates': 2, 'dirty': False, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxx \u2014 src', '', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxx src']), ({'name': 'main.pyxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': False, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxx \u2014 src', '\u2022', '', '/project/src/main.py', 'main.py\u2026', 'main.pyxxx src']), ({'name': 'xxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 1}, ['xxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', '\u2026', 'xxxx src']), ({'name': 'main.pyxxx', 'parent': 'tests', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxx \u2014 tests', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxx tests']), ({'name': 'main.pyxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 4}, ['main.pyxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'mai\u2026', 'main.pyxxx src'])], 5: [({'name': 'main.pyxxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxxx src']), ({'name': 'main.pyxxxx', 'parent': 'src', 'duplicates': 1, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxxx', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxxx src']), ({'name': 'main.pyxxxx', 'parent': 'src', 'duplicates': 2, 'dirty': False, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxxx \u2014 src', '', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxxx src']), ({'name': 'main.pyxxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': False, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxxx \u2014 src', '\u2022', '', '/project/src/main.py', 'main.py\u2026', 'main.pyxxxx src']), ({'name': 'xxxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 1}, ['xxxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', '\u2026', 'xxxxx src']), ({'name': 'main.pyxxxx', 'parent': 'tests', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxxx \u2014 tests', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxxx tests']), ({'name': 'main.pyxxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 4}, ['main.pyxxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'mai\u2026', 'main.pyxxxx src'])]}
for i, (inputs, expected) in enumerate(fixtures[N]):
    check("workspace regression "+str(i), solve(inputs), 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)

meaning: Fixture-count band, not measured model difficulty

deps: stdlib

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    r0 = x['name']+' — '+x['parent'] if x['duplicates']>1 else x['name']
    r1 = '*' if x['dirty'] and not x['pinned'] else ''
    r2 = 'pin' if x['pinned'] else ''
    r3 = x['path']
    r4 = x['name'] if len(x['name'])<=x['max_chars'] else x['name'][:max(0,x['max_chars']-1)]+'…'
    r5 = x['name']+' '+x['parent']
    return [r0,r1,r2,r3,r4,r5]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'name': 'main.py', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.py \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'main.py', 'main.py src']), ({'name': 'main.py', 'parent': 'src', 'duplicates': 1, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.py', '\u2022', 'pin', '/project/src/main.py', 'main.py', 'main.py src']), ({'name': 'main.py', 'parent': 'src', 'duplicates': 2, 'dirty': False, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.py \u2014 src', '', 'pin', '/project/src/main.py', 'main.py', 'main.py src']), ({'name': 'main.py', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': False, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.py \u2014 src', '\u2022', '', '/project/src/main.py', 'main.py', 'main.py src']), ({'name': 'x', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 1}, ['x \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'x', 'x src']), ({'name': 'main.py', 'parent': 'tests', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.py \u2014 tests', '\u2022', 'pin', '/project/src/main.py', 'main.py', 'main.py tests']), ({'name': 'main.py', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 4}, ['main.py \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'mai\u2026', 'main.py src'])], 2: [({'name': 'main.pyx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'main.pyx', 'main.pyx src']), ({'name': 'main.pyx', 'parent': 'src', 'duplicates': 1, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyx', '\u2022', 'pin', '/project/src/main.py', 'main.pyx', 'main.pyx src']), ({'name': 'main.pyx', 'parent': 'src', 'duplicates': 2, 'dirty': False, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyx \u2014 src', '', 'pin', '/project/src/main.py', 'main.pyx', 'main.pyx src']), ({'name': 'main.pyx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': False, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyx \u2014 src', '\u2022', '', '/project/src/main.py', 'main.pyx', 'main.pyx src']), ({'name': 'xx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 1}, ['xx \u2014 src', '\u2022', 'pin', '/project/src/main.py', '\u2026', 'xx src']), ({'name': 'main.pyx', 'parent': 'tests', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyx \u2014 tests', '\u2022', 'pin', '/project/src/main.py', 'main.pyx', 'main.pyx tests']), ({'name': 'main.pyx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 4}, ['main.pyx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'mai\u2026', 'main.pyx src'])], 3: [({'name': 'main.pyxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxx src']), ({'name': 'main.pyxx', 'parent': 'src', 'duplicates': 1, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxx', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxx src']), ({'name': 'main.pyxx', 'parent': 'src', 'duplicates': 2, 'dirty': False, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxx \u2014 src', '', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxx src']), ({'name': 'main.pyxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': False, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxx \u2014 src', '\u2022', '', '/project/src/main.py', 'main.py\u2026', 'main.pyxx src']), ({'name': 'xxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 1}, ['xxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', '\u2026', 'xxx src']), ({'name': 'main.pyxx', 'parent': 'tests', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxx \u2014 tests', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxx tests']), ({'name': 'main.pyxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 4}, ['main.pyxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'mai\u2026', 'main.pyxx src'])], 4: [({'name': 'main.pyxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxx src']), ({'name': 'main.pyxxx', 'parent': 'src', 'duplicates': 1, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxx', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxx src']), ({'name': 'main.pyxxx', 'parent': 'src', 'duplicates': 2, 'dirty': False, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxx \u2014 src', '', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxx src']), ({'name': 'main.pyxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': False, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxx \u2014 src', '\u2022', '', '/project/src/main.py', 'main.py\u2026', 'main.pyxxx src']), ({'name': 'xxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 1}, ['xxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', '\u2026', 'xxxx src']), ({'name': 'main.pyxxx', 'parent': 'tests', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxx \u2014 tests', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxx tests']), ({'name': 'main.pyxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 4}, ['main.pyxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'mai\u2026', 'main.pyxxx src'])], 5: [({'name': 'main.pyxxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxxx src']), ({'name': 'main.pyxxxx', 'parent': 'src', 'duplicates': 1, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxxx', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxxx src']), ({'name': 'main.pyxxxx', 'parent': 'src', 'duplicates': 2, 'dirty': False, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxxx \u2014 src', '', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxxx src']), ({'name': 'main.pyxxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': False, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxxx \u2014 src', '\u2022', '', '/project/src/main.py', 'main.py\u2026', 'main.pyxxxx src']), ({'name': 'xxxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 1}, ['xxxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', '\u2026', 'xxxxx src']), ({'name': 'main.pyxxxx', 'parent': 'tests', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxxx \u2014 tests', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxxx tests']), ({'name': 'main.pyxxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 4}, ['main.pyxxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'mai\u2026', 'main.pyxxxx src'])]}
for i, (inputs, expected) in enumerate(fixtures[N]):
    check("workspace regression "+str(i), solve(inputs), 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)

prompt:
The tab workspace reports an incorrect dirty marker.

Duplicate basenames receive parent-directory suffixes; singleton basenames remain short. Dirty marker, pin marker and tooltip are independent label channels.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    r0 = x['name']+' — '+x['parent'] if x['duplicates']>1 else x['name']
    r1 = '•' if x['dirty'] else ''
    r2 = ''
    r3 = x['path']
    r4 = x['name'] if len(x['name'])<=x['max_chars'] else x['name'][:max(0,x['max_chars']-1)]+'…'
    r5 = x['name']+' '+x['parent']
    return [r0,r1,r2,r3,r4,r5]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'name': 'main.py', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.py \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'main.py', 'main.py src']), ({'name': 'main.py', 'parent': 'src', 'duplicates': 1, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.py', '\u2022', 'pin', '/project/src/main.py', 'main.py', 'main.py src']), ({'name': 'main.py', 'parent': 'src', 'duplicates': 2, 'dirty': False, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.py \u2014 src', '', 'pin', '/project/src/main.py', 'main.py', 'main.py src']), ({'name': 'main.py', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': False, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.py \u2014 src', '\u2022', '', '/project/src/main.py', 'main.py', 'main.py src']), ({'name': 'x', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 1}, ['x \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'x', 'x src']), ({'name': 'main.py', 'parent': 'tests', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.py \u2014 tests', '\u2022', 'pin', '/project/src/main.py', 'main.py', 'main.py tests']), ({'name': 'main.py', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 4}, ['main.py \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'mai\u2026', 'main.py src'])], 2: [({'name': 'main.pyx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'main.pyx', 'main.pyx src']), ({'name': 'main.pyx', 'parent': 'src', 'duplicates': 1, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyx', '\u2022', 'pin', '/project/src/main.py', 'main.pyx', 'main.pyx src']), ({'name': 'main.pyx', 'parent': 'src', 'duplicates': 2, 'dirty': False, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyx \u2014 src', '', 'pin', '/project/src/main.py', 'main.pyx', 'main.pyx src']), ({'name': 'main.pyx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': False, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyx \u2014 src', '\u2022', '', '/project/src/main.py', 'main.pyx', 'main.pyx src']), ({'name': 'xx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 1}, ['xx \u2014 src', '\u2022', 'pin', '/project/src/main.py', '\u2026', 'xx src']), ({'name': 'main.pyx', 'parent': 'tests', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyx \u2014 tests', '\u2022', 'pin', '/project/src/main.py', 'main.pyx', 'main.pyx tests']), ({'name': 'main.pyx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 4}, ['main.pyx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'mai\u2026', 'main.pyx src'])], 3: [({'name': 'main.pyxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxx src']), ({'name': 'main.pyxx', 'parent': 'src', 'duplicates': 1, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxx', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxx src']), ({'name': 'main.pyxx', 'parent': 'src', 'duplicates': 2, 'dirty': False, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxx \u2014 src', '', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxx src']), ({'name': 'main.pyxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': False, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxx \u2014 src', '\u2022', '', '/project/src/main.py', 'main.py\u2026', 'main.pyxx src']), ({'name': 'xxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 1}, ['xxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', '\u2026', 'xxx src']), ({'name': 'main.pyxx', 'parent': 'tests', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxx \u2014 tests', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxx tests']), ({'name': 'main.pyxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 4}, ['main.pyxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'mai\u2026', 'main.pyxx src'])], 4: [({'name': 'main.pyxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxx src']), ({'name': 'main.pyxxx', 'parent': 'src', 'duplicates': 1, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxx', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxx src']), ({'name': 'main.pyxxx', 'parent': 'src', 'duplicates': 2, 'dirty': False, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxx \u2014 src', '', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxx src']), ({'name': 'main.pyxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': False, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxx \u2014 src', '\u2022', '', '/project/src/main.py', 'main.py\u2026', 'main.pyxxx src']), ({'name': 'xxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 1}, ['xxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', '\u2026', 'xxxx src']), ({'name': 'main.pyxxx', 'parent': 'tests', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxx \u2014 tests', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxx tests']), ({'name': 'main.pyxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 4}, ['main.pyxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'mai\u2026', 'main.pyxxx src'])], 5: [({'name': 'main.pyxxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxxx src']), ({'name': 'main.pyxxxx', 'parent': 'src', 'duplicates': 1, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxxx', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxxx src']), ({'name': 'main.pyxxxx', 'parent': 'src', 'duplicates': 2, 'dirty': False, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxxx \u2014 src', '', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxxx src']), ({'name': 'main.pyxxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': False, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxxx \u2014 src', '\u2022', '', '/project/src/main.py', 'main.py\u2026', 'main.pyxxxx src']), ({'name': 'xxxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 1}, ['xxxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', '\u2026', 'xxxxx src']), ({'name': 'main.pyxxxx', 'parent': 'tests', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxxx \u2014 tests', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxxx tests']), ({'name': 'main.pyxxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 4}, ['main.pyxxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'mai\u2026', 'main.pyxxxx src'])]}
for i, (inputs, expected) in enumerate(fixtures[N]):
    check("workspace regression "+str(i), solve(inputs), 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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    r0 = x['name']+' — '+x['parent'] if x['duplicates']>1 else x['name']
    r1 = '•' if x['dirty'] else ''
    r2 = 'pin' if x['pinned'] and not x['dirty'] else ''
    r3 = x['path']
    r4 = x['name'] if len(x['name'])<=x['max_chars'] else x['name'][:max(0,x['max_chars']-1)]+'…'
    r5 = x['name']+' '+x['parent']
    return [r0,r1,r2,r3,r4,r5]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'name': 'main.py', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.py \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'main.py', 'main.py src']), ({'name': 'main.py', 'parent': 'src', 'duplicates': 1, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.py', '\u2022', 'pin', '/project/src/main.py', 'main.py', 'main.py src']), ({'name': 'main.py', 'parent': 'src', 'duplicates': 2, 'dirty': False, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.py \u2014 src', '', 'pin', '/project/src/main.py', 'main.py', 'main.py src']), ({'name': 'main.py', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': False, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.py \u2014 src', '\u2022', '', '/project/src/main.py', 'main.py', 'main.py src']), ({'name': 'x', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 1}, ['x \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'x', 'x src']), ({'name': 'main.py', 'parent': 'tests', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.py \u2014 tests', '\u2022', 'pin', '/project/src/main.py', 'main.py', 'main.py tests']), ({'name': 'main.py', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 4}, ['main.py \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'mai\u2026', 'main.py src'])], 2: [({'name': 'main.pyx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'main.pyx', 'main.pyx src']), ({'name': 'main.pyx', 'parent': 'src', 'duplicates': 1, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyx', '\u2022', 'pin', '/project/src/main.py', 'main.pyx', 'main.pyx src']), ({'name': 'main.pyx', 'parent': 'src', 'duplicates': 2, 'dirty': False, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyx \u2014 src', '', 'pin', '/project/src/main.py', 'main.pyx', 'main.pyx src']), ({'name': 'main.pyx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': False, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyx \u2014 src', '\u2022', '', '/project/src/main.py', 'main.pyx', 'main.pyx src']), ({'name': 'xx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 1}, ['xx \u2014 src', '\u2022', 'pin', '/project/src/main.py', '\u2026', 'xx src']), ({'name': 'main.pyx', 'parent': 'tests', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyx \u2014 tests', '\u2022', 'pin', '/project/src/main.py', 'main.pyx', 'main.pyx tests']), ({'name': 'main.pyx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 4}, ['main.pyx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'mai\u2026', 'main.pyx src'])], 3: [({'name': 'main.pyxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxx src']), ({'name': 'main.pyxx', 'parent': 'src', 'duplicates': 1, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxx', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxx src']), ({'name': 'main.pyxx', 'parent': 'src', 'duplicates': 2, 'dirty': False, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxx \u2014 src', '', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxx src']), ({'name': 'main.pyxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': False, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxx \u2014 src', '\u2022', '', '/project/src/main.py', 'main.py\u2026', 'main.pyxx src']), ({'name': 'xxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 1}, ['xxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', '\u2026', 'xxx src']), ({'name': 'main.pyxx', 'parent': 'tests', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxx \u2014 tests', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxx tests']), ({'name': 'main.pyxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 4}, ['main.pyxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'mai\u2026', 'main.pyxx src'])], 4: [({'name': 'main.pyxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxx src']), ({'name': 'main.pyxxx', 'parent': 'src', 'duplicates': 1, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxx', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxx src']), ({'name': 'main.pyxxx', 'parent': 'src', 'duplicates': 2, 'dirty': False, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxx \u2014 src', '', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxx src']), ({'name': 'main.pyxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': False, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxx \u2014 src', '\u2022', '', '/project/src/main.py', 'main.py\u2026', 'main.pyxxx src']), ({'name': 'xxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 1}, ['xxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', '\u2026', 'xxxx src']), ({'name': 'main.pyxxx', 'parent': 'tests', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxx \u2014 tests', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxx tests']), ({'name': 'main.pyxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 4}, ['main.pyxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'mai\u2026', 'main.pyxxx src'])], 5: [({'name': 'main.pyxxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxxx src']), ({'name': 'main.pyxxxx', 'parent': 'src', 'duplicates': 1, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxxx', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxxx src']), ({'name': 'main.pyxxxx', 'parent': 'src', 'duplicates': 2, 'dirty': False, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxxx \u2014 src', '', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxxx src']), ({'name': 'main.pyxxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': False, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxxx \u2014 src', '\u2022', '', '/project/src/main.py', 'main.py\u2026', 'main.pyxxxx src']), ({'name': 'xxxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 1}, ['xxxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', '\u2026', 'xxxxx src']), ({'name': 'main.pyxxxx', 'parent': 'tests', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxxx \u2014 tests', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxxx tests']), ({'name': 'main.pyxxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 4}, ['main.pyxxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'mai\u2026', 'main.pyxxxx src'])]}
for i, (inputs, expected) in enumerate(fixtures[N]):
    check("workspace regression "+str(i), solve(inputs), 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)

prompt:
The tab workspace reports an incorrect pinned marker.

Duplicate basenames receive parent-directory suffixes; singleton basenames remain short. Dirty marker, pin marker and tooltip are independent label channels.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    r0 = x['name']+' — '+x['parent'] if x['duplicates']>1 else x['name']
    r1 = '•' if x['dirty'] else ''
    r2 = 'pin' if x['pinned'] else ''
    r3 = x['name']
    r4 = x['name'] if len(x['name'])<=x['max_chars'] else x['name'][:max(0,x['max_chars']-1)]+'…'
    r5 = x['name']+' '+x['parent']
    return [r0,r1,r2,r3,r4,r5]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'name': 'main.py', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.py \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'main.py', 'main.py src']), ({'name': 'main.py', 'parent': 'src', 'duplicates': 1, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.py', '\u2022', 'pin', '/project/src/main.py', 'main.py', 'main.py src']), ({'name': 'main.py', 'parent': 'src', 'duplicates': 2, 'dirty': False, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.py \u2014 src', '', 'pin', '/project/src/main.py', 'main.py', 'main.py src']), ({'name': 'main.py', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': False, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.py \u2014 src', '\u2022', '', '/project/src/main.py', 'main.py', 'main.py src']), ({'name': 'x', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 1}, ['x \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'x', 'x src']), ({'name': 'main.py', 'parent': 'tests', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.py \u2014 tests', '\u2022', 'pin', '/project/src/main.py', 'main.py', 'main.py tests']), ({'name': 'main.py', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 4}, ['main.py \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'mai\u2026', 'main.py src'])], 2: [({'name': 'main.pyx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'main.pyx', 'main.pyx src']), ({'name': 'main.pyx', 'parent': 'src', 'duplicates': 1, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyx', '\u2022', 'pin', '/project/src/main.py', 'main.pyx', 'main.pyx src']), ({'name': 'main.pyx', 'parent': 'src', 'duplicates': 2, 'dirty': False, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyx \u2014 src', '', 'pin', '/project/src/main.py', 'main.pyx', 'main.pyx src']), ({'name': 'main.pyx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': False, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyx \u2014 src', '\u2022', '', '/project/src/main.py', 'main.pyx', 'main.pyx src']), ({'name': 'xx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 1}, ['xx \u2014 src', '\u2022', 'pin', '/project/src/main.py', '\u2026', 'xx src']), ({'name': 'main.pyx', 'parent': 'tests', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyx \u2014 tests', '\u2022', 'pin', '/project/src/main.py', 'main.pyx', 'main.pyx tests']), ({'name': 'main.pyx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 4}, ['main.pyx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'mai\u2026', 'main.pyx src'])], 3: [({'name': 'main.pyxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxx src']), ({'name': 'main.pyxx', 'parent': 'src', 'duplicates': 1, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxx', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxx src']), ({'name': 'main.pyxx', 'parent': 'src', 'duplicates': 2, 'dirty': False, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxx \u2014 src', '', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxx src']), ({'name': 'main.pyxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': False, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxx \u2014 src', '\u2022', '', '/project/src/main.py', 'main.py\u2026', 'main.pyxx src']), ({'name': 'xxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 1}, ['xxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', '\u2026', 'xxx src']), ({'name': 'main.pyxx', 'parent': 'tests', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxx \u2014 tests', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxx tests']), ({'name': 'main.pyxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 4}, ['main.pyxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'mai\u2026', 'main.pyxx src'])], 4: [({'name': 'main.pyxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxx src']), ({'name': 'main.pyxxx', 'parent': 'src', 'duplicates': 1, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxx', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxx src']), ({'name': 'main.pyxxx', 'parent': 'src', 'duplicates': 2, 'dirty': False, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxx \u2014 src', '', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxx src']), ({'name': 'main.pyxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': False, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxx \u2014 src', '\u2022', '', '/project/src/main.py', 'main.py\u2026', 'main.pyxxx src']), ({'name': 'xxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 1}, ['xxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', '\u2026', 'xxxx src']), ({'name': 'main.pyxxx', 'parent': 'tests', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxx \u2014 tests', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxx tests']), ({'name': 'main.pyxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 4}, ['main.pyxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'mai\u2026', 'main.pyxxx src'])], 5: [({'name': 'main.pyxxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxxx src']), ({'name': 'main.pyxxxx', 'parent': 'src', 'duplicates': 1, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxxx', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxxx src']), ({'name': 'main.pyxxxx', 'parent': 'src', 'duplicates': 2, 'dirty': False, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxxx \u2014 src', '', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxxx src']), ({'name': 'main.pyxxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': False, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxxx \u2014 src', '\u2022', '', '/project/src/main.py', 'main.py\u2026', 'main.pyxxxx src']), ({'name': 'xxxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 1}, ['xxxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', '\u2026', 'xxxxx src']), ({'name': 'main.pyxxxx', 'parent': 'tests', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxxx \u2014 tests', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxxx tests']), ({'name': 'main.pyxxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 4}, ['main.pyxxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'mai\u2026', 'main.pyxxxx src'])]}
for i, (inputs, expected) in enumerate(fixtures[N]):
    check("workspace regression "+str(i), solve(inputs), 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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    r0 = x['name']+' — '+x['parent'] if x['duplicates']>1 else x['name']
    r1 = '•' if x['dirty'] else ''
    r2 = 'pin' if x['pinned'] else ''
    r3 = x['parent']+'/'+x['name']
    r4 = x['name'] if len(x['name'])<=x['max_chars'] else x['name'][:max(0,x['max_chars']-1)]+'…'
    r5 = x['name']+' '+x['parent']
    return [r0,r1,r2,r3,r4,r5]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'name': 'main.py', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.py \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'main.py', 'main.py src']), ({'name': 'main.py', 'parent': 'src', 'duplicates': 1, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.py', '\u2022', 'pin', '/project/src/main.py', 'main.py', 'main.py src']), ({'name': 'main.py', 'parent': 'src', 'duplicates': 2, 'dirty': False, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.py \u2014 src', '', 'pin', '/project/src/main.py', 'main.py', 'main.py src']), ({'name': 'main.py', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': False, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.py \u2014 src', '\u2022', '', '/project/src/main.py', 'main.py', 'main.py src']), ({'name': 'x', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 1}, ['x \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'x', 'x src']), ({'name': 'main.py', 'parent': 'tests', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.py \u2014 tests', '\u2022', 'pin', '/project/src/main.py', 'main.py', 'main.py tests']), ({'name': 'main.py', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 4}, ['main.py \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'mai\u2026', 'main.py src'])], 2: [({'name': 'main.pyx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'main.pyx', 'main.pyx src']), ({'name': 'main.pyx', 'parent': 'src', 'duplicates': 1, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyx', '\u2022', 'pin', '/project/src/main.py', 'main.pyx', 'main.pyx src']), ({'name': 'main.pyx', 'parent': 'src', 'duplicates': 2, 'dirty': False, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyx \u2014 src', '', 'pin', '/project/src/main.py', 'main.pyx', 'main.pyx src']), ({'name': 'main.pyx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': False, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyx \u2014 src', '\u2022', '', '/project/src/main.py', 'main.pyx', 'main.pyx src']), ({'name': 'xx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 1}, ['xx \u2014 src', '\u2022', 'pin', '/project/src/main.py', '\u2026', 'xx src']), ({'name': 'main.pyx', 'parent': 'tests', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyx \u2014 tests', '\u2022', 'pin', '/project/src/main.py', 'main.pyx', 'main.pyx tests']), ({'name': 'main.pyx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 4}, ['main.pyx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'mai\u2026', 'main.pyx src'])], 3: [({'name': 'main.pyxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxx src']), ({'name': 'main.pyxx', 'parent': 'src', 'duplicates': 1, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxx', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxx src']), ({'name': 'main.pyxx', 'parent': 'src', 'duplicates': 2, 'dirty': False, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxx \u2014 src', '', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxx src']), ({'name': 'main.pyxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': False, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxx \u2014 src', '\u2022', '', '/project/src/main.py', 'main.py\u2026', 'main.pyxx src']), ({'name': 'xxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 1}, ['xxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', '\u2026', 'xxx src']), ({'name': 'main.pyxx', 'parent': 'tests', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxx \u2014 tests', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxx tests']), ({'name': 'main.pyxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 4}, ['main.pyxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'mai\u2026', 'main.pyxx src'])], 4: [({'name': 'main.pyxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxx src']), ({'name': 'main.pyxxx', 'parent': 'src', 'duplicates': 1, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxx', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxx src']), ({'name': 'main.pyxxx', 'parent': 'src', 'duplicates': 2, 'dirty': False, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxx \u2014 src', '', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxx src']), ({'name': 'main.pyxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': False, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxx \u2014 src', '\u2022', '', '/project/src/main.py', 'main.py\u2026', 'main.pyxxx src']), ({'name': 'xxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 1}, ['xxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', '\u2026', 'xxxx src']), ({'name': 'main.pyxxx', 'parent': 'tests', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxx \u2014 tests', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxx tests']), ({'name': 'main.pyxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 4}, ['main.pyxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'mai\u2026', 'main.pyxxx src'])], 5: [({'name': 'main.pyxxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxxx src']), ({'name': 'main.pyxxxx', 'parent': 'src', 'duplicates': 1, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxxx', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxxx src']), ({'name': 'main.pyxxxx', 'parent': 'src', 'duplicates': 2, 'dirty': False, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxxx \u2014 src', '', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxxx src']), ({'name': 'main.pyxxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': False, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxxx \u2014 src', '\u2022', '', '/project/src/main.py', 'main.py\u2026', 'main.pyxxxx src']), ({'name': 'xxxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 1}, ['xxxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', '\u2026', 'xxxxx src']), ({'name': 'main.pyxxxx', 'parent': 'tests', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxxx \u2014 tests', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxxx tests']), ({'name': 'main.pyxxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 4}, ['main.pyxxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'mai\u2026', 'main.pyxxxx src'])]}
for i, (inputs, expected) in enumerate(fixtures[N]):
    check("workspace regression "+str(i), solve(inputs), 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)

prompt:
The tab workspace reports an incorrect full path tooltip.

Duplicate basenames receive parent-directory suffixes; singleton basenames remain short. Dirty marker, pin marker and tooltip are independent label channels.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    r0 = x['name']+' — '+x['parent'] if x['duplicates']>1 else x['name']
    r1 = '•' if x['dirty'] else ''
    r2 = 'pin' if x['pinned'] else ''
    r3 = x['path']
    r4 = x['name'][:x['max_chars']]
    r5 = x['name']+' '+x['parent']
    return [r0,r1,r2,r3,r4,r5]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'name': 'main.py', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.py \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'main.py', 'main.py src']), ({'name': 'main.py', 'parent': 'src', 'duplicates': 1, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.py', '\u2022', 'pin', '/project/src/main.py', 'main.py', 'main.py src']), ({'name': 'main.py', 'parent': 'src', 'duplicates': 2, 'dirty': False, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.py \u2014 src', '', 'pin', '/project/src/main.py', 'main.py', 'main.py src']), ({'name': 'main.py', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': False, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.py \u2014 src', '\u2022', '', '/project/src/main.py', 'main.py', 'main.py src']), ({'name': 'x', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 1}, ['x \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'x', 'x src']), ({'name': 'main.py', 'parent': 'tests', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.py \u2014 tests', '\u2022', 'pin', '/project/src/main.py', 'main.py', 'main.py tests']), ({'name': 'main.py', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 4}, ['main.py \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'mai\u2026', 'main.py src'])], 2: [({'name': 'main.pyx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'main.pyx', 'main.pyx src']), ({'name': 'main.pyx', 'parent': 'src', 'duplicates': 1, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyx', '\u2022', 'pin', '/project/src/main.py', 'main.pyx', 'main.pyx src']), ({'name': 'main.pyx', 'parent': 'src', 'duplicates': 2, 'dirty': False, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyx \u2014 src', '', 'pin', '/project/src/main.py', 'main.pyx', 'main.pyx src']), ({'name': 'main.pyx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': False, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyx \u2014 src', '\u2022', '', '/project/src/main.py', 'main.pyx', 'main.pyx src']), ({'name': 'xx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 1}, ['xx \u2014 src', '\u2022', 'pin', '/project/src/main.py', '\u2026', 'xx src']), ({'name': 'main.pyx', 'parent': 'tests', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyx \u2014 tests', '\u2022', 'pin', '/project/src/main.py', 'main.pyx', 'main.pyx tests']), ({'name': 'main.pyx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 4}, ['main.pyx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'mai\u2026', 'main.pyx src'])], 3: [({'name': 'main.pyxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxx src']), ({'name': 'main.pyxx', 'parent': 'src', 'duplicates': 1, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxx', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxx src']), ({'name': 'main.pyxx', 'parent': 'src', 'duplicates': 2, 'dirty': False, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxx \u2014 src', '', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxx src']), ({'name': 'main.pyxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': False, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxx \u2014 src', '\u2022', '', '/project/src/main.py', 'main.py\u2026', 'main.pyxx src']), ({'name': 'xxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 1}, ['xxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', '\u2026', 'xxx src']), ({'name': 'main.pyxx', 'parent': 'tests', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxx \u2014 tests', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxx tests']), ({'name': 'main.pyxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 4}, ['main.pyxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'mai\u2026', 'main.pyxx src'])], 4: [({'name': 'main.pyxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxx src']), ({'name': 'main.pyxxx', 'parent': 'src', 'duplicates': 1, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxx', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxx src']), ({'name': 'main.pyxxx', 'parent': 'src', 'duplicates': 2, 'dirty': False, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxx \u2014 src', '', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxx src']), ({'name': 'main.pyxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': False, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxx \u2014 src', '\u2022', '', '/project/src/main.py', 'main.py\u2026', 'main.pyxxx src']), ({'name': 'xxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 1}, ['xxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', '\u2026', 'xxxx src']), ({'name': 'main.pyxxx', 'parent': 'tests', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxx \u2014 tests', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxx tests']), ({'name': 'main.pyxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 4}, ['main.pyxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'mai\u2026', 'main.pyxxx src'])], 5: [({'name': 'main.pyxxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxxx src']), ({'name': 'main.pyxxxx', 'parent': 'src', 'duplicates': 1, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxxx', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxxx src']), ({'name': 'main.pyxxxx', 'parent': 'src', 'duplicates': 2, 'dirty': False, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxxx \u2014 src', '', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxxx src']), ({'name': 'main.pyxxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': False, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxxx \u2014 src', '\u2022', '', '/project/src/main.py', 'main.py\u2026', 'main.pyxxxx src']), ({'name': 'xxxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 1}, ['xxxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', '\u2026', 'xxxxx src']), ({'name': 'main.pyxxxx', 'parent': 'tests', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxxx \u2014 tests', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxxx tests']), ({'name': 'main.pyxxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 4}, ['main.pyxxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'mai\u2026', 'main.pyxxxx src'])]}
for i, (inputs, expected) in enumerate(fixtures[N]):
    check("workspace regression "+str(i), solve(inputs), 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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    r0 = x['name']+' — '+x['parent'] if x['duplicates']>1 else x['name']
    r1 = '•' if x['dirty'] else ''
    r2 = 'pin' if x['pinned'] else ''
    r3 = x['path']
    r4 = x['name'][:x['max_chars']]+'…'
    r5 = x['name']+' '+x['parent']
    return [r0,r1,r2,r3,r4,r5]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'name': 'main.py', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.py \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'main.py', 'main.py src']), ({'name': 'main.py', 'parent': 'src', 'duplicates': 1, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.py', '\u2022', 'pin', '/project/src/main.py', 'main.py', 'main.py src']), ({'name': 'main.py', 'parent': 'src', 'duplicates': 2, 'dirty': False, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.py \u2014 src', '', 'pin', '/project/src/main.py', 'main.py', 'main.py src']), ({'name': 'main.py', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': False, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.py \u2014 src', '\u2022', '', '/project/src/main.py', 'main.py', 'main.py src']), ({'name': 'x', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 1}, ['x \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'x', 'x src']), ({'name': 'main.py', 'parent': 'tests', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.py \u2014 tests', '\u2022', 'pin', '/project/src/main.py', 'main.py', 'main.py tests']), ({'name': 'main.py', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 4}, ['main.py \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'mai\u2026', 'main.py src'])], 2: [({'name': 'main.pyx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'main.pyx', 'main.pyx src']), ({'name': 'main.pyx', 'parent': 'src', 'duplicates': 1, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyx', '\u2022', 'pin', '/project/src/main.py', 'main.pyx', 'main.pyx src']), ({'name': 'main.pyx', 'parent': 'src', 'duplicates': 2, 'dirty': False, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyx \u2014 src', '', 'pin', '/project/src/main.py', 'main.pyx', 'main.pyx src']), ({'name': 'main.pyx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': False, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyx \u2014 src', '\u2022', '', '/project/src/main.py', 'main.pyx', 'main.pyx src']), ({'name': 'xx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 1}, ['xx \u2014 src', '\u2022', 'pin', '/project/src/main.py', '\u2026', 'xx src']), ({'name': 'main.pyx', 'parent': 'tests', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyx \u2014 tests', '\u2022', 'pin', '/project/src/main.py', 'main.pyx', 'main.pyx tests']), ({'name': 'main.pyx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 4}, ['main.pyx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'mai\u2026', 'main.pyx src'])], 3: [({'name': 'main.pyxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxx src']), ({'name': 'main.pyxx', 'parent': 'src', 'duplicates': 1, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxx', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxx src']), ({'name': 'main.pyxx', 'parent': 'src', 'duplicates': 2, 'dirty': False, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxx \u2014 src', '', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxx src']), ({'name': 'main.pyxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': False, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxx \u2014 src', '\u2022', '', '/project/src/main.py', 'main.py\u2026', 'main.pyxx src']), ({'name': 'xxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 1}, ['xxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', '\u2026', 'xxx src']), ({'name': 'main.pyxx', 'parent': 'tests', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxx \u2014 tests', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxx tests']), ({'name': 'main.pyxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 4}, ['main.pyxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'mai\u2026', 'main.pyxx src'])], 4: [({'name': 'main.pyxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxx src']), ({'name': 'main.pyxxx', 'parent': 'src', 'duplicates': 1, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxx', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxx src']), ({'name': 'main.pyxxx', 'parent': 'src', 'duplicates': 2, 'dirty': False, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxx \u2014 src', '', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxx src']), ({'name': 'main.pyxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': False, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxx \u2014 src', '\u2022', '', '/project/src/main.py', 'main.py\u2026', 'main.pyxxx src']), ({'name': 'xxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 1}, ['xxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', '\u2026', 'xxxx src']), ({'name': 'main.pyxxx', 'parent': 'tests', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxx \u2014 tests', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxx tests']), ({'name': 'main.pyxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 4}, ['main.pyxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'mai\u2026', 'main.pyxxx src'])], 5: [({'name': 'main.pyxxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxxx src']), ({'name': 'main.pyxxxx', 'parent': 'src', 'duplicates': 1, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxxx', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxxx src']), ({'name': 'main.pyxxxx', 'parent': 'src', 'duplicates': 2, 'dirty': False, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxxx \u2014 src', '', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxxx src']), ({'name': 'main.pyxxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': False, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxxx \u2014 src', '\u2022', '', '/project/src/main.py', 'main.py\u2026', 'main.pyxxxx src']), ({'name': 'xxxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 1}, ['xxxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', '\u2026', 'xxxxx src']), ({'name': 'main.pyxxxx', 'parent': 'tests', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 8}, ['main.pyxxxx \u2014 tests', '\u2022', 'pin', '/project/src/main.py', 'main.py\u2026', 'main.pyxxxx tests']), ({'name': 'main.pyxxxx', 'parent': 'src', 'duplicates': 2, 'dirty': True, 'pinned': True, 'path': '/project/src/main.py', 'max_chars': 4}, ['main.pyxxxx \u2014 src', '\u2022', 'pin', '/project/src/main.py', 'mai\u2026', 'main.pyxxxx src'])]}
for i, (inputs, expected) in enumerate(fixtures[N]):
    check("workspace regression "+str(i), solve(inputs), 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)

prompt:
The tab workspace reports an incorrect ellipsis budget.

Duplicate basenames receive parent-directory suffixes; singleton basenames remain short. Dirty marker, pin marker and tooltip are independent label channels.

split: open-access