FAILURE MAP
← Case archive

FA-9976 / Packaging / Open access

Reproducible archive metadata: Archive entry order follows filesystem enumeration · case 01

Archive entry order follows filesystem enumeration.

Verified by executionVariant 1 · 4 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The implementation substitutes in entries for in sorted(entries), so archive entry order follows filesystem enumeration.

VERIFIED REPAIR

Sort archive entries deterministically.

Unsuccessful approach: The attempted repair substitutes in sorted(entries, reverse=True). Fixture 2 still yields [('b', 0, 0, 100, 493, 'b'), ('a', 0, 0, 100, 420, 'a')] 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, 493 if executable else 420, content) for name, owner, group, timestamp, executable, content in 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 fixtureActualExpectedOutcome
fixture 1[][]Passed
fixture 2[['b', 0, 0, 100, 493, 'b'], ['a', 0, 0, 100, 420, 'a']][['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, 493, 'payload']][['a', 0, 0, 9, 493, 'payload']]Passed

SHA-256 / 352e4088df829619afed28cda48c7f50f07274f1ac5ae17041a1617ada40b3d5

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 if executable else 420, content) for name, owner, group, timestamp, executable, content in sorted(entries, reverse=True)]
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 fixtureActualExpectedOutcome
fixture 1[][]Passed
fixture 2[['b', 0, 0, 100, 493, 'b'], ['a', 0, 0, 100, 420, 'a']][['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, 493, 'payload']][['a', 0, 0, 9, 493, 'payload']]Passed

SHA-256 / d9d9fef609e013958a6fa57b22f31c47f0d214ae41c0224cc45f672ce8d0d2b3

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 fixtureActualExpectedOutcome
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.772896+00:00.

Case digest / 68b470a04345d188e33aadcdcff92225aab4c00f508efc0a80997e4e4fe2af95