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

N = 1
observations = []
def solve(previous, updates):
    result = {name: list(deps) for name, deps in previous.items()}
    for target, deps in updates:
        result.setdefault(target, [])
        for dep in deps:
            if True and dep not in result[target]:
                result[target].append(dep)
    return result
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({}, []), {})
check('fixture 2', solve({'a': ['b']}, [('a', ['c'])]), {'a': ['b', 'c']})
check('fixture 3', solve({}, [('a', ['a', 'b', 'b', 'c', 'b'])]), {'a': ['b', 'c']})
check('fixture 4', solve({}, [('z', [])]), {'z': []})
check('fixture 5', solve({'a': ['b']}, [('a', ['b', 'c']), ('a', ['d'])]), {'a': ['b', 'c', 'd']})
check('fixture 6', solve({'old': ['x']}, [('new', ['z', 'a'])]), {'old': ['x'], 'new': ['z', 'a']})
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)

evaluation_group: xt-depfile-merge

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

N = 1
observations = []
def solve(previous, updates):
    result = {name: list(deps) for name, deps in previous.items()}
    for target, deps in updates:
        result.setdefault(target, [])
        for dep in deps:
            if dep == target and dep not in result[target]:
                result[target].append(dep)
    return result
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({}, []), {})
check('fixture 2', solve({'a': ['b']}, [('a', ['c'])]), {'a': ['b', 'c']})
check('fixture 3', solve({}, [('a', ['a', 'b', 'b', 'c', 'b'])]), {'a': ['b', 'c']})
check('fixture 4', solve({}, [('z', [])]), {'z': []})
check('fixture 5', solve({'a': ['b']}, [('a', ['b', 'c']), ('a', ['d'])]), {'a': ['b', 'c', 'd']})
check('fixture 6', solve({'old': ['x']}, [('new', ['z', 'a'])]), {'old': ['x'], 'new': ['z', 'a']})
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:
A target becomes its own prerequisite.

Merge prerequisite lists by target, preserving first occurrence order, retaining previous prerequisites, ignoring self references, and retaining empty targets.

split: open-access


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

N = 1
observations = []
def solve(previous, updates):
    result = {name: list(deps) for name, deps in previous.items()}
    for target, deps in updates:
        result.setdefault(target, [])
        for dep in deps:
            if dep != target and True:
                result[target].append(dep)
    return result
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({}, []), {})
check('fixture 2', solve({'a': ['b']}, [('a', ['c'])]), {'a': ['b', 'c']})
check('fixture 3', solve({}, [('a', ['a', 'b', 'b', 'c', 'b'])]), {'a': ['b', 'c']})
check('fixture 4', solve({}, [('z', [])]), {'z': []})
check('fixture 5', solve({'a': ['b']}, [('a', ['b', 'c']), ('a', ['d'])]), {'a': ['b', 'c', 'd']})
check('fixture 6', solve({'old': ['x']}, [('new', ['z', 'a'])]), {'old': ['x'], 'new': ['z', 'a']})
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

evaluation_group: xt-depfile-merge

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

N = 1
observations = []
def solve(previous, updates):
    result = {name: list(deps) for name, deps in previous.items()}
    for target, deps in updates:
        result.setdefault(target, [])
        for dep in deps:
            if dep != target and dep not in result[target][-1:]:
                result[target].append(dep)
    return result
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({}, []), {})
check('fixture 2', solve({'a': ['b']}, [('a', ['c'])]), {'a': ['b', 'c']})
check('fixture 3', solve({}, [('a', ['a', 'b', 'b', 'c', 'b'])]), {'a': ['b', 'c']})
check('fixture 4', solve({}, [('z', [])]), {'z': []})
check('fixture 5', solve({'a': ['b']}, [('a', ['b', 'c']), ('a', ['d'])]), {'a': ['b', 'c', 'd']})
check('fixture 6', solve({'old': ['x']}, [('new', ['z', 'a'])]), {'old': ['x'], 'new': ['z', 'a']})
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:
Repeated prerequisites survive.

Merge prerequisite lists by target, preserving first occurrence order, retaining previous prerequisites, ignoring self references, and retaining empty targets.

split: open-access


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

N = 1
observations = []
def solve(previous, updates):
    result = {name: list(deps) for name, deps in previous.items()}
    for target, deps in updates:
        result.setdefault(target, [])
        for dep in deps:
            if dep != target and dep not in result[target]:
                result[target].insert(0, dep)
    return result
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({}, []), {})
check('fixture 2', solve({'a': ['b']}, [('a', ['c'])]), {'a': ['b', 'c']})
check('fixture 3', solve({}, [('a', ['a', 'b', 'b', 'c', 'b'])]), {'a': ['b', 'c']})
check('fixture 4', solve({}, [('z', [])]), {'z': []})
check('fixture 5', solve({'a': ['b']}, [('a', ['b', 'c']), ('a', ['d'])]), {'a': ['b', 'c', 'd']})
check('fixture 6', solve({'old': ['x']}, [('new', ['z', 'a'])]), {'old': ['x'], 'new': ['z', 'a']})
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)

evaluation_group: xt-depfile-merge

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

N = 1
observations = []
def solve(previous, updates):
    result = {name: list(deps) for name, deps in previous.items()}
    for target, deps in updates:
        result.setdefault(target, [])
        for dep in deps:
            if dep != target and dep not in result[target]:
                result[target] = sorted(result[target] + [dep])
    return result
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({}, []), {})
check('fixture 2', solve({'a': ['b']}, [('a', ['c'])]), {'a': ['b', 'c']})
check('fixture 3', solve({}, [('a', ['a', 'b', 'b', 'c', 'b'])]), {'a': ['b', 'c']})
check('fixture 4', solve({}, [('z', [])]), {'z': []})
check('fixture 5', solve({'a': ['b']}, [('a', ['b', 'c']), ('a', ['d'])]), {'a': ['b', 'c', 'd']})
check('fixture 6', solve({'old': ['x']}, [('new', ['z', 'a'])]), {'old': ['x'], 'new': ['z', 'a']})
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:
New dependencies prepend in reverse order.

Merge prerequisite lists by target, preserving first occurrence order, retaining previous prerequisites, ignoring self references, and retaining empty targets.

split: open-access


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

N = 1
observations = []
def solve(jobs):
    states = [state for required, state in jobs if True]
    if 'failed' in states: return 'failed'
    if 'cancelled' in states: return 'cancelled'
    if 'pending' in states: return 'waiting'
    if 'running' in states: return 'running'
    return 'passed'
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([]), 'passed')
check('fixture 2', solve([(False, 'failed')]), 'passed')
check('fixture 3', solve([(True, 'failed'), (True, 'running')]), 'failed')
check('fixture 4', solve([(True, 'cancelled')]), 'cancelled')
check('fixture 5', solve([(True, 'pending')]), 'waiting')
check('fixture 6', solve([(True, 'running')]), 'running')
check('fixture 7', solve([(True, 'passed')]), 'passed')
check('fixture 8', solve([(True, 'pending'), (True, 'running')]), 'waiting')
check('fixture 9', solve([(False, 'pending'), (True, 'passed')]), 'passed')
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)

evaluation_group: xt-build-exit

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

N = 1
observations = []
def solve(jobs):
    states = [state for required, state in jobs if not required]
    if 'failed' in states: return 'failed'
    if 'cancelled' in states: return 'cancelled'
    if 'pending' in states: return 'waiting'
    if 'running' in states: return 'running'
    return 'passed'
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([]), 'passed')
check('fixture 2', solve([(False, 'failed')]), 'passed')
check('fixture 3', solve([(True, 'failed'), (True, 'running')]), 'failed')
check('fixture 4', solve([(True, 'cancelled')]), 'cancelled')
check('fixture 5', solve([(True, 'pending')]), 'waiting')
check('fixture 6', solve([(True, 'running')]), 'running')
check('fixture 7', solve([(True, 'passed')]), 'passed')
check('fixture 8', solve([(True, 'pending'), (True, 'running')]), 'waiting')
check('fixture 9', solve([(False, 'pending'), (True, 'passed')]), 'passed')
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:
Optional job failures block the build.

Return failed if any required job fails, cancelled if any required job cancels, waiting if required work is pending, running if required work runs, otherwise passed. Optional jobs never block.

split: open-access


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

N = 1
observations = []
def solve(jobs):
    states = [state for required, state in jobs if required]
    if 'failed' in states: return 'passed'
    if 'cancelled' in states: return 'cancelled'
    if 'pending' in states: return 'waiting'
    if 'running' in states: return 'running'
    return 'passed'
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([]), 'passed')
check('fixture 2', solve([(False, 'failed')]), 'passed')
check('fixture 3', solve([(True, 'failed'), (True, 'running')]), 'failed')
check('fixture 4', solve([(True, 'cancelled')]), 'cancelled')
check('fixture 5', solve([(True, 'pending')]), 'waiting')
check('fixture 6', solve([(True, 'running')]), 'running')
check('fixture 7', solve([(True, 'passed')]), 'passed')
check('fixture 8', solve([(True, 'pending'), (True, 'running')]), 'waiting')
check('fixture 9', solve([(False, 'pending'), (True, 'passed')]), 'passed')
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)

evaluation_group: xt-build-exit

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

N = 1
observations = []
def solve(jobs):
    states = [state for required, state in jobs if required]
    if 'failed' in states: return 'running'
    if 'cancelled' in states: return 'cancelled'
    if 'pending' in states: return 'waiting'
    if 'running' in states: return 'running'
    return 'passed'
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([]), 'passed')
check('fixture 2', solve([(False, 'failed')]), 'passed')
check('fixture 3', solve([(True, 'failed'), (True, 'running')]), 'failed')
check('fixture 4', solve([(True, 'cancelled')]), 'cancelled')
check('fixture 5', solve([(True, 'pending')]), 'waiting')
check('fixture 6', solve([(True, 'running')]), 'running')
check('fixture 7', solve([(True, 'passed')]), 'passed')
check('fixture 8', solve([(True, 'pending'), (True, 'running')]), 'waiting')
check('fixture 9', solve([(False, 'pending'), (True, 'passed')]), 'passed')
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:
Required failures report success.

Return failed if any required job fails, cancelled if any required job cancels, waiting if required work is pending, running if required work runs, otherwise passed. Optional jobs never block.

split: open-access


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

N = 1
observations = []
def solve(jobs):
    states = [state for required, state in jobs if required]
    if 'failed' in states: return 'failed'
    if 'cancelled' in states: return 'passed'
    if 'pending' in states: return 'waiting'
    if 'running' in states: return 'running'
    return 'passed'
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([]), 'passed')
check('fixture 2', solve([(False, 'failed')]), 'passed')
check('fixture 3', solve([(True, 'failed'), (True, 'running')]), 'failed')
check('fixture 4', solve([(True, 'cancelled')]), 'cancelled')
check('fixture 5', solve([(True, 'pending')]), 'waiting')
check('fixture 6', solve([(True, 'running')]), 'running')
check('fixture 7', solve([(True, 'passed')]), 'passed')
check('fixture 8', solve([(True, 'pending'), (True, 'running')]), 'waiting')
check('fixture 9', solve([(False, 'pending'), (True, 'passed')]), 'passed')
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)

evaluation_group: xt-build-exit

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

N = 1
observations = []
def solve(jobs):
    states = [state for required, state in jobs if required]
    if 'failed' in states: return 'failed'
    if 'cancelled' in states: return 'failed'
    if 'pending' in states: return 'waiting'
    if 'running' in states: return 'running'
    return 'passed'
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([]), 'passed')
check('fixture 2', solve([(False, 'failed')]), 'passed')
check('fixture 3', solve([(True, 'failed'), (True, 'running')]), 'failed')
check('fixture 4', solve([(True, 'cancelled')]), 'cancelled')
check('fixture 5', solve([(True, 'pending')]), 'waiting')
check('fixture 6', solve([(True, 'running')]), 'running')
check('fixture 7', solve([(True, 'passed')]), 'passed')
check('fixture 8', solve([(True, 'pending'), (True, 'running')]), 'waiting')
check('fixture 9', solve([(False, 'pending'), (True, 'passed')]), 'passed')
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:
Cancelled required jobs count as success.

Return failed if any required job fails, cancelled if any required job cancels, waiting if required work is pending, running if required work runs, otherwise passed. Optional jobs never block.

split: open-access


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

N = 1
observations = []
def solve(jobs):
    states = [state for required, state in jobs if required]
    if 'failed' in states: return 'failed'
    if 'cancelled' in states: return 'cancelled'
    if 'pending' in states: return 'running'
    if 'running' in states: return 'running'
    return 'passed'
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([]), 'passed')
check('fixture 2', solve([(False, 'failed')]), 'passed')
check('fixture 3', solve([(True, 'failed'), (True, 'running')]), 'failed')
check('fixture 4', solve([(True, 'cancelled')]), 'cancelled')
check('fixture 5', solve([(True, 'pending')]), 'waiting')
check('fixture 6', solve([(True, 'running')]), 'running')
check('fixture 7', solve([(True, 'passed')]), 'passed')
check('fixture 8', solve([(True, 'pending'), (True, 'running')]), 'waiting')
check('fixture 9', solve([(False, 'pending'), (True, 'passed')]), 'passed')
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)

evaluation_group: xt-build-exit

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

N = 1
observations = []
def solve(jobs):
    states = [state for required, state in jobs if required]
    if 'failed' in states: return 'failed'
    if 'cancelled' in states: return 'cancelled'
    if 'pending' in states: return 'passed'
    if 'running' in states: return 'running'
    return 'passed'
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([]), 'passed')
check('fixture 2', solve([(False, 'failed')]), 'passed')
check('fixture 3', solve([(True, 'failed'), (True, 'running')]), 'failed')
check('fixture 4', solve([(True, 'cancelled')]), 'cancelled')
check('fixture 5', solve([(True, 'pending')]), 'waiting')
check('fixture 6', solve([(True, 'running')]), 'running')
check('fixture 7', solve([(True, 'passed')]), 'passed')
check('fixture 8', solve([(True, 'pending'), (True, 'running')]), 'waiting')
check('fixture 9', solve([(False, 'pending'), (True, 'passed')]), 'passed')
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:
Pending prerequisites report active execution.

Return failed if any required job fails, cancelled if any required job cancels, waiting if required work is pending, running if required work runs, otherwise passed. Optional jobs never block.

split: open-access


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

N = 1
observations = []
def solve(jobs):
    states = [state for required, state in jobs if required]
    if 'failed' in states: return 'failed'
    if 'cancelled' in states: return 'cancelled'
    if 'pending' in states: return 'waiting'
    if 'running' in states: return 'passed'
    return 'passed'
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([]), 'passed')
check('fixture 2', solve([(False, 'failed')]), 'passed')
check('fixture 3', solve([(True, 'failed'), (True, 'running')]), 'failed')
check('fixture 4', solve([(True, 'cancelled')]), 'cancelled')
check('fixture 5', solve([(True, 'pending')]), 'waiting')
check('fixture 6', solve([(True, 'running')]), 'running')
check('fixture 7', solve([(True, 'passed')]), 'passed')
check('fixture 8', solve([(True, 'pending'), (True, 'running')]), 'waiting')
check('fixture 9', solve([(False, 'pending'), (True, 'passed')]), 'passed')
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)

evaluation_group: xt-build-exit

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

N = 1
observations = []
def solve(jobs):
    states = [state for required, state in jobs if required]
    if 'failed' in states: return 'failed'
    if 'cancelled' in states: return 'cancelled'
    if 'pending' in states: return 'waiting'
    if 'running' in states: return 'waiting'
    return 'passed'
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([]), 'passed')
check('fixture 2', solve([(False, 'failed')]), 'passed')
check('fixture 3', solve([(True, 'failed'), (True, 'running')]), 'failed')
check('fixture 4', solve([(True, 'cancelled')]), 'cancelled')
check('fixture 5', solve([(True, 'pending')]), 'waiting')
check('fixture 6', solve([(True, 'running')]), 'running')
check('fixture 7', solve([(True, 'passed')]), 'passed')
check('fixture 8', solve([(True, 'pending'), (True, 'running')]), 'waiting')
check('fixture 9', solve([(False, 'pending'), (True, 'passed')]), 'passed')
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:
An active build reports completion.

Return failed if any required job fails, cancelled if any required job cancels, waiting if required work is pending, running if required work runs, otherwise passed. Optional jobs never block.

split: open-access


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

N = 1
observations = []
def solve(project, version, abi, flavor, classifier):
    return (project.casefold(), tuple(version), abi, flavor, classifier)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('My_Pkg', (1, 2, 3), 'cp311', 'debug', None), ('my-pkg', (1, 2, 3), 'cp311', 'debug', None))
check('fixture 2', solve('my-pkg', (1, 2, 3), 'cp312', 'release', 'tests'), ('my-pkg', (1, 2, 3), 'cp312', 'release', 'tests'))
check('fixture 3', solve('A_B', (2, 0, 1), 'abi3', 'release', ''), ('a-b', (2, 0, 1), 'abi3', 'release', ''))
check('fixture 4', solve('A_B', (2, 0, 2), 'abi3', 'debug', 'docs'), ('a-b', (2, 0, 2), 'abi3', 'debug', 'docs'))
check('fixture 5', solve('a_b', (2, 1, 0), 'none', 'release', None), ('a-b', (2, 1, 0), 'none', 'release', None))
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)

evaluation_group: xt-artifact-name

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

N = 1
observations = []
def solve(project, version, abi, flavor, classifier):
    return (project.replace('_', '-'), tuple(version), abi, flavor, classifier)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('My_Pkg', (1, 2, 3), 'cp311', 'debug', None), ('my-pkg', (1, 2, 3), 'cp311', 'debug', None))
check('fixture 2', solve('my-pkg', (1, 2, 3), 'cp312', 'release', 'tests'), ('my-pkg', (1, 2, 3), 'cp312', 'release', 'tests'))
check('fixture 3', solve('A_B', (2, 0, 1), 'abi3', 'release', ''), ('a-b', (2, 0, 1), 'abi3', 'release', ''))
check('fixture 4', solve('A_B', (2, 0, 2), 'abi3', 'debug', 'docs'), ('a-b', (2, 0, 2), 'abi3', 'debug', 'docs'))
check('fixture 5', solve('a_b', (2, 1, 0), 'none', 'release', None), ('a-b', (2, 1, 0), 'none', 'release', None))
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:
Underscores split equivalent project identities.

An artifact identity consists of project, version tuple, target ABI, build flavor, and optional classifier; preserve all fields including empty classifier.

split: open-access


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

N = 1
observations = []
def solve(project, version, abi, flavor, classifier):
    return (project.casefold().replace('_', '-'), tuple(version[:2]), abi, flavor, classifier)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('My_Pkg', (1, 2, 3), 'cp311', 'debug', None), ('my-pkg', (1, 2, 3), 'cp311', 'debug', None))
check('fixture 2', solve('my-pkg', (1, 2, 3), 'cp312', 'release', 'tests'), ('my-pkg', (1, 2, 3), 'cp312', 'release', 'tests'))
check('fixture 3', solve('A_B', (2, 0, 1), 'abi3', 'release', ''), ('a-b', (2, 0, 1), 'abi3', 'release', ''))
check('fixture 4', solve('A_B', (2, 0, 2), 'abi3', 'debug', 'docs'), ('a-b', (2, 0, 2), 'abi3', 'debug', 'docs'))
check('fixture 5', solve('a_b', (2, 1, 0), 'none', 'release', None), ('a-b', (2, 1, 0), 'none', 'release', None))
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)

evaluation_group: xt-artifact-name

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

N = 1
observations = []
def solve(project, version, abi, flavor, classifier):
    return (project.casefold().replace('_', '-'), tuple(version[:1]), abi, flavor, classifier)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('My_Pkg', (1, 2, 3), 'cp311', 'debug', None), ('my-pkg', (1, 2, 3), 'cp311', 'debug', None))
check('fixture 2', solve('my-pkg', (1, 2, 3), 'cp312', 'release', 'tests'), ('my-pkg', (1, 2, 3), 'cp312', 'release', 'tests'))
check('fixture 3', solve('A_B', (2, 0, 1), 'abi3', 'release', ''), ('a-b', (2, 0, 1), 'abi3', 'release', ''))
check('fixture 4', solve('A_B', (2, 0, 2), 'abi3', 'debug', 'docs'), ('a-b', (2, 0, 2), 'abi3', 'debug', 'docs'))
check('fixture 5', solve('a_b', (2, 1, 0), 'none', 'release', None), ('a-b', (2, 1, 0), 'none', 'release', None))
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:
Patch versions collide.

An artifact identity consists of project, version tuple, target ABI, build flavor, and optional classifier; preserve all fields including empty classifier.

split: open-access


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

N = 1
observations = []
def solve(project, version, abi, flavor, classifier):
    return (project.casefold().replace('_', '-'), tuple(version), None, flavor, classifier)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('My_Pkg', (1, 2, 3), 'cp311', 'debug', None), ('my-pkg', (1, 2, 3), 'cp311', 'debug', None))
check('fixture 2', solve('my-pkg', (1, 2, 3), 'cp312', 'release', 'tests'), ('my-pkg', (1, 2, 3), 'cp312', 'release', 'tests'))
check('fixture 3', solve('A_B', (2, 0, 1), 'abi3', 'release', ''), ('a-b', (2, 0, 1), 'abi3', 'release', ''))
check('fixture 4', solve('A_B', (2, 0, 2), 'abi3', 'debug', 'docs'), ('a-b', (2, 0, 2), 'abi3', 'debug', 'docs'))
check('fixture 5', solve('a_b', (2, 1, 0), 'none', 'release', None), ('a-b', (2, 1, 0), 'none', 'release', None))
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)

evaluation_group: xt-artifact-name

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

N = 1
observations = []
def solve(project, version, abi, flavor, classifier):
    return (project.casefold().replace('_', '-'), tuple(version), abi[:2], flavor, classifier)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('My_Pkg', (1, 2, 3), 'cp311', 'debug', None), ('my-pkg', (1, 2, 3), 'cp311', 'debug', None))
check('fixture 2', solve('my-pkg', (1, 2, 3), 'cp312', 'release', 'tests'), ('my-pkg', (1, 2, 3), 'cp312', 'release', 'tests'))
check('fixture 3', solve('A_B', (2, 0, 1), 'abi3', 'release', ''), ('a-b', (2, 0, 1), 'abi3', 'release', ''))
check('fixture 4', solve('A_B', (2, 0, 2), 'abi3', 'debug', 'docs'), ('a-b', (2, 0, 2), 'abi3', 'debug', 'docs'))
check('fixture 5', solve('a_b', (2, 1, 0), 'none', 'release', None), ('a-b', (2, 1, 0), 'none', 'release', None))
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:
ABI-specific artifacts collide.

An artifact identity consists of project, version tuple, target ABI, build flavor, and optional classifier; preserve all fields including empty classifier.

split: open-access


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

N = 1
observations = []
def solve(project, version, abi, flavor, classifier):
    return (project.casefold().replace('_', '-'), tuple(version), abi, None, classifier)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('My_Pkg', (1, 2, 3), 'cp311', 'debug', None), ('my-pkg', (1, 2, 3), 'cp311', 'debug', None))
check('fixture 2', solve('my-pkg', (1, 2, 3), 'cp312', 'release', 'tests'), ('my-pkg', (1, 2, 3), 'cp312', 'release', 'tests'))
check('fixture 3', solve('A_B', (2, 0, 1), 'abi3', 'release', ''), ('a-b', (2, 0, 1), 'abi3', 'release', ''))
check('fixture 4', solve('A_B', (2, 0, 2), 'abi3', 'debug', 'docs'), ('a-b', (2, 0, 2), 'abi3', 'debug', 'docs'))
check('fixture 5', solve('a_b', (2, 1, 0), 'none', 'release', None), ('a-b', (2, 1, 0), 'none', 'release', None))
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)

evaluation_group: xt-artifact-name

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

N = 1
observations = []
def solve(project, version, abi, flavor, classifier):
    return (project.casefold().replace('_', '-'), tuple(version), abi, 'release', classifier)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('My_Pkg', (1, 2, 3), 'cp311', 'debug', None), ('my-pkg', (1, 2, 3), 'cp311', 'debug', None))
check('fixture 2', solve('my-pkg', (1, 2, 3), 'cp312', 'release', 'tests'), ('my-pkg', (1, 2, 3), 'cp312', 'release', 'tests'))
check('fixture 3', solve('A_B', (2, 0, 1), 'abi3', 'release', ''), ('a-b', (2, 0, 1), 'abi3', 'release', ''))
check('fixture 4', solve('A_B', (2, 0, 2), 'abi3', 'debug', 'docs'), ('a-b', (2, 0, 2), 'abi3', 'debug', 'docs'))
check('fixture 5', solve('a_b', (2, 1, 0), 'none', 'release', None), ('a-b', (2, 1, 0), 'none', 'release', None))
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:
Debug and release artifacts collide.

An artifact identity consists of project, version tuple, target ABI, build flavor, and optional classifier; preserve all fields including empty classifier.

split: open-access


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

N = 1
observations = []
def solve(project, version, abi, flavor, classifier):
    return (project.casefold().replace('_', '-'), tuple(version), abi, flavor, None)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('My_Pkg', (1, 2, 3), 'cp311', 'debug', None), ('my-pkg', (1, 2, 3), 'cp311', 'debug', None))
check('fixture 2', solve('my-pkg', (1, 2, 3), 'cp312', 'release', 'tests'), ('my-pkg', (1, 2, 3), 'cp312', 'release', 'tests'))
check('fixture 3', solve('A_B', (2, 0, 1), 'abi3', 'release', ''), ('a-b', (2, 0, 1), 'abi3', 'release', ''))
check('fixture 4', solve('A_B', (2, 0, 2), 'abi3', 'debug', 'docs'), ('a-b', (2, 0, 2), 'abi3', 'debug', 'docs'))
check('fixture 5', solve('a_b', (2, 1, 0), 'none', 'release', None), ('a-b', (2, 1, 0), 'none', 'release', None))
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)

evaluation_group: xt-artifact-name

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

N = 1
observations = []
def solve(project, version, abi, flavor, classifier):
    return (project.casefold().replace('_', '-'), tuple(version), abi, flavor, classifier or 'default')
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('My_Pkg', (1, 2, 3), 'cp311', 'debug', None), ('my-pkg', (1, 2, 3), 'cp311', 'debug', None))
check('fixture 2', solve('my-pkg', (1, 2, 3), 'cp312', 'release', 'tests'), ('my-pkg', (1, 2, 3), 'cp312', 'release', 'tests'))
check('fixture 3', solve('A_B', (2, 0, 1), 'abi3', 'release', ''), ('a-b', (2, 0, 1), 'abi3', 'release', ''))
check('fixture 4', solve('A_B', (2, 0, 2), 'abi3', 'debug', 'docs'), ('a-b', (2, 0, 2), 'abi3', 'debug', 'docs'))
check('fixture 5', solve('a_b', (2, 1, 0), 'none', 'release', None), ('a-b', (2, 1, 0), 'none', 'release', None))
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:
Unclassified artifacts collide with classified artifacts.

An artifact identity consists of project, version tuple, target ABI, build flavor, and optional classifier; preserve all fields including empty classifier.

split: open-access


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

N = 1
observations = []
def solve(defaults, requested, disabled, mandatory):
    flags = list(requested) + list(defaults)
    opts = [x for x in flags if x.startswith('-O')]
    flags = [x for x in flags if not x.startswith('-O')]
    flags = [x for x in flags if x not in disabled]
    if opts: flags.append(opts[-1])
    for flag in mandatory:
        if flag not in flags: flags.append(flag)
    return flags
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([], [], [], []), [])
check('fixture 2', solve(['-O0', '-Wall'], ['-O2', '-Ifoo', '-Ifoo'], ['-Wall'], ['-g']), ['-Ifoo', '-Ifoo', '-O2', '-g'])
check('fixture 3', solve(['-O1'], ['-O3'], [], []), ['-O3'])
check('fixture 4', solve(['-g'], [], [], ['-g']), ['-g'])
check('fixture 5', solve(['-Wa', '-Wb'], [], ['-Wa'], []), ['-Wb'])
check('fixture 6', solve([], ['-Ifoo', '-Ibar'], [], ['-g', '-g']), ['-Ifoo', '-Ibar', '-g'])
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)

evaluation_group: xt-compiler-flags

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

N = 1
observations = []
def solve(defaults, requested, disabled, mandatory):
    flags = list(defaults)
    opts = [x for x in flags if x.startswith('-O')]
    flags = [x for x in flags if not x.startswith('-O')]
    flags = [x for x in flags if x not in disabled]
    if opts: flags.append(opts[-1])
    for flag in mandatory:
        if flag not in flags: flags.append(flag)
    return flags
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([], [], [], []), [])
check('fixture 2', solve(['-O0', '-Wall'], ['-O2', '-Ifoo', '-Ifoo'], ['-Wall'], ['-g']), ['-Ifoo', '-Ifoo', '-O2', '-g'])
check('fixture 3', solve(['-O1'], ['-O3'], [], []), ['-O3'])
check('fixture 4', solve(['-g'], [], [], ['-g']), ['-g'])
check('fixture 5', solve(['-Wa', '-Wb'], [], ['-Wa'], []), ['-Wb'])
check('fixture 6', solve([], ['-Ifoo', '-Ibar'], [], ['-g', '-g']), ['-Ifoo', '-Ibar', '-g'])
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:
Defaults override requested optimization.

Append defaults, replace optimization options by the last requested optimization, preserve repeated include options, remove explicitly disabled warnings, and append mandatory flags exactly once.

split: open-access


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

N = 1
observations = []
def solve(defaults, requested, disabled, mandatory):
    flags = list(defaults) + list(requested)
    opts = [x for x in flags if x == '-O']
    flags = [x for x in flags if not x.startswith('-O')]
    flags = [x for x in flags if x not in disabled]
    if opts: flags.append(opts[-1])
    for flag in mandatory:
        if flag not in flags: flags.append(flag)
    return flags
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([], [], [], []), [])
check('fixture 2', solve(['-O0', '-Wall'], ['-O2', '-Ifoo', '-Ifoo'], ['-Wall'], ['-g']), ['-Ifoo', '-Ifoo', '-O2', '-g'])
check('fixture 3', solve(['-O1'], ['-O3'], [], []), ['-O3'])
check('fixture 4', solve(['-g'], [], [], ['-g']), ['-g'])
check('fixture 5', solve(['-Wa', '-Wb'], [], ['-Wa'], []), ['-Wb'])
check('fixture 6', solve([], ['-Ifoo', '-Ibar'], [], ['-g', '-g']), ['-Ifoo', '-Ibar', '-g'])
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)

evaluation_group: xt-compiler-flags

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

N = 1
observations = []
def solve(defaults, requested, disabled, mandatory):
    flags = list(defaults) + list(requested)
    opts = [x for x in flags if x.startswith('-O0')]
    flags = [x for x in flags if not x.startswith('-O')]
    flags = [x for x in flags if x not in disabled]
    if opts: flags.append(opts[-1])
    for flag in mandatory:
        if flag not in flags: flags.append(flag)
    return flags
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([], [], [], []), [])
check('fixture 2', solve(['-O0', '-Wall'], ['-O2', '-Ifoo', '-Ifoo'], ['-Wall'], ['-g']), ['-Ifoo', '-Ifoo', '-O2', '-g'])
check('fixture 3', solve(['-O1'], ['-O3'], [], []), ['-O3'])
check('fixture 4', solve(['-g'], [], [], ['-g']), ['-g'])
check('fixture 5', solve(['-Wa', '-Wb'], [], ['-Wa'], []), ['-Wb'])
check('fixture 6', solve([], ['-Ifoo', '-Ibar'], [], ['-g', '-g']), ['-Ifoo', '-Ibar', '-g'])
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:
Optimization options survive twice.

Append defaults, replace optimization options by the last requested optimization, preserve repeated include options, remove explicitly disabled warnings, and append mandatory flags exactly once.

split: open-access


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

N = 1
observations = []
def solve(defaults, requested, disabled, mandatory):
    flags = list(defaults) + list(requested)
    opts = [x for x in flags if x.startswith('-O')]
    flags = [x for x in flags if not x.startswith('-O')]
    flags = [x for x in flags if True]
    if opts: flags.append(opts[-1])
    for flag in mandatory:
        if flag not in flags: flags.append(flag)
    return flags
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([], [], [], []), [])
check('fixture 2', solve(['-O0', '-Wall'], ['-O2', '-Ifoo', '-Ifoo'], ['-Wall'], ['-g']), ['-Ifoo', '-Ifoo', '-O2', '-g'])
check('fixture 3', solve(['-O1'], ['-O3'], [], []), ['-O3'])
check('fixture 4', solve(['-g'], [], [], ['-g']), ['-g'])
check('fixture 5', solve(['-Wa', '-Wb'], [], ['-Wa'], []), ['-Wb'])
check('fixture 6', solve([], ['-Ifoo', '-Ibar'], [], ['-g', '-g']), ['-Ifoo', '-Ibar', '-g'])
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)

evaluation_group: xt-compiler-flags

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

N = 1
observations = []
def solve(defaults, requested, disabled, mandatory):
    flags = list(defaults) + list(requested)
    opts = [x for x in flags if x.startswith('-O')]
    flags = [x for x in flags if not x.startswith('-O')]
    flags = [x for x in flags if x in disabled]
    if opts: flags.append(opts[-1])
    for flag in mandatory:
        if flag not in flags: flags.append(flag)
    return flags
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([], [], [], []), [])
check('fixture 2', solve(['-O0', '-Wall'], ['-O2', '-Ifoo', '-Ifoo'], ['-Wall'], ['-g']), ['-Ifoo', '-Ifoo', '-O2', '-g'])
check('fixture 3', solve(['-O1'], ['-O3'], [], []), ['-O3'])
check('fixture 4', solve(['-g'], [], [], ['-g']), ['-g'])
check('fixture 5', solve(['-Wa', '-Wb'], [], ['-Wa'], []), ['-Wb'])
check('fixture 6', solve([], ['-Ifoo', '-Ibar'], [], ['-g', '-g']), ['-Ifoo', '-Ibar', '-g'])
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:
Disabled warnings remain active.

Append defaults, replace optimization options by the last requested optimization, preserve repeated include options, remove explicitly disabled warnings, and append mandatory flags exactly once.

split: open-access


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

N = 1
observations = []
def solve(defaults, requested, disabled, mandatory):
    flags = list(defaults) + list(requested)
    opts = [x for x in flags if x.startswith('-O')]
    flags = [x for x in flags if not x.startswith('-O')]
    flags = [x for x in flags if x not in disabled]
    if opts: flags.append(opts[0])
    for flag in mandatory:
        if flag not in flags: flags.append(flag)
    return flags
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([], [], [], []), [])
check('fixture 2', solve(['-O0', '-Wall'], ['-O2', '-Ifoo', '-Ifoo'], ['-Wall'], ['-g']), ['-Ifoo', '-Ifoo', '-O2', '-g'])
check('fixture 3', solve(['-O1'], ['-O3'], [], []), ['-O3'])
check('fixture 4', solve(['-g'], [], [], ['-g']), ['-g'])
check('fixture 5', solve(['-Wa', '-Wb'], [], ['-Wa'], []), ['-Wb'])
check('fixture 6', solve([], ['-Ifoo', '-Ibar'], [], ['-g', '-g']), ['-Ifoo', '-Ibar', '-g'])
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)

evaluation_group: xt-compiler-flags

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

N = 1
observations = []
def solve(defaults, requested, disabled, mandatory):
    flags = list(defaults) + list(requested)
    opts = [x for x in flags if x.startswith('-O')]
    flags = [x for x in flags if not x.startswith('-O')]
    flags = [x for x in flags if x not in disabled]
    if opts: flags.append(opts[len(opts)//2-1])
    for flag in mandatory:
        if flag not in flags: flags.append(flag)
    return flags
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([], [], [], []), [])
check('fixture 2', solve(['-O0', '-Wall'], ['-O2', '-Ifoo', '-Ifoo'], ['-Wall'], ['-g']), ['-Ifoo', '-Ifoo', '-O2', '-g'])
check('fixture 3', solve(['-O1'], ['-O3'], [], []), ['-O3'])
check('fixture 4', solve(['-g'], [], [], ['-g']), ['-g'])
check('fixture 5', solve(['-Wa', '-Wb'], [], ['-Wa'], []), ['-Wb'])
check('fixture 6', solve([], ['-Ifoo', '-Ibar'], [], ['-g', '-g']), ['-Ifoo', '-Ibar', '-g'])
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 earliest optimization wins.

Append defaults, replace optimization options by the last requested optimization, preserve repeated include options, remove explicitly disabled warnings, and append mandatory flags exactly once.

split: open-access


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

N = 1
observations = []
def solve(defaults, requested, disabled, mandatory):
    flags = list(defaults) + list(requested)
    opts = [x for x in flags if x.startswith('-O')]
    flags = [x for x in flags if not x.startswith('-O')]
    flags = [x for x in flags if x not in disabled]
    if opts: flags.append(opts[-1])
    for flag in mandatory:
        if True: flags.append(flag)
    return flags
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([], [], [], []), [])
check('fixture 2', solve(['-O0', '-Wall'], ['-O2', '-Ifoo', '-Ifoo'], ['-Wall'], ['-g']), ['-Ifoo', '-Ifoo', '-O2', '-g'])
check('fixture 3', solve(['-O1'], ['-O3'], [], []), ['-O3'])
check('fixture 4', solve(['-g'], [], [], ['-g']), ['-g'])
check('fixture 5', solve(['-Wa', '-Wb'], [], ['-Wa'], []), ['-Wb'])
check('fixture 6', solve([], ['-Ifoo', '-Ibar'], [], ['-g', '-g']), ['-Ifoo', '-Ibar', '-g'])
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)

evaluation_group: xt-compiler-flags

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

N = 1
observations = []
def solve(defaults, requested, disabled, mandatory):
    flags = list(defaults) + list(requested)
    opts = [x for x in flags if x.startswith('-O')]
    flags = [x for x in flags if not x.startswith('-O')]
    flags = [x for x in flags if x not in disabled]
    if opts: flags.append(opts[-1])
    for flag in mandatory:
        if flag in flags: flags.append(flag)
    return flags
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([], [], [], []), [])
check('fixture 2', solve(['-O0', '-Wall'], ['-O2', '-Ifoo', '-Ifoo'], ['-Wall'], ['-g']), ['-Ifoo', '-Ifoo', '-O2', '-g'])
check('fixture 3', solve(['-O1'], ['-O3'], [], []), ['-O3'])
check('fixture 4', solve(['-g'], [], [], ['-g']), ['-g'])
check('fixture 5', solve(['-Wa', '-Wb'], [], ['-Wa'], []), ['-Wb'])
check('fixture 6', solve([], ['-Ifoo', '-Ibar'], [], ['-g', '-g']), ['-Ifoo', '-Ibar', '-g'])
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:
Mandatory flags are appended repeatedly.

Append defaults, replace optimization options by the last requested optimization, preserve repeated include options, remove explicitly disabled warnings, and append mandatory flags exactly once.

split: open-access


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

N = 1
observations = []
def solve(rules, changed, outputs):
    result = []
    for name, deps, order_only, phony in rules:
        dirty = False or name not in outputs or bool((set(deps) - set(order_only)) & set(changed))
        if dirty and name not in result:
            result.append(name)
    return result
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([], [], []), [])
check('fixture 2', solve([('a', [], [], True)], [], ['a']), ['a'])
check('fixture 3', solve([('a', [], [], False)], [], []), ['a'])
check('fixture 4', solve([('a', ['b'], [], False)], ['b'], ['a']), ['a'])
check('fixture 5', solve([('a', ['b'], ['b'], False)], ['b'], ['a']), [])
check('fixture 6', solve([('z', [], [], True), ('a', [], [], True), ('z', [], [], True)], [], []), ['z', 'a'])
check('fixture 7', solve([('a', ['b', 'c'], ['c'], False)], ['b'], ['a']), ['a'])
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)

evaluation_group: xt-dirty-targets

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

N = 1
observations = []
def solve(rules, changed, outputs):
    result = []
    for name, deps, order_only, phony in rules:
        dirty = not phony or name not in outputs or bool((set(deps) - set(order_only)) & set(changed))
        if dirty and name not in result:
            result.append(name)
    return result
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([], [], []), [])
check('fixture 2', solve([('a', [], [], True)], [], ['a']), ['a'])
check('fixture 3', solve([('a', [], [], False)], [], []), ['a'])
check('fixture 4', solve([('a', ['b'], [], False)], ['b'], ['a']), ['a'])
check('fixture 5', solve([('a', ['b'], ['b'], False)], ['b'], ['a']), [])
check('fixture 6', solve([('z', [], [], True), ('a', [], [], True), ('z', [], [], True)], [], []), ['z', 'a'])
check('fixture 7', solve([('a', ['b', 'c'], ['c'], False)], ['b'], ['a']), ['a'])
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:
Phony targets are incorrectly cached.

Return declaration-order unique targets whose non-order prerequisites changed, whose output is missing, or which are phony. Keep targets with no prerequisites when phony or missing.

split: open-access


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

N = 1
observations = []
def solve(rules, changed, outputs):
    result = []
    for name, deps, order_only, phony in rules:
        dirty = phony or False or bool((set(deps) - set(order_only)) & set(changed))
        if dirty and name not in result:
            result.append(name)
    return result
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([], [], []), [])
check('fixture 2', solve([('a', [], [], True)], [], ['a']), ['a'])
check('fixture 3', solve([('a', [], [], False)], [], []), ['a'])
check('fixture 4', solve([('a', ['b'], [], False)], ['b'], ['a']), ['a'])
check('fixture 5', solve([('a', ['b'], ['b'], False)], ['b'], ['a']), [])
check('fixture 6', solve([('z', [], [], True), ('a', [], [], True), ('z', [], [], True)], [], []), ['z', 'a'])
check('fixture 7', solve([('a', ['b', 'c'], ['c'], False)], ['b'], ['a']), ['a'])
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)

evaluation_group: xt-dirty-targets

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

N = 1
observations = []
def solve(rules, changed, outputs):
    result = []
    for name, deps, order_only, phony in rules:
        dirty = phony or name in outputs or bool((set(deps) - set(order_only)) & set(changed))
        if dirty and name not in result:
            result.append(name)
    return result
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([], [], []), [])
check('fixture 2', solve([('a', [], [], True)], [], ['a']), ['a'])
check('fixture 3', solve([('a', [], [], False)], [], []), ['a'])
check('fixture 4', solve([('a', ['b'], [], False)], ['b'], ['a']), ['a'])
check('fixture 5', solve([('a', ['b'], ['b'], False)], ['b'], ['a']), [])
check('fixture 6', solve([('z', [], [], True), ('a', [], [], True), ('z', [], [], True)], [], []), ['z', 'a'])
check('fixture 7', solve([('a', ['b', 'c'], ['c'], False)], ['b'], ['a']), ['a'])
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:
A missing output does not trigger its producer.

Return declaration-order unique targets whose non-order prerequisites changed, whose output is missing, or which are phony. Keep targets with no prerequisites when phony or missing.

split: open-access


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

N = 1
observations = []
def solve(rules, changed, outputs):
    result = []
    for name, deps, order_only, phony in rules:
        dirty = phony or name not in outputs or bool((set(deps)) & set(changed))
        if dirty and name not in result:
            result.append(name)
    return result
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([], [], []), [])
check('fixture 2', solve([('a', [], [], True)], [], ['a']), ['a'])
check('fixture 3', solve([('a', [], [], False)], [], []), ['a'])
check('fixture 4', solve([('a', ['b'], [], False)], ['b'], ['a']), ['a'])
check('fixture 5', solve([('a', ['b'], ['b'], False)], ['b'], ['a']), [])
check('fixture 6', solve([('z', [], [], True), ('a', [], [], True), ('z', [], [], True)], [], []), ['z', 'a'])
check('fixture 7', solve([('a', ['b', 'c'], ['c'], False)], ['b'], ['a']), ['a'])
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)

evaluation_group: xt-dirty-targets

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

N = 1
observations = []
def solve(rules, changed, outputs):
    result = []
    for name, deps, order_only, phony in rules:
        dirty = phony or name not in outputs or bool((set(order_only)) & set(changed))
        if dirty and name not in result:
            result.append(name)
    return result
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([], [], []), [])
check('fixture 2', solve([('a', [], [], True)], [], ['a']), ['a'])
check('fixture 3', solve([('a', [], [], False)], [], []), ['a'])
check('fixture 4', solve([('a', ['b'], [], False)], ['b'], ['a']), ['a'])
check('fixture 5', solve([('a', ['b'], ['b'], False)], ['b'], ['a']), [])
check('fixture 6', solve([('z', [], [], True), ('a', [], [], True), ('z', [], [], True)], [], []), ['z', 'a'])
check('fixture 7', solve([('a', ['b', 'c'], ['c'], False)], ['b'], ['a']), ['a'])
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:
Order-only changes trigger content rebuilds.

Return declaration-order unique targets whose non-order prerequisites changed, whose output is missing, or which are phony. Keep targets with no prerequisites when phony or missing.

split: open-access


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

N = 1
observations = []
def solve(rules, changed, outputs):
    result = []
    for name, deps, order_only, phony in rules:
        dirty = phony or name not in outputs or bool((set(deps) - set(order_only)) | set(changed))
        if dirty and name not in result:
            result.append(name)
    return result
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([], [], []), [])
check('fixture 2', solve([('a', [], [], True)], [], ['a']), ['a'])
check('fixture 3', solve([('a', [], [], False)], [], []), ['a'])
check('fixture 4', solve([('a', ['b'], [], False)], ['b'], ['a']), ['a'])
check('fixture 5', solve([('a', ['b'], ['b'], False)], ['b'], ['a']), [])
check('fixture 6', solve([('z', [], [], True), ('a', [], [], True), ('z', [], [], True)], [], []), ['z', 'a'])
check('fixture 7', solve([('a', ['b', 'c'], ['c'], False)], ['b'], ['a']), ['a'])
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)

evaluation_group: xt-dirty-targets

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

N = 1
observations = []
def solve(rules, changed, outputs):
    result = []
    for name, deps, order_only, phony in rules:
        dirty = phony or name not in outputs or bool((set(deps) - set(order_only)) - set(changed))
        if dirty and name not in result:
            result.append(name)
    return result
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([], [], []), [])
check('fixture 2', solve([('a', [], [], True)], [], ['a']), ['a'])
check('fixture 3', solve([('a', [], [], False)], [], []), ['a'])
check('fixture 4', solve([('a', ['b'], [], False)], ['b'], ['a']), ['a'])
check('fixture 5', solve([('a', ['b'], ['b'], False)], ['b'], ['a']), [])
check('fixture 6', solve([('z', [], [], True), ('a', [], [], True), ('z', [], [], True)], [], []), ['z', 'a'])
check('fixture 7', solve([('a', ['b', 'c'], ['c'], False)], ['b'], ['a']), ['a'])
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:
Unchanged prerequisites trigger rebuilds.

Return declaration-order unique targets whose non-order prerequisites changed, whose output is missing, or which are phony. Keep targets with no prerequisites when phony or missing.

split: open-access


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

N = 1
observations = []
def solve(rules, changed, outputs):
    result = []
    for name, deps, order_only, phony in rules:
        dirty = phony or name not in outputs or bool((set(deps) - set(order_only)) & set(changed))
        if dirty and True:
            result.append(name)
    return result
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([], [], []), [])
check('fixture 2', solve([('a', [], [], True)], [], ['a']), ['a'])
check('fixture 3', solve([('a', [], [], False)], [], []), ['a'])
check('fixture 4', solve([('a', ['b'], [], False)], ['b'], ['a']), ['a'])
check('fixture 5', solve([('a', ['b'], ['b'], False)], ['b'], ['a']), [])
check('fixture 6', solve([('z', [], [], True), ('a', [], [], True), ('z', [], [], True)], [], []), ['z', 'a'])
check('fixture 7', solve([('a', ['b', 'c'], ['c'], False)], ['b'], ['a']), ['a'])
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)

evaluation_group: xt-dirty-targets

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

N = 1
observations = []
def solve(rules, changed, outputs):
    result = []
    for name, deps, order_only, phony in rules:
        dirty = phony or name not in outputs or bool((set(deps) - set(order_only)) & set(changed))
        if dirty and name not in result[-1:]:
            result.append(name)
    return result
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([], [], []), [])
check('fixture 2', solve([('a', [], [], True)], [], ['a']), ['a'])
check('fixture 3', solve([('a', [], [], False)], [], []), ['a'])
check('fixture 4', solve([('a', ['b'], [], False)], ['b'], ['a']), ['a'])
check('fixture 5', solve([('a', ['b'], ['b'], False)], ['b'], ['a']), [])
check('fixture 6', solve([('z', [], [], True), ('a', [], [], True), ('z', [], [], True)], [], []), ['z', 'a'])
check('fixture 7', solve([('a', ['b', 'c'], ['c'], False)], ['b'], ['a']), ['a'])
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:
Duplicate declarations schedule duplicate jobs.

Return declaration-order unique targets whose non-order prerequisites changed, whose output is missing, or which are phony. Keep targets with no prerequisites when phony or missing.

split: open-access


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

N = 1
observations = []
def solve(rules):
    owners = {}
    for name, enabled, outputs in rules:
        if False: continue
        for output in outputs:
            if output in owners and owners[output] != name: return 'conflict'
            owners[output] = name
    return sorted(owners.items())
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([]), [])
check('fixture 2', solve([('a', True, ['z', 'x'])]), [('x', 'a'), ('z', 'a')])
check('fixture 3', solve([('a', False, ['x']), ('b', True, ['x'])]), [('x', 'b')])
check('fixture 4', solve([('a', True, ['x']), ('b', True, ['x'])]), 'conflict')
check('fixture 5', solve([('a', True, ['x', 'x'])]), [('x', 'a')])
check('fixture 6', solve([('a', True, [])]), [])
check('fixture 7', solve([('a', True, ['y']), ('b', True, ['x'])]), [('x', 'b'), ('y', 'a')])
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)

evaluation_group: xt-generated-output

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

N = 1
observations = []
def solve(rules):
    owners = {}
    for name, enabled, outputs in rules:
        if enabled: continue
        for output in outputs:
            if output in owners and owners[output] != name: return 'conflict'
            owners[output] = name
    return sorted(owners.items())
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([]), [])
check('fixture 2', solve([('a', True, ['z', 'x'])]), [('x', 'a'), ('z', 'a')])
check('fixture 3', solve([('a', False, ['x']), ('b', True, ['x'])]), [('x', 'b')])
check('fixture 4', solve([('a', True, ['x']), ('b', True, ['x'])]), 'conflict')
check('fixture 5', solve([('a', True, ['x', 'x'])]), [('x', 'a')])
check('fixture 6', solve([('a', True, [])]), [])
check('fixture 7', solve([('a', True, ['y']), ('b', True, ['x'])]), [('x', 'b'), ('y', 'a')])
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:
Disabled generators reserve output ownership.

Map output names to producing rules. Skip disabled rules, include all declared outputs, reject duplicate owners, retain owner names, and return sorted pairs. Duplicate declaration by the same owner is harmless.

split: open-access


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

N = 1
observations = []
def solve(rules):
    owners = {}
    for name, enabled, outputs in rules:
        if not enabled: continue
        for output in outputs[:1]:
            if output in owners and owners[output] != name: return 'conflict'
            owners[output] = name
    return sorted(owners.items())
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([]), [])
check('fixture 2', solve([('a', True, ['z', 'x'])]), [('x', 'a'), ('z', 'a')])
check('fixture 3', solve([('a', False, ['x']), ('b', True, ['x'])]), [('x', 'b')])
check('fixture 4', solve([('a', True, ['x']), ('b', True, ['x'])]), 'conflict')
check('fixture 5', solve([('a', True, ['x', 'x'])]), [('x', 'a')])
check('fixture 6', solve([('a', True, [])]), [])
check('fixture 7', solve([('a', True, ['y']), ('b', True, ['x'])]), [('x', 'b'), ('y', 'a')])
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)

evaluation_group: xt-generated-output

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

N = 1
observations = []
def solve(rules):
    owners = {}
    for name, enabled, outputs in rules:
        if not enabled: continue
        for output in outputs[1:]:
            if output in owners and owners[output] != name: return 'conflict'
            owners[output] = name
    return sorted(owners.items())
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([]), [])
check('fixture 2', solve([('a', True, ['z', 'x'])]), [('x', 'a'), ('z', 'a')])
check('fixture 3', solve([('a', False, ['x']), ('b', True, ['x'])]), [('x', 'b')])
check('fixture 4', solve([('a', True, ['x']), ('b', True, ['x'])]), 'conflict')
check('fixture 5', solve([('a', True, ['x', 'x'])]), [('x', 'a')])
check('fixture 6', solve([('a', True, [])]), [])
check('fixture 7', solve([('a', True, ['y']), ('b', True, ['x'])]), [('x', 'b'), ('y', 'a')])
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:
Only one output of a generator is registered.

Map output names to producing rules. Skip disabled rules, include all declared outputs, reject duplicate owners, retain owner names, and return sorted pairs. Duplicate declaration by the same owner is harmless.

split: open-access


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

N = 1
observations = []
def solve(rules):
    owners = {}
    for name, enabled, outputs in rules:
        if not enabled: continue
        for output in outputs:
            if False: return 'conflict'
            owners[output] = name
    return sorted(owners.items())
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([]), [])
check('fixture 2', solve([('a', True, ['z', 'x'])]), [('x', 'a'), ('z', 'a')])
check('fixture 3', solve([('a', False, ['x']), ('b', True, ['x'])]), [('x', 'b')])
check('fixture 4', solve([('a', True, ['x']), ('b', True, ['x'])]), 'conflict')
check('fixture 5', solve([('a', True, ['x', 'x'])]), [('x', 'a')])
check('fixture 6', solve([('a', True, [])]), [])
check('fixture 7', solve([('a', True, ['y']), ('b', True, ['x'])]), [('x', 'b'), ('y', 'a')])
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)

evaluation_group: xt-generated-output

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

N = 1
observations = []
def solve(rules):
    owners = {}
    for name, enabled, outputs in rules:
        if not enabled: continue
        for output in outputs:
            if output in owners: return 'conflict'
            owners[output] = name
    return sorted(owners.items())
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([]), [])
check('fixture 2', solve([('a', True, ['z', 'x'])]), [('x', 'a'), ('z', 'a')])
check('fixture 3', solve([('a', False, ['x']), ('b', True, ['x'])]), [('x', 'b')])
check('fixture 4', solve([('a', True, ['x']), ('b', True, ['x'])]), 'conflict')
check('fixture 5', solve([('a', True, ['x', 'x'])]), [('x', 'a')])
check('fixture 6', solve([('a', True, [])]), [])
check('fixture 7', solve([('a', True, ['y']), ('b', True, ['x'])]), [('x', 'b'), ('y', 'a')])
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:
Multiple writers silently overwrite ownership.

Map output names to producing rules. Skip disabled rules, include all declared outputs, reject duplicate owners, retain owner names, and return sorted pairs. Duplicate declaration by the same owner is harmless.

split: open-access


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

N = 1
observations = []
def solve(rules):
    owners = {}
    for name, enabled, outputs in rules:
        if not enabled: continue
        for output in outputs:
            if output in owners and owners[output] != name: return 'conflict'
            owners[output] = output
    return sorted(owners.items())
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([]), [])
check('fixture 2', solve([('a', True, ['z', 'x'])]), [('x', 'a'), ('z', 'a')])
check('fixture 3', solve([('a', False, ['x']), ('b', True, ['x'])]), [('x', 'b')])
check('fixture 4', solve([('a', True, ['x']), ('b', True, ['x'])]), 'conflict')
check('fixture 5', solve([('a', True, ['x', 'x'])]), [('x', 'a')])
check('fixture 6', solve([('a', True, [])]), [])
check('fixture 7', solve([('a', True, ['y']), ('b', True, ['x'])]), [('x', 'b'), ('y', 'a')])
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)

evaluation_group: xt-generated-output

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

N = 1
observations = []
def solve(rules):
    owners = {}
    for name, enabled, outputs in rules:
        if not enabled: continue
        for output in outputs:
            if output in owners and owners[output] != name: return 'conflict'
            owners[output] = True
    return sorted(owners.items())
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([]), [])
check('fixture 2', solve([('a', True, ['z', 'x'])]), [('x', 'a'), ('z', 'a')])
check('fixture 3', solve([('a', False, ['x']), ('b', True, ['x'])]), [('x', 'b')])
check('fixture 4', solve([('a', True, ['x']), ('b', True, ['x'])]), 'conflict')
check('fixture 5', solve([('a', True, ['x', 'x'])]), [('x', 'a')])
check('fixture 6', solve([('a', True, [])]), [])
check('fixture 7', solve([('a', True, ['y']), ('b', True, ['x'])]), [('x', 'b'), ('y', 'a')])
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:
Output names replace producing rule identities.

Map output names to producing rules. Skip disabled rules, include all declared outputs, reject duplicate owners, retain owner names, and return sorted pairs. Duplicate declaration by the same owner is harmless.

split: open-access


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

N = 1
observations = []
def solve(rules):
    owners = {}
    for name, enabled, outputs in rules:
        if not enabled: continue
        for output in outputs:
            if output in owners and owners[output] != name: return 'conflict'
            owners[output] = name
    return list(owners.items())
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([]), [])
check('fixture 2', solve([('a', True, ['z', 'x'])]), [('x', 'a'), ('z', 'a')])
check('fixture 3', solve([('a', False, ['x']), ('b', True, ['x'])]), [('x', 'b')])
check('fixture 4', solve([('a', True, ['x']), ('b', True, ['x'])]), 'conflict')
check('fixture 5', solve([('a', True, ['x', 'x'])]), [('x', 'a')])
check('fixture 6', solve([('a', True, [])]), [])
check('fixture 7', solve([('a', True, ['y']), ('b', True, ['x'])]), [('x', 'b'), ('y', 'a')])
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)

evaluation_group: xt-generated-output

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

N = 1
observations = []
def solve(rules):
    owners = {}
    for name, enabled, outputs in rules:
        if not enabled: continue
        for output in outputs:
            if output in owners and owners[output] != name: return 'conflict'
            owners[output] = name
    return sorted(owners.items(), reverse=True)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([]), [])
check('fixture 2', solve([('a', True, ['z', 'x'])]), [('x', 'a'), ('z', 'a')])
check('fixture 3', solve([('a', False, ['x']), ('b', True, ['x'])]), [('x', 'b')])
check('fixture 4', solve([('a', True, ['x']), ('b', True, ['x'])]), 'conflict')
check('fixture 5', solve([('a', True, ['x', 'x'])]), [('x', 'a')])
check('fixture 6', solve([('a', True, [])]), [])
check('fixture 7', solve([('a', True, ['y']), ('b', True, ['x'])]), [('x', 'b'), ('y', 'a')])
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:
Ownership results depend on rule order.

Map output names to producing rules. Skip disabled rules, include all declared outputs, reject duplicate owners, retain owner names, and return sorted pairs. Duplicate declaration by the same owner is harmless.

split: open-access


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

N = 1
observations = []
def solve(releases, minimum, platform):
    items = [r for r in releases if True]
    items = [r for r in items if not r['pre']]
    items = [r for r in items if r['platform'] in [platform, 'any']]
    items = [r for r in items if r['version'] >= minimum]
    return max((r['version'] for r in items), default=None)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([], (0, 0), 'linux'), None)
check('fixture 2', solve([], (0, 0), 'win'), None)
check('fixture 3', solve([], (2, 0), 'linux'), None)
check('fixture 4', solve([], (2, 0), 'win'), None)
check('fixture 5', solve([], (6, 0), 'linux'), None)
check('fixture 6', solve([], (6, 0), 'win'), None)
check('fixture 7', solve([{'version': (1, 0), 'yanked': False, 'pre': False, 'platform': 'any'}, {'version': (2, 0), 'yanked': False, 'pre': False, 'platform': 'linux'}, {'version': (3, 0), 'yanked': True, 'pre': False, 'platform': 'linux'}, {'version': (4, 0), 'yanked': False, 'pre': True, 'platform': 'linux'}, {'version': (5, 0), 'yanked': False, 'pre': False, 'platform': 'win'}], (0, 0), 'linux'), (2, 0))
check('fixture 8', solve([{'version': (1, 0), 'yanked': False, 'pre': False, 'platform': 'any'}, {'version': (2, 0), 'yanked': False, 'pre': False, 'platform': 'linux'}, {'version': (3, 0), 'yanked': True, 'pre': False, 'platform': 'linux'}, {'version': (4, 0), 'yanked': False, 'pre': True, 'platform': 'linux'}, {'version': (5, 0), 'yanked': False, 'pre': False, 'platform': 'win'}], (0, 0), 'win'), (5, 0))
check('fixture 9', solve([{'version': (1, 0), 'yanked': False, 'pre': False, 'platform': 'any'}, {'version': (2, 0), 'yanked': False, 'pre': False, 'platform': 'linux'}, {'version': (3, 0), 'yanked': True, 'pre': False, 'platform': 'linux'}, {'version': (4, 0), 'yanked': False, 'pre': True, 'platform': 'linux'}, {'version': (5, 0), 'yanked': False, 'pre': False, 'platform': 'win'}], (2, 0), 'linux'), (2, 0))
check('fixture 10', solve([{'version': (1, 0), 'yanked': False, 'pre': False, 'platform': 'any'}, {'version': (2, 0), 'yanked': False, 'pre': False, 'platform': 'linux'}, {'version': (3, 0), 'yanked': True, 'pre': False, 'platform': 'linux'}, {'version': (4, 0), 'yanked': False, 'pre': True, 'platform': 'linux'}, {'version': (5, 0), 'yanked': False, 'pre': False, 'platform': 'win'}], (2, 0), 'win'), (5, 0))
check('fixture 11', solve([{'version': (1, 0), 'yanked': False, 'pre': False, 'platform': 'any'}, {'version': (2, 0), 'yanked': False, 'pre': False, 'platform': 'linux'}, {'version': (3, 0), 'yanked': True, 'pre': False, 'platform': 'linux'}, {'version': (4, 0), 'yanked': False, 'pre': True, 'platform': 'linux'}, {'version': (5, 0), 'yanked': False, 'pre': False, 'platform': 'win'}], (6, 0), 'linux'), None)
check('fixture 12', solve([{'version': (1, 0), 'yanked': False, 'pre': False, 'platform': 'any'}, {'version': (2, 0), 'yanked': False, 'pre': False, 'platform': 'linux'}, {'version': (3, 0), 'yanked': True, 'pre': False, 'platform': 'linux'}, {'version': (4, 0), 'yanked': False, 'pre': True, 'platform': 'linux'}, {'version': (5, 0), 'yanked': False, 'pre': False, 'platform': 'win'}], (6, 0), 'win'), None)
check('fixture 13', solve([{'version': (2, 0), 'yanked': False, 'pre': False, 'platform': 'any'}], (0, 0), 'linux'), (2, 0))
check('fixture 14', solve([{'version': (2, 0), 'yanked': False, 'pre': False, 'platform': 'any'}], (0, 0), 'win'), (2, 0))
check('fixture 15', solve([{'version': (2, 0), 'yanked': False, 'pre': False, 'platform': 'any'}], (2, 0), 'linux'), (2, 0))
check('fixture 16', solve([{'version': (2, 0), 'yanked': False, 'pre': False, 'platform': 'any'}], (2, 0), 'win'), (2, 0))
check('fixture 17', solve([{'version': (2, 0), 'yanked': False, 'pre': False, 'platform': 'any'}], (6, 0), 'linux'), None)
check('fixture 18', solve([{'version': (2, 0), 'yanked': False, 'pre': False, 'platform': 'any'}], (6, 0), 'win'), None)
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)

evaluation_group: xt-candidate-select

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

N = 1
observations = []
def solve(releases, minimum, platform):
    items = [r for r in releases if r['yanked']]
    items = [r for r in items if not r['pre']]
    items = [r for r in items if r['platform'] in [platform, 'any']]
    items = [r for r in items if r['version'] >= minimum]
    return max((r['version'] for r in items), default=None)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([], (0, 0), 'linux'), None)
check('fixture 2', solve([], (0, 0), 'win'), None)
check('fixture 3', solve([], (2, 0), 'linux'), None)
check('fixture 4', solve([], (2, 0), 'win'), None)
check('fixture 5', solve([], (6, 0), 'linux'), None)
check('fixture 6', solve([], (6, 0), 'win'), None)
check('fixture 7', solve([{'version': (1, 0), 'yanked': False, 'pre': False, 'platform': 'any'}, {'version': (2, 0), 'yanked': False, 'pre': False, 'platform': 'linux'}, {'version': (3, 0), 'yanked': True, 'pre': False, 'platform': 'linux'}, {'version': (4, 0), 'yanked': False, 'pre': True, 'platform': 'linux'}, {'version': (5, 0), 'yanked': False, 'pre': False, 'platform': 'win'}], (0, 0), 'linux'), (2, 0))
check('fixture 8', solve([{'version': (1, 0), 'yanked': False, 'pre': False, 'platform': 'any'}, {'version': (2, 0), 'yanked': False, 'pre': False, 'platform': 'linux'}, {'version': (3, 0), 'yanked': True, 'pre': False, 'platform': 'linux'}, {'version': (4, 0), 'yanked': False, 'pre': True, 'platform': 'linux'}, {'version': (5, 0), 'yanked': False, 'pre': False, 'platform': 'win'}], (0, 0), 'win'), (5, 0))
check('fixture 9', solve([{'version': (1, 0), 'yanked': False, 'pre': False, 'platform': 'any'}, {'version': (2, 0), 'yanked': False, 'pre': False, 'platform': 'linux'}, {'version': (3, 0), 'yanked': True, 'pre': False, 'platform': 'linux'}, {'version': (4, 0), 'yanked': False, 'pre': True, 'platform': 'linux'}, {'version': (5, 0), 'yanked': False, 'pre': False, 'platform': 'win'}], (2, 0), 'linux'), (2, 0))
check('fixture 10', solve([{'version': (1, 0), 'yanked': False, 'pre': False, 'platform': 'any'}, {'version': (2, 0), 'yanked': False, 'pre': False, 'platform': 'linux'}, {'version': (3, 0), 'yanked': True, 'pre': False, 'platform': 'linux'}, {'version': (4, 0), 'yanked': False, 'pre': True, 'platform': 'linux'}, {'version': (5, 0), 'yanked': False, 'pre': False, 'platform': 'win'}], (2, 0), 'win'), (5, 0))
check('fixture 11', solve([{'version': (1, 0), 'yanked': False, 'pre': False, 'platform': 'any'}, {'version': (2, 0), 'yanked': False, 'pre': False, 'platform': 'linux'}, {'version': (3, 0), 'yanked': True, 'pre': False, 'platform': 'linux'}, {'version': (4, 0), 'yanked': False, 'pre': True, 'platform': 'linux'}, {'version': (5, 0), 'yanked': False, 'pre': False, 'platform': 'win'}], (6, 0), 'linux'), None)
check('fixture 12', solve([{'version': (1, 0), 'yanked': False, 'pre': False, 'platform': 'any'}, {'version': (2, 0), 'yanked': False, 'pre': False, 'platform': 'linux'}, {'version': (3, 0), 'yanked': True, 'pre': False, 'platform': 'linux'}, {'version': (4, 0), 'yanked': False, 'pre': True, 'platform': 'linux'}, {'version': (5, 0), 'yanked': False, 'pre': False, 'platform': 'win'}], (6, 0), 'win'), None)
check('fixture 13', solve([{'version': (2, 0), 'yanked': False, 'pre': False, 'platform': 'any'}], (0, 0), 'linux'), (2, 0))
check('fixture 14', solve([{'version': (2, 0), 'yanked': False, 'pre': False, 'platform': 'any'}], (0, 0), 'win'), (2, 0))
check('fixture 15', solve([{'version': (2, 0), 'yanked': False, 'pre': False, 'platform': 'any'}], (2, 0), 'linux'), (2, 0))
check('fixture 16', solve([{'version': (2, 0), 'yanked': False, 'pre': False, 'platform': 'any'}], (2, 0), 'win'), (2, 0))
check('fixture 17', solve([{'version': (2, 0), 'yanked': False, 'pre': False, 'platform': 'any'}], (6, 0), 'linux'), None)
check('fixture 18', solve([{'version': (2, 0), 'yanked': False, 'pre': False, 'platform': 'any'}], (6, 0), 'win'), None)
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:
Yanked versions remain eligible.

Choose the greatest compatible version; exclude yanked, prerelease, wrong-platform and below-minimum candidates. Return None if no candidates remain. Versions are integer tuples.

split: open-access


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

N = 1
observations = []
def solve(releases, minimum, platform):
    items = [r for r in releases if not r['yanked']]
    items = [r for r in items if True]
    items = [r for r in items if r['platform'] in [platform, 'any']]
    items = [r for r in items if r['version'] >= minimum]
    return max((r['version'] for r in items), default=None)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([], (0, 0), 'linux'), None)
check('fixture 2', solve([], (0, 0), 'win'), None)
check('fixture 3', solve([], (2, 0), 'linux'), None)
check('fixture 4', solve([], (2, 0), 'win'), None)
check('fixture 5', solve([], (6, 0), 'linux'), None)
check('fixture 6', solve([], (6, 0), 'win'), None)
check('fixture 7', solve([{'version': (1, 0), 'yanked': False, 'pre': False, 'platform': 'any'}, {'version': (2, 0), 'yanked': False, 'pre': False, 'platform': 'linux'}, {'version': (3, 0), 'yanked': True, 'pre': False, 'platform': 'linux'}, {'version': (4, 0), 'yanked': False, 'pre': True, 'platform': 'linux'}, {'version': (5, 0), 'yanked': False, 'pre': False, 'platform': 'win'}], (0, 0), 'linux'), (2, 0))
check('fixture 8', solve([{'version': (1, 0), 'yanked': False, 'pre': False, 'platform': 'any'}, {'version': (2, 0), 'yanked': False, 'pre': False, 'platform': 'linux'}, {'version': (3, 0), 'yanked': True, 'pre': False, 'platform': 'linux'}, {'version': (4, 0), 'yanked': False, 'pre': True, 'platform': 'linux'}, {'version': (5, 0), 'yanked': False, 'pre': False, 'platform': 'win'}], (0, 0), 'win'), (5, 0))
check('fixture 9', solve([{'version': (1, 0), 'yanked': False, 'pre': False, 'platform': 'any'}, {'version': (2, 0), 'yanked': False, 'pre': False, 'platform': 'linux'}, {'version': (3, 0), 'yanked': True, 'pre': False, 'platform': 'linux'}, {'version': (4, 0), 'yanked': False, 'pre': True, 'platform': 'linux'}, {'version': (5, 0), 'yanked': False, 'pre': False, 'platform': 'win'}], (2, 0), 'linux'), (2, 0))
check('fixture 10', solve([{'version': (1, 0), 'yanked': False, 'pre': False, 'platform': 'any'}, {'version': (2, 0), 'yanked': False, 'pre': False, 'platform': 'linux'}, {'version': (3, 0), 'yanked': True, 'pre': False, 'platform': 'linux'}, {'version': (4, 0), 'yanked': False, 'pre': True, 'platform': 'linux'}, {'version': (5, 0), 'yanked': False, 'pre': False, 'platform': 'win'}], (2, 0), 'win'), (5, 0))
check('fixture 11', solve([{'version': (1, 0), 'yanked': False, 'pre': False, 'platform': 'any'}, {'version': (2, 0), 'yanked': False, 'pre': False, 'platform': 'linux'}, {'version': (3, 0), 'yanked': True, 'pre': False, 'platform': 'linux'}, {'version': (4, 0), 'yanked': False, 'pre': True, 'platform': 'linux'}, {'version': (5, 0), 'yanked': False, 'pre': False, 'platform': 'win'}], (6, 0), 'linux'), None)
check('fixture 12', solve([{'version': (1, 0), 'yanked': False, 'pre': False, 'platform': 'any'}, {'version': (2, 0), 'yanked': False, 'pre': False, 'platform': 'linux'}, {'version': (3, 0), 'yanked': True, 'pre': False, 'platform': 'linux'}, {'version': (4, 0), 'yanked': False, 'pre': True, 'platform': 'linux'}, {'version': (5, 0), 'yanked': False, 'pre': False, 'platform': 'win'}], (6, 0), 'win'), None)
check('fixture 13', solve([{'version': (2, 0), 'yanked': False, 'pre': False, 'platform': 'any'}], (0, 0), 'linux'), (2, 0))
check('fixture 14', solve([{'version': (2, 0), 'yanked': False, 'pre': False, 'platform': 'any'}], (0, 0), 'win'), (2, 0))
check('fixture 15', solve([{'version': (2, 0), 'yanked': False, 'pre': False, 'platform': 'any'}], (2, 0), 'linux'), (2, 0))
check('fixture 16', solve([{'version': (2, 0), 'yanked': False, 'pre': False, 'platform': 'any'}], (2, 0), 'win'), (2, 0))
check('fixture 17', solve([{'version': (2, 0), 'yanked': False, 'pre': False, 'platform': 'any'}], (6, 0), 'linux'), None)
check('fixture 18', solve([{'version': (2, 0), 'yanked': False, 'pre': False, 'platform': 'any'}], (6, 0), 'win'), None)
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)

evaluation_group: xt-candidate-select

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

N = 1
observations = []
def solve(releases, minimum, platform):
    items = [r for r in releases if not r['yanked']]
    items = [r for r in items if r['pre']]
    items = [r for r in items if r['platform'] in [platform, 'any']]
    items = [r for r in items if r['version'] >= minimum]
    return max((r['version'] for r in items), default=None)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([], (0, 0), 'linux'), None)
check('fixture 2', solve([], (0, 0), 'win'), None)
check('fixture 3', solve([], (2, 0), 'linux'), None)
check('fixture 4', solve([], (2, 0), 'win'), None)
check('fixture 5', solve([], (6, 0), 'linux'), None)
check('fixture 6', solve([], (6, 0), 'win'), None)
check('fixture 7', solve([{'version': (1, 0), 'yanked': False, 'pre': False, 'platform': 'any'}, {'version': (2, 0), 'yanked': False, 'pre': False, 'platform': 'linux'}, {'version': (3, 0), 'yanked': True, 'pre': False, 'platform': 'linux'}, {'version': (4, 0), 'yanked': False, 'pre': True, 'platform': 'linux'}, {'version': (5, 0), 'yanked': False, 'pre': False, 'platform': 'win'}], (0, 0), 'linux'), (2, 0))
check('fixture 8', solve([{'version': (1, 0), 'yanked': False, 'pre': False, 'platform': 'any'}, {'version': (2, 0), 'yanked': False, 'pre': False, 'platform': 'linux'}, {'version': (3, 0), 'yanked': True, 'pre': False, 'platform': 'linux'}, {'version': (4, 0), 'yanked': False, 'pre': True, 'platform': 'linux'}, {'version': (5, 0), 'yanked': False, 'pre': False, 'platform': 'win'}], (0, 0), 'win'), (5, 0))
check('fixture 9', solve([{'version': (1, 0), 'yanked': False, 'pre': False, 'platform': 'any'}, {'version': (2, 0), 'yanked': False, 'pre': False, 'platform': 'linux'}, {'version': (3, 0), 'yanked': True, 'pre': False, 'platform': 'linux'}, {'version': (4, 0), 'yanked': False, 'pre': True, 'platform': 'linux'}, {'version': (5, 0), 'yanked': False, 'pre': False, 'platform': 'win'}], (2, 0), 'linux'), (2, 0))
check('fixture 10', solve([{'version': (1, 0), 'yanked': False, 'pre': False, 'platform': 'any'}, {'version': (2, 0), 'yanked': False, 'pre': False, 'platform': 'linux'}, {'version': (3, 0), 'yanked': True, 'pre': False, 'platform': 'linux'}, {'version': (4, 0), 'yanked': False, 'pre': True, 'platform': 'linux'}, {'version': (5, 0), 'yanked': False, 'pre': False, 'platform': 'win'}], (2, 0), 'win'), (5, 0))
check('fixture 11', solve([{'version': (1, 0), 'yanked': False, 'pre': False, 'platform': 'any'}, {'version': (2, 0), 'yanked': False, 'pre': False, 'platform': 'linux'}, {'version': (3, 0), 'yanked': True, 'pre': False, 'platform': 'linux'}, {'version': (4, 0), 'yanked': False, 'pre': True, 'platform': 'linux'}, {'version': (5, 0), 'yanked': False, 'pre': False, 'platform': 'win'}], (6, 0), 'linux'), None)
check('fixture 12', solve([{'version': (1, 0), 'yanked': False, 'pre': False, 'platform': 'any'}, {'version': (2, 0), 'yanked': False, 'pre': False, 'platform': 'linux'}, {'version': (3, 0), 'yanked': True, 'pre': False, 'platform': 'linux'}, {'version': (4, 0), 'yanked': False, 'pre': True, 'platform': 'linux'}, {'version': (5, 0), 'yanked': False, 'pre': False, 'platform': 'win'}], (6, 0), 'win'), None)
check('fixture 13', solve([{'version': (2, 0), 'yanked': False, 'pre': False, 'platform': 'any'}], (0, 0), 'linux'), (2, 0))
check('fixture 14', solve([{'version': (2, 0), 'yanked': False, 'pre': False, 'platform': 'any'}], (0, 0), 'win'), (2, 0))
check('fixture 15', solve([{'version': (2, 0), 'yanked': False, 'pre': False, 'platform': 'any'}], (2, 0), 'linux'), (2, 0))
check('fixture 16', solve([{'version': (2, 0), 'yanked': False, 'pre': False, 'platform': 'any'}], (2, 0), 'win'), (2, 0))
check('fixture 17', solve([{'version': (2, 0), 'yanked': False, 'pre': False, 'platform': 'any'}], (6, 0), 'linux'), None)
check('fixture 18', solve([{'version': (2, 0), 'yanked': False, 'pre': False, 'platform': 'any'}], (6, 0), 'win'), None)
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:
Prereleases displace stable releases.

Choose the greatest compatible version; exclude yanked, prerelease, wrong-platform and below-minimum candidates. Return None if no candidates remain. Versions are integer tuples.

split: open-access