carlos / todomvc-bakeoff Public

Clone
git clone https://amadan.net/carlos/todomvc-bakeoff

Plain git — no account needed to clone.

Download

Download this file

1LIVE https://todo-haskell.bfj.oncarlos.com 7d40789
2
3# todo-haskell: status
4
5Deployed build `7d40789` to `todo-haskell.bfj.oncarlos.com` (channel
6`edge`). `/api/version` reports `7d40789`. The first deploy was
7`7881a7e`; `7d40789` fixes the review findings below.
8
9## Checks
10
11| Check | Result |
12|---|---|
13| `make test` (hspec, 18 examples) | pass |
14| Shared suite, local x86 build | 67 passed, 3 skipped (the suite's own JS-off skips) |
15| `scripts/boot-check.sh dist/app-linux-arm64` | `/healthz` 200, `/api/version` 200, clean exit on SIGTERM |
16| Shared suite against https://todo-haskell.bfj.oncarlos.com | 67 passed, 3 skipped |
17
18## Notes
19
20- Stack: warp + wai, lucid2, sqlite-simple, cookie, file-embed. Reasons
21 are in `README.md`.
22- The arm64 binary is built inside the arm64 root with Debian's GHC
23 9.6.6, statically linked against glibc, stripped: 28 MB. The x86 build
24 uses ghcup's GHC 9.10.3. `cabal.project` pins the Hackage index so both
25 resolve the same library versions.
26- A cold arm64 dependency build (about fifty libraries, `-j8`, emulated)
27 took roughly 40 minutes on a busy docs-t1. After that, rebuilding the
28 app takes about 90 seconds.
29- docs-t1 has `libgmp.so.10` but no `libgmp.so`, which ghcup's x86 GHC
30 needs to link. The Makefile makes a link to it in `.cache/x86-lib` and
31 points `LIBRARY_PATH` there. No system change.
32- Warp's `x509` flag is off (it would pull in a crypto library for TLS
33 client certificates, which the edge already handles).
34- Static glibc warns about `getaddrinfo`, `dlopen` and `getpw*`. The app
35 calls none of them at runtime.
36
37## Review findings fixed (7d40789)
38
391. **An edit in progress was lost when a response arrived.** `app.js`
40 replaced the whole list with each action's answer, which dropped any
41 editor opened while that request was pending. It now records the open
42 edit (item, typed value, selection, focus) before swapping in the new
43 list and puts it back on the same item afterwards. It also ignores the
44 `focusout` caused by the swap, so the old input isn't saved by
45 mistake. Checked in Chromium with a toggle response delayed 1.5 s:
46 double-clicking another item and typing during the delay leaves the
47 editor open, focused and holding the typed text, and Enter saves it.
482. **`--listen` accepted any `127.x.x.x` address.** It now accepts exactly
49 `127.0.0.1:<port>`. `127.0.0.2:8080` and `0.0.0.0:8080` are refused
50 with a usage error.
51
52After the fixes: `make test` passes, the shared suite passes locally and
53against https://todo-haskell.bfj.oncarlos.com (67 passed, 3 skipped),
54and `boot-check.sh` passes.
55
56## Review findings not fixed
57
58None.
59