From a8d1fcce3ffef5f1e7bb41f8751b218fe7a60d78 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 12 Jul 2026 00:11:45 +0000 Subject: [PATCH] ruling: phase0-comrak-002 (mimalloc) ACCEPTED, scoped to the comrak CLI workload Human ruling on the needs-human-review allocator swap (+4.6%, CI [+3.3%,+5.8%]): accepted as a real win for the measured comrak CLI single-stream markdown-render workload, explicitly not a blanket mimalloc mandate. Ledger row stays needs-human-review (append-only); the ruling is documented in results/rulings/phase0-comrak-002.md and reflected in the case study. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01EcKPWQ3MQD4NdEHwar96u2 --- .../phase3/02-build-flags-and-allocators.md | 8 ++++ results/rulings/phase0-comrak-002.md | 44 +++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 results/rulings/phase0-comrak-002.md diff --git a/results/phase3/02-build-flags-and-allocators.md b/results/phase3/02-build-flags-and-allocators.md index faccf1c..07240c0 100644 --- a/results/phase3/02-build-flags-and-allocators.md +++ b/results/phase3/02-build-flags-and-allocators.md @@ -39,6 +39,14 @@ every workload, fragmentation pattern, and concurrency scenario the target will meet in production. The pipeline measured a real win and then **refused to auto-ship it**, tagging it for a human ruling instead. +**Human ruling (`results/rulings/phase0-comrak-002.md`): ACCEPTED, +scoped to the comrak CLI single-stream markdown-render workload** — a +real win for the measured use, deliberately *not* a blanket "always use +mimalloc" mandate. The tier forced the judgment; the judgment is bounded +and written down. The ledger row stays `needs-human-review` (append-only +records what the pipeline decided); the ruling is the human layer on +top. + ## What the pair demonstrates The cheap classes are not lesser — class 1 produced this project's diff --git a/results/rulings/phase0-comrak-002.md b/results/rulings/phase0-comrak-002.md new file mode 100644 index 0000000..d6d8842 --- /dev/null +++ b/results/rulings/phase0-comrak-002.md @@ -0,0 +1,44 @@ +# Human ruling — `phase0-comrak-002` (mimalloc allocator swap) + +**Ruling: ACCEPTED, scoped to the measured workload.** +**Ruled by:** project owner (repo maintainer), recorded 2026-07-12. +**Ledger row:** `phase0-comrak-002` remains `needs-human-review` (the +append-only ledger records what the *pipeline* decided; this document is +the human decision layered on top). + +## What was measured + +Swapping comrak's global allocator to +[mimalloc](https://github.com/microsoft/mimalloc): + +- **Speedup: 1.046 median, 95% CI [1.033, 1.058]** (+4.6%) on the comrak + CLI rendering the pinned Pro Git corpus (11.0 MB markdown, single + stream), interleaved A/B vs a pristine-rebuilt baseline. +- Byte-identical golden replay. The pipeline routed it to + `needs-human-review` per SPEC §8 because a global allocator swap is a + behavioral change no single benchmark can fully clear. + +## The ruling and its scope + +**Accepted** as a real, CI-significant win **for the comrak CLI's +single-stream markdown-render workload** — the workload measured, on the +calibrated hardware in `results/calibration/`. + +This is explicitly **not** a blanket "always link mimalloc" mandate: + +- The upside (+4.6%) is genuine but modest; it does not justify making + mimalloc a default across unrelated targets or workloads without their + own measurement. +- The comrak CLI on this workload is single-threaded, which is what makes + the ruling low-risk here — the concurrency/fragmentation concerns SPEC + §8 flags are minimal for a short-lived, single-stream CLI process. A + long-running or heavily-multithreaded comrak *library* embedding would + need its own review before inheriting this. + +## Why this is the honest resolution + +The `needs-human-review` tier exists precisely to force this judgment +instead of letting a green benchmark auto-ship a global behavioral +change. The judgment: yes for the measured CLI workload, with the scope +written down so the number can't be over-generalized later. The tier did +its job; the win is real; the ruling is bounded.