FA-9176 / Build systems / Open access
Link command assembly: Output names lose the output selector · case 01
Output names lose the output selector.
ROOT CAUSE
The implementation substitutes [output] for ['-o', output], so output names lose the output selector.
THE FAILURE
The implementation substitutes [output] for ['-o', output], so output names lose the output selector.
Unsuccessful approach: The attempted repair substitutes [output, '-o']. Fixture 1 still yields ['app', '-o'] instead of ['-o', '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 = 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 += [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 | ['app'] | ['-o', 'app'] | Failed |
| fixture 2 | ['b.o', 'a.o', 'x.a', 'y.a', 'x.a', '-framework', 'Core', '-framework', 'UI', '-L', '/lib a', '-L', '/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'] | Failed |
| fixture 3 | ['a.o', 'b.a', 'x'] | ['a.o', 'b.a', '-o', 'x'] | Failed |
| fixture 4 | ['-framework', 'Core', 'x'] | ['-framework', 'Core', '-o', 'x'] | Failed |
| fixture 5 | ['-L', 'space dir', 'x'] | ['-L', 'space dir', '-o', 'x'] | Failed |
| fixture 6 | ['z.o', '-framework', 'A', '-L', 'D', 'z'] | ['z.o', '-framework', 'A', '-L', 'D', '-o', 'z'] | Failed |
SHA-256 / f4a2855cacd7eade0961572d4182d4312029dbf0dd4a2c547988c826118cefdf
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(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 += [output, '-o']
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 | ['app', '-o'] | ['-o', 'app'] | Failed |
| fixture 2 | ['b.o', 'a.o', 'x.a', 'y.a', 'x.a', '-framework', 'Core', '-framework', 'UI', '-L', '/lib a', '-L', '/lib b', 'my app', '-o'] | ['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', 'x', '-o'] | ['a.o', 'b.a', '-o', 'x'] | Failed |
| fixture 4 | ['-framework', 'Core', 'x', '-o'] | ['-framework', 'Core', '-o', 'x'] | Failed |
| fixture 5 | ['-L', 'space dir', 'x', '-o'] | ['-L', 'space dir', '-o', 'x'] | Failed |
| fixture 6 | ['z.o', '-framework', 'A', '-L', 'D', 'z', '-o'] | ['z.o', '-framework', 'A', '-L', 'D', '-o', 'z'] | Failed |
SHA-256 / 1247fb58803ce2b7e8cea962d5c01aa1ddda68e6bc2989160d2ff15d8fb8f02b
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 6 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗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.770268+00:00.
Case digest / 8ed9619e77c1e5f60d77c55c6389a5b194abd622eeada57c90270c5be90878b0