FA-9226 / Build systems / Open access
Build status reduction: An active build reports completion · case 01
An active build reports completion.
ROOT CAUSE
The implementation substitutes if 'running' in states: return 'passed' for if 'running' in states: return 'running', so an active build reports completion.
VERIFIED REPAIR
Distinguish active work from waiting and terminal success.
Unsuccessful approach: The attempted repair substitutes if 'running' in states: return 'waiting'. Fixture 6 still yields 'waiting' instead of 'running'.
Case contract
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.
Why this case matters
An offline model of build status reduction, suitable for testing build and release tooling without external services.
1 / The failure
Exit 1"""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)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1 | passed | passed | Passed |
| fixture 2 | passed | passed | Passed |
| fixture 3 | failed | failed | Passed |
| fixture 4 | cancelled | cancelled | Passed |
| fixture 5 | waiting | waiting | Passed |
| fixture 6 | passed | running | Failed |
| fixture 7 | passed | passed | Passed |
| fixture 8 | waiting | waiting | Passed |
| fixture 9 | passed | passed | Passed |
SHA-256 / d55db279fcab339aecd6008d67a7ab493cc84f1719634b0d19368689fb95f6d9
2 / The unsuccessful fix
Exit 1"""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)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1 | passed | passed | Passed |
| fixture 2 | passed | passed | Passed |
| fixture 3 | failed | failed | Passed |
| fixture 4 | cancelled | cancelled | Passed |
| fixture 5 | waiting | waiting | Passed |
| fixture 6 | waiting | running | Failed |
| fixture 7 | passed | passed | Passed |
| fixture 8 | waiting | waiting | Passed |
| fixture 9 | passed | passed | Passed |
SHA-256 / 643ac86bbd48c3d501bd8cd8f450997dc1b346a51bd18f473d630a7878501556
3 / The verified repair
Exit 0"""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 '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)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1 | passed | passed | Passed |
| fixture 2 | passed | passed | Passed |
| fixture 3 | failed | failed | Passed |
| fixture 4 | cancelled | cancelled | Passed |
| fixture 5 | waiting | waiting | Passed |
| fixture 6 | running | running | Passed |
| fixture 7 | passed | passed | Passed |
| fixture 8 | waiting | waiting | Passed |
| fixture 9 | passed | passed | Passed |
SHA-256 / ebdb6ace53bde76a1b24aa4ce3a9450fc8734382229ce22896a61a15303645cf
Verification & scope
This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.
Observations recorded using Python 3.12.14 at 2026-09-29T14:38:28.089974+00:00.
Case digest / cd283499b5c7732d7bee66ee351736c1bc02b587f5ed472d60e911ad364c5436