From 94181d58cf66c5b7b263fd435a344f1cd8872cff Mon Sep 17 00:00:00 2001 From: cirakg Date: Sun, 18 Oct 2026 23:44:18 +0200 Subject: docs: record M2 results and bump version to 0.2.0 CHANGELOG 0.2.0; PERFORMANCE (simulator benchmarks and what they mean for the watch); TESTING (vector sources, M2 results, watchdog caveat); FEASIBILITY (verified: no native HMAC-SHA1, AES-256 works, Long semantics); README status and targets; developer-guide Monkey C facts. Co-Authored-By: Claude Opus 5.5 --- docs/DEVELOPER_GUIDE.md | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'docs/DEVELOPER_GUIDE.md') diff --git a/docs/DEVELOPER_GUIDE.md b/docs/DEVELOPER_GUIDE.md index e6f53a9..eacea84 100644 --- a/docs/DEVELOPER_GUIDE.md +++ b/docs/DEVELOPER_GUIDE.md @@ -25,6 +25,8 @@ Everything runs in Docker through the `Makefile`; the host needs only Docker and | Accept changed screens after reviewing build/screenshots/ | `make screenshots-approve` | | Start-up time and memory budgets | `make perf`, `make memtest` | | Signed package for the Store beta | `make package` | +| Regenerate the crypto/OTP test vectors | `make vectors` | +| Build the M1 settings spike | `make spike` (instructions: [SETTINGS_SPIKE.md](SETTINGS_SPIKE.md)) | | Everything, in order | `make ci` | | A shell in the container | `make shell` | @@ -66,6 +68,14 @@ The simulator is a GTK program. The scripts start it on a virtual display (Xvfb - `monkeydo` exits with 1 even when every unit test passed, so `tools/ciq_test_report.py` judges the console output instead. - For a normal (non-test) run, `monkeydo` blocks while the app runs and streams the app's `System.println` output. Quotes in that output arrive escaped, which is why the diagnostics use plain `key=value` pairs. +### Monkey C facts that matter here (verified with SDK 9.2.0) + +- `Long` is 64-bit and wraps on overflow; `>>` is an arithmetic shift, so logical shifts and rotations mask off the copied sign bits (see `source/crypto/Sha512.mc`). +- Assigning a value above 255 to a ByteArray element throws; mask with `& 0xFF`. +- Native HMAC supports only SHA-256; HMAC-SHA1 and HMAC-SHA512 go through `Hmac.generic`. +- Function calls are expensive in the VM; hot loops inline small helpers (SHA-512 went 37 % faster that way). +- The simulator doesn't enforce the watchdog in test runs. Anything long runs as a `Jobs.Job` with a bounded step. + ### Screenshots `tools/sim_screenshot.py` doesn't assume where the watch is drawn in the simulator window. It searches for the device drawing (named in the device's `simulator.json`) in the window capture, comparing only the bezel, because the app draws inside the display area. The match is near-exact (mean difference below 0.3 out of 255); the drawing sits at offset (1, 26) because of the window border and the menu bar. The display rectangle from `simulator.json` is then cut out, round screens get their corners blacked out, and the result is compared with `test/golden/.png`. -- cgit v1.2.3