FAILURE MAP
← Case archive

FA-9526 / Dependency resolution / Open access

Feature activation closure: Requested leaves are omitted from results · case 01

Requested leaves are omitted from results.

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

ROOT CAUSE

The implementation substitutes return sorted(active & set(implications)) for return sorted(active), so requested leaves are omitted from results.

VERIFIED REPAIR

Return all activated feature names, including requested leaves.

Unsuccessful approach: The attempted repair substitutes return sorted(active - set(requested)). Fixture 2 still yields [] instead of ['x'].

Case contract

Activate named features and their implications, preserve unknown requested leaves, ignore disabled implication edges, deduplicate cycles, and return sorted activated features.

Why this case matters

An offline model of feature activation closure, 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(requested, implications):
    active = set(requested)
    for _ in range(len(implications) + 1):
        for feature, edges in implications.items():
            if feature in active:
                active.update(name for name, enabled in edges if enabled)
    return sorted(active & set(implications))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([], {}), [])
check('fixture 2', solve(['x'], {}), ['x'])
check('fixture 3', solve(['other'], {'a': [('b', True)]}), ['other'])
check('fixture 4', solve(['a'], {'a': [('b', True), ('c', False)]}), ['a', 'b'])
check('fixture 5', solve(['a'], {'b': [('c', True)], 'a': [('b', True)]}), ['a', 'b', 'c'])
check('fixture 6', solve(['a'], {'a': [('b', True)], 'b': [('a', True)]}), ['a', 'b'])
check('fixture 7', solve(['z', 'a', 'z'], {}), ['a', 'z'])
check('fixture 8', solve(['a'], {'c': [('d', True)], 'b': [('c', True)], 'a': [('b', True)]}), ['a', 'b', 'c', 'd'])
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[]['x']Failed
fixture 3[]['other']Failed
fixture 4['a']['a', 'b']Failed
fixture 5['a', 'b']['a', 'b', 'c']Failed
fixture 6['a', 'b']['a', 'b']Passed
fixture 7[]['a', 'z']Failed
fixture 8['a', 'b', 'c']['a', 'b', 'c', 'd']Failed

SHA-256 / d13e5d32a7371b223252c66f6fd40f75a9c02a42f2990249b9ac2d8676971bc7

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(requested, implications):
    active = set(requested)
    for _ in range(len(implications) + 1):
        for feature, edges in implications.items():
            if feature in active:
                active.update(name for name, enabled in edges if enabled)
    return sorted(active - set(requested))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([], {}), [])
check('fixture 2', solve(['x'], {}), ['x'])
check('fixture 3', solve(['other'], {'a': [('b', True)]}), ['other'])
check('fixture 4', solve(['a'], {'a': [('b', True), ('c', False)]}), ['a', 'b'])
check('fixture 5', solve(['a'], {'b': [('c', True)], 'a': [('b', True)]}), ['a', 'b', 'c'])
check('fixture 6', solve(['a'], {'a': [('b', True)], 'b': [('a', True)]}), ['a', 'b'])
check('fixture 7', solve(['z', 'a', 'z'], {}), ['a', 'z'])
check('fixture 8', solve(['a'], {'c': [('d', True)], 'b': [('c', True)], 'a': [('b', True)]}), ['a', 'b', 'c', 'd'])
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[]['x']Failed
fixture 3[]['other']Failed
fixture 4['b']['a', 'b']Failed
fixture 5['b', 'c']['a', 'b', 'c']Failed
fixture 6['b']['a', 'b']Failed
fixture 7[]['a', 'z']Failed
fixture 8['b', 'c', 'd']['a', 'b', 'c', 'd']Failed

SHA-256 / 5fd114ff29a7d91e868c9992fa52f0f45c2ec544cc07bacd2578f9b89e519db1

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(requested, implications):
    active = set(requested)
    for _ in range(len(implications) + 1):
        for feature, edges in implications.items():
            if feature in active:
                active.update(name for name, enabled in edges if enabled)
    return sorted(active)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve([], {}), [])
check('fixture 2', solve(['x'], {}), ['x'])
check('fixture 3', solve(['other'], {'a': [('b', True)]}), ['other'])
check('fixture 4', solve(['a'], {'a': [('b', True), ('c', False)]}), ['a', 'b'])
check('fixture 5', solve(['a'], {'b': [('c', True)], 'a': [('b', True)]}), ['a', 'b', 'c'])
check('fixture 6', solve(['a'], {'a': [('b', True)], 'b': [('a', True)]}), ['a', 'b'])
check('fixture 7', solve(['z', 'a', 'z'], {}), ['a', 'z'])
check('fixture 8', solve(['a'], {'c': [('d', True)], 'b': [('c', True)], 'a': [('b', True)]}), ['a', 'b', 'c', 'd'])
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['x']['x']Passed
fixture 3['other']['other']Passed
fixture 4['a', 'b']['a', 'b']Passed
fixture 5['a', 'b', 'c']['a', 'b', 'c']Passed
fixture 6['a', 'b']['a', 'b']Passed
fixture 7['a', 'z']['a', 'z']Passed
fixture 8['a', 'b', 'c', 'd']['a', 'b', 'c', 'd']Passed

SHA-256 / 61507dca56ea28864086fcc573f8f548cbb9c5591c881c15acb705cc1fb27398

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

Case digest / 2e41768f2795d768bbefadd52570dd9641b301237fdbc5b1728e6a9baea5a09a