The fallback pose model that dies with the primary

A pose detection ladder in DanceSaga typically runs the full landmark model on the GPU delegate, drops to the CPU delegate, then to a lite model, and finally to a mode that keeps the music and the session timer alive while scoring pauses. The configuration that defines those tiers passes review easily because every line is individually valid. The defect sits between the lines: two tiers that fetch their model asset or WASM runtime from the same host share one failure domain, so the day the CDN hiccups, the whole ladder collapses at once and a patient mid exercise watches a frozen skeleton.

Why reviewers approve it

The tier list usually grows by duplication: someone copies the primary block, swaps the model variant name, and leaves the base URL untouched. The diff shows a new model file, a different delegate and a sensible timeout, so the reviewer checks the intent and signs off. No unit test catches it either, because tests mock the loader and never simulate the asset host going dark. The fallback exists on paper and has never once been taken in production. Medical device software lifecycle standards such as IEC 62304, the familiar one in rehabilitation, ask you to show that a risk control actually works, and an untested fallback is exactly the kind of control an auditor will pull apart.

The rule

Each tier must differ from the one above it in at least one dependency that can fail independently, meaning host, delegate or asset, and the last tier must start with zero network requests, which in practice means its model and runtime ship inside the app bundle or the service worker cache.

A check you can run today

Start static: extract the host from every model asset path and every WASM base path in the tier list and count how many tiers each host appears in; any host listed by more than one tier is a shared failure domain, and the terminal tier should list none. Then do it live, because the static check misses redirects and CDN aliases. Open a session in a Chromium browser, block the primary asset host with DevTools request blocking, reload, and time how long it takes to reach the scoring loop. Our loader uses a 4 s initialization watchdog per tier, so the session should land on a working tier within a few watchdog periods; if it sits on the spinner or throws, you have just reproduced next quarter's incident on your own desk. Wire both checks into CI, the static one as a lint on the config and the live one as a headless browser job with the host blocked, so the next duplicated block fails the build instead of the clinic session.

What the offline tier costs

Bundling a lite landmark model and its runtime adds weight to first load, by our estimate a few megabytes, which matters on clinic tablets and the home connections this audience uses. The compromise most teams settle on is precaching the terminal tier in the service worker after the first successful session, accepting that a brand new user facing a broken CDN still gets nothing. That gap is a product decision, not an engineering one, so put it in front of whoever owns the patient experience and get a yes or no in writing. If the answer is that a first session must never fail, the model goes in the bundle and the load budget absorbs it.

Does a separate CDN hostname really count as an independent failure domain?

Only if it resolves to different infrastructure; two hostnames fronted by the same provider and edge will fail together, so check where the CNAMEs land before trusting the count.

Back to DanceSaga - Pose Detection · Domains

← Back to DanceSaga - Pose Detection
Engineering & Architecture Brief

The fallback pose model that dies with the primary

A pose detection ladder in DanceSaga typically runs the full landmark model on the GPU delegate, drops to the CPU delegate, then to a lite model, and finally to a mode that keeps the music and the session timer alive while scoring pauses. The configuration that defines those tiers passes review easily because every line is individually valid. The defect sits between the lines: two tiers that fetch their model asset or WASM runtime from the same host share one failure domain, so the day the CDN hiccups, the whole ladder collapses at once and a patient mid exercise watches a frozen skeleton.

Why reviewers approve it

The tier list usually grows by duplication: someone copies the primary block, swaps the model variant name, and leaves the base URL untouched. The diff shows a new model file, a different delegate and a sensible timeout, so the reviewer checks the intent and signs off. No unit test catches it either, because tests mock the loader and never simulate the asset host going dark. The fallback exists on paper and has never once been taken in production. Medical device software lifecycle standards such as IEC 62304, the familiar one in rehabilitation, ask you to show that a risk control actually works, and an untested fallback is exactly the kind of control an auditor will pull apart.

The rule

Each tier must differ from the one above it in at least one dependency that can fail independently, meaning host, delegate or asset, and the last tier must start with zero network requests, which in practice means its model and runtime ship inside the app bundle or the service worker cache.

A check you can run today

Start static: extract the host from every model asset path and every WASM base path in the tier list and count how many tiers each host appears in; any host listed by more than one tier is a shared failure domain, and the terminal tier should list none. Then do it live, because the static check misses redirects and CDN aliases. Open a session in a Chromium browser, block the primary asset host with DevTools request blocking, reload, and time how long it takes to reach the scoring loop. Our loader uses a 4 s initialization watchdog per tier, so the session should land on a working tier within a few watchdog periods; if it sits on the spinner or throws, you have just reproduced next quarter's incident on your own desk. Wire both checks into CI, the static one as a lint on the config and the live one as a headless browser job with the host blocked, so the next duplicated block fails the build instead of the clinic session.

What the offline tier costs

Bundling a lite landmark model and its runtime adds weight to first load, by our estimate a few megabytes, which matters on clinic tablets and the home connections this audience uses. The compromise most teams settle on is precaching the terminal tier in the service worker after the first successful session, accepting that a brand new user facing a broken CDN still gets nothing. That gap is a product decision, not an engineering one, so put it in front of whoever owns the patient experience and get a yes or no in writing. If the answer is that a first session must never fail, the model goes in the bundle and the load budget absorbs it.

Technical FAQ: Does a separate CDN hostname really count as an independent failure domain?

Only if it resolves to different infrastructure; two hostnames fronted by the same provider and edge will fail together, so check where the CNAMEs land before trusting the count.

Related Architecture Specifications (DANCEGOAL): danceheal.com · learnmerengue.com · rehabsaga.com

More Technical Articles on rehabdance.com

A staleness limit counted in frames: how pose scoring lies when the detector slows down →The CPU fallback nobody has ever loaded: a pose-detection config error that sails through review →