FA-9921 / Packaging / Open access
Entry point registry assembly: Identical duplicate entry points are rejected · case 01
Identical duplicate entry points are rejected.
ROOT CAUSE
The implementation substitutes name in bucket for name in bucket and bucket[name] != target, so identical duplicate entry points are rejected.
VERIFIED REPAIR
Allow same-name same-target duplicate declarations.
Unsuccessful approach: The attempted repair substitutes name in bucket or target in bucket.values(). Fixture 5 still yields 'conflict' instead of {'cli': {'run': 'a:main'}}.
Case contract
Build a group-to-name-to-target mapping, skip disabled declarations, reject conflicting duplicate names within a group, allow duplicates with the same target, and allow identical names across groups.
Why this case matters
An offline model of entry point registry 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(rows):
result = {}
for group, name, target, enabled in rows:
if not enabled: continue
bucket = result.setdefault(group, {})
if name in bucket: return 'conflict'
bucket[name] = target
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([('cli', 'run', 'a:main', True)]), {'cli': {'run': 'a:main'}})
check('fixture 3', solve([('cli', 'run', 'a:main', False)]), {})
check('fixture 4', solve([('cli', 'run', 'a:main', True), ('cli', 'run', 'b:main', True)]), 'conflict')
check('fixture 5', solve([('cli', 'run', 'a:main', True), ('cli', 'run', 'a:main', True)]), {'cli': {'run': 'a:main'}})
check('fixture 6', solve([('cli', 'run', 'a:main', True), ('plugin', 'run', 'b:main', True)]), {'cli': {'run': 'a:main'}, 'plugin': {'run': 'b:main'}})
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 | {'cli': {'run': 'a:main'}} | {'cli': {'run': 'a:main'}} | Passed |
| fixture 3 | {} | {} | Passed |
| fixture 4 | conflict | conflict | Passed |
| fixture 5 | conflict | {'cli': {'run': 'a:main'}} | Failed |
| fixture 6 | {'cli': {'run': 'a:main'}, 'plugin': {'run': 'b:main'}} | {'cli': {'run': 'a:main'}, 'plugin': {'run': 'b:main'}} | Passed |
SHA-256 / 57c54bdd596a06b08af38e5381b364734c3ce64711e7113644fecc811f0b2315
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(rows):
result = {}
for group, name, target, enabled in rows:
if not enabled: continue
bucket = result.setdefault(group, {})
if name in bucket or target in bucket.values(): return 'conflict'
bucket[name] = target
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([('cli', 'run', 'a:main', True)]), {'cli': {'run': 'a:main'}})
check('fixture 3', solve([('cli', 'run', 'a:main', False)]), {})
check('fixture 4', solve([('cli', 'run', 'a:main', True), ('cli', 'run', 'b:main', True)]), 'conflict')
check('fixture 5', solve([('cli', 'run', 'a:main', True), ('cli', 'run', 'a:main', True)]), {'cli': {'run': 'a:main'}})
check('fixture 6', solve([('cli', 'run', 'a:main', True), ('plugin', 'run', 'b:main', True)]), {'cli': {'run': 'a:main'}, 'plugin': {'run': 'b:main'}})
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 | {'cli': {'run': 'a:main'}} | {'cli': {'run': 'a:main'}} | Passed |
| fixture 3 | {} | {} | Passed |
| fixture 4 | conflict | conflict | Passed |
| fixture 5 | conflict | {'cli': {'run': 'a:main'}} | Failed |
| fixture 6 | {'cli': {'run': 'a:main'}, 'plugin': {'run': 'b:main'}} | {'cli': {'run': 'a:main'}, 'plugin': {'run': 'b:main'}} | Passed |
SHA-256 / 01fc56e8fea1cfde4248bae1ad86e0bb84daa653a3dcf7883fb2b93be2602fa7
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(rows):
result = {}
for group, name, target, enabled in rows:
if not enabled: continue
bucket = result.setdefault(group, {})
if name in bucket and bucket[name] != target: return 'conflict'
bucket[name] = target
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([('cli', 'run', 'a:main', True)]), {'cli': {'run': 'a:main'}})
check('fixture 3', solve([('cli', 'run', 'a:main', False)]), {})
check('fixture 4', solve([('cli', 'run', 'a:main', True), ('cli', 'run', 'b:main', True)]), 'conflict')
check('fixture 5', solve([('cli', 'run', 'a:main', True), ('cli', 'run', 'a:main', True)]), {'cli': {'run': 'a:main'}})
check('fixture 6', solve([('cli', 'run', 'a:main', True), ('plugin', 'run', 'b:main', True)]), {'cli': {'run': 'a:main'}, 'plugin': {'run': 'b:main'}})
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 | {'cli': {'run': 'a:main'}} | {'cli': {'run': 'a:main'}} | Passed |
| fixture 3 | {} | {} | Passed |
| fixture 4 | conflict | conflict | Passed |
| fixture 5 | {'cli': {'run': 'a:main'}} | {'cli': {'run': 'a:main'}} | Passed |
| fixture 6 | {'cli': {'run': 'a:main'}, 'plugin': {'run': 'b:main'}} | {'cli': {'run': 'a:main'}, 'plugin': {'run': 'b:main'}} | Passed |
SHA-256 / 2f547ee8def0920638766f1644428a8134da4a1c363fa799b33758655e68942e
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.171306+00:00.
Case digest / df800ee949609b8803364bc383d66da173a99bbf69796d539c9d66a405092570