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.
| model | PR-AUC | precision | recall | alerts/machine-hr | failures caught | lead p50 (min) |
| baseline: vibration slope | 0.1865 | 0.188 | 0.969 | 92.5 | 87 | 60 |
| baseline: logistic regression | 0.3747 | 0.366 | 0.418 | 20.5 | 65 | 60 |
| gbm | 0.4775 | 0.284 | 0.723 | 45.6 | 81 | 60 |
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.
| when | from | to | reason |
| 2026-08-26T17:27:15.038000-04:00 | INSUFFICIENT_DATA | ALARM | Threshold Crossed: no datapoints were received for 1 period and 1 missing datapoint was treated as [Breaching]. |
| 2026-08-26T17:52:46.931000-04:00 | ALARM | OK | Threshold 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:00 | OK | ALARM | Threshold 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.
Parity, query by query
| query | Athena / S3 | DuckDB / files | DuckDB / MinIO | |
| bronze_rows | 204274 | 204274 | 204274 | agree |
| silver_rows | 84761 | 84761 | 84761 | agree |
| run_sessions | 1075 | 1075 | 1075 | agree |
| gold_rows | 84761 | 84761 | 84761 | agree |
| distinct_tools | 482 | 482 | 482 | agree |
| distinct_machines | 8 | 8 | 8 | agree |
| label_positives_1h | 13821 | 13821 | 13821 | agree |
| label_positives_24h | 78127 | 78127 | 78127 | agree |
| ground_truth_failures | 119 | 119 | 119 | agree |
| vib_mean_x1e6 | 2115922 | 2115922 | 2115922 | agree |
| vib_slope_x1e6 | 2296584 | 2296584 | 2296584 | agree |
| load_slope_x1e6 | 10791424 | 10791424 | 10791424 | agree |
| hours_on_tool_x1e6 | 775949 | 775949 | 775949 | agree |
| cycles_on_tool_sum | 1716024 | 1716024 | 1716024 | agree |
| clock_skew_min_x100 | 1494710978 | 1494710978 | 1494710978 | agree |
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 job | status | billable | PR-AUC | spot |
| wearwatch-gbm-20260831-metrics-2 | Completed | 28s | 0.4824 | yes |
| wearwatch-gbm-20260831-metrics | Failed | 25s | — | yes |
| wearwatch-gbm-20260825-210551 | Completed | 25s | — | yes |
| wearwatch-gbm-20260825-210239 | Completed | 20s | — | yes |
| wearwatch-gbm-20260825-205944 | Completed | 23s | — | yes |
| wearwatch-gbm-20260825-205556 | Failed | 20s | — | 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.