FA-9296 / Build systems / Open access
Direct rebuild trigger selection: Unchanged prerequisites trigger rebuilds · case 01
Unchanged prerequisites trigger rebuilds.
ROOT CAUSE
The implementation substitutes | set(changed) for & set(changed), so unchanged prerequisites trigger rebuilds.
THE FAILURE
The implementation substitutes | set(changed) for & set(changed), so unchanged prerequisites trigger rebuilds.
Unsuccessful approach: The attempted repair substitutes - set(changed). Fixture 4 still yields [] instead of ['a'].
Case contract
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.
Why this case matters
An offline model of direct rebuild trigger selection, 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, 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)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1 | [] | [] | Passed |
| fixture 2 | ['a'] | ['a'] | Passed |
| fixture 3 | ['a'] | ['a'] | Passed |
| fixture 4 | ['a'] | ['a'] | Passed |
| fixture 5 | ['a'] | [] | Failed |
| fixture 6 | ['z', 'a'] | ['z', 'a'] | Passed |
| fixture 7 | ['a'] | ['a'] | Passed |
SHA-256 / 325a23389559f3c6b1cfdce7148e8e6c65ce661bea92437cbc3afd1cde416708
2 / The unsuccessful fix
Exit 1"""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)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1 | [] | [] | Passed |
| fixture 2 | ['a'] | ['a'] | Passed |
| fixture 3 | ['a'] | ['a'] | Passed |
| fixture 4 | [] | ['a'] | Failed |
| fixture 5 | [] | [] | Passed |
| fixture 6 | ['z', 'a'] | ['z', 'a'] | Passed |
| fixture 7 | [] | ['a'] | Failed |
SHA-256 / 7ad396ec78f302697810785a8f9b775daadac1c086eb3ccb9e7cdb8a87a03235
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 7 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:28.724809+00:00.
Case digest / fe9cea48335b3ce373966bd4a2861d6c12656b1fc2000d7682ef8ae4774abb66