Skip to content

Complete streamcount types, package checks and version 2 migration - #4

Merged
jhurliman merged 2 commits into
release/streamcount-validationfrom
release/streamcount-types
Sep 10, 2026
Merged

Complete streamcount types, package checks and version 2 migration#4
jhurliman merged 2 commits into
release/streamcount-validationfrom
release/streamcount-types

Conversation

@jhurliman

@jhurliman jhurliman commented Sep 10, 2026

Copy link
Copy Markdown
Owner

Stacked on #3 (release/streamcount-validation), which is stacked on #2. Completes the remaining public declarations and distributed-package validation, and prepares version 2.0.0.

Declarations cover every root export and the existing CountMinSketch, HyperLogLog, MinHeap and PRNG deep imports. Tests install the tarball independently, exercise CommonJS/ESM, and compile positive/negative NodeNext and Node16 TypeScript consumers. The package includes its format/migration documentation. Tests run before publishing; no automatic publishing is configured.

Validation: 37 tests pass locally, including the signed-minimum hash regression and all parent serialization/estimator tests. CI installs the development dependencies on Node 22/24/26 and adds a separate Node 6 runtime-floor smoke test. Removes the obsolete Travis matrix identified by the review of #2. npm publication and merging are not performed by this PR.

Stacked follow-up: #6 adds validated weighted increments, superseding #1. Merge this PR before #6.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 10, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-10T07:57:01.858266Z f231dc3 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@jhurliman
jhurliman added this pull request to stack #5 September 10, 2026 16:25
@jhurliman
jhurliman merged commit d325f10 into master Sep 10, 2026
8 checks passed
@jhurliman
jhurliman deleted the release/streamcount-types branch September 10, 2026 18:40
jhurliman added a commit that referenced this pull request Sep 10, 2026
…#2)

Fix CountMinSketch handling of keys inherited from Object.prototype,
isolate returned top-k tuples from internal state, and correct
serialized-size estimates to account for power-of-two bucket widths.
Repair only the affected heap path on increments instead of sorting the
whole heap.

Replace the broken Vows runner with Node's built-in runner while
retaining the existing ordered scenarios, add five regressions, exclude
development files from npm archives, use Buffer.alloc, and add Node
22/24/26 CI. The runtime floor becomes Node 6; this requires a major
version when released. No version is bumped in this PR.

Validation: 24 tests pass on Node 24, including existing million-item
cardinality/merge checks, reserved-key roundtrips, tuple isolation, size
estimates and 100,000 tracked-key updates. Packed CommonJS and ESM
consumers pass. A seven-run local benchmark of 100,000 repeat updates
across 1,000 keys improved from 1,141 ms median to 29 ms on macOS
arm64/Node 24; this is specific to that workload. The original three
regressions failed before the fixes.

Stacked release follow-ups: #3 completes input/serialization validation
and preserves capacity in CMS2; #4 adds public/deep-import declarations,
installed-package checks and the 2.0.0 migration. This parent PR retains
the legacy binary layout; the next layer introduces the versioned
format.
jhurliman added a commit that referenced this pull request Sep 10, 2026
Stacked on #4. Supersedes #1's weighted-increment proposal, originally
contributed by Ruslan Dzhumakaliev, with `increment(key, incrementBy =
1)` and public TypeScript declarations.

Accept nonnegative uint32 integer weights; zero is a no-op, and invalid
weights or counter overflow reject before mutation. Raise all selected
buckets below the new minimum rather than only the old minimum buckets.
For example, buckets 5 and 7 become 15 and 15 after +10, matching ten
unit conservative updates; the original proposal produced 15 and 7 while
reporting 15.

Add collision-heavy comparisons against repeated unit updates, top-k
checks, uint32 boundary/atomicity checks, legacy/CMS2 roundtrips,
installed TypeScript consumer coverage and a Node 6 weighted-update
smoke check. Document that weighted observations do not implement full
distributed sketch merging or recover keys omitted from workers' top-k
lists.

Validation: all 44 tests pass locally. CI covers Node 22/24/26 and the
Node 6 runtime floor. No merge or publication is performed; #1 can be
closed as superseded once this replacement is accepted.
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