3 Commits
Author SHA1 Message Date
Samuel Cui 4d5dbd0b8c Release ACP v0.2.3
Simplify indexed copy facts and unify staged output completion.
Fix cleanup, rewrite persistence, native paths, and terminal reporting.
Maintain compatibility, upstream notices, and automated release checks.
2026-10-05 16:29:55 +08:00
Samuel Cui 3ec7e8efb0 fix: close the release-review findings
A release review of the v0.2.1 branch found one data race and a set of
documentation claims the code does not support.

- Make the feed counters atomic: Submit writes them while the pipeline reads
  them for its terminal event, and a caller may Close from another goroutine.
  The new test reproduces the race on the previous revision under -race.
- Correct the withdrawn-version mapping: WithSignatureCache(true) becomes
  HashCachedOrReadRefresh (HashReadRefresh never reuses a stored hash, so the
  old mapping silently lost every cache hit), and add the SourceWithPath and
  Job.Path string-to-segments rows.
- Correct the targetless-hash promise: an empty Targets slice writes nothing,
  and it only hashes when the policy produces a hash, so the default HashOff
  records none.
- Make the report chapter honest about row keying, the restored shell carrying
  today's additive options, the second deliberate difference from af05f05c
  (the managed signature cache), the rewrite tool's tab indent, the
  duplicate-path rule, and the mmap divergence from upstream.
- Fix TESTING.md: the drain test is portable, and only the FreeBSD build
  compiles mmap_other.go.
- Fix AGENTS.md: only value options are last-wins, a reuse-only hash policy is
  an item error rather than an option error, and the event fan-out is the one
  handoff without a hardStop escape.
- Pin the behaviours the review found uncovered: the interval flush, the
  result handoff's hardStop escape, and an Item.Targets panic.
- Harden the read-buffer pool instrumentation: two collections drop the buffers
  cached in another processor's private slot, which a drain loop cannot reach,
  so the refcount assertions stop being vacuous and stop flaking.
2026-09-19 16:21:07 +08:00
Samuel Cui ac02c71d3f feat!: stream caller-owned items and own the result queue
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.
2026-09-19 15:18:13 +08:00