{"abstract":"Empty environment values fall through to defaults.","category":"Configuration","checks":8,"contract":"For declared variable names return exact present environment value, otherwise explicit default including empty values. Required missing values report missing; optional missing values are omitted. Prefix is prepended before lookup.","contract_signature":"declarations, environment, prefix","evaluation_group":"xt-env-projection","failed_approach":"The attempted repair substitutes if environment.get(key) not in (None, ''):. Fixture 3 still yields {'PORT': '80'} instead of {'PORT': ''}.","family":"xt-env-projection-present-empty","id":"FA-9636","implementations":{"attempt":{"sha256":"80b1c220df2f8f98a55402c093ad892e59b15c34542298e0aa5210d38170c45c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(declarations, environment, prefix):\n    result = {}\n    for name, default, required in declarations:\n        key = prefix + name\n        if environment.get(key) not in (None, ''): result[name] = environment[key]\n        elif default is not None: result[name] = default\n        elif required: result[name] = 'missing'\n    return result\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1', solve([], {}, 'APP_'), {})\ncheck('fixture 2', solve([('PORT', None, True)], {'APP_PORT': '0'}, 'APP_'), {'PORT': '0'})\ncheck('fixture 3', solve([('PORT', '80', True)], {'APP_PORT': ''}, 'APP_'), {'PORT': ''})\ncheck('fixture 4', solve([('PORT', '', True)], {}, 'APP_'), {'PORT': ''})\ncheck('fixture 5', solve([('PORT', None, True)], {}, 'APP_'), {'PORT': 'missing'})\ncheck('fixture 6', solve([('PORT', None, False)], {}, 'APP_'), {})\ncheck('fixture 7', solve([('PORT', '80', False)], {}, 'APP_'), {'PORT': '80'})\ncheck('fixture 8', solve([('PORT', '80', True)], {'PORT': '90'}, 'APP_'), {'PORT': '80'})\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"4f114ae5c6d2c20f1eeb6d7d03a9f7371829cdfba1a391f17044444c32d764c7","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(declarations, environment, prefix):\n    result = {}\n    for name, default, required in declarations:\n        key = prefix + name\n        if environment.get(key): result[name] = environment[key]\n        elif default is not None: result[name] = default\n        elif required: result[name] = 'missing'\n    return result\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1', solve([], {}, 'APP_'), {})\ncheck('fixture 2', solve([('PORT', None, True)], {'APP_PORT': '0'}, 'APP_'), {'PORT': '0'})\ncheck('fixture 3', solve([('PORT', '80', True)], {'APP_PORT': ''}, 'APP_'), {'PORT': ''})\ncheck('fixture 4', solve([('PORT', '', True)], {}, 'APP_'), {'PORT': ''})\ncheck('fixture 5', solve([('PORT', None, True)], {}, 'APP_'), {'PORT': 'missing'})\ncheck('fixture 6', solve([('PORT', None, False)], {}, 'APP_'), {})\ncheck('fixture 7', solve([('PORT', '80', False)], {}, 'APP_'), {'PORT': '80'})\ncheck('fixture 8', solve([('PORT', '80', True)], {'PORT': '90'}, 'APP_'), {'PORT': '80'})\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":" 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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"xt-env-projection-present-empty","generated_at":"2026-09-29T14:38:31.771218+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"An offline model of environment variable projection, suitable for testing build and release tooling without external services.","root_cause":"The implementation substitutes if environment.get(key): for if key in environment:, so empty environment values fall through to defaults.","sha256":"2facea5f1da49ea8d53392a9db65b6f95fb938a624316022c3d136885ecaf4b7","title":"Environment variable projection: Empty environment values fall through to defaults · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":37.323,"exit_code":1,"observations":[{"actual":{},"check":"fixture 1","expected":{},"passed":true},{"actual":{"PORT":"0"},"check":"fixture 2","expected":{"PORT":"0"},"passed":true},{"actual":{"PORT":"80"},"check":"fixture 3","expected":{"PORT":""},"passed":false},{"actual":{"PORT":""},"check":"fixture 4","expected":{"PORT":""},"passed":true},{"actual":{"PORT":"missing"},"check":"fixture 5","expected":{"PORT":"missing"},"passed":true},{"actual":{},"check":"fixture 6","expected":{},"passed":true},{"actual":{"PORT":"80"},"check":"fixture 7","expected":{"PORT":"80"},"passed":true},{"actual":{"PORT":"80"},"check":"fixture 8","expected":{"PORT":"80"},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": {}, \"expected\": {}, \"passed\": true}, {\"check\": \"fixture 2\", \"actual\": {\"PORT\": \"0\"}, \"expected\": {\"PORT\": \"0\"}, \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": {\"PORT\": \"80\"}, \"expected\": {\"PORT\": \"\"}, \"passed\": false}, {\"check\": \"fixture 4\", \"actual\": {\"PORT\": \"\"}, \"expected\": {\"PORT\": \"\"}, \"passed\": true}, {\"check\": \"fixture 5\", \"actual\": {\"PORT\": \"missing\"}, \"expected\": {\"PORT\": \"missing\"}, \"passed\": true}, {\"check\": \"fixture 6\", \"actual\": {}, \"expected\": {}, \"passed\": true}, {\"check\": \"fixture 7\", \"actual\": {\"PORT\": \"80\"}, \"expected\": {\"PORT\": \"80\"}, \"passed\": true}, {\"check\": \"fixture 8\", \"actual\": {\"PORT\": \"80\"}, \"expected\": {\"PORT\": \"80\"}, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.482,"exit_code":1,"observations":[{"actual":{},"check":"fixture 1","expected":{},"passed":true},{"actual":{"PORT":"0"},"check":"fixture 2","expected":{"PORT":"0"},"passed":true},{"actual":{"PORT":"80"},"check":"fixture 3","expected":{"PORT":""},"passed":false},{"actual":{"PORT":""},"check":"fixture 4","expected":{"PORT":""},"passed":true},{"actual":{"PORT":"missing"},"check":"fixture 5","expected":{"PORT":"missing"},"passed":true},{"actual":{},"check":"fixture 6","expected":{},"passed":true},{"actual":{"PORT":"80"},"check":"fixture 7","expected":{"PORT":"80"},"passed":true},{"actual":{"PORT":"80"},"check":"fixture 8","expected":{"PORT":"80"},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": {}, \"expected\": {}, \"passed\": true}, {\"check\": \"fixture 2\", \"actual\": {\"PORT\": \"0\"}, \"expected\": {\"PORT\": \"0\"}, \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": {\"PORT\": \"80\"}, \"expected\": {\"PORT\": \"\"}, \"passed\": false}, {\"check\": \"fixture 4\", \"actual\": {\"PORT\": \"\"}, \"expected\": {\"PORT\": \"\"}, \"passed\": true}, {\"check\": \"fixture 5\", \"actual\": {\"PORT\": \"missing\"}, \"expected\": {\"PORT\": \"missing\"}, \"passed\": true}, {\"check\": \"fixture 6\", \"actual\": {}, \"expected\": {}, \"passed\": true}, {\"check\": \"fixture 7\", \"actual\": {\"PORT\": \"80\"}, \"expected\": {\"PORT\": \"80\"}, \"passed\": true}, {\"check\": \"fixture 8\", \"actual\": {\"PORT\": \"80\"}, \"expected\": {\"PORT\": \"80\"}, \"passed\": true}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}