FAILURE MAP
← Case archive

FA-12366 / Manufacturing workflow integrity / Open access

A deviation approval leaks to another operation · case 01

A deviation approval leaks to another operation.

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

ROOT CAUSE

A lot-specific exception is treated as blanket permission for every operation.

VERIFIED REPAIR

Match the lot, route operation occurrence, and inclusive approved cycle interval.

Unsuccessful approach: Adding the operation match still ignores expiration after the approved rework cycles.

Case contract

Approvals are (lot, operation occurrence, first cycle, last cycle). Return true iff an approval matches lot and occurrence and contains the requested cycle.

Why this case matters

A deterministic manufacturing record model isolates this workflow defect before equipment or enterprise integration.

1 / The failure

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

N = 1
observations = []
def solve(approvals, lot, operation, cycle):
    return any(a == lot for a, o, lo, hi in approvals)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
a = [('lot', 'wash-2', N, N+2)]
check('first approved cycle', solve(a, 'lot', 'wash-2', N), True)
check('last approved cycle', solve(a, 'lot', 'wash-2', N+2), True)
check('expired deviation', solve(a, 'lot', 'wash-2', N+3), False)
check('too early', solve(a, 'lot', 'wash-2', N-1), False)
check('different occurrence', solve(a, 'lot', 'wash-1', N), False)
check('different lot', solve(a, 'other', 'wash-2', N), False)
check('no approvals', solve([], 'lot', 'wash-2', N), False)
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
first approved cycleTrueTruePassed
last approved cycleTrueTruePassed
expired deviationTrueFalseFailed
too earlyTrueFalseFailed
different occurrenceTrueFalseFailed
different lotFalseFalsePassed
no approvalsFalseFalsePassed

SHA-256 / 198e4a955beaa4041532e749cc87a74399901f119954604dae8f50818275cfbe

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(approvals, lot, operation, cycle):
    return any(a == lot and o == operation for a, o, lo, hi in approvals)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
a = [('lot', 'wash-2', N, N+2)]
check('first approved cycle', solve(a, 'lot', 'wash-2', N), True)
check('last approved cycle', solve(a, 'lot', 'wash-2', N+2), True)
check('expired deviation', solve(a, 'lot', 'wash-2', N+3), False)
check('too early', solve(a, 'lot', 'wash-2', N-1), False)
check('different occurrence', solve(a, 'lot', 'wash-1', N), False)
check('different lot', solve(a, 'other', 'wash-2', N), False)
check('no approvals', solve([], 'lot', 'wash-2', N), False)
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
first approved cycleTrueTruePassed
last approved cycleTrueTruePassed
expired deviationTrueFalseFailed
too earlyTrueFalseFailed
different occurrenceFalseFalsePassed
different lotFalseFalsePassed
no approvalsFalseFalsePassed

SHA-256 / f418c7d430e87451bdcc992e033d6d70ad4b6e8f114d5919faf329648474c96f

3 / The verified repair

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

N = 1
observations = []
def solve(approvals, lot, operation, cycle):
    return any(a == lot and o == operation and lo <= cycle <= hi for a, o, lo, hi in approvals)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
a = [('lot', 'wash-2', N, N+2)]
check('first approved cycle', solve(a, 'lot', 'wash-2', N), True)
check('last approved cycle', solve(a, 'lot', 'wash-2', N+2), True)
check('expired deviation', solve(a, 'lot', 'wash-2', N+3), False)
check('too early', solve(a, 'lot', 'wash-2', N-1), False)
check('different occurrence', solve(a, 'lot', 'wash-1', N), False)
check('different lot', solve(a, 'other', 'wash-2', N), False)
check('no approvals', solve([], 'lot', 'wash-2', N), False)
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
first approved cycleTrueTruePassed
last approved cycleTrueTruePassed
expired deviationFalseFalsePassed
too earlyFalseFalsePassed
different occurrenceFalseFalsePassed
different lotFalseFalsePassed
no approvalsFalseFalsePassed

SHA-256 / 1dd3dfd4d5220e73f0301236e80c8bb1748976cd27b612ae86027b298bd05b5e

Verification & scope

Offline policy model only; no physical equipment, regulatory certification, or concurrent transaction claims. 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:56.219111+00:00.

Case digest / 6a526d1c4ccea9dd50da36bb14dd5a0d177e6a69d9b8716d0afb5fe2c6d8cd5b