FA-9911 / Packaging / Open access
Entry point registry assembly: Entry point groups share one namespace · case 01
Entry point groups share one namespace.
ROOT CAUSE
The implementation substitutes result.setdefault('global', {}) for result.setdefault(group, {}), so entry point groups share one namespace.
VERIFIED REPAIR
Create a separate namespace for each entry point group.
Unsuccessful approach: The attempted repair substitutes result.setdefault(name, {}). Fixture 2 still yields {'run': {'run': 'a:main'}} 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('global', {})
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 | {'global': {'run': 'a:main'}} | {'cli': {'run': 'a:main'}} | Failed |
| fixture 3 | {} | {} | Passed |
| fixture 4 | conflict | conflict | Passed |
| fixture 5 | {'global': {'run': 'a:main'}} | {'cli': {'run': 'a:main'}} | Failed |
| fixture 6 | conflict | {'cli': {'run': 'a:main'}, 'plugin': {'run': 'b:main'}} | Failed |
SHA-256 / 652fead5dd4aec354aee134f5aa0e54b591c4580a80f8170db169b37b5d57548
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(name, {})
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 | {'run': {'run': 'a:main'}} | {'cli': {'run': 'a:main'}} | Failed |
| fixture 3 | {} | {} | Passed |
| fixture 4 | conflict | conflict | Passed |
| fixture 5 | {'run': {'run': 'a:main'}} | {'cli': {'run': 'a:main'}} | Failed |
| fixture 6 | conflict | {'cli': {'run': 'a:main'}, 'plugin': {'run': 'b:main'}} | Failed |
SHA-256 / 1f7f4f6a49e3556b0094fff7a777cdb52d47b79c9e8409f8858407dfb5d940c8
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.170035+00:00.
Case digest / 2c019db7fe31b4947d7c1637d58e35ee90d099fb1bedbbeeda5d99c3118f540c