Overlap source reads, hashing, ordered linear writes, and asynchronous cleanup with bounded buffers. Preserve conflicting output order, API behavior, and no-space diagnostics. Add an LTFS drive-buffer model and reproducible performance checks.
Both were invisible on Darwin: one needs a real Linux ENOSPC, the other needs
the command's own stderr.
- A non-linear target pre-allocates with fallocate, and a failure there was
reported as a bare error: it never ran through mappingError, never aborted
the device and never ended a linear target, unlike every neighbouring path.
A volume that fills up after the disk-usage snapshot therefore reported a
target that was "not written" instead of ErrTargetNoSpace. Classify it like
the rest. TestFullVolumePreallocationReportsNoSpace pins it with a real
ENOSPC on a small tmpfs (it fails on the previous revision), and
TestNonLinearTargetOnRefusingDeviceReportsATargetFailure records that a
device refusing fallocate reports its own refusal rather than claiming no
space. The drain test now uses a linear target, which is the shape that
actually queues buffers before the write fails.
- cmd/acp registered the progress bar and then the report collector, and a run
keeps one event handler, so the bar received nothing: the command printed its
construction frame and no update. Compose the two handlers in the command and
pin it end to end (the new test fails on the previous revision). README now
says a command that wants both composes them.
- item.go still promised that an empty Targets slice hashes the source; the
default HashOff reads nothing. TESTING.md and TODO.md now describe the Linux
suite that actually exists.
Reshape the public API around one push engine and restore the af05f05c
surface as a compatibility shell over it.
- NewStream takes caller-owned items (Source/Targets), reports every accepted
item through one results callback, and Wait returns the run's terminal error.
Run, BatchSource and the item callbacks are gone.
- The engine owns the result path: WithResultBuffer is the depth of the result
queue, WithResultBatch is how many results one delivery carries, and
WithResultFlushInterval is how long a successful result may wait. A result
that carries any error is delivered immediately as its own batch.
- Restore the af05f05c API byte-compatibly in the same package: New, Copyer,
Wait/WaitErr, AccurateJob, WildcardJob, the report events and the JSON report
round-trip through encoding/json alone.
- One descriptor serves a whole item; the stored hash is read through the
descriptor that reads the content and the computed hash is published through
it before it closes.
- Make every handoff escapable by a hard stop: the read buffer, a chunk send,
an event send and the result buffer.
- Fix the recorded sweep findings: report indent and round-trip, cmd/acp exit
status, acp-rewrite final paths, mmap EOF/close/slice, disk-usage
reservations, ErrTargetIO identity, the fatal-panic safety net, option
validation, and the FreeBSD/Windows build paths.
- Cover the contract with semantic tests, add Makefile check/race/vet/cross
targets, and document the withdrawn v0.1.0/v0.2.0 migration in README.
Replaces the streaming request/result API with caller-owned items and
consolidates the content options, following the Job execution performance
design.
- `Item`, `BatchSource` and `Run` replace `StreamRequest`, `StreamResult`,
`StreamSource`, `StreamSink` and `RunStream`. Every accepted item receives
exactly one terminal callback from a single goroutine and without doing
I/O; an item ACP cannot process reports `Failed`, and a completion carries
one outcome per requested target in request order with its error identity
preserved. A graceful stop stops feeding, finishes the items in flight and
reports the rest, and a hard stop abandons per-item accounting.
- One `HashPolicy` replaces `WithHash`, `WithSignatureCache` and
`ForceRehash`. A stored hash is read whenever the policy uses the cache,
reused only where the policy allows it, and refreshed only when it differs.
- A source-only `WithReadMode` selects buffered (the default) or mapped
reads, and buffered sources open with `O_NOATIME` where the platform has
it. `LinearDevice` keeps request ordering, append targets and abort-on-error
but no longer selects the read mode.
- `Overwrite` becomes a target-device option, `WithReadBuffer` sets the read
buffer, and `SelectFiles` returns the entries the command line copies,
replacing `AccurateJob`, `WildcardJob` and the walk options.
- Copy consumers share one reference-counted chunk buffer each from a common
pool, and the per-item write goroutines finish before the result channel
closes, so no finished item can be dropped.
The command line tools, the documentation and the test suite move with the
API, including semantic tests for the callback contract, the stop and drain
paths, the hash policy matrix and the read modes.