FA-10121 / Deployment models / Open access
Deployment drift report: Reordered command arguments are treated as unchanged · case 01
Reordered command arguments are treated as unchanged.
ROOT CAUSE
The implementation substitutes set(desired['command']) != set(actual['command']) for desired['command'] != actual['command'], so reordered command arguments are treated as unchanged.
VERIFIED REPAIR
Compare ordered command vectors.
Unsuccessful approach: The attempted repair substitutes sorted(desired['command']) != sorted(actual['command']). Fixture 6 still yields [] instead of ['command'].
Case contract
Compare desired and actual image, environment mapping, replica count, ordered command and resource limits. Return changed fields in fixed schema order.
Why this case matters
An offline model of deployment drift report, 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(desired, actual):
result = []
if desired['image'] != actual['image']: result.append('image')
if desired['env'] != actual['env']: result.append('env')
if desired['replicas'] != actual['replicas']: result.append('replicas')
if set(desired['command']) != set(actual['command']): result.append('command')
if desired['limits'] != actual['limits']: result.append('limits')
return result
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'image': 'v1', 'env': {'A': '1'}, 'replicas': 2, 'command': ['a', 'b'], 'limits': {'memory': 1}}, {'image': 'v1', 'env': {'A': '1'}, 'replicas': 2, 'command': ['a', 'b'], 'limits': {'memory': 1}}), [])
check('fixture 2', solve({'image': 'v1', 'env': {'A': '1'}, 'replicas': 2, 'command': ['a', 'b'], 'limits': {'memory': 1}}, {'image': 'v2', 'env': {'A': '1'}, 'replicas': 2, 'command': ['a', 'b'], 'limits': {'memory': 1}}), ['image'])
check('fixture 3', solve({'image': 'v1', 'env': {'A': '1'}, 'replicas': 2, 'command': ['a', 'b'], 'limits': {'memory': 1}}, {'image': 'v1', 'env': {'A': '2'}, 'replicas': 2, 'command': ['a', 'b'], 'limits': {'memory': 1}}), ['env'])
check('fixture 4', solve({'image': 'v1', 'env': {'A': '1'}, 'replicas': 2, 'command': ['a', 'b'], 'limits': {'memory': 1}}, {'image': 'v1', 'env': {'A': '1'}, 'replicas': 3, 'command': ['a', 'b'], 'limits': {'memory': 1}}), ['replicas'])
check('fixture 5', solve({'image': 'v1', 'env': {'A': '1'}, 'replicas': 2, 'command': ['a', 'b'], 'limits': {'memory': 1}}, {'image': 'v1', 'env': {'A': '1'}, 'replicas': 1, 'command': ['a', 'b'], 'limits': {'memory': 1}}), ['replicas'])
check('fixture 6', solve({'image': 'v1', 'env': {'A': '1'}, 'replicas': 2, 'command': ['a', 'b'], 'limits': {'memory': 1}}, {'image': 'v1', 'env': {'A': '1'}, 'replicas': 2, 'command': ['b', 'a'], 'limits': {'memory': 1}}), ['command'])
check('fixture 7', solve({'image': 'v1', 'env': {'A': '1'}, 'replicas': 2, 'command': ['a', 'b'], 'limits': {'memory': 1}}, {'image': 'v1', 'env': {'A': '1'}, 'replicas': 2, 'command': ['a', 'b'], 'limits': {'memory': 2}}), ['limits'])
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 | ['image'] | ['image'] | Passed |
| fixture 3 | ['env'] | ['env'] | Passed |
| fixture 4 | ['replicas'] | ['replicas'] | Passed |
| fixture 5 | ['replicas'] | ['replicas'] | Passed |
| fixture 6 | [] | ['command'] | Failed |
| fixture 7 | ['limits'] | ['limits'] | Passed |
SHA-256 / ab5dccf6c7f2028c533eafe4198a99dcbf792c3bc9ca8d101be5c33fc18b0b2a
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(desired, actual):
result = []
if desired['image'] != actual['image']: result.append('image')
if desired['env'] != actual['env']: result.append('env')
if desired['replicas'] != actual['replicas']: result.append('replicas')
if sorted(desired['command']) != sorted(actual['command']): result.append('command')
if desired['limits'] != actual['limits']: result.append('limits')
return result
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'image': 'v1', 'env': {'A': '1'}, 'replicas': 2, 'command': ['a', 'b'], 'limits': {'memory': 1}}, {'image': 'v1', 'env': {'A': '1'}, 'replicas': 2, 'command': ['a', 'b'], 'limits': {'memory': 1}}), [])
check('fixture 2', solve({'image': 'v1', 'env': {'A': '1'}, 'replicas': 2, 'command': ['a', 'b'], 'limits': {'memory': 1}}, {'image': 'v2', 'env': {'A': '1'}, 'replicas': 2, 'command': ['a', 'b'], 'limits': {'memory': 1}}), ['image'])
check('fixture 3', solve({'image': 'v1', 'env': {'A': '1'}, 'replicas': 2, 'command': ['a', 'b'], 'limits': {'memory': 1}}, {'image': 'v1', 'env': {'A': '2'}, 'replicas': 2, 'command': ['a', 'b'], 'limits': {'memory': 1}}), ['env'])
check('fixture 4', solve({'image': 'v1', 'env': {'A': '1'}, 'replicas': 2, 'command': ['a', 'b'], 'limits': {'memory': 1}}, {'image': 'v1', 'env': {'A': '1'}, 'replicas': 3, 'command': ['a', 'b'], 'limits': {'memory': 1}}), ['replicas'])
check('fixture 5', solve({'image': 'v1', 'env': {'A': '1'}, 'replicas': 2, 'command': ['a', 'b'], 'limits': {'memory': 1}}, {'image': 'v1', 'env': {'A': '1'}, 'replicas': 1, 'command': ['a', 'b'], 'limits': {'memory': 1}}), ['replicas'])
check('fixture 6', solve({'image': 'v1', 'env': {'A': '1'}, 'replicas': 2, 'command': ['a', 'b'], 'limits': {'memory': 1}}, {'image': 'v1', 'env': {'A': '1'}, 'replicas': 2, 'command': ['b', 'a'], 'limits': {'memory': 1}}), ['command'])
check('fixture 7', solve({'image': 'v1', 'env': {'A': '1'}, 'replicas': 2, 'command': ['a', 'b'], 'limits': {'memory': 1}}, {'image': 'v1', 'env': {'A': '1'}, 'replicas': 2, 'command': ['a', 'b'], 'limits': {'memory': 2}}), ['limits'])
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 | ['image'] | ['image'] | Passed |
| fixture 3 | ['env'] | ['env'] | Passed |
| fixture 4 | ['replicas'] | ['replicas'] | Passed |
| fixture 5 | ['replicas'] | ['replicas'] | Passed |
| fixture 6 | [] | ['command'] | Failed |
| fixture 7 | ['limits'] | ['limits'] | Passed |
SHA-256 / f97317b6cca64846cfe64bb576443519e70246eca03075a3d94ee7958083daf9
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(desired, actual):
result = []
if desired['image'] != actual['image']: result.append('image')
if desired['env'] != actual['env']: result.append('env')
if desired['replicas'] != actual['replicas']: result.append('replicas')
if desired['command'] != actual['command']: result.append('command')
if desired['limits'] != actual['limits']: result.append('limits')
return result
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'image': 'v1', 'env': {'A': '1'}, 'replicas': 2, 'command': ['a', 'b'], 'limits': {'memory': 1}}, {'image': 'v1', 'env': {'A': '1'}, 'replicas': 2, 'command': ['a', 'b'], 'limits': {'memory': 1}}), [])
check('fixture 2', solve({'image': 'v1', 'env': {'A': '1'}, 'replicas': 2, 'command': ['a', 'b'], 'limits': {'memory': 1}}, {'image': 'v2', 'env': {'A': '1'}, 'replicas': 2, 'command': ['a', 'b'], 'limits': {'memory': 1}}), ['image'])
check('fixture 3', solve({'image': 'v1', 'env': {'A': '1'}, 'replicas': 2, 'command': ['a', 'b'], 'limits': {'memory': 1}}, {'image': 'v1', 'env': {'A': '2'}, 'replicas': 2, 'command': ['a', 'b'], 'limits': {'memory': 1}}), ['env'])
check('fixture 4', solve({'image': 'v1', 'env': {'A': '1'}, 'replicas': 2, 'command': ['a', 'b'], 'limits': {'memory': 1}}, {'image': 'v1', 'env': {'A': '1'}, 'replicas': 3, 'command': ['a', 'b'], 'limits': {'memory': 1}}), ['replicas'])
check('fixture 5', solve({'image': 'v1', 'env': {'A': '1'}, 'replicas': 2, 'command': ['a', 'b'], 'limits': {'memory': 1}}, {'image': 'v1', 'env': {'A': '1'}, 'replicas': 1, 'command': ['a', 'b'], 'limits': {'memory': 1}}), ['replicas'])
check('fixture 6', solve({'image': 'v1', 'env': {'A': '1'}, 'replicas': 2, 'command': ['a', 'b'], 'limits': {'memory': 1}}, {'image': 'v1', 'env': {'A': '1'}, 'replicas': 2, 'command': ['b', 'a'], 'limits': {'memory': 1}}), ['command'])
check('fixture 7', solve({'image': 'v1', 'env': {'A': '1'}, 'replicas': 2, 'command': ['a', 'b'], 'limits': {'memory': 1}}, {'image': 'v1', 'env': {'A': '1'}, 'replicas': 2, 'command': ['a', 'b'], 'limits': {'memory': 2}}), ['limits'])
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 | ['image'] | ['image'] | Passed |
| fixture 3 | ['env'] | ['env'] | Passed |
| fixture 4 | ['replicas'] | ['replicas'] | Passed |
| fixture 5 | ['replicas'] | ['replicas'] | Passed |
| fixture 6 | ['command'] | ['command'] | Passed |
| fixture 7 | ['limits'] | ['limits'] | Passed |
SHA-256 / 962434b1e97b03316623228d0a3d7cfabbd039093f7fa7f7f5be26d4d5478322
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:36.028244+00:00.
Case digest / 744fa9599bcb07c90d29d326057590e89730a245a41858f0b33639d2417fbfd1