Sub topic 12
Verifying That a Poka-Yoke Device Works
Assume you understand process steps, defects, and basic inspection. You should also be able to read short Python examples. This chapter focuses on verification: proving that a mistake-proofing device blocks the intended error and cannot be casually skipped.
Define what “works” means
A poka-yoke device is verified against explicit acceptance criteria. Do not stop after showing that the normal case succeeds. A useful verification asks:
- Does the process continue when all required conditions are correct?
- Does it stop when the targeted error occurs?
- Does it identify the error clearly?
- Can a person bypass it without authorization?
- Does it remain effective at normal operating speed?
- Does it fail safely when the device loses power, data, or communication?
Create a test matrix before testing. Include normal, abnormal, and bypass attempts.
| Test case | Input or action | Expected result |
|---|---|---|
| Correct process | Required scan and quantity are valid | Process continues |
| Missing scan | Operator tries to continue without scanning | Process stops |
| Wrong quantity | Count does not match the order | Process stops and explains why |
| Bypass attempt | Operator calls the next step directly | Access is denied or the event is recorded |
Test the error path, not only the happy path
Start with the error that the device is meant to prevent. State it precisely:
“An operator can release an order before confirming the required item.”
Then define the control:
“Release is unavailable until the item is scanned and the scanned quantity matches the order.”
Test each condition separately. A device that checks only the final result may miss the original error. For example, checking a box after release detects a problem late. Disabling the release action until the conditions are valid prevents the error earlier.
from dataclasses import dataclass
@dataclass(frozen=True)
class Order:
required_quantity: int
scanned_quantity: int = 0
item_scanned: bool = False
def release_order(order: Order) -> str:
if not order.item_scanned:
raise ValueError("Item must be scanned before release")
if order.scanned_quantity != order.required_quantity:
raise ValueError("Scanned quantity does not match the order")
return "released"
cases = [
("valid order", Order(3, 3, True), True),
("missing scan", Order(3, 3, False), False),
("wrong quantity", Order(3, 2, True), False),
]
for name, order, should_release in cases:
try:
result = release_order(order)
passed = should_release and result == "released"
except ValueError:
passed = not should_release
print(f"{name}: {'PASS' if passed else 'FAIL'}")
assert passedThe assertions test both sides of the control. A stronger system test would also verify that every user interface, API, and automated job calls the same guarded release operation. A unit test cannot prove that another route does not skip the guard.
Verify bypass resistance
List realistic bypass routes rather than assuming users will follow the intended path. Try direct API calls, old screens, manual data edits, disconnected sensors, duplicate submissions, and restart or power-loss recovery.
For each route, choose an expected behavior:
- Block the action.
- Require an authorized override.
- Record the override with a reason and user identity.
- Put the process in a safe state and require recovery.
An override is not automatically a failure. It becomes a failure when it is anonymous, effortless, or more convenient than the normal process.
A successful demonstration with one cooperative operator is not proof of effectiveness. Include unusual inputs, rushed work, equipment faults, and deliberate bypass attempts.Use evidence and repeat the test
Record the test version, equipment or software state, operator, inputs, result, and timestamp. Repeat tests after configuration changes, maintenance, or updates. If the device depends on a sensor, verify the sensor itself and its failure behavior.
A useful measure is the escape rate:
escape rate = bypassed errors ÷ attempted errors
The target for a critical control may be zero escapes. If escapes occur, determine whether the device design, installation, training, or process ownership caused them. Fix the cause and rerun the full test matrix.
Exercise
A scanner blocks release when an item is missing, but an administrator can use an old API endpoint to release the order. Has the poka-yoke been verified?
Show answer
No. The normal and visible path may work, but the old endpoint is a bypass route. Disable or protect that route, test the authorized override behavior, and repeat the verification.