WearWatch — evidence ledger

OPC UA to a deployed model, and back out of the cloud on purpose.

15 of 15 gold-layer queries agree across three engines Athena over S3, DuckDB over local Parquet, and DuckDB over the same objects repatriated into MinIO. Each query returns one scalar and floats are compared as integers scaled by 1e6, so a disagreement in the eighth decimal is a failure rather than a rounding artefact.
15/15parity
$0.00AWS spend, 8 months
214tests
70decisions recorded
3.2hours between failures
21.0%positive rate
DESTROYEDcloud stack

The stack is gone, and that is the result. The claim this project makes is that the cloud was a reversible choice, and a reversal nobody performed is a claim nobody tested. Destroyed 2026-09-02 and verified empty by two tools asking different questions — an inventory check for WearWatch's own resources, and an account-wide sweep for anything billable in any region. Everything below was frozen from the live stack beforehand, because none of it is verifiable afterwards; everything the stack did still runs locally on the repatriated world, for $0.

The model, against a baseline a maintenance engineer would use

Threshold on vibration slope is what the incumbent practice actually is, so it is the baseline. Precision is reported beside recall because a predictive-maintenance model that hides its false-positive rate is selling something.

modelPR-AUCprecisionrecallalerts/machine-hrfailures caughtlead p50 (min)
baseline: vibration slope0.18650.1880.96992.58760
baseline: logistic regression0.37470.3660.41820.56560
gbm0.47750.2840.72345.68160

Split tool-wise and time-forward at 2026-03-04T20:39:45-05:00: 356 tools to train, 120 held out, 5 straddling the cutoff dropped rather than split. A tool appearing on both sides leaks.

The drift catch

The fleet's wear rate was multiplied by 1.6 at a declared simulated timestamp. The score distribution shifted, PSI crossed the threshold, and the CloudWatch alarm transitioned OK -> ALARM.

2.236PSI
0.25alarm threshold
0.168mean score before
0.484mean score after
16.2%actual failures before
21.6%actual failures after

Prediction-versus-actual is exact here because the simulator writes ground truth straight to storage. The realised failure rate rose with the scores, so the model reacted to a world that genuinely got worse rather than hallucinating a shift.

Alarm state, with AWS's own timestamps

These are the non-fabricable part: transition times minted by CloudWatch, not by this repository.

whenfromtoreason
2026-08-26T17:27:15.038000-04:00INSUFFICIENT_DATAALARMThreshold Crossed: no datapoints were received for 1 period and 1 missing datapoint was treated as [Breaching].
2026-08-26T17:52:46.931000-04:00ALARMOKThreshold Crossed: 1 out of the last 1 datapoints [0.0 (26/08/26 21:47:00)] was not greater than or equal to the thresho
2026-08-26T17:54:46.930000-04:00OKALARMThreshold Crossed: 1 out of the last 1 datapoints [2.2359515935574823 (26/08/26 21:49:00)] was greater than or equal to

What it looks like

Rendered from the same evidence by tools/make_gifs.py. These make the evidence legible; they are not themselves evidence.

The drift catch Three hours before a failure

Parity, query by query

queryAthena / S3DuckDB / filesDuckDB / MinIO
bronze_rows204274204274204274agree
silver_rows847618476184761agree
run_sessions107510751075agree
gold_rows847618476184761agree
distinct_tools482482482agree
distinct_machines888agree
label_positives_1h138211382113821agree
label_positives_24h781277812778127agree
ground_truth_failures119119119agree
vib_mean_x1e6211592221159222115922agree
vib_slope_x1e6229658422965842296584agree
load_slope_x1e6107914241079142410791424agree
hours_on_tool_x1e6775949775949775949agree
cycles_on_tool_sum171602417160241716024agree
clock_skew_min_x100149471097814947109781494710978agree

Repatriation, executed

A migration plan nobody ran is a migration plan that does not work. Verified per object by SHA-256, not by the sync command's exit code — a sync reports success for a transfer it skipped.

97objects at source
97landed
0missing
0hash mismatches

The cloud, by ARN

ARNs and job IDs are the spine of the ledger because they cannot be invented: an ARN carries the account, the region, the service and a name AWS minted. Captured from the AWS APIs and never from Terraform state, which holds the IoT certificate's private key in plaintext.

training jobstatusbillablePR-AUCspot
wearwatch-gbm-20260831-metrics-2Completed28s0.4824yes
wearwatch-gbm-20260831-metricsFailed25s—yes
wearwatch-gbm-20260825-210551Completed25s—yes
wearwatch-gbm-20260825-210239Completed20s—yes
wearwatch-gbm-20260825-205944Completed23s—yes
wearwatch-gbm-20260825-205556Failed20s—yes

The jobs showing no PR-AUC completed before MetricDefinitions was set. SageMaker harvests metrics by regex over stdout; with none configured a job trains, succeeds, and reports an empty metric list. Nothing errors.

One image, two runtimes

The SAME ECR artefact serves in both worlds - not a same-source rebuild.

sha256:58337b934ca8ce9ecae052fac823a961d2f9cded6811f6f03858ee2507b5ef0d

yesdigest match
0.0max score difference
100/100online agreement
6000/6000batch agreement

Account verification

Queries the AWS APIs, never Terraform state — a resource created outside Terraform is invisible to terraform state list by construction, and that is the case it exists to catch. A denied probe fails the run rather than counting as a pass.

17probes
0findings
0could not check
2declared neighbours

Neighbours are named with their owner rather than absorbed into the expected set. Widening the allowlist to silence them would make the check quieter and blinder at once.