Skip to content

DDIR: count keeps its sign, as DD's count - #933

Merged
frankmcsherry merged 1 commit into
master-nextfrom
ddir-count-signed
Oct 14, 2026
Merged

frankmcsherry merged 1 commit into
master-nextfrom
ddir-count-signed

Conversation

@frankmcsherry

Copy link
Copy Markdown
Member

DDIR's `count` dropped any count that was not positive, on both backends.
DD's `count` emits the accumulated diff whatever its sign, and a negative count is how a program finds a negative accumulation.

A key's count is now the sum of its diffs whenever that is not zero.
A key whose values cancel still has no count, as in DD, where the reducer never sees a zero accumulation.

`tests/count.rs` checks positive, negative, mixed-sign, and cancelling keys on both backends at 1 and 3 workers.
Restoring the `> 0` test in the corgi backend makes it fail.

`cargo test -p interactive -p ddir-server` passes.
It merges cleanly with #932.

🤖 Generated with Claude Code

A key's count is the sum of its diffs whenever that is not zero.
Before, both backends dropped a count that was not positive, so a negative accumulation was invisible.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@frankmcsherry
frankmcsherry merged commit 3b0a9bf into master-next Oct 14, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant