FA-9156 / Build systems / Open access
Link command assembly: Object order is alphabetized · case 01
Object order is alphabetized.
ROOT CAUSE
The implementation substitutes sorted(objects) for list(objects), so object order is alphabetized.
VERIFIED REPAIR
Preserve the caller-provided object ordering.
Unsuccessful approach: The attempted repair substitutes list(reversed(objects)). Fixture 2 still yields ['a.o', 'b.o', 'x.a', 'y.a', 'x.a', '-framework', 'Core', '-framework', 'UI', '-L', '/lib a', '-L', '/lib b', '-o', 'my app'] instead of ['b.o', 'a.o', 'x.a', 'y.a', 'x.a', '-framework', 'Core', '-framework', 'UI', '-L', '/lib a', '-L', '/lib b', '-o', 'my app'].
Case contract
Emit object arguments first, then each archive in declared order preserving repeats, then frameworks as paired flags, then search directories as paired flags, then the output pair.
Why this case matters
An offline model of link command assembly, 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(objects, archives, frameworks, directories, output):
result = sorted(objects)
result += list(archives)
result += [part for name in frameworks for part in ['-framework', name]]
result += [part for name in directories for part in ['-L', name]]
result += ['-o', output]
return result
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([], [], [], [], 'app'), ['-o', 'app'])
check('fixture 2', solve(['b.o', 'a.o'], ['x.a', 'y.a', 'x.a'], ['Core', 'UI'], ['/lib a', '/lib b'], 'my app'), ['b.o', 'a.o', 'x.a', 'y.a', 'x.a', '-framework', 'Core', '-framework', 'UI', '-L', '/lib a', '-L', '/lib b', '-o', 'my app'])
check('fixture 3', solve(['a.o'], ['b.a'], [], [], 'x'), ['a.o', 'b.a', '-o', 'x'])
check('fixture 4', solve([], [], ['Core'], [], 'x'), ['-framework', 'Core', '-o', 'x'])
check('fixture 5', solve([], [], [], ['space dir'], 'x'), ['-L', 'space dir', '-o', 'x'])
check('fixture 6', solve(['z.o'], [], ['A'], ['D'], 'z'), ['z.o', '-framework', 'A', '-L', 'D', '-o', 'z'])
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 | ['-o', 'app'] | ['-o', 'app'] | Passed |
| fixture 2 | ['a.o', 'b.o', 'x.a', 'y.a', 'x.a', '-framework', 'Core', '-framework', 'UI', '-L', '/lib a', '-L', '/lib b', '-o', 'my app'] | ['b.o', 'a.o', 'x.a', 'y.a', 'x.a', '-framework', 'Core', '-framework', 'UI', '-L', '/lib a', '-L', '/lib b', '-o', 'my app'] | Failed |
| fixture 3 | ['a.o', 'b.a', '-o', 'x'] | ['a.o', 'b.a', '-o', 'x'] | Passed |
| fixture 4 | ['-framework', 'Core', '-o', 'x'] | ['-framework', 'Core', '-o', 'x'] | Passed |
| fixture 5 | ['-L', 'space dir', '-o', 'x'] | ['-L', 'space dir', '-o', 'x'] | Passed |
| fixture 6 | ['z.o', '-framework', 'A', '-L', 'D', '-o', 'z'] | ['z.o', '-framework', 'A', '-L', 'D', '-o', 'z'] | Passed |
SHA-256 / 7bc5333843b8b85ee59fdb2b979312d26cae2dffd1d7f8ae838345dd9dd9e773
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(objects, archives, frameworks, directories, output):
result = list(reversed(objects))
result += list(archives)
result += [part for name in frameworks for part in ['-framework', name]]
result += [part for name in directories for part in ['-L', name]]
result += ['-o', output]
return result
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([], [], [], [], 'app'), ['-o', 'app'])
check('fixture 2', solve(['b.o', 'a.o'], ['x.a', 'y.a', 'x.a'], ['Core', 'UI'], ['/lib a', '/lib b'], 'my app'), ['b.o', 'a.o', 'x.a', 'y.a', 'x.a', '-framework', 'Core', '-framework', 'UI', '-L', '/lib a', '-L', '/lib b', '-o', 'my app'])
check('fixture 3', solve(['a.o'], ['b.a'], [], [], 'x'), ['a.o', 'b.a', '-o', 'x'])
check('fixture 4', solve([], [], ['Core'], [], 'x'), ['-framework', 'Core', '-o', 'x'])
check('fixture 5', solve([], [], [], ['space dir'], 'x'), ['-L', 'space dir', '-o', 'x'])
check('fixture 6', solve(['z.o'], [], ['A'], ['D'], 'z'), ['z.o', '-framework', 'A', '-L', 'D', '-o', 'z'])
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 | ['-o', 'app'] | ['-o', 'app'] | Passed |
| fixture 2 | ['a.o', 'b.o', 'x.a', 'y.a', 'x.a', '-framework', 'Core', '-framework', 'UI', '-L', '/lib a', '-L', '/lib b', '-o', 'my app'] | ['b.o', 'a.o', 'x.a', 'y.a', 'x.a', '-framework', 'Core', '-framework', 'UI', '-L', '/lib a', '-L', '/lib b', '-o', 'my app'] | Failed |
| fixture 3 | ['a.o', 'b.a', '-o', 'x'] | ['a.o', 'b.a', '-o', 'x'] | Passed |
| fixture 4 | ['-framework', 'Core', '-o', 'x'] | ['-framework', 'Core', '-o', 'x'] | Passed |
| fixture 5 | ['-L', 'space dir', '-o', 'x'] | ['-L', 'space dir', '-o', 'x'] | Passed |
| fixture 6 | ['z.o', '-framework', 'A', '-L', 'D', '-o', 'z'] | ['z.o', '-framework', 'A', '-L', 'D', '-o', 'z'] | Passed |
SHA-256 / d405a77068f3be9fbb452949d0127d6f6a5e34c4f295a43c690e4263f4efd325
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(objects, archives, frameworks, directories, output):
result = list(objects)
result += list(archives)
result += [part for name in frameworks for part in ['-framework', name]]
result += [part for name in directories for part in ['-L', name]]
result += ['-o', output]
return result
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([], [], [], [], 'app'), ['-o', 'app'])
check('fixture 2', solve(['b.o', 'a.o'], ['x.a', 'y.a', 'x.a'], ['Core', 'UI'], ['/lib a', '/lib b'], 'my app'), ['b.o', 'a.o', 'x.a', 'y.a', 'x.a', '-framework', 'Core', '-framework', 'UI', '-L', '/lib a', '-L', '/lib b', '-o', 'my app'])
check('fixture 3', solve(['a.o'], ['b.a'], [], [], 'x'), ['a.o', 'b.a', '-o', 'x'])
check('fixture 4', solve([], [], ['Core'], [], 'x'), ['-framework', 'Core', '-o', 'x'])
check('fixture 5', solve([], [], [], ['space dir'], 'x'), ['-L', 'space dir', '-o', 'x'])
check('fixture 6', solve(['z.o'], [], ['A'], ['D'], 'z'), ['z.o', '-framework', 'A', '-L', 'D', '-o', 'z'])
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 | ['-o', 'app'] | ['-o', 'app'] | Passed |
| fixture 2 | ['b.o', 'a.o', 'x.a', 'y.a', 'x.a', '-framework', 'Core', '-framework', 'UI', '-L', '/lib a', '-L', '/lib b', '-o', 'my app'] | ['b.o', 'a.o', 'x.a', 'y.a', 'x.a', '-framework', 'Core', '-framework', 'UI', '-L', '/lib a', '-L', '/lib b', '-o', 'my app'] | Passed |
| fixture 3 | ['a.o', 'b.a', '-o', 'x'] | ['a.o', 'b.a', '-o', 'x'] | Passed |
| fixture 4 | ['-framework', 'Core', '-o', 'x'] | ['-framework', 'Core', '-o', 'x'] | Passed |
| fixture 5 | ['-L', 'space dir', '-o', 'x'] | ['-L', 'space dir', '-o', 'x'] | Passed |
| fixture 6 | ['z.o', '-framework', 'A', '-L', 'D', '-o', 'z'] | ['z.o', '-framework', 'A', '-L', 'D', '-o', 'z'] | Passed |
SHA-256 / 869b197b8f76034181fdc3150a3c5c2f072c8a769c951c1ac0b5afb977224fc5
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:27.487789+00:00.
Case digest / da2d18832a3dad092a31b8b326c1d71f5a3d7534b9493bb50b1ea259e48fb043