FA-9316 / Build systems / Open access
Generated file ownership: Multiple writers silently overwrite ownership · case 01
Multiple writers silently overwrite ownership.
ROOT CAUSE
The implementation substitutes if False: return 'conflict' for if output in owners and owners[output] != name: return 'conflict', so multiple writers silently overwrite ownership.
VERIFIED REPAIR
Reject distinct owners while allowing repeated declarations by one owner.
Unsuccessful approach: The attempted repair substitutes if output in owners: return 'conflict'. Fixture 5 still yields 'conflict' instead of [('x', 'a')].
Case contract
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.
Why this case matters
An offline model of generated file ownership, 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(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)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1 | [] | [] | Passed |
| fixture 2 | [['x', 'a'], ['z', 'a']] | [['x', 'a'], ['z', 'a']] | Passed |
| fixture 3 | [['x', 'b']] | [['x', 'b']] | Passed |
| fixture 4 | [['x', 'b']] | conflict | Failed |
| fixture 5 | [['x', 'a']] | [['x', 'a']] | Passed |
| fixture 6 | [] | [] | Passed |
| fixture 7 | [['x', 'b'], ['y', 'a']] | [['x', 'b'], ['y', 'a']] | Passed |
SHA-256 / 87642fbe3fc42429523b2de4b2cedf128026a0fa9025b5ce03a4586b716f95a9
2 / The unsuccessful fix
Exit 1"""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)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1 | [] | [] | Passed |
| fixture 2 | [['x', 'a'], ['z', 'a']] | [['x', 'a'], ['z', 'a']] | Passed |
| fixture 3 | [['x', 'b']] | [['x', 'b']] | Passed |
| fixture 4 | conflict | conflict | Passed |
| fixture 5 | conflict | [['x', 'a']] | Failed |
| fixture 6 | [] | [] | Passed |
| fixture 7 | [['x', 'b'], ['y', 'a']] | [['x', 'b'], ['y', 'a']] | Passed |
SHA-256 / 0f389638180aafd8d35a6b77b456e28cd0b24cca93c8b0ed8675c789e951559d
3 / The verified repair
Exit 0"""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())
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)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1 | [] | [] | Passed |
| fixture 2 | [['x', 'a'], ['z', 'a']] | [['x', 'a'], ['z', 'a']] | Passed |
| fixture 3 | [['x', 'b']] | [['x', 'b']] | Passed |
| fixture 4 | conflict | conflict | Passed |
| fixture 5 | [['x', 'a']] | [['x', 'a']] | Passed |
| fixture 6 | [] | [] | Passed |
| fixture 7 | [['x', 'b'], ['y', 'a']] | [['x', 'b'], ['y', 'a']] | Passed |
SHA-256 / a3ea30a6f36a4b7551deb24c694597368e1288f85cba9721a4ea90e7b18c21f5
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.969533+00:00.
Case digest / e3af67d3c9d344ee7d8f2011baab0f5798d2fcb12c7444e12d4354980782e035