| 1 | LIVE https://todo-rust.bfj.oncarlos.com f78a916 |
| 2 | |
| 3 | ## What's there |
| 4 | |
| 5 | - Rust: axum 0.8 on tokio, maud templates, rusqlite with bundled SQLite, |
| 6 | mimalloc. A static linux-arm64 musl binary of about 3 MB, built with |
| 7 | `cargo zigbuild`. |
| 8 | - `make test`: 10 in-process HTTP tests, all passing. |
| 9 | - Shared suite on a local run: 67 passed, 3 skipped (the skips are the |
| 10 | JS-only tests in the JS-off run). Against |
| 11 | [https://todo-rust.bfj.oncarlos.com](https://todo-rust.bfj.oncarlos.com), |
| 12 | 67 passed, 3 skipped after the review-fix deploy (`f78a916`). |
| 13 | - `scripts/boot-check.sh dist/app-linux-arm64`: healthz 200, version 200, |
| 14 | clean exit on SIGTERM. |
| 15 | |
| 16 | ## Worth knowing |
| 17 | |
| 18 | On the first live run, one test failed: a cross-origin POST got 502 |
| 19 | from the edge instead of 403. It reproduced reliably: 19 of 60 |
| 20 | cross-origin POSTs and 13 of 40 POSTs to an unknown path came back 502. |
| 21 | Both responses were sent before the app had read the request body, and |
| 22 | that drops the connection to the edge. The app now reads the whole body |
| 23 | (up to 1 MiB) before it answers anything. Afterwards, 120 of 120 of |
| 24 | those requests answered correctly (403 and 404). Any other app that |
| 25 | rejects a request without reading its body may hit the same thing on |
| 26 | Carloku. |
| 27 | |
| 28 | ## Review fixes (`f78a916`) |
| 29 | |
| 30 | 1. **An edit was lost when another action's response arrived.** |
| 31 | `static/app.js` used to replace the whole list on every response. If |
| 32 | an item is being edited and its edit hasn't been sent yet, the list is |
| 33 | now patched around that item instead. Its draft, focus and edit state |
| 34 | stay, and only its view (label, checkbox) is refreshed. Checked with a |
| 35 | Playwright script that delayed POST responses by 1.5 s: toggle one |
| 36 | item, start editing another and type a draft. When the toggle response |
| 37 | arrived, the toggle was applied and the draft, focus and edit state |
| 38 | were all still there. Pressing Enter then saved the draft. |
| 39 | 2. **`clean-deps` left Zig's compiled libraries in its shared cache.** |
| 40 | The Makefile now points `ZIG_GLOBAL_CACHE_DIR` and |
| 41 | `ZIG_LOCAL_CACHE_DIR` at `apps/rust/.cache/zig`, and `clean-deps` |
| 42 | removes that directory. A cold `make build-arm64` after `clean-deps` |
| 43 | took 1 min 29 s and refilled `.cache/zig` (79 MB). |
| 44 | |
| 45 | ## Review findings not fixed |
| 46 | |
| 47 | None. |
| 48 | |