The mirror flag that only breaks during failover

A pose pipeline that swaps left and right only when the GPU model falls over will pass every review, every staging run and every dashboard. The primary path mirrors the front camera inside the capture driver, while the CPU fallback was given its own preprocessing block with horizontal flip enabled, which in isolation was correct. Each file reads clean. The bug exists only in the combination, and only during the incident you were trying to survive.

Why review cannot see it

Reviewers read diffs, and this diff is a single boolean in a file nobody connects to a camera driver that lives in another repository. Confidence stays high after the swap, because the model is certain it sees a wrist and is simply labelling the wrong one. Health checks watch latency, frame rate and mean confidence, so the fallback reports green while the gesture classifier downstream reads a raised right hand as a left one. Staging never exercises the path, because staging GPUs never fail.

A degraded answer must still be a correct answer

Fallback is what keeps a motion tracking service alive when the accelerator, the driver or the large model dies, and it is only worth having if the consumer can trust it less without being led to trust it wrongly. That forces the contract between pose producer and consumer to cover topology and handedness, not just tensor shape: same keypoint order, same coordinate frame, same mirror convention, on every path. Staleness belongs in the contract too. A consumer should treat any keypoint set older than 150 ms as missing instead of reusing it, so a stalled fallback produces an explicit gap rather than a frozen skeleton that still looks plausible. Where pose output feeds anything near machine guarding, functional safety standards for machinery such as ISO 13849 already push you this way: a detectable absence is acceptable, an undetectable wrong value is not.

The check you can run this afternoon

Record a short clip of one person raising only the right hand, commit it as a golden asset, and replay it through every inference path the config declares, forcing the fallback by hiding the GPU from the process or pointing the runtime at the CPU execution provider. On every frame where the hand is clearly up, assert that the right wrist's y coordinate is smaller than the right shoulder's, since image y grows downward, and that the left wrist stays below the left shoulder. A flipped mirror fails on the first such frame, a wrong keypoint ordering fails almost as fast, and the whole run takes seconds on a laptop. Wire it into CI as a test that iterates over the configured paths rather than a hardcoded list, so the fallback someone adds next quarter gets checked without anyone having to remember it.

The decision rule is blunt: a fallback that cannot pass the same golden clip as the primary comes out of the config and is replaced by an explicit no pose state, because a service that returns nothing during an outage costs you one incident, while one that returns mirrored joints costs you the ones after it, with the whole team hunting a bug that only appears under failure.

Why not compare the fallback against the primary on live traffic instead?

Because in a real failover the primary is the thing that is down, and shadow comparison during normal operation only proves the two agree while both are healthy. The golden clip tests each path in the state it actually runs in, without needing the other one.

Back to PoseRecognition · Domains

← Back to PoseRecognition
Engineering & Architecture Brief

The mirror flag that only breaks during failover

A pose pipeline that swaps left and right only when the GPU model falls over will pass every review, every staging run and every dashboard. The primary path mirrors the front camera inside the capture driver, while the CPU fallback was given its own preprocessing block with horizontal flip enabled, which in isolation was correct. Each file reads clean. The bug exists only in the combination, and only during the incident you were trying to survive.

Why review cannot see it

Reviewers read diffs, and this diff is a single boolean in a file nobody connects to a camera driver that lives in another repository. Confidence stays high after the swap, because the model is certain it sees a wrist and is simply labelling the wrong one. Health checks watch latency, frame rate and mean confidence, so the fallback reports green while the gesture classifier downstream reads a raised right hand as a left one. Staging never exercises the path, because staging GPUs never fail.

A degraded answer must still be a correct answer

Fallback is what keeps a motion tracking service alive when the accelerator, the driver or the large model dies, and it is only worth having if the consumer can trust it less without being led to trust it wrongly. That forces the contract between pose producer and consumer to cover topology and handedness, not just tensor shape: same keypoint order, same coordinate frame, same mirror convention, on every path. Staleness belongs in the contract too. A consumer should treat any keypoint set older than 150 ms as missing instead of reusing it, so a stalled fallback produces an explicit gap rather than a frozen skeleton that still looks plausible. Where pose output feeds anything near machine guarding, functional safety standards for machinery such as ISO 13849 already push you this way: a detectable absence is acceptable, an undetectable wrong value is not.

The check you can run this afternoon

Record a short clip of one person raising only the right hand, commit it as a golden asset, and replay it through every inference path the config declares, forcing the fallback by hiding the GPU from the process or pointing the runtime at the CPU execution provider. On every frame where the hand is clearly up, assert that the right wrist's y coordinate is smaller than the right shoulder's, since image y grows downward, and that the left wrist stays below the left shoulder. A flipped mirror fails on the first such frame, a wrong keypoint ordering fails almost as fast, and the whole run takes seconds on a laptop. Wire it into CI as a test that iterates over the configured paths rather than a hardcoded list, so the fallback someone adds next quarter gets checked without anyone having to remember it.

The decision rule is blunt: a fallback that cannot pass the same golden clip as the primary comes out of the config and is replaced by an explicit no pose state, because a service that returns nothing during an outage costs you one incident, while one that returns mirrored joints costs you the ones after it, with the whole team hunting a bug that only appears under failure.

Technical FAQ: Why not compare the fallback against the primary on live traffic instead?

Because in a real failover the primary is the thing that is down, and shadow comparison during normal operation only proves the two agree while both are healthy. The golden clip tests each path in the state it actually runs in, without needing the other one.

Related Architecture Specifications (POSEAUDIT): posturerecognition.com · fitdetection.com · gesturelearning.com

More Technical Articles on poserecognition.com

Pose recognition is becoming a shared layer for health, fitness and games →PoseAudit, PoseMonitor and PoseCommand describe different product motions →The fallback pose model that passes review and swaps your wrists →