Process
How the take-home was built on 29 October (09:35 to about 19:00 PT): Rocco directing several Claude Code agents in parallel. Everything here comes from the shared work log, where each agent recorded what was asked, what it did, how it checked it, and what went wrong.
How the work was organised
The log. It lives outside the repo (~/dev/hilos-log/) so every worktree shares it, with one file per entry so parallel agents never race on a shared file.
Two builds. The TypeScript/React/three.js build on main is the deliverable. The main agent first recommended against a second build, because it doubles the code to defend. Rocco chose to explore one anyway, in its own worktree, and then widened it from a benchmark kernel to one Rust + wgpu codebase for web and native. The wasm branch keeps main's edit format, integer accumulator and op log, so the builds stay comparable and share saved data.
The agents. On Linux in the morning: a main agent and a wasm agent. At 14:50 the work moved to a Mac, after the agents checked the remote was private and nothing was left uncommitted. On the Mac:
- mac-hilos-guy cloned and re-ran the tests (18/18); Rocco then gave
mainto hilos-lead, which owned it from then on. - mac-wasm-guy carried the Rust build to a native iPad app, then TestFlight.
- mac-ipad-setup-guy prepared the iPad and the Apple accounts.
- deploy-guy built the Cloudflare deploy and the sync Worker in a
deployworktree, agreeing the API shapes with hilos-lead before writing code.
Rocco's part. Choices between options the agents set out (Rust + wgpu over C++, time-slicing the release, one Worker instead of Pages plus a second Worker, the short domain). Approvals for anything outward-facing: deploys, account changes, the TestFlight submission. And the hands-on steps: installing Xcode, pairing and trusting the iPad, and clicking Create on the API token in person, so the secret never appeared in an agent's screenshots.
Tests first, as the spec
Before any feature code, the main agent wrote the constraint tests against stubbed APIs. All 10 Vitest cases failed with "not implemented", as intended, and went to Rocco for review. They pin the sole (byte-identical, 3,161 seam vertices fixed, upper still sealed), exact undo, memory with 100 max-radius undo steps, reload, op size, the frame budget and picking after an edit, plus a Playwright test for context loss and reload. The wasm agent ported the same tests to Rust. The two agents agreed the op bytes and the rounding rule before either wrote an implementation. Later tests followed the same order: test 9 (no tears) failed on the old code before the fix.
Measure, then decide
The design started from measurements of the shoe. A 60 mm brush touches about 62k upper vertices. Naive undo would need about 170 MB for 100 steps, so edits became a bitmask, 16-bit weights and one integer vector, about 147 KB each. The memory budget at that point was marked as an estimate.
Several plans were dropped because of a number:
- CPU preview per frame measured 11.7 ms natively in Rust and 17 to 25 ms in TypeScript at the densest 80 mm spot. Both builds moved the drag preview to the vertex shader, so a pointer move costs no per-vertex CPU work.
- Release then cost about 80 ms. After Rocco approved time-slicing it, press measured 6 to 7 ms, release 5 to 7 ms and the worst settle slice about 8 ms. A test checks that settling in slices gives the same bits as settling at once.
- A 17.6 ms frame seen once was chased down to, most likely, JIT warm-up plus a
computeBoundingSphere()over all 185k vertices that nothing read. That call was removed. The same probe found that each commit re-uploads about 4.4 MB, because the changed range spans nearly the whole buffer. The comment claiming otherwise was corrected; the upload waits for an iPad measurement.
How work was checked
- Tests that can fail. deploy-guy broke the sync Worker on purpose (removed the echo skip, the gunzip limit or the dedup, introduced an off-by-one in paging, relaxed the undo length check) and each change failed a test. hilos-lead did the same for the sync client: stack-based replay fails one test, never acknowledging fails all three.
- Teeth for the pixel check. The context-loss e2e compares the canvas after restore with the canvas before the loss. With
restoreContext()removed, 18.1% of pixels differed, so the check catches a blank redraw. - Cross-build fixture.
mainrecorded two op logs with the SHA-256 of the upper's positions after every op; one interleaves two devices so the undo is not of the newest edit. The Rust build replays the same files and matches every hash. Every op changes the hash (16 transitions), so the test cannot pass vacuously. - End to end against the real server code. Playwright runs against
wrangler dev: offline edits reach a second browser context with the same hash. That e2e found two client bugs, and a later one found the HUD saying "up to date" before an op had been sent. - The live site. Rocco ran deploy-guy's smoke script against the deployed URL: 12/12, which settled two questions the earlier checks had left open (gzip on the wire, headers served on workers.dev).
- Devices. On Rocco's iPad the native app replayed 18 edits after a restart.
Steering and mistakes caught
- The mesh tore. The design doc's facing filter tore the laces when you dragged across them. The wasm agent caught it on Linux by looking at the screen. The "sealed" test only checked coincident vertices, not stretched neighbours. Both builds replaced the filter with a position-only weight, guarded by the new no-tears test.
- A memory test that passed for the wrong reason. It used random grabs and passed at 87.6 MB. The true worst case, the densest spot every step, was 96.8 MB, over the 96 MB budget. The test was made worst-case, and BVH leaf sizes were measured to pick 24, bringing it to 92.0 MB.
- E2e drags missed the shoe. The app signalled ready while the canvas was still 300x150, so the first drag orbited the camera instead of editing. The tests now wait for layout and require each drag to add exactly one op.
- A pixel bar too loose. hilos-lead noticed that one edit changes only about 1.3% of pixels, so its 1% tolerance could pass a restore that drew the pre-edit shape. It tightened the bar to 0.2% and added a check that an edit changes more than 0.6%.
- Docs ahead of the code.
DECISIONS.mdsaid server sync was built before it was; corrected. - A wrong expectation between agents. hilos-lead and mac-wasm-guy both expected the Rust replay to diverge on the interleaved fixture, assuming its undo was stack-based. mac-wasm-guy read the code, found it already matched by edit id, and corrected the claim before the test ran; the test then matched every hash.
- A misdiagnosis. The Apple team's refusal to register the iPad was read first as a pending enrollment, then as an unaccepted agreement. In fact plain
-allowProvisioningUpdatesnever registers devices. - Relayed approvals refused. deploy-guy would not deploy on a go-ahead relayed through hilos-lead and asked Rocco directly. Permission denials (a rustup install, a device registration, a domain click) were stopped and handed to Rocco, not routed around.
- Rocco overriding agents. Rocco kept the shoe bundled in the TestFlight build against
AGENTS.md(flagged twice; Rocco's call), and told hilos-lead to drop its privacy caveats about a public URL shortener.
One loosening, stated plainly: the frame-budget test was first isolated in its own run with the assertion kept strict, then given one retry after failing once at a load average of 21.8 (other agents' builds, a simulator).
Cut, and not yet verified
- Ops from another device apply on the next load, not live. Live application needs bounded memory for remote edits.
- A server that lost a shoe's log is not detected by a device that had already synced.
- The 4.4 MB per-commit upload, and the TS build's frame times on the iPad, are not measured yet.
- Rust build: grab and IndexedDB reload in the browser, the iPad Safari check, WebGL2 context loss, the two- and three-finger taps by hand, and frame numbers under a Pencil drag on the device are all unverified. The cross-build test runs natively, not yet as wasm.
- The TestFlight build was waiting for Beta App Review at the last entry.
- Design cuts: no symmetry (shoes aren't mirror-symmetric), no push along the normal (about 3x the undo memory).