FA-9971 / Packaging / Open access
Reproducible archive metadata: Executable files lose their mode bit · case 01
Executable files lose their mode bit.
ROOT CAUSE
The implementation substitutes 420 for 493 if executable else 420, so executable files lose their mode bit.
VERIFIED REPAIR
Preserve executable versus nonexecutable mode using canonical modes.
Unsuccessful approach: The attempted repair substitutes 493. Fixture 2 still yields [('a', 0, 0, 100, 493, 'a'), ('b', 0, 0, 100, 493, 'b')] instead of [('a', 0, 0, 100, 420, 'a'), ('b', 0, 0, 100, 493, 'b')].
Case contract
Return sorted entries with normalized owner/group, fixed timestamp, preserved executable distinction, and file payload. Ignore input owner, group, and timestamp.
Why this case matters
An offline model of reproducible archive metadata, 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(entries, epoch):
return [(name, 0, 0, epoch, 420, content) for name, owner, group, timestamp, executable, content in sorted(entries)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([], 0), [])
check('fixture 2', solve([('b', 5, 6, 123, True, 'b'), ('a', 8, 9, 987, False, 'a')], 100), [('a', 0, 0, 100, 420, 'a'), ('b', 0, 0, 100, 493, 'b')])
check('fixture 3', solve([('a', 0, 0, 0, False, '')], 0), [('a', 0, 0, 0, 420, '')])
check('fixture 4', solve([('a', 1, 2, 3, True, 'payload')], 9), [('a', 0, 0, 9, 493, 'payload')])
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', 0, 0, 100, 420, 'a'], ['b', 0, 0, 100, 420, 'b']] | [['a', 0, 0, 100, 420, 'a'], ['b', 0, 0, 100, 493, 'b']] | Failed |
| fixture 3 | [['a', 0, 0, 0, 420, '']] | [['a', 0, 0, 0, 420, '']] | Passed |
| fixture 4 | [['a', 0, 0, 9, 420, 'payload']] | [['a', 0, 0, 9, 493, 'payload']] | Failed |
SHA-256 / d3a6465de469fde2cbb5d35bcf24c92cce8a0010ba17a37c57a83feaf8ddb84c
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(entries, epoch):
return [(name, 0, 0, epoch, 493, content) for name, owner, group, timestamp, executable, content in sorted(entries)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([], 0), [])
check('fixture 2', solve([('b', 5, 6, 123, True, 'b'), ('a', 8, 9, 987, False, 'a')], 100), [('a', 0, 0, 100, 420, 'a'), ('b', 0, 0, 100, 493, 'b')])
check('fixture 3', solve([('a', 0, 0, 0, False, '')], 0), [('a', 0, 0, 0, 420, '')])
check('fixture 4', solve([('a', 1, 2, 3, True, 'payload')], 9), [('a', 0, 0, 9, 493, 'payload')])
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', 0, 0, 100, 493, 'a'], ['b', 0, 0, 100, 493, 'b']] | [['a', 0, 0, 100, 420, 'a'], ['b', 0, 0, 100, 493, 'b']] | Failed |
| fixture 3 | [['a', 0, 0, 0, 493, '']] | [['a', 0, 0, 0, 420, '']] | Failed |
| fixture 4 | [['a', 0, 0, 9, 493, 'payload']] | [['a', 0, 0, 9, 493, 'payload']] | Passed |
SHA-256 / 6d082549d09599fb55ff0208a0aa7799c1a06caddba4e02a58649c7d0c4820ec
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(entries, epoch):
return [(name, 0, 0, epoch, 493 if executable else 420, content) for name, owner, group, timestamp, executable, content in sorted(entries)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([], 0), [])
check('fixture 2', solve([('b', 5, 6, 123, True, 'b'), ('a', 8, 9, 987, False, 'a')], 100), [('a', 0, 0, 100, 420, 'a'), ('b', 0, 0, 100, 493, 'b')])
check('fixture 3', solve([('a', 0, 0, 0, False, '')], 0), [('a', 0, 0, 0, 420, '')])
check('fixture 4', solve([('a', 1, 2, 3, True, 'payload')], 9), [('a', 0, 0, 9, 493, 'payload')])
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', 0, 0, 100, 420, 'a'], ['b', 0, 0, 100, 493, 'b']] | [['a', 0, 0, 100, 420, 'a'], ['b', 0, 0, 100, 493, 'b']] | Passed |
| fixture 3 | [['a', 0, 0, 0, 420, '']] | [['a', 0, 0, 0, 420, '']] | Passed |
| fixture 4 | [['a', 0, 0, 9, 493, 'payload']] | [['a', 0, 0, 9, 493, 'payload']] | Passed |
SHA-256 / 3b25fd600231cf6364e161b5c05ecd674c1ceb41698bfc2dd943f57bc73e497f
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:34.772821+00:00.
Case digest / 87d7cce633b1be23429a9cb95970952bdd4927567c2bc79593c1640cab3f8fe2