pingqiuandClaude Opus 5.5 0b8ea2f2e6 volume: return the cut's statistics in POST /chunk/cut
The chunk layer fills chunkCutStats for every cut, but the /chunk/cut body
dropped them (the W2 placeholder said "added when W3 fills them"). The body
now carries a "stats" object that mirrors storage.ChunkCutStats field for
field: barrier pause, sync, copy, candidate/uploaded/zeroed/unchanged chunks,
uploaded bytes, upload and CAS time and result, total time, and the staging
counters. A reflection test keeps the body in step with the layer's struct,
so a new layer statistic cannot be dropped silently.

This lets a caller (the CLI, a test harness) see what one cut cost without
reading logs: the barrier pause against the chunks it copied, and the bytes
each cut uploaded to the store.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 17:42:30 -08:00
Languages
Go 84.5%
Rust 7.9%
Shell 2.7%
templ 1.6%
Java 1%
Other 2%