Permafrost iconPERMAFROST

The fridge that argues for its contents.

A $60 edge guardian for clinic vaccine fridges — reflexes in sub-milliseconds, reasoning in the Qwen cloud, proof in a hash chain.

Built for the Global AI Hackathon with Qwen Cloud · Track 5 — EdgeAgent
permafrost — replay
$ permafrost replay --curve seeds/door_ajar.csv
reflex: CRITICAL door_timer in <1 ms
verdict: door_ajar (0.93) — stock at risk in 22 min
chain: OK — 2177 entries, intact

02 · The hook

Cold-chain monitors get unplugged — because they cry wolf.

Every defrost cycle looks like an emergency to a threshold alarm. Staff silence it. Then the real emergency arrives.

03 · The problem

Monday morning, two-room clinic.

A nurse opens the fridge and finds Friday's power blip silently cooked $8,000 of childhood vaccines. The monitor that could have warned her was unplugged months ago — because it screamed at every defrost cycle.

$8,000of stock lost to one unwitnessed excursion
$1–3k / yrcommercial cold-chain monitoring — out of reach for small clinics
0 alarmsfrom an unplugged monitor — the false-alarm death spiral

04 · The solution

Reflexes local. Reasoning cloud. Proof cryptographic.

A Pi-class device reacts in <1 ms from local rules; qwen3.7-plus with thinking diagnoses each excursion with evidence and a guidance citation; every event extends a SHA-256 hash chain with Ed25519-signed daily roots.

permafrost — one loop, edge to cloud and back
Permafrost hero: edge reflex loop, Qwen cloud verdicts, tamper-evident hash chain

05 · How it works

One loop, closed with a signature.

EDGE Raspberry Pi · or replay on a laptop

DS18B20 ×2 + reed → 10s sampler
reflex rules vN → buzzer <100 ms
hash-chain log hᵢ = SHA256(hᵢ₋₁ ‖ entry)
offline queue ECIES-sealed
excursion events only
never raw streams

CLOUD FastAPI · LIVE on Alibaba FC

/diagnose → ExcursionVerdict
/distill → IF/THEN rules + signature
/report/weekly → VFC summary
structured output
function calling

QWEN CLOUD DashScope

qwen3.7-plus + thinking
text-embedding-v4 → citations
qwen3.6-flash → distillation
qwen3-tts-instruct-flash → voice

↩ the cloud distills its own verdicts into local rules vN+1, Ed25519-signs the bundle — the edge verifies before hot-swap, and refuses forgeries

06 · Live demo — the cable pull

The network dies. The fridge stays guarded.

permafrost replay · --offline-from 1700 --online-from 2100
[tick 1700] ~~ NETWORK CUT — OFFLINE, rules v1 protecting ~~ [tick 1813] REFLEX CRITICAL door_timer: Door open 2 min+ [tick 1820] REFLEX WATCH fast_rise: warming ≥ 0.5C/min [tick 2100] ~~ RECONNECTED — syncing queued events ~~ replay done: 2160 ticks | offline ticks 400 | queue pending 0 (synced 2) | rules v1 chain: OK — 2178 entries re-derived, intact; 1 signed daily root(s) verified
1
Cable cut mid-excursion

Tick 1700 — the cloud vanishes while the door is ajar.

2
Alarm fires anyway

Local reflex trips at tick 1813 in <1 ms — zero connectivity required.

3
Queue drains on reconnect

ECIES-sealed events sync; Qwen verdicts arrive late but complete.

4
Chain closes gap-free

verify-chain re-derives 2,178 hashes — the blackout left no hole.

07 · Key features

Every claim is a passing test.

0.007 ms

Reflex p95 latency

Local rules trip the buzzer four orders of magnitude inside the 100 ms budget — measured by permafrost bench, always before any cloud round-trip.

Twin discrimination

Near-identical +3.2 °C spikes: defrost reads BENIGN, door-ajar reads CRITICAL with a stock-risk ETA and citation.

Signed rule hot-swap

Ed25519 verification before activation; unsigned, forged, or downgraded bundles are refused and chain-logged (invariant I3).

Offline queue + resync

Events ECIES-sealed to the cloud's public key; the chain stays gap-free through a hard-kill power cut (invariant I1).

1-byte tamper detection

Flip any byte — entry, hash, seq, or signed root — and verify-chain fails, names the sequence, exits 1 (invariant I2).

08 · Why Qwen Cloud · why this build

One vendor, four surfaces, honest wiring.

Why only Qwen Cloud

  • qwen3.7-plus + thinking — multi-step reasoning over slopes, periodicity, humidity co-signals; a flash-tier matcher would re-create the false-positive problem
  • Structured outputExcursionVerdict JSON drives actuators; a free-text parse failure at 2 AM is a dead-vaccine failure
  • text-embedding-v4 — every CRITICAL verdict cites guidance (enforced in the schema, invariant I4)
  • qwen3.6-flash — distillation costs $0.00007 a run; the max tier would burn the $60-device economics

Why this build wins the seam

  • Offline-first, keyless judging — the entire graded path reproduces byte-for-byte on deterministic fixtures
  • Wiring proven without a key — a bogus key drives a real DashScope round-trip: authentic 401, real request_id
  • Cryptography, not clipboards — compliance is a verifiable chain, not a paper log
  • Remove Qwen and you need an LLM vendor + vector store + TTS vendor + rules engine — a bill rural clinics will never pay

09 · Traction — shipped, not promised

What's real today.

331tests passing · offline · keyless
100%line coverage (--cov=permafrost)
1.000bench accuracy, 4-class fixture set
2,177chain entries verified gap-free
cable-pull demo — alarm fires offline, queue drains, chain intact (verify_offline.py exits 0)
invariants I1–I4 as hard assertions: power-cut survival · 1-byte tamper · forged-bundle refusal · citations required
signed distillation loop — measured 100% cloud-spend cut on the defrost day, detection preserved on the door control
deployed live on Alibaba Function Compute (managed python3.10) — /health · /run · /verify serve the offline engine from the cloud
5-stage CI: ruff · mypy · pytest · CodeQL · replay smoke — plus honest Status section for what's not done

10 · The ask

Judge it in three minutes.

$ git clone https://github.com/edycutjong/permafrost
$ pip install -e ".[dev]"
$ permafrost replay --curve seeds/door_ajar.csv --db audit.db --fresh
$ permafrost verify-chain audit.db
github.com/edycutjong/permafrost
permafrost.edycu.dev · Edy Cu · solo build
☁️ live on Alibaba Function Compute
MIT · zero hardware · zero API keys · the loop is the product
Permafrost icon
permafrost.edycu.dev
Landing · demo script · benchmark report · this deck
Built with Qwen Cloud
01 / 10
←/→ navigate · ESC overview · P presenter · C contrast
SPEAKER NOTES