|
1 | 1 | # SPDX-License-Identifier: PMPL-1.0-or-later |
2 | | -# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk> |
| 2 | +# Copyright (c) 2026 Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk> |
3 | 3 | # |
4 | | -# PLAYBOOK.a2ml — Operational playbook |
| 4 | +# PLAYBOOK.a2ml — Operational runbook |
5 | 5 | # Runbooks, incident response, deployment procedures. |
6 | 6 |
|
7 | 7 | [metadata] |
8 | 8 | version = "0.1.0" |
9 | | -last-updated = "2026-03-16" |
| 9 | +last-updated = "2026-04-12" |
10 | 10 |
|
11 | | -[deployment] |
12 | | -# method = "gitops" |
13 | | -# target = "container" |
| 11 | +# ------------------------------------------------------------------ |
| 12 | +# FIRMWARE BUILD + FLASH |
| 13 | +# ------------------------------------------------------------------ |
| 14 | + |
| 15 | +[firmware.host-tests] |
| 16 | +command = "cd firmware-zig && zig build test" |
| 17 | +expected = "10/10 tests pass (buffer, sensors, mqtt, ota, wifi)" |
| 18 | +note = "all_tests.zig is the host-side root; main.zig excluded (freestanding externs)" |
| 19 | + |
| 20 | +[firmware.esp32-flash] |
| 21 | +status = "pending — requires physical ESP32 board + ESP-IDF toolchain" |
| 22 | +steps = [ |
| 23 | + "Install ESP-IDF (idf.py or Zig cross-compile toolchain)", |
| 24 | + "Set target: zig build -Dtarget=xtensa-freestanding-none", |
| 25 | + "Flash: esptool.py write_flash 0x10000 zig-out/bin/kaldor-bbw-firmware.bin", |
| 26 | + "Monitor: idf.py monitor", |
| 27 | +] |
| 28 | + |
| 29 | +# ------------------------------------------------------------------ |
| 30 | +# BACKEND DEVELOPMENT |
| 31 | +# ------------------------------------------------------------------ |
| 32 | + |
| 33 | +[backend-deno.dev] |
| 34 | +command = "cd backend-deno && deno task dev" |
| 35 | +note = "Canonical backend. Oak framework, ReScript compiled to JS." |
| 36 | + |
| 37 | +[backend-deno.test] |
| 38 | +command = "cd backend-deno && deno task test" |
| 39 | + |
| 40 | +[backend-api-legacy.note] |
| 41 | +status = "deprecated — do not develop further" |
| 42 | +decommission = "pending Jonathan's backend strategy decision" |
| 43 | + |
| 44 | +# ------------------------------------------------------------------ |
| 45 | +# FRONTEND |
| 46 | +# ------------------------------------------------------------------ |
| 47 | + |
| 48 | +[frontend.dev] |
| 49 | +command = "cd frontend && npm run dev" |
| 50 | +note = "ReScript → JS compiled by rescript, served by Vite" |
| 51 | + |
| 52 | +[frontend.build] |
| 53 | +command = "cd frontend && npm run build" |
| 54 | + |
| 55 | +# ------------------------------------------------------------------ |
| 56 | +# FULL STACK (docker-compose) |
| 57 | +# ------------------------------------------------------------------ |
| 58 | + |
| 59 | +[full-stack] |
| 60 | +command = "docker-compose up" |
| 61 | +note = "Brings up Mosquitto, TimescaleDB, backend-deno, frontend. Legacy Node backend excluded." |
| 62 | + |
| 63 | +# ------------------------------------------------------------------ |
| 64 | +# INCIDENT RESPONSE |
| 65 | +# ------------------------------------------------------------------ |
14 | 66 |
|
15 | 67 | [incident-response] |
16 | | -# 1. Check .machine_readable/STATE.a2ml for current status |
17 | | -# 2. Review recent commits and CI results |
18 | | -# 3. Run just validate to check compliance |
19 | | - |
20 | | -[release-process] |
21 | | -# 1. Update version in STATE.a2ml, META.a2ml |
22 | | -# 2. Run just quality (format, lint, test) |
23 | | -# 3. Tag and push |
| 68 | +steps = [ |
| 69 | + "Check .machine_readable/6a2/STATE.a2ml for current subsystem status", |
| 70 | + "Review recent commits: git log --oneline -10", |
| 71 | + "Run firmware tests: cd firmware-zig && zig build test", |
| 72 | + "Run pre-commit checks: panic-attack assail .", |
| 73 | + "Check CI status on GitHub Actions", |
| 74 | +] |
| 75 | + |
| 76 | +# ------------------------------------------------------------------ |
| 77 | +# RELEASE PROCESS |
| 78 | +# ------------------------------------------------------------------ |
| 79 | + |
| 80 | +[release] |
| 81 | +steps = [ |
| 82 | + "Update version in STATE.a2ml and META.a2ml", |
| 83 | + "Update CHANGELOG.md (add dated release section)", |
| 84 | + "Run: just quality (format + lint + test)", |
| 85 | + "Tag: git tag -s v<version> -m 'Release v<version>'", |
| 86 | + "Push tag: git push origin v<version>", |
| 87 | +] |
0 commit comments