Repository navigation
refactor(csheap)!: ASAPv1 only — drop the portable format, add a golden - #169
Closed
GordonYuanyc wants to merge 2 commits into
Closed
GordonYuanyc wants to merge 2 commits into
GordonYuanyc wants to merge 2 commits into
Conversation
CSHeap serializes through ASAPv1 only. Removes CountSketchWithHeap, CsHeapItem and the rest of message_pack_format::portable::countsketch_topk, with the e2e test and docs rows that covered them, and adds the CSHeap golden fixture csheap_i64_regular_2x4_strkeys (kind_id 0x0a 0x00). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of the ASAPv1-only series: one PR per sketch group, each off
main. This one removes the portable Count-Sketch-with-heap format; ASAPv1 (0x0a 0x00) is the only CSHeap format left, and it gets its first golden.Removed
message_pack_format::portable::countsketch_topk:CountSketchWithHeap,CsHeapItem,WireHeapItem,SketchlibCSHeap, thesketchlib_cs_heap_*/new_sketchlib_cs_heap/matrix_from_sketchlib_cs_heap/heap_to_wirehelpers,CountSketchInnerWire,CountSketchWithHeapWire; crate-root re-exportsCountSketchWithHeap,CsHeapItem.native/countsketch_topk.rsis CountL2HH's and goes with that PR).Added
csheap_i64_regular_2x4_strkeys(pushed to sketchlib-golden-bytes; submodule bumped): the Count Sketch golden's signed 2x4 matrix plus a k=5 string-keyed heap{alpha: 2^32, beta: 127, delta: 127, gamma: -33}, set directly, never hashed. It pins uint64 and negative heap counts and the tie-by-key order. The test checks both directions and that a plainCountdecoder refuses it.Downstream note
CountMinSketchWithHeap::from_msgpack(the two portable wire shapes were identical). Until the backend moves to ASAPv1, that frame is read with Count-Min semantics (min over signed rows) rather than refused.Verification (rustc 1.99)
cargo fmt --check; clippy-D warningsfor all four CI feature sets;RUSTDOCFLAGS="-D warnings" cargo doc; gen-proto drift clean; filtered tests (asapv1_golden,--lib -- countsketch_topk,e2e -- composition wire topk,pbt -- topk_wrappers). The reviewer hand-decoded the new golden byte by byte against spec §3.10. Implemented and reviewed by separate agents; review findings are addressed in the second commit.🤖 Generated with Claude Code